/*
 * Storefront redesign — Phase 2: Header + Navigation
 * ---------------------------------------------------------------------------
 * Additive stylesheet loaded AFTER style.css / responsive.css. It only
 * restyles the header, top utility row and main navigation for the premium
 * watch/accessories theme. It intentionally does NOT touch:
 *   - the footer (out of scope for this phase)
 *   - the mobile drawer open/close mechanics (.mobile-menu, #page-overlay)
 *   - the cart dropdown's show/hide mechanics (#cart-qty:hover .cshort-summary)
 *   - the category mega-menu's show/hide mechanics (li.all__category__list:hover .side__bar)
 * Those interactions are driven by pre-existing rules in style.css and are
 * only re-colored here. The one exception is `.side__bar { top: 100%; }`
 * below, a bugfix for a positioning regression — see the comment there.
 *
 * Everything below reads color/spacing/radius values from theme-tokens.css
 * custom properties instead of hard-coded hex, so a future SaaS theme layer
 * can reskin the header by swapping tokens only.
 */

#navbar_top {
    font-family: var(--font-base);
}

/* ---------------------------------------------------------------------- */
/* Top row: logo / search / actions                                       */
/* ---------------------------------------------------------------------- */

.main-header {
    background: var(--surface-bg);
    box-shadow: var(--shadow-sm);
}

.logo-area {
    padding: var(--space-4) 0;
    border-bottom: 1px solid var(--surface-border);
}

.logo-header.site-header__row {
    display: flex;
    align-items: center;
    gap: var(--space-5);
}

.site-header__logo {
    flex: 0 0 auto;
}

.site-header__logo img {
    height: 46px;
    width: auto;
    display: block;
}

.site-header__search {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
}

.site-header__search form {
    display: flex;
    align-items: stretch;
    height: 46px;
    background: var(--surface-bg-soft);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-pill);
    overflow: hidden;
    transition: border-color var(--transition-fast);
}

.site-header__search form:focus-within {
    border-color: var(--brand-primary);
}

.site-header__search form input {
    flex: 1 1 auto;
    width: auto;
    float: none;
    height: 100%;
    padding: 0 var(--space-5);
    border: 0;
    background: transparent;
    font-size: 14px !important;
    color: var(--text-strong);
}

.site-header__search form input::placeholder {
    color: var(--text-muted);
}

.site-header__search form button {
    flex: 0 0 auto;
    width: 54px;
    float: none;
    height: 100%;
    border: 0;
    background: var(--nav-bg);
    color: var(--brand-primary-contrast);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
}

.site-header__search form button:hover {
    background: var(--brand-primary);
}

.site-header__search form button svg,
.site-header__search form button i {
    color: inherit;
    width: 18px;
    height: 18px;
}

.site-header__search .search_result {
    position: relative;
}

.site-header__search .search_product {
    margin-top: var(--space-2);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

/* Actions cluster: support / account / cart --------------------------- */

.header-list-items.site-header__actions {
    text-align: left;
    margin: 0;
    flex: 0 0 auto;
}

.site-header__actions ul {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-header__actions ul li {
    margin: 0;
    text-align: left;
}

.site-header__action a {
    color: var(--text-strong);
}

.site-header__support-link {
    display: flex !important;
    align-items: center;
    gap: var(--space-2);
}

.site-header__support-link i {
    font-size: 20px;
    color: var(--brand-primary);
}

.site-header__support-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    text-align: left;
}

.site-header__support-text small {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}

.site-header__support-text strong {
    font-size: 14px;
    color: var(--text-strong);
    font-weight: 700;
    white-space: nowrap;
}

.site-header__track-link {
    display: block;
    margin-top: 2px;
}

.site-header__track-link a {
    font-size: 12px !important;
    color: var(--text-muted);
    text-decoration: underline;
}

.site-header__track-link a:hover {
    color: var(--brand-primary);
}

.for_order.site-header__action a {
    display: flex !important;
    align-items: center;
    gap: var(--space-2);
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.for_order.site-header__action a i {
    font-size: 18px !important;
    color: var(--brand-primary);
}

.for_order.site-header__action a:hover {
    color: var(--brand-primary);
}

.cart-dialog.site-header__action {
    display: flex;
    align-items: center;
}

.cart-dialog .margin-shopping {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-strong);
}

.cart-dialog .margin-shopping i {
    font-size: 22px;
}

.cart-dialog .margin-shopping span {
    background: var(--brand-primary);
    color: var(--brand-primary-contrast);
    min-width: 20px;
    height: 20px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

/* Cosmetic-only refresh of the cart dropdown. Position/opacity/visibility
   are intentionally left alone — they are controlled by the existing
   `#cart-qty:hover .cshort-summary` rule in style.css. */
.cshort-summary {
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.cshort-summary .go_cart,
.cshort-summary .go_cart:hover {
    background: var(--nav-bg);
    border-radius: var(--radius-sm);
}

/* ---------------------------------------------------------------------- */
/* Navigation row (dark, premium)                                         */
/* ---------------------------------------------------------------------- */

.menu-area.site-nav {
    background: var(--nav-bg);
    border-top: 0;
    border-bottom: 1px solid var(--nav-border);
}

.catagory_menu.site-nav__inner {
    padding: 0;
}

.heder__category.site-nav__list {
    display: flex;
    align-items: stretch;
    height: auto;
    line-height: normal;
    gap: var(--space-2);
}

.site-nav__list > div {
    display: flex;
    align-items: center;
}

li.all__category__list {
    width: auto;
    min-width: 220px;
    background: var(--brand-primary);
    color: var(--brand-primary-contrast);
    padding: 0 var(--space-4);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    height: 50px;
}

li.all__category__list a {
    color: inherit;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin: 0;
}

li.all__category__list i {
    padding-left: 0;
}

.side__bar,
.side__barsub,
.side__barchild {
    background: var(--nav-bg-elevated);
    border: 1px solid var(--nav-border);
}

/* Bugfix: style.css sets `.side__bar { top: 10; }` which is not a valid
   CSS length (missing unit), so it is dropped and falls back to `top: auto`.
   With the trigger's layout changed to `display: flex; align-items: center;`
   above, the browser's static-position fallback for that `auto` value
   centers the flyout on the 50px-tall trigger instead of hanging it below,
   causing it to spill over page content on every non-home page whenever the
   trigger is hovered. Giving it an explicit `top` restores the intended
   "drop below the trigger" position regardless of the trigger's display mode. */
.side__bar {
    top: 100%;
}

.side__bar ul li a,
.side__barsub li a,
.side__barchild li a {
    color: var(--nav-text);
}

.side__bar ul li:hover,
.side__bar ul li:hover > a,
.side__barsub li:hover,
.side__barsub li:hover > a,
.side__barchild li:hover,
.side__barchild li:hover > a {
    background-color: var(--brand-primary);
    color: var(--brand-primary-contrast);
}

.catagory_menu ul li a {
    color: var(--nav-text);
    margin: 0 var(--space-3);
    font-size: 14px;
    font-weight: 500;
    padding: var(--space-2) 0;
    border-bottom: 2px solid transparent;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}

.catagory_menu ul li a:hover {
    color: var(--brand-primary-light);
    border-bottom-color: var(--brand-primary);
}

.contact__menu {
    margin-left: auto;
}

/* ---------------------------------------------------------------------- */
/* Mobile header + mobile search (existing markup, cosmetic only)         */
/* ---------------------------------------------------------------------- */

.mobile-header.sticky {
    background: var(--surface-bg);
    box-shadow: var(--shadow-sm);
}

.mobile-logo {
    font-family: var(--font-base);
}

.menu-bar i {
    color: var(--text-strong);
}

.menu-logo img {
    height: 36px;
    width: auto;
}

.menu-bag .margin-shopping i {
    color: var(--text-strong);
    font-size: 20px;
}

.menu-bag .margin-shopping span {
    background: var(--brand-primary);
    color: var(--brand-primary-contrast);
    border-radius: var(--radius-pill);
}

.mobile-search {
    background: var(--surface-bg);
}

.mobile-search form {
    border-radius: var(--radius-pill);
    border-color: var(--surface-border) !important;
    background: var(--surface-bg-soft);
    overflow: hidden;
}

.mobile-search form input {
    background: transparent;
}

.mobile-search form button {
    background: var(--nav-bg);
    color: var(--brand-primary-contrast);
}

/* ---------------------------------------------------------------------- */
/* Tablet / small-desktop adjustments (>=768px only — below that the       */
/* existing responsive.css already swaps to the separate mobile header)   */
/* ---------------------------------------------------------------------- */

@media only screen and (min-width: 768px) and (max-width: 991px) {
    .logo-header.site-header__row {
        gap: var(--space-3);
    }
    .site-header__logo img {
        height: 36px;
    }
    .site-header__support-text,
    .site-header__track-link {
        display: none;
    }
    .for_order.site-header__action a {
        font-size: 13px;
    }
    .site-header__support-link i {
        font-size: 22px;
    }
    li.all__category__list {
        min-width: 0;
        padding: 0 var(--space-3);
    }
    .catagory_menu ul li a {
        margin: 0 var(--space-2);
        font-size: 13px;
    }
}

@media only screen and (min-width: 992px) and (max-width: 1199px) {
    .site-header__actions ul {
        gap: var(--space-4);
    }
    .site-header__support-text strong {
        font-size: 13px;
    }
}
