/**
 * Unified Header Styles
 * 
 * Styles for the unified navigation header.
 * Used on both shop pages and CSR pages.
 * 
 * Note: This file uses design tokens from /csr-includes/css/design-tokens.css
 * If design-tokens.css is not loaded, include fallback variables below.
 * 
 * @version 2.0.0
 */

/* ========================================
   LOCAL HEADER VARIABLES
   These provide shorthand aliases for design tokens.
   If design-tokens.css isn't loaded, they fall back to hardcoded values.
   Note: design-tokens.css should be loaded BEFORE this file.
   ======================================== */
:root {
    /* Colors - shorthand aliases for header use */
    --wr-black: var(--wr-color-black, #151515);
    --wr-dark: #1a1a1a;
    --wr-gray-900: var(--wr-color-gray-900, #222222);
    --wr-gray-800: var(--wr-color-gray-800, #333333);
    --wr-gray-700: var(--wr-color-gray-700, #444444);
    --wr-gray-600: var(--wr-color-gray-600, #666666);
    --wr-gray-500: var(--wr-color-gray-500, #888888);
    --wr-gray-400: var(--wr-color-gray-400, #aaaaaa);
    --wr-gray-300: var(--wr-color-gray-300, #cccccc);
    --wr-gray-200: var(--wr-color-gray-200, #e5e7eb);
    --wr-gray-100: var(--wr-color-gray-100, #f5f5f5);
    --wr-gray-50: var(--wr-color-gray-50, #f9fafb);
    --wr-white: var(--wr-color-white, #ffffff);
    
    --wr-red: var(--wr-color-red, #dc2626);
    --wr-red-dark: var(--wr-color-red-dark, #b91c1c);
    --wr-red-light: var(--wr-color-red-light, #fecaca);
    
    --wr-accent: var(--wr-color-accent, #f59e0b);
    --wr-accent-light: var(--wr-color-accent-bg, #fef3c7);
    
    --wr-green: var(--wr-color-green, #16a34a);
    --wr-green-light: var(--wr-color-green-light, #bbf7d0);
    
    --wr-font: var(--wr-font-sans, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
    
    /* Layout - local shortcuts (these use _header prefix to avoid circular refs) */
    --_header-height: 60px;
    --_utility-height: 36px;
    --_promo-height: 36px;
    --wr-container-max: var(--wr-page-width, 1200px);
    --_container-padding: 24px;
    
    /* Transitions - local shortcuts */
    --_transition-fast: 150ms ease;
    --_transition: 200ms ease;
    --_transition-slow: 300ms ease;
    --wr-transition-fast: var(--_transition-fast);
    
    /* Shadows - local shortcuts */
    --_shadow-sm: 0 1px 2px rgba(0,0,0,0.1);
    --_shadow: 0 4px 12px rgba(0,0,0,0.15);
    --_shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
}

/* ========================================
   HEADER BASE RESETS
   High specificity to prevent page styles from overriding
   ======================================== */

/* Reset all anchors within header to prevent page CSS overrides */
.wr-header a,
.wr-header a:link,
.wr-header a:visited,
.wr-header a:hover,
.wr-header a:active,
.wr-mobile-menu a,
.wr-mobile-menu a:link,
.wr-mobile-menu a:visited,
.wr-mobile-menu a:hover,
.wr-mobile-menu a:active {
    font-style: normal;
    font-weight: inherit;
    font-size: inherit;
    line-height: inherit;
    letter-spacing: normal;
    text-transform: none;
    text-decoration: none;
    font-family: var(--wr-font);
}

/* Protect header text elements from page overrides */
.wr-header,
.wr-header *,
.wr-mobile-menu,
.wr-mobile-menu * {
    box-sizing: border-box;
    font-family: var(--wr-font);
}

/* Ensure buttons and inputs are also protected */
.wr-header button,
.wr-header input,
.wr-mobile-menu button,
.wr-mobile-menu input {
    font-family: var(--wr-font);
    font-style: normal;
}

/* ========================================
   HEADER BASE
   ======================================== */
.wr-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--wr-white);
    box-shadow: var(--wr-shadow-sm, var(--_shadow-sm));
}

/* Smooth transitions for all header elements */
.wr-utility-bar,
.wr-promo-bar {
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    overflow: hidden;
}

.wr-header-row {
    transition: padding 0.3s ease;
}

.wr-header-row .wr-logo img,
.wr-main-header .wr-logo img {
    transition: height 0.3s ease;
}

.wr-nav-bar .wr-primary-nav__item {
    transition: padding 0.3s ease, font-size 0.3s ease;
}

/* Scrolled/compact header state - utility and promo bars hide, nav shrinks */
.wr-header.is-scrolled .wr-utility-bar {
    max-height: 0;
    opacity: 0;
    padding: 0;
    overflow: hidden;
}

.wr-header.is-scrolled .wr-promo-bar {
    max-height: 0;
    opacity: 0;
    padding: 0;
    overflow: hidden;
}

.wr-header.is-scrolled .wr-header-row {
    padding: 20px 0 8px;
}

.wr-header.is-scrolled .wr-header-row .wr-logo img {
    height: 36px;
}

.wr-header.is-scrolled .wr-nav-bar .wr-primary-nav__item {
    padding: 8px 12px;
    font-size: 0.8125rem;
}

.wr-header.is-scrolled .wr-main-header {
    height: 50px;
}

.wr-header.is-scrolled .wr-main-header .wr-logo img {
    height: 28px;
}

/* ========================================
   UTILITY BAR
   ======================================== */
.wr-utility-bar {
    background: var(--wr-gray-900);
    max-height: var(--wr-utility-height, var(--_utility-height));
    height: var(--wr-utility-height, var(--_utility-height));
    font-size: 0.8125rem;
    opacity: 1;
}

.wr-utility-bar__inner {
    max-width: var(--wr-container-max);
    margin: 0 auto;
    padding: 0 var(--wr-container-padding, var(--_container-padding));
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wr-utility-bar__left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wr-header .wr-utility-bar__phone,
.wr-utility-bar__phone {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--wr-white);
    font-weight: 600;
    font-size: 0.8125rem;
    font-style: normal;
    padding-right: 16px;
    border-right: 1px solid var(--wr-gray-700);
    margin-right: 8px;
    text-decoration: none;
}

.wr-utility-bar__phone svg {
    width: 14px;
    height: 14px;
    color: var(--wr-accent);
}

.wr-utility-bar__links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.wr-header .wr-utility-bar__link,
.wr-utility-bar__link {
    color: var(--wr-gray-300);
    padding: 6px 10px;
    border-radius: 4px;
    transition: all var(--wr-transition-fast, var(--_transition-fast));
    white-space: nowrap;
    text-decoration: none;
    font-size: 0.8125rem;
    font-style: normal;
    font-weight: 400;
}

.wr-header .wr-utility-bar__link:hover,
.wr-utility-bar__link:hover {
    color: var(--wr-white);
    background: var(--wr-gray-800);
}

.wr-utility-bar__right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.wr-utility-bar__link--deals {
    color: var(--wr-accent);
    font-weight: 600;
}

.wr-utility-bar__link--deals:hover {
    background: rgba(245, 158, 11, 0.15);
    color: var(--wr-accent-light);
}

/* ========================================
   PROMO BAR
   ======================================== */
.wr-promo-bar {
    background: var(--wr-red);
    color: var(--wr-white);
    height: var(--wr-promo-height, var(--_promo-height));
    max-height: var(--wr-promo-height, var(--_promo-height));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
    opacity: 1;
}

.wr-promo-bar__slide {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    animation: fadeIn 0.3s ease;
}

.wr-promo-bar__slide--active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.wr-promo-bar__text {
    margin-right: 4px;
}

.wr-promo-bar__code {
    background: rgba(255,255,255,0.2);
    padding: 2px 10px;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.wr-promo-bar__info {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    margin-left: 8px;
    font-size: 0.875rem;
    transition: color var(--wr-transition-fast, var(--_transition-fast));
}

.wr-promo-bar__info:hover {
    color: var(--wr-white);
}

/* ========================================
   MAIN HEADER
   ======================================== */
.wr-main-header {
    background: var(--wr-white);
    height: var(--wr-header-height, var(--_header-height));
    border-bottom: 1px solid var(--wr-gray-200);
}

.wr-main-header__inner {
    max-width: var(--wr-container-max);
    margin: 0 auto;
    padding: 0 var(--wr-container-padding, var(--_container-padding));
    height: 100%;
    display: flex;
    align-items: center;
    gap: 24px;
}

/* ========================================
   LOGO
   ======================================== */
.wr-logo {
    flex-shrink: 0;
}

.wr-logo img {
    display: block;
    height: 36px;
    width: auto;
}

/* ========================================
   PRIMARY NAVIGATION
   ======================================== */
.wr-primary-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.wr-header .wr-primary-nav__item,
.wr-primary-nav__item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    font-size: 0.9375rem;
    font-weight: 500;
    font-style: normal;
    color: var(--wr-gray-800);
    border-radius: 6px;
    transition: all var(--wr-transition-fast, var(--_transition-fast));
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.wr-header .wr-primary-nav__item:hover,
.wr-primary-nav__item:hover {
    background: var(--wr-gray-100);
    color: var(--wr-black);
}

.wr-primary-nav__item--has-menu[aria-expanded="true"] {
    background: var(--wr-gray-100);
    color: var(--wr-black);
}

.wr-primary-nav__item--highlight {
    color: var(--wr-red);
    font-weight: 600;
}

.wr-primary-nav__item--highlight:hover {
    background: var(--wr-red-light);
}

.wr-primary-nav__arrow {
    width: 18px;
    height: 18px;
    transition: transform var(--wr-transition-fast, var(--_transition-fast));
}

.wr-primary-nav__item--has-menu[aria-expanded="true"] .wr-primary-nav__arrow {
    transform: rotate(180deg);
}

.wr-primary-nav__divider {
    width: 1px;
    height: 24px;
    background: var(--wr-gray-200);
    margin: 0 8px;
}

/* ========================================
   SEARCH
   ======================================== */
.wr-search {
    position: relative;
    width: 280px;
    flex-shrink: 0;
}

.wr-search__input {
    width: 100%;
    height: 40px;
    padding: 0 44px 0 16px;
    border: 1px solid var(--wr-gray-300);
    border-radius: 8px;
    font-size: 0.875rem;
    background: var(--wr-gray-50);
    transition: all var(--wr-transition-fast, var(--_transition-fast));
}

.wr-search__input:focus {
    outline: none;
    border-color: var(--wr-gray-500);
    background: var(--wr-white);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}

.wr-search__btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wr-gray-500);
    border-radius: 6px;
    transition: all var(--wr-transition-fast, var(--_transition-fast));
}

.wr-search__btn:hover {
    color: var(--wr-black);
    background: var(--wr-gray-200);
}

.wr-search__btn svg {
    width: 18px;
    height: 18px;
}

/* ========================================
   HEADER ICONS
   ======================================== */
.wr-header-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wr-header-icon {
    position: relative;
}

.wr-header-icon__btn,
a.wr-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    color: var(--wr-gray-700);
    transition: all var(--wr-transition-fast, var(--_transition-fast));
    text-decoration: none;
}

.wr-header-icon__btn:hover,
a.wr-header-icon:hover {
    background: var(--wr-gray-100);
    color: var(--wr-black);
}

.wr-header-icon__btn svg,
a.wr-header-icon svg {
    width: 22px;
    height: 22px;
}

/* Cart Badge */
.wr-cart__count {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--wr-red);
    color: var(--wr-white);
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================================================================
   ACCOUNT INITIALS (Logged-in State)
   ========================================================================= */

.wr-account__initials {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--wr-primary, #2563eb);
    color: var(--wr-white);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 50%;
    text-transform: uppercase;
    letter-spacing: -0.02em;
}

/* Logged-in account button styling */
.wr-header-icon__btn--logged-in {
    border: 2px solid var(--wr-primary, #2563eb);
}

.wr-header-icon__btn--logged-in:hover {
    border-color: var(--wr-primary-hover, #1d4ed8);
}

/* Account dropdown user info header */
.wr-account__user-info {
    padding: 12px 16px;
    background: var(--wr-gray-50);
    border-bottom: 1px solid var(--wr-gray-200);
}

.wr-account__user-name {
    font-weight: 600;
    color: var(--wr-gray-900);
    font-size: 0.9375rem;
}

/* Sign out link styling */
.wr-account__link--signout {
    color: var(--wr-red, #dc2626);
}

.wr-account__link--signout:hover {
    background: #fef2f2;
    color: var(--wr-red-hover, #b91c1c);
}

/* Sign in link styling */
.wr-account__link--signin {
    font-weight: 600;
    color: var(--wr-primary, #2563eb);
}

/* Marketing layout - logged-in state */
.wr-header--marketing_v1 .wr-header-icon__btn--logged-in {
    border: 2px solid var(--wr-primary, #2563eb);
    background: transparent;
}

.wr-header--marketing_v1 .wr-header-icon__btn--logged-in:hover {
    border-color: var(--wr-primary-hover, #1d4ed8);
    background: rgba(37, 99, 235, 0.1);
}

.wr-header--marketing_v1 .wr-account__initials {
    background: var(--wr-primary, #2563eb);
    color: var(--wr-white);
}

/* =========================================================================
   EMPLOYEE BAR (Visible to employees only)
   ========================================================================= */

.wr-employee-bar {
    background: linear-gradient(90deg, #7c3aed, #6366f1);
    color: #fff;
    font-size: 1rem;
    padding: 12px 0;
    text-align: center;
}

.wr-employee-bar__inner {
    max-width: var(--wr-container-max, 1200px);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.wr-employee-bar__icon {
    font-size: 1.25rem;
}

.wr-employee-bar__text {
    font-weight: 500;
    font-size: 1rem;
}

.wr-employee-bar__text strong {
    font-weight: 700;
    color: #fbbf24;
    text-transform: uppercase;
}

.wr-employee-bar__logout {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 6px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background 0.2s ease;
}

.wr-employee-bar__logout:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}

/* Account Dropdown */
.wr-account__dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    min-width: 180px;
    background: var(--wr-white);
    border: 1px solid var(--wr-gray-200);
    border-radius: 8px;
    box-shadow: var(--wr-shadow, var(--_shadow));
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--wr-transition, var(--_transition));
    z-index: 100;
}

.wr-account__dropdown.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.wr-header .wr-account__link,
.wr-account__link {
    display: block;
    padding: 10px 16px;
    font-size: 0.875rem;
    font-style: normal;
    font-weight: 400;
    color: var(--wr-gray-700);
    transition: all var(--wr-transition-fast, var(--_transition-fast));
    text-decoration: none;
}

.wr-header .wr-account__link:hover,
.wr-account__link:hover {
    background: var(--wr-gray-50);
    color: var(--wr-black);
}

.wr-account__link:first-child {
    border-radius: 8px 8px 0 0;
}

.wr-account__link:last-child {
    border-radius: 0 0 8px 8px;
}

.wr-account__separator {
    height: 1px;
    background: var(--wr-gray-200);
    margin: 4px 0;
}

/* ========================================
   MEGA MENUS
   ======================================== */
.wr-mega-menus {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 90;
}

.wr-mega-menu {
    display: none;
}

.wr-mega-menu.is-open {
    display: block;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.wr-mega-menu__inner {
    position: relative;
    max-width: var(--wr-mega-menu-width, var(--wr-container-max));
    margin: 0 auto;
    padding: 40px var(--wr-container-padding, var(--_container-padding)) 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 32px;
    background: var(--wr-mega-menu-bg, var(--wr-white));
    border-top: 1px solid var(--wr-gray-200);
    box-shadow: var(--wr-shadow-lg, var(--_shadow-lg));
}

/* Close button for mega menu */
.wr-mega-menu__close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: var(--wr-white, #fff);
    border: 1px solid var(--wr-gray-200);
    padding: 6px 12px;
    font-size: 0.875rem;
    color: var(--wr-gray-600);
    cursor: pointer;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
    z-index: 10;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.wr-mega-menu__close:hover {
    color: var(--wr-gray-800);
    background: var(--wr-gray-100);
    border-color: var(--wr-gray-300);
}

/* Non-full-width mega menus are positioned relative to their trigger */
.wr-mega-menu--positioned {
    left: 0;
    right: auto;
}

.wr-mega-menu--positioned .wr-mega-menu__inner {
    margin: 0;
    display: inline-grid;
}

.wr-mega-menu__column {
    min-width: 0;
}

/* Stacked columns - multiple columns in one grid cell */
.wr-mega-menu__column-stack {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Column separators - apply to stacks as a whole, not individual columns within stacks */
.wr-mega-menu--separators > .wr-mega-menu__inner > .wr-mega-menu__column:not(:last-child),
.wr-mega-menu--separators > .wr-mega-menu__inner > .wr-mega-menu__column-stack:not(:last-child) {
    border-right: 1px solid var(--wr-mega-column-border, var(--wr-gray-200));
    padding-right: 24px;
}

/* Columns within stacks don't get separators */
.wr-mega-menu--separators .wr-mega-menu__column-stack .wr-mega-menu__column {
    border-right: none;
    padding-right: 0;
}

/* Title underline */
.wr-mega-menu--title-border .wr-mega-menu__title {
    padding-bottom: 8px;
    border-bottom: 2px solid var(--wr-mega-column-border, var(--wr-gray-200));
}

/* ========================================
   COMPACT MODE - Titles positioned to the left
   ======================================== */
.wr-mega-menu--compact .wr-mega-menu__column {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 12px;
}

.wr-mega-menu--compact .wr-mega-menu__title {
    white-space: nowrap;
    font-size: 0.7rem;
    letter-spacing: 1px;
    color: var(--wr-gray-500);
    padding: 0;
    margin: 0;
    border-bottom: none;
    flex-shrink: 0;
    min-width: 1.2em;
}

.wr-mega-menu--compact .wr-mega-menu__links {
    flex: 1;
    min-width: 0;
}

/* Compact mode stacked columns - reduce gap */
.wr-mega-menu--compact .wr-mega-menu__column-stack {
    gap: 16px;
}

/* Compact mode with vertical titles (default) */
.wr-mega-menu--compact.wr-mega-menu--titles-vertical .wr-mega-menu__title {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
}

/* Compact mode with horizontal titles (better for single letters like A, B, C) */
.wr-mega-menu--compact.wr-mega-menu--titles-horizontal .wr-mega-menu__title {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    transform: none;
    text-align: center;
    min-width: auto;
    padding: 4px 0;
}

/* Compact mode adjusts title border for vertical */
.wr-mega-menu--compact.wr-mega-menu--titles-vertical.wr-mega-menu--title-border .wr-mega-menu__title {
    border-bottom: none;
    border-left: 2px solid var(--wr-mega-column-border, var(--wr-gray-200));
    padding-left: 8px;
    padding-bottom: 0;
}

/* Compact mode adjusts title border for horizontal */
.wr-mega-menu--compact.wr-mega-menu--titles-horizontal.wr-mega-menu--title-border .wr-mega-menu__title {
    border-bottom: 2px solid var(--wr-mega-column-border, var(--wr-gray-200));
    border-left: none;
    padding-left: 0;
    padding-bottom: 4px;
    margin-bottom: 8px;
}

.wr-mega-menu__column--featured {
    /* No max-width constraint */
}

.wr-mega-menu__title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--wr-gray-500);
    margin-bottom: 12px;
}

.wr-mega-menu__links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wr-header .wr-mega-menu__link,
.wr-mega-menu__link {
    display: block;
    padding: 6px 0;
    font-size: 0.9375rem;
    font-style: normal;
    font-weight: 400;
    color: var(--wr-gray-700);
    transition: color var(--wr-transition-fast, var(--_transition-fast));
    text-decoration: none;
}

.wr-header .wr-mega-menu__link:hover,
.wr-mega-menu__link:hover {
    color: var(--wr-black);
}

.wr-mega-menu__link--hot {
    font-weight: 500;
}

.wr-mega-menu__link--sale {
    font-weight: 500;
}

/* Link badges - styled inline elements */
.wr-mega-menu__link-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-right: 6px;
    vertical-align: middle;
    line-height: 1.2;
}

.wr-mega-menu__link-badge--hot {
    background: var(--wr-red, #dc2626);
    color: #fff;
}

.wr-mega-menu__link-badge--sale {
    background: var(--wr-green, #16a34a);
    color: #fff;
}

.wr-mega-menu__link-badge--new {
    background: var(--wr-blue, #2563eb);
    color: #fff;
}

.wr-mega-menu__link--new {
    font-weight: 500;
}

.wr-mega-menu__link--popular {
    font-weight: 500;
}

.wr-mega-menu__link-badge--popular {
    background: var(--wr-orange, #ea580c);
    color: #fff;
}

.wr-mega-menu__link--arrow::after {
    content: ' →';
}

/* Highlighted: wraps the entire link label in a solid pill background.
   Stackable — can be combined with any other style (e.g. arrow + highlighted).
   Higher-specificity selectors + !important on background to beat:
     - .wr-header .wr-mega-menu__link:hover (0,3,0 specificity in CSS file)
     - the inline <style> rule in header-unified.php that also sets
       .wr-mega-menu__link:hover { background: var(--wr-mega-link-hover-bg) }
       and loads after this stylesheet. */
.wr-header .wr-mega-menu__link--highlighted,
.wr-mega-menu__link--highlighted {
    display: inline-block;
    background: var(--wr-highlight, #dc2626);
    color: #ffffff !important;
    padding: 3px 11px 3px 16px;
    border-radius: 4px;
    font-weight: 600;
    line-height: 1.6;
    text-decoration: none !important;
    transition: color 150ms ease, background 150ms ease;
}
.wr-header .wr-mega-menu__link--highlighted:hover,
.wr-mega-menu__link--highlighted:hover {
    background: var(--wr-highlight-hover, #991b1b) !important;
    color: #ffffff !important;
}

.wr-mega-menu__link--bold {
    font-weight: 700;
}

.wr-mega-menu__link--italic {
    font-style: italic;
}

/* Featured Product */
.wr-mega-menu__featured {
    background: var(--wr-gray-50);
    border-radius: 8px;
    padding: 16px;
    position: relative;
}

.wr-mega-menu__badge {
    position: absolute;
    top: 4px;
    left: 4px;
    padding: 4px 8px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    background: var(--wr-accent);
    color: var(--wr-black);
    z-index: 2;
}

.wr-mega-menu__badge--red {
    background: var(--wr-red);
    color: var(--wr-white);
}

.wr-mega-menu__badge--green {
    background: var(--wr-green);
    color: var(--wr-white);
}

.wr-mega-menu__featured-link {
    display: block;
    text-align: center;
    text-decoration: none;
    position: relative;
}

/* Standardized featured product image container */
.wr-mega-menu__featured-img-container {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wr-gray-50, #f9fafb);
    border-radius: 6px;
    margin-bottom: 12px;
    overflow: hidden;
}

.wr-mega-menu__featured-img {
    max-width: 100%;
    max-height: 180px;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto 8px auto;
    display: block;
}

/* When image is not in container, limit height */
.wr-mega-menu__featured-link > .wr-mega-menu__featured-img {
    max-height: 180px;
}

.wr-mega-menu__featured-name {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--wr-gray-800);
    margin-bottom: 4px;
    /* Limit to 2 lines with ellipsis */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    max-height: 2.6em;
}

.wr-mega-menu__featured-price {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--wr-red);
}

.wr-mega-menu__featured-price--original {
    text-decoration: line-through;
    color: var(--wr-gray-500);
    font-weight: 400;
    font-size: 0.875rem;
    margin-right: 6px;
}

.wr-mega-menu__featured-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--wr-gray-600);
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--wr-red);
}

.wr-mega-menu__featured-desc {
    display: block;
    font-size: 0.8125rem;
    color: var(--wr-gray-600);
    line-height: 1.4;
    margin-bottom: 6px;
}

/* Product List Mode */
.wr-mega-menu__product-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wr-mega-menu__product-list .wr-mega-menu__title {
    margin-bottom: 8px;
}

.wr-mega-menu__product-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    background: var(--wr-gray-50);
    border-radius: 6px;
    text-decoration: none;
    transition: background var(--wr-transition-fast);
}

.wr-mega-menu__product-item:hover {
    background: var(--wr-gray-100);
}

.wr-mega-menu__product-thumb {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 4px;
    background: var(--wr-white);
}

.wr-mega-menu__product-info {
    flex: 1;
    min-width: 0;
}

.wr-mega-menu__product-name {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--wr-gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wr-mega-menu__product-price {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--wr-red);
}

/* More Products Links */
.wr-mega-menu__more-products {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--wr-gray-200);
}

.wr-mega-menu__more-label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--wr-gray-500);
    margin-bottom: 6px;
}

.wr-mega-menu__more-link {
    display: inline-block;
    font-size: 0.75rem;
    color: var(--wr-gray-700);
    text-decoration: none;
    margin-right: 12px;
    margin-bottom: 4px;
}

.wr-mega-menu__more-link:hover {
    color: var(--wr-red);
    text-decoration: underline;
}

/* More Products Row Style */
.wr-mega-menu__more-product-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    border-bottom: 1px solid var(--wr-gray-100);
    text-decoration: none;
    color: inherit;
    transition: background-color 0.15s ease;
}

.wr-mega-menu__more-product-row:last-child {
    border-bottom: none;
}

.wr-mega-menu__more-product-row:hover {
    background-color: var(--wr-gray-50);
}

.wr-mega-menu__more-product-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 4px;
    background: #fff;
}

.wr-mega-menu__more-product-text {
    flex: 1;
    font-size: 0.8125rem;
    color: var(--wr-gray-700);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wr-mega-menu__more-product-price {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--wr-gray-900);
    white-space: nowrap;
}

/* ========================================
   MOBILE TOGGLE
   ======================================== */
.wr-mobile-toggle {
    display: none;
    width: 40px;
    height: 40px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.wr-mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--wr-gray-800);
    transition: all var(--wr-transition, var(--_transition));
}

.wr-mobile-toggle.is-open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.wr-mobile-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.wr-mobile-toggle.is-open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   MOBILE MENU
   ======================================== */
.wr-mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--wr-white);
    z-index: 999;
    transform: translateX(-100%);
    transition: transform var(--wr-transition-slow, var(--_transition-slow));
    overflow: hidden;
}

.wr-mobile-menu.is-open {
    transform: translateX(0);
}

.wr-mobile-menu__inner {
    position: relative;
    padding: 20px;
    height: 100%;
    overflow-y: auto;
}

/* Mobile menu header with close button */
.wr-mobile-menu__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--wr-gray-200);
}

.wr-mobile-menu__title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--wr-gray-900);
}

.wr-mobile-menu__close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wr-gray-100);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--wr-gray-600);
    transition: all var(--wr-transition-fast, var(--_transition-fast));
}

.wr-mobile-menu__close:hover {
    background: var(--wr-gray-200);
    color: var(--wr-gray-900);
}

.wr-mobile-menu__close svg {
    width: 24px;
    height: 24px;
}

/* Mobile menu search */
.wr-mobile-menu__search {
    display: flex;
    margin-bottom: 20px;
    position: relative;
}

.wr-mobile-menu__search-input {
    flex: 1;
    padding: 12px 48px 12px 16px;
    border: 1px solid var(--wr-gray-300);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--wr-white);
}

.wr-mobile-menu__search-input:focus {
    outline: none;
    border-color: var(--wr-gray-500);
}

.wr-mobile-menu__search-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--wr-gray-500);
}

.wr-mobile-menu__search-btn svg {
    width: 20px;
    height: 20px;
}

.wr-mobile-menu__quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

.wr-mobile-menu .wr-mobile-menu__quick-link,
.wr-mobile-menu__quick-link {
    padding: 8px 14px;
    background: var(--wr-gray-100);
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 500;
    font-style: normal;
    color: var(--wr-gray-700);
    text-decoration: none;
    transition: all var(--wr-transition-fast, var(--_transition-fast));
}

.wr-mobile-menu .wr-mobile-menu__quick-link:hover,
.wr-mobile-menu__quick-link:hover {
    background: var(--wr-gray-200);
    color: var(--wr-black);
}

.wr-mobile-menu__quick-link--highlight {
    background: var(--wr-accent-light);
    color: var(--wr-accent);
}

.wr-mobile-menu__nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wr-mobile-menu__nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--wr-gray-800);
    background: var(--wr-gray-50);
    border-radius: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.wr-mobile-menu__nav-item:hover {
    background: var(--wr-gray-100);
}

.wr-mobile-menu__nav-item svg {
    width: 20px;
    height: 20px;
    color: var(--wr-gray-500);
}

/* Mobile Menu Sections (Special Links, Utility Links) */
.wr-mobile-menu__section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--wr-gray-200);
}

.wr-mobile-menu__section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wr-gray-500);
    margin-bottom: 8px;
    padding: 0 4px;
}

.wr-mobile-menu__link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    font-size: 0.9375rem;
    color: var(--wr-gray-700);
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 2px;
}

.wr-mobile-menu__link:hover {
    background: var(--wr-gray-100);
    color: var(--wr-gray-900);
}

.wr-mobile-menu__link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: var(--wr-gray-500);
}

.wr-mobile-menu__link-icon svg {
    width: 18px;
    height: 18px;
}

.wr-mobile-menu__footer {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--wr-gray-200);
    text-align: center;
}

.wr-mobile-menu__phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--wr-gray-900);
    margin-bottom: 8px;
    text-decoration: none;
}

.wr-mobile-menu__hours {
    display: block;
    font-size: 0.875rem;
    color: var(--wr-gray-500);
}

/* Mobile Sub-menus - slide in from right as overlay */
.wr-mobile-submenu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background: var(--wr-white);
    padding: 16px;
    overflow-y: auto;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.wr-mobile-submenu.is-open {
    transform: translateX(0);
}

.wr-mobile-submenu__back {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    margin: -16px -16px 16px;
    width: calc(100% + 32px);
    background: var(--wr-gray-100);
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: var(--wr-gray-700);
    cursor: pointer;
}

.wr-mobile-submenu__back svg {
    width: 20px;
    height: 20px;
}

.wr-mobile-submenu__back:hover {
    background: var(--wr-gray-200);
}

.wr-mobile-submenu__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--wr-gray-900);
    margin-bottom: 12px;
}

.wr-mobile-submenu__view-all {
    display: block;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: var(--wr-red);
    color: var(--wr-white);
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
}

.wr-mobile-submenu__view-all:hover {
    background: var(--wr-red-dark, #b91c1c);
}

.wr-mobile-submenu__links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wr-mobile-submenu__section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wr-gray-500);
    padding: 16px 12px 8px;
    margin-top: 8px;
}

.wr-mobile-submenu__section-title:first-child {
    margin-top: 0;
    padding-top: 8px;
}

.wr-mobile-menu .wr-mobile-submenu__link,
.wr-mobile-submenu__link {
    display: block;
    padding: 12px 16px;
    font-size: 1rem;
    font-style: normal;
    font-weight: 400;
    color: var(--wr-gray-700);
    background: var(--wr-gray-50);
    border-radius: 6px;
    text-decoration: none;
}

.wr-mobile-menu .wr-mobile-submenu__link:hover,
.wr-mobile-submenu__link:hover {
    background: var(--wr-gray-100);
    color: var(--wr-gray-900);
}

.wr-mobile-submenu__empty {
    padding: 16px;
    color: var(--wr-gray-500);
    font-size: 0.9375rem;
    text-align: center;
}

/* ========================================
   OVERLAY
   ======================================== */
.wr-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 80;
    opacity: 0;
    transition: opacity var(--wr-transition, var(--_transition));
}

.wr-overlay.is-visible {
    display: block;
    opacity: 1;
}

/* ========================================
   RESPONSIVE - TABLET (1024px and below)
   Optimized for 1024x768 and similar resolutions
   ======================================== */
@media (max-width: 1024px) {
    .wr-utility-bar__links {
        display: none;
    }
    
    .wr-search {
        width: 200px;
    }
    
    .wr-primary-nav__item {
        padding: 8px 10px;
        font-size: 0.875rem;
    }
    
    /* Mega menu optimizations for smaller screens */
    .wr-mega-menu__inner {
        padding: 36px var(--wr-container-padding, var(--_container-padding)) 16px;
        gap: 20px;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .wr-mega-menu__link {
        padding: 5px 0;
        font-size: 0.875rem;
    }
    
    .wr-mega-menu__title {
        font-size: 0.6875rem;
        margin-bottom: 8px;
    }
    
    /* Featured product image constraints for 1024px screens */
    .wr-mega-menu__featured-img-container {
        height: 140px;
    }
    
    .wr-mega-menu__featured-img {
        max-height: 140px;
    }
    
    .wr-mega-menu__featured {
        padding: 12px;
    }
    
    .wr-mega-menu__featured-name {
        font-size: 0.8125rem;
        line-height: 1.3;
        max-height: 2.6em;
    }
    
    .wr-mega-menu__featured-desc {
        font-size: 0.75rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .wr-mega-menu__featured-price {
        font-size: 0.875rem;
    }
    
    /* Product list items more compact */
    .wr-mega-menu__product-item {
        padding: 6px;
        gap: 10px;
    }
    
    .wr-mega-menu__product-thumb {
        width: 40px;
        height: 40px;
    }
    
    .wr-mega-menu__product-name {
        font-size: 0.75rem;
    }
    
    .wr-mega-menu__product-price {
        font-size: 0.8125rem;
    }
    
    /* More products section compact */
    .wr-mega-menu__more-product-row {
        padding: 4px 0;
        gap: 8px;
    }
    
    .wr-mega-menu__more-product-img {
        width: 32px;
        height: 32px;
    }
    
    .wr-mega-menu__more-product-text {
        font-size: 0.75rem;
    }
    
    .wr-mega-menu__more-product-price {
        font-size: 0.75rem;
    }
    
    /* Column separators smaller padding */
    .wr-mega-menu--separators > .wr-mega-menu__inner > .wr-mega-menu__column:not(:last-child),
    .wr-mega-menu--separators > .wr-mega-menu__inner > .wr-mega-menu__column-stack:not(:last-child) {
        padding-right: 16px;
    }
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */
@media (max-width: 768px) {
    .wr-utility-bar {
        display: none;
    }
    
    .wr-mobile-toggle {
        display: flex;
    }
    
    .wr-primary-nav {
        display: none;
    }
    
    .wr-search {
        display: none;
    }
    
    .wr-mobile-menu {
        display: block;
    }
    
    .wr-main-header__inner {
        gap: 12px;
    }
    
    .wr-logo img {
        height: 28px;
    }
}

/* ========================================
   LAYOUT: MARKETING V1
   ======================================== */

/* Header row (logo, search, icons) - 3 column layout */
.wr-header-row {
    background: var(--wr-dark, #1a1a1a);
    padding: 16px 0;
}

.wr-header-row__inner {
    max-width: var(--wr-container-max);
    margin: 0 auto;
    padding: 0 var(--wr-container-padding, var(--_container-padding));
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 32px;
}

.wr-header--marketing_v1 .wr-logo img {
    height: 48px;
}

/* Logo column wrapper */
.wr-header-row__logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wr-header-row__logo .wr-mobile-toggle {
    display: none;
}

.wr-header-row__logo .wr-logo {
    flex-shrink: 0;
}

/* Wide search bar for marketing layout - icon inside input */
.wr-search--wide {
    width: 100%;
    max-width: 100%;
    position: relative;
    display: flex;
    align-items: center;
}

.wr-search--wide .wr-search__input {
    width: 100%;
    border-radius: 24px;
    border: 1px solid var(--wr-gray-600);
    background: var(--wr-gray-800);
    padding: 12px 48px 12px 20px;
    font-size: 0.9375rem;
    color: var(--wr-white);
}

.wr-search--wide .wr-search__input::placeholder {
    color: var(--wr-gray-400);
}

.wr-search--wide .wr-search__input:focus {
    outline: none;
    border-color: var(--wr-gray-500);
    background: var(--wr-gray-700);
}

.wr-search--wide .wr-search__btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--wr-gray-400);
    transition: color var(--wr-transition-fast, var(--_transition-fast));
}

.wr-search--wide .wr-search__btn:hover {
    color: var(--wr-white);
    background: transparent;
}

.wr-search--wide .wr-search__btn svg {
    width: 20px;
    height: 20px;
}

/* Header icons in dark mode */
.wr-header--marketing_v1 .wr-header-icons {
    gap: 12px;
}

.wr-header--marketing_v1 .wr-header-icon__btn,
.wr-header--marketing_v1 .wr-cart {
    color: var(--wr-white);
    background: transparent;
    border-radius: 50%;
}

.wr-header--marketing_v1 .wr-header-icon__btn:hover,
.wr-header--marketing_v1 .wr-cart:hover {
    background: var(--wr-icon-hover-bg, rgba(255, 255, 255, 0.1));
    color: var(--wr-white);
}

/* Cart badge in dark mode - red circle over icon */
.wr-header--marketing_v1 .wr-cart__count {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--wr-red);
    color: var(--wr-white);
    font-size: 0.6875rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Standalone navigation bar - uses customizable CSS variables */
.wr-nav-bar {
    background: var(--wr-nav-bar-bg, var(--wr-gray-800));
}

.wr-nav-bar__inner {
    max-width: var(--wr-container-max);
    margin: 0 auto;
    padding: 0 var(--wr-container-padding, var(--_container-padding));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
}

.wr-nav-bar__left {
    display: flex;
    align-items: center;
    gap: 0;
}

.wr-nav-bar__right {
    display: flex;
    align-items: center;
    gap: 4px;
}

.wr-nav-bar__special-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--wr-nav-bar-text, var(--wr-white));
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}

.wr-nav-bar__special-link:hover {
    background: var(--wr-nav-bar-hover-bg, var(--wr-gray-700));
    color: var(--wr-nav-bar-hover-text, var(--wr-white));
}

.wr-nav-bar__special-link svg {
    width: 18px;
    height: 18px;
}

.wr-nav-bar__special-link--deals {
    color: var(--wr-accent, #f59e0b);
}

.wr-nav-bar__special-link--deals:hover {
    color: var(--wr-accent, #f59e0b);
}

.wr-nav-bar .wr-primary-nav__item {
    color: var(--wr-nav-bar-text, var(--wr-white));
    background: transparent;
    padding: 12px 16px;
    font-size: 0.875rem;
    font-weight: 500;
}

.wr-nav-bar .wr-primary-nav__item:hover {
    background: var(--wr-nav-bar-hover-bg, var(--wr-gray-700));
    color: var(--wr-nav-bar-hover-text, var(--wr-white));
}

.wr-nav-bar .wr-primary-nav__item--highlight {
    color: var(--wr-accent);
}

.wr-nav-bar .wr-primary-nav__arrow {
    color: var(--wr-nav-bar-text, var(--wr-gray-400));
}

/* First nav item (Shop All) - no special icon, uses nav-bar colors */

/* Marketing layout responsive */
@media (max-width: 1024px) {
    .wr-header-row__inner {
        gap: 20px;
    }
    
    .wr-nav-bar .wr-primary-nav__item {
        padding: 10px 12px;
        font-size: 0.8125rem;
    }
}

@media (max-width: 768px) {
    .wr-header {
        position: relative;
    }

    .wr-header-row {
        padding: 10px 0;
    }
    
    .wr-header-row__inner {
        display: flex;
        justify-content: space-between;
        gap: 12px;
    }
    
    .wr-header--marketing_v1 .wr-logo img {
        height: 32px;
    }
    
    .wr-search--wide {
        display: none;
    }
    
    .wr-nav-bar {
        display: none;
    }
    
    .wr-header-row__logo .wr-mobile-toggle {
        display: flex;
    }
    
    .wr-header-row__logo .wr-mobile-toggle span {
        background: var(--wr-white);
    }
}

/* ========================================
   SEARCH SUGGESTIONS DROPDOWN
   ======================================== */
.wr-search {
    position: relative;
}

.wr-search-suggest {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    min-width: 400px;
    max-width: 600px;
    background: var(--wr-white);
    border: 1px solid var(--wr-gray-200);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1000;
    overflow: hidden;
}

.wr-search-suggest.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Two-column layout */
.wr-search-suggest__inner {
    display: grid;
    grid-template-columns: 1fr 250px;
    max-height: 520px;
    overflow: hidden;
}

.wr-search-suggest__products {
    padding: 12px 0;
    border-right: 1px solid var(--wr-gray-100);
    overflow-y: auto;
}

.wr-search-suggest__sidebar {
    padding: 12px 0;
    background: var(--wr-gray-50);
    overflow-y: auto;
}

/* Section headers */
.wr-search-suggest__section-title {
    padding: 6px 12px 4px;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--wr-gray-500);
}

/* Product rows — compact 3-column: thumb | meta | badge+price */
.wr-search-suggest__product {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 14px;
    text-decoration: none;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
}

.wr-search-suggest__products .wr-search-suggest__product:last-child {
    border-bottom: none;
}

.wr-search-suggest__product:hover,
.wr-search-suggest__product.is-focused {
    background: #f9fafb;
}

/* Left — thumbnail */
.wr-search-suggest__product-thumb {
    width: 44px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 5px;
    background: #f1f5f9;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wr-search-suggest__product-thumb img {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Center — name + brand · SKU */
.wr-search-suggest__product-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wr-search-suggest__product-name {
    font-size: 13px;
    font-weight: 500;
    color: #111827;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wr-search-suggest__product-sub {
    font-family: "DM Mono", ui-monospace, monospace;
    font-size: 10px;
    color: #9ca3af;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wr-search-suggest__product-sub-sep {
    color: #e5e7eb;
}

/* Right — badge + price, stacked, right-aligned */
.wr-search-suggest__product-aside {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
}

.wr-search-suggest__product-badge {
    font-family: "DM Mono", ui-monospace, monospace;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 9999px;
    line-height: 1.2;
}

.wr-search-suggest__product-badge--in-stock {
    color: #16a34a;
    background: #dcfce7;
}

.wr-search-suggest__product-badge--pre-order {
    background: #fef3c7;
    color: #b45309;
}

.wr-search-suggest__product-badge--backordered {
    background: #fef9c3;
    color: #a16207;
}

.wr-search-suggest__product-badge--out-of-stock {
    background: #f3f4f6;
    color: #6b7280;
}

.wr-search-suggest__product-badge--store-only {
    background: #ecfeff;
    color: #0e7490;
}

.wr-search-suggest__product-badge--discontinued {
    background: #f3f4f6;
    color: #6b7280;
    font-style: italic;
}

.wr-search-suggest__product-price {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 6px;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.wr-search-suggest__price--regular {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

.wr-search-suggest__price--sale {
    font-size: 13px;
    font-weight: 600;
    color: #dc2626;
}

.wr-search-suggest__price--was {
    font-size: 11px;
    font-weight: 400;
    color: #9ca3af;
    text-decoration: line-through;
}

/* Adjust sidebar width on smaller desktop screens */
@media (max-width: 900px) and (min-width: 769px) {
    .wr-search-suggest__inner {
        grid-template-columns: 1fr 220px;
    }
}

/* Help sidebar items (articles + FAQ) — 2-line title clamp */
.wr-search-suggest__sidebar-item--help span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Sidebar items (categories, brands, articles) */
.wr-search-suggest__sidebar-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.75rem;
    color: var(--wr-gray-700);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.wr-search-suggest__sidebar-item:hover,
.wr-search-suggest__sidebar-item.is-focused {
    background: var(--wr-gray-100);
    color: var(--wr-gray-900);
}

.wr-search-suggest__sidebar-item svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    color: var(--wr-gray-400);
}

.wr-search-suggest__sidebar-item span {
    flex: 1;
    line-height: 1.3;
}

.wr-search-suggest__sidebar-item span:first-child {
    flex: 0;
}

/* Arrow indicator for sidebar items */
.wr-search-suggest__arrow {
    color: var(--wr-gray-400);
    font-size: 0.875rem;
    flex-shrink: 0;
    margin-right: 2px;
}

.wr-search-suggest__sidebar-item:hover .wr-search-suggest__arrow {
    color: var(--wr-primary, #2563eb);
}

/* Quick Answer items - expandable inline cards */
.wr-search-suggest__qa {
    padding: 10px 12px;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fcd34d;
    border-radius: 8px;
    margin: 4px 8px;
    transition: box-shadow 0.15s ease;
}

.wr-search-suggest__qa:hover {
    box-shadow: 0 1px 4px rgba(217, 119, 6, 0.15);
}

.wr-search-suggest__qa-question {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 0;
    cursor: pointer;
    user-select: none;
}

.wr-search-suggest__qa.is-expanded .wr-search-suggest__qa-question {
    margin-bottom: 6px;
}

.wr-search-suggest__qa-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: #d97706;
    margin-top: 1px;
}

.wr-search-suggest__qa-question span {
    flex: 1;
    line-height: 1.3;
}

/* Chevron toggle indicator */
.wr-search-suggest__qa-chevron {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: #b45309;
    margin-top: 1px;
    transition: transform 0.2s ease;
}

.wr-search-suggest__qa.is-expanded .wr-search-suggest__qa-chevron {
    transform: rotate(180deg);
}

/* Answer body (collapsible) */
.wr-search-suggest__qa-body {
    overflow: hidden;
}

.wr-search-suggest__qa-answer {
    font-size: 0.75rem;
    color: #78350f;
    line-height: 1.5;
    padding-left: 20px;
    padding-right: 4px;
}

/* Links section inside Q&A card */
.wr-search-suggest__qa-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
    padding-left: 20px;
}

.wr-search-suggest__qa-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    color: #d97706;
    text-decoration: none;
    line-height: 1.3;
    padding: 2px 0;
}

.wr-search-suggest__qa-link svg {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
}

.wr-search-suggest__qa-link:hover {
    color: #b45309;
    text-decoration: underline;
}

/* Article link variant */
.wr-search-suggest__qa-link--article {
    color: #92400e;
}

.wr-search-suggest__qa-link--article:hover {
    color: #78350f;
}

/* Search link variant */
.wr-search-suggest__qa-link--search {
    color: #b45309;
    font-style: italic;
}

.wr-search-suggest__qa-link--search:hover {
    color: #92400e;
}

/* Divider between sections */
.wr-search-suggest__divider {
    height: 1px;
    background: var(--wr-gray-200);
    margin: 6px 0;
}

/* View all results link */
.wr-search-suggest__footer {
    padding: 12px 16px;
    border-top: 1px solid var(--wr-gray-200);
    background: var(--wr-gray-50);
    text-align: center;
}

.wr-search-suggest__view-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--wr-primary, #2563eb);
    text-decoration: none;
    transition: color 0.15s;
}

.wr-search-suggest__view-all:hover {
    color: var(--wr-primary-dark, #1d4ed8);
    text-decoration: underline;
}

.wr-search-suggest__view-all svg {
    width: 16px;
    height: 16px;
}

/* Loading state */
.wr-search-suggest__loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    color: var(--wr-gray-500);
    font-size: 0.875rem;
}

.wr-search-suggest__loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--wr-gray-200);
    border-top-color: var(--wr-primary, #2563eb);
    border-radius: 50%;
    animation: wr-spin 0.8s linear infinite;
    margin-right: 10px;
}

@keyframes wr-spin {
    to { transform: rotate(360deg); }
}

/* No results state */
.wr-search-suggest__empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--wr-gray-500);
    font-size: 0.875rem;
}

/* Mobile styles - inline dropdown with minimal clutter */
@media (max-width: 768px) {
    .wr-search-suggest {
        position: fixed;
        top: auto;
        left: 12px;
        right: 12px;
        bottom: auto;
        min-width: auto;
        max-width: none;
        border-radius: 12px;
        max-height: 60vh;
    }
    
    .wr-search-suggest__inner {
        display: block;
        max-height: 55vh;
        overflow-y: auto;
    }
    
    .wr-search-suggest__products {
        border-right: none;
        border-bottom: 1px solid var(--wr-gray-100);
    }
    
    .wr-search-suggest__sidebar {
        background: transparent;
    }
    
    .wr-search-suggest__product {
        padding: 9px 12px;
    }
}

@media (max-width: 360px) {
    .wr-search-suggest__product-sub {
        display: none;
    }
}

/* Wide search variant (marketing layout) */
.wr-search--wide .wr-search-suggest {
    min-width: 100%;
    max-width: 700px;
}

/* Hide sidebar on narrow screens if no content */
.wr-search-suggest__sidebar:empty {
    display: none;
}

.wr-search-suggest__sidebar:empty + .wr-search-suggest__products {
    border-right: none;
}

/* Single column when sidebar is empty */
.wr-search-suggest__inner:has(.wr-search-suggest__sidebar:empty) {
    grid-template-columns: 1fr;
}

/* Full-width sidebar when no products - show categories/brands/articles prominently */
.wr-search-suggest__inner--no-products {
    grid-template-columns: 1fr;
}

.wr-search-suggest__inner--no-products .wr-search-suggest__sidebar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0 24px;
    padding: 16px;
    background: #fff;
}

.wr-search-suggest__inner--no-products .wr-search-suggest__section-title {
    grid-column: 1 / -1;
    margin-top: 8px;
}

.wr-search-suggest__inner--no-products .wr-search-suggest__section-title:first-child {
    margin-top: 0;
}

.wr-search-suggest__inner--no-products .wr-search-suggest__divider {
    grid-column: 1 / -1;
}

.wr-search-suggest__inner--no-products .wr-search-suggest__sidebar-item {
    padding: 10px 12px;
    background: var(--wr-gray-50);
    border-radius: 6px;
    margin-bottom: 4px;
}

/* Browse categories (shown on empty focus) */
.wr-search-suggest__browse {
    padding: 8px 0;
}

.wr-search-suggest__browse .wr-search-suggest__section-title {
    padding: 6px 12px 4px;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--wr-gray-500);
}

.wr-search-suggest__browse-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--wr-gray-800);
    text-decoration: none;
    transition: background 0.1s;
}

.wr-search-suggest__browse-item:hover,
.wr-search-suggest__browse-item.is-focused {
    background: var(--wr-gray-50);
    color: var(--wr-primary, #2563eb);
}

.wr-search-suggest__browse-arrow {
    color: var(--wr-gray-400);
    font-size: 0.875rem;
}

.wr-search-suggest__browse-item:hover .wr-search-suggest__browse-arrow {
    color: var(--wr-primary, #2563eb);
}

/* Keyboard navigation highlight */
.wr-search-suggest [data-focused="true"] {
    background: var(--wr-gray-100);
    outline: 2px solid var(--wr-primary, #2563eb);
    outline-offset: -2px;
}
