/* =========================================================================
   Top header strip + header spacing (2026-11)

   Loaded on every storefront page from layouts/master.blade.php, after
   storefront-blocks.css. Like that file, this one must be uploaded to BOTH
   themes/DefaultTheme/src/resources/assets/css/ and
   public/themes/defaultTheme/css/ (the browser reads the public one).

   1. Top header strip       partials/top-header.blade.php      .ks-top-header
   2. Header spacing         layouts/master.blade.php           header.main-header
   ========================================================================= */


/* -------------------------------------------------------------------------
   1. Top header strip

   Three cells: right / center (text links from قالب > هدر بالایی) and left
   (social icons). A grid with 1fr | auto | 1fr keeps the center slot truly
   centred whatever the side cells hold. Grid columns follow the document
   direction, so on the RTL site the first cell is the right-hand one.
   ------------------------------------------------------------------------- */

.ks-top-header {
    border-bottom: 1px solid #f0f0f0;
}

.ks-top-header-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    min-height: 34px;
    padding: 3px 0;
}

.ks-top-header-slot--center {
    text-align: center;
}

/* Same size as the main menu items (kalasoon.css: 15px). */
.ks-top-header-link {
    display: inline-block;
    font-size: 15px;
    line-height: 1.6;
    color: #212121;
    transition: color 0.2s ease-in-out;
}

a.ks-top-header-link:hover,
a.ks-top-header-link:focus {
    color: #0189a3;
    text-decoration: none;
}

/* justify-self follows the grid's direction: the far (left) edge on RTL.
   The list's own dir="ltr" only orders the icons inside it. */
.ks-top-header-socials {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-self: end;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* 22px — a step under the 28px account icon in the topbar. */
.ks-top-header-social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: #555;
    font-size: 22px;
    line-height: 1;
    transition: color 0.2s ease-in-out;
}

.ks-top-header-social svg {
    width: 20px;
    height: 20px;
}

.ks-top-header-social:hover,
.ks-top-header-social:focus {
    color: #0189a3;
    text-decoration: none;
}

@media (max-width: 767px) {
    .ks-top-header-row {
        grid-template-columns: 1fr auto;
        min-height: 30px;
        padding: 2px 0;
    }

    .ks-top-header-slot--center {
        display: none;
    }

    .ks-top-header-link {
        font-size: 13px;
    }

    .ks-top-header-social {
        width: 24px;
        height: 24px;
        font-size: 19px;
    }

    .ks-top-header-social svg {
        width: 17px;
        height: 17px;
    }
}


/* -------------------------------------------------------------------------
   2. Header spacing

   - The 2px line under the header (kalasoon.css) sat between the main menu
     and the home slider; it is gone. The only header rule now is the light
     one under the top header strip above.
   - Topbar (logo row) padding was 0.75rem top and bottom (main.css); the
     bottom half is what separated it from the main menu.
   - .bottom-header carried a 4px bottom margin on top of the page's own
     top margin (index.blade.php, now mt-2).
   ------------------------------------------------------------------------- */

header.main-header {
    border-bottom: 0;
}

header.main-header .topbar {
    padding-top: 0.5rem;
    padding-bottom: 0.25rem;
}

header.main-header .bottom-header {
    margin-bottom: 0;
}
