/* Header & navigation — unified green / white / yellow / black */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ── Site header ── */
.icg-header.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: var(--icg-white);
    border-bottom: 1px solid var(--icg-border);
    box-shadow: 0 4px 20px rgba(30, 77, 36, 0.06);
    padding: 0;
}

.icg-header-bar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
        "logo actions actions"
        "search search search";
    align-items: center;
    gap: 10px 12px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 6px 12px;
}

.icg-logo {
    grid-area: logo;
    display: inline-flex;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
    line-height: 0;
    text-decoration: none;
    color: var(--icg-black);
    min-width: 0;
}

.icg-logo-img {
    display: block;
    height: 90px;
    width: auto;
    max-width: 340px;
    margin: -16px -24px;
    padding: 0;
    object-fit: contain;
    flex-shrink: 0;
}

/* Desktop nav — hidden on mobile */
.icg-nav {
    display: none;
}

.icg-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    color: var(--icg-black);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.icg-nav-link i {
    font-size: 15px;
    opacity: 0.75;
}

.icg-nav-link:hover {
    background: var(--icg-green-soft);
    color: var(--icg-green-dark);
}

.icg-nav-link.is-active {
    background: var(--icg-green);
    color: #fff;
}

.icg-nav-link.is-active i {
    opacity: 1;
    color: var(--icg-yellow);
}

/* Search */
.icg-search {
    grid-area: search;
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--icg-green-soft);
    border: 1.5px solid var(--icg-border);
    border-radius: 999px;
    padding: 4px 4px 4px 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.icg-search:focus-within {
    border-color: var(--icg-green);
    box-shadow: 0 0 0 3px rgba(45, 106, 53, 0.15);
    background: #fff;
}

.icg-search-icon {
    color: var(--icg-green);
    font-size: 16px;
    flex-shrink: 0;
}

.icg-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: var(--icg-black);
    padding: 8px 10px;
}

.icg-search-input::placeholder {
    color: var(--icg-muted);
}

.icg-search-btn {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: var(--icg-green);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}

.icg-search-btn:hover {
    background: var(--icg-green-dark);
    transform: scale(1.04);
}

/* Header actions */
.icg-header-actions {
    grid-area: actions;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.icg-icon-btn {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--icg-green-soft);
    color: var(--icg-green-dark);
    text-decoration: none;
    font-size: 20px;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.icg-icon-btn:hover {
    background: var(--icg-green);
    color: #fff;
}

.icg-icon-btn.is-active {
    background: var(--icg-green);
    color: #fff;
}

.icg-cart-badge,
.icg-header .cart-pill {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--icg-yellow);
    color: var(--icg-black);
    font-size: 10px;
    font-weight: 800;
    display: grid;
    place-items: center;
    line-height: 1;
    border: 2px solid var(--icg-white);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.icg-cart-badge.is-zero,
.icg-header .cart-pill.is-zero {
    opacity: 0.5;
}

/* Flash */
.icg-theme .flash-strip {
    max-width: 1280px;
    margin: 0 auto;
    padding: 10px 16px;
    font-size: 13px;
    text-align: center;
    border-radius: 0;
}

/* ── Mobile bottom nav ── */
.icg-bottom-nav.bottom-nav {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
    gap: 0;
    padding: 6px 4px calc(8px + env(safe-area-inset-bottom, 0px));
    background: var(--icg-white);
    border-top: 1px solid var(--icg-border);
    box-shadow: 0 -8px 24px rgba(30, 77, 36, 0.08);
}

.icg-bnav-item {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 2px;
    text-decoration: none;
    color: var(--icg-muted);
    border-radius: 12px;
    transition: color 0.2s ease;
    position: relative;
}

.icg-bnav-icon-wrap {
    position: relative;
    width: 44px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.icg-bnav-item i {
    font-size: 20px;
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease;
}

.icg-bnav-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.icg-bnav-item.is-active {
    color: var(--icg-green-dark);
}

.icg-bnav-item.is-active .icg-bnav-icon-wrap {
    background: var(--icg-green-soft);
}

.icg-bnav-item.is-active i {
    color: var(--icg-green);
    transform: translateY(-1px);
}

.icg-bnav-item.is-active .icg-bnav-label {
    color: var(--icg-black);
    font-weight: 700;
}

.icg-bnav-badge,
.icg-bottom-nav .nav-cart-pill {
    position: absolute;
    top: -2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--icg-yellow);
    color: var(--icg-black);
    font-size: 9px;
    font-weight: 800;
    display: grid;
    place-items: center;
    border: 2px solid var(--icg-white);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.icg-bnav-badge.is-zero,
.icg-bottom-nav .nav-cart-pill.is-zero {
    opacity: 0.55;
}

/* Desktop layout */
@media (min-width: 992px) {
    .icg-header-bar {
        grid-template-columns: auto auto 1fr auto;
        grid-template-areas: "logo nav search actions";
        gap: 8px 16px;
        padding: 6px 24px;
    }

    .icg-nav {
        display: flex;
        align-items: center;
        gap: 4px;
        grid-area: nav;
    }

    .icg-search {
        grid-area: search;
        max-width: 420px;
        margin-left: auto;
    }

    .icg-logo-img {
        height: 96px;
        max-width: 380px;
        margin: -18px -26px;
    }

    .icg-bottom-nav,
    .mobile-only-nav.icg-bottom-nav {
        display: none !important;
    }

    .icg-theme .mobile-shell,
    .mobile-shell {
        padding-bottom: 28px;
    }
}

@media (min-width: 1200px) {
    .icg-header-bar {
        padding: 6px 32px;
    }

    .icg-search {
        max-width: 480px;
    }
}

/* Override legacy header rules */
.icg-header .header-top,
.icg-header .desktop-nav {
    display: none !important;
}

.icg-theme .site-header.icg-header {
    background: var(--icg-white);
    box-shadow: 0 4px 20px rgba(30, 77, 36, 0.06);
}

.mc-shop-theme .site-header.icg-header {
    background: var(--icg-white);
    border-bottom: 1px solid var(--icg-border);
    box-shadow: 0 4px 20px rgba(30, 77, 36, 0.06);
}
