/* navbar */

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2.8rem;
    height: 84px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(var(--emerald-rgb), 0.08);
    position: sticky;
    top: 0;
    z-index: 200;
    transition: box-shadow 0.3s ease, background 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.navbar-brand {
    min-width: 120px;
    display: flex;
    align-items: center;
}

.navbar-logo {
    height: 42px;
    width: auto;
    display: block;
}

.navbar-links {
    display: flex;
    gap: 0;
    align-items: center;
}

.navbar-links a {
    white-space: nowrap;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.92rem;
    text-transform: uppercase;
    color: var(--color-ink);
    text-decoration: none;
    padding: 0.4rem 1.1rem;
    border-radius: 4px;
    transition: color 0.2s ease;
    position: relative;
}

.navbar-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 1.1rem;
    right: 1.1rem;
    height: 1px;
    background: var(--emerald);
    transform: scaleX(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.navbar-links a:hover {
    color: var(--emerald);
}

.navbar-links a:hover::after,
.navbar-links a.active::after {
    transform: scaleX(1);
}

.navbar-links a.active {
    color: var(--emerald);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

/* icon buttons */

.nav-icon-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-ink);
    transition: background 0.2s ease, color 0.2s ease;
    position: relative;
    text-decoration: none;
}

.nav-icon-btn:hover {
    background: rgba(var(--emerald-rgb), 0.08);
    color: var(--emerald);
}

.nav-icon-btn svg {
    display: block;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    stroke-width: 1.6;
}

.nav-cart-wrap {
    position: relative;
}

.nav-cart-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    min-width: 16px;
    height: 16px;
    padding: 0 3px;
    background: var(--emerald);
    color: var(--color-white);
    border-radius: 50%;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    line-height: 1;
    border: 1.5px solid white;
}

/* account dropdown */

.nav-mobile-account {
    display: none;
}

.nav-dropdown-wrap {
    position: relative;
}

.nav-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(var(--emerald-rgb), 0.1);
    border-radius: 14px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.04);
    min-width: 168px;
    overflow: hidden;
    z-index: 999;
}

.nav-dropdown.open {
    display: block;
    animation: dropdownIn 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.nav-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.6rem 1.1rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-ink);
    text-decoration: none;
    transition: background 0.15s;
}

.nav-dropdown a:hover {
    background: rgba(var(--emerald-rgb), 0.06);
    color: var(--emerald);
}

.nav-dropdown a svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    stroke-width: 1.8;
}

.nav-dropdown-label {
    display: block;
    padding: 0.55rem 1.1rem 0.2rem;
    font-family: var(--font-body);
    font-size: 0.72rem;
    color: #aaa;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.nav-dropdown-divider {
    height: 1px;
    background: rgba(var(--emerald-rgb), 0.08);
    margin: 3px 0.8rem;
}

.nav-dropdown-danger {
    color: #b23b3b !important;
}

.nav-dropdown-danger:hover {
    background: rgba(178, 59, 59, 0.05) !important;
    color: #b23b3b !important;
}

/* hamburger */

.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    width: 46px;
    height: 46px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    transition: background 0.18s ease;
}

.nav-hamburger:hover {
    background: rgba(var(--emerald-rgb), 0.09);
}

.nav-hamburger span {
    display: block;
    width: 28px;
    height: 2px;
    background: var(--color-ink);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
    transform-origin: center;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Skip link and focus styles */

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 10000;
    padding: 0.75rem 1.1rem;
    background: var(--emerald);
    color: var(--color-white);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transform: translateY(-200%);
    transition: transform 0.2s ease;
}

.skip-link:focus {
    color: var(--color-white);
    transform: none;
}

.main-content:focus {
    outline: none;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 2px solid var(--emerald);
    outline-offset: 2px;
}

/* footer */

.footer {
    background-color: var(--beige-light);
    color: var(--color-ink);
    box-shadow: 0 -6px 20px rgba(40, 77, 64, 0.08);
}

.footer-top {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.6fr;
    gap: 3rem;
    padding: 4rem 4rem 3rem;
    border-bottom: 1px solid rgba(var(--emerald-rgb), 0.15);
}

.footer-col--brand {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 1rem;
}

.footer-logo {
    height: 56px;
    width: auto;
    display: block;
}

.footer-brand-name {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--color-ink);
    margin: 0;
}

.footer-tagline {
    font-size: 0.82rem;
    color: var(--color-body);
    line-height: 1.7;
    margin: 0;
    max-width: 220px;
}

.footer-socials {
    display: flex;
    align-items: center;
    gap: 0.25rem 0.75rem;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0 0 0 -12px;
}

.footer-social {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--color-ink);
    text-decoration: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.footer-social svg {
    width: 20px;
    height: 20px;
}

.footer-social:hover {
    opacity: 0.6;
    transform: translateY(-2px);
}

.footer .footer-heading {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-ink);
    margin-bottom: 1.2rem;
}

.footer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.footer-nav a {
    display: inline-block;
    padding: 0.3rem 0;
    font-size: 0.85rem;
    color: var(--color-body);
    text-decoration: none;
    transition: color 0.2s ease;
    letter-spacing: 0.02em;
}

.footer-nav a:hover {
    color: var(--emerald);
}

.footer-newsletter-text {
    font-size: 0.82rem;
    color: var(--color-body);
    line-height: 1.7;
    margin-bottom: 1.2rem;
}

.footer-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.6rem;
}

.footer-newsletter-input {
    min-height: 44px;
    background: var(--color-white);
    border: 1px solid rgba(var(--emerald-rgb), 0.22);
    border-radius: 0;
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
    color: var(--color-ink);
    font-family: var(--font-body);
    outline: none;
    transition: border-color 0.2s ease;
}

.footer-newsletter-input::placeholder {
    color: var(--color-body);
}

.footer-newsletter-input:focus {
    border-color: var(--emerald);
}

.footer-newsletter-btn {
    min-height: 44px;
    background: var(--emerald);
    color: var(--color-white);
    border: none;
    border-radius: 0;
    padding: 0.65rem 1rem;
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.footer-newsletter-btn:hover {
    background: var(--emerald-dark);
}

.footer-subscribe-thanks {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--emerald);
    letter-spacing: 0.06em;
    margin-bottom: 1.4rem;
}

.footer-newsletter-disclaimer {
    font-size: 0.78rem;
    color: var(--color-body);
    letter-spacing: 0.03em;
    margin-bottom: 1.4rem;
}

.footer-newsletter-disclaimer a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-contact-detail {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.78rem;
    color: var(--color-body);
    margin-bottom: 0.55rem;
    letter-spacing: 0.02em;
    line-height: 1.5;
}

.footer-contact-detail svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
    margin-top: 0.15rem;
    opacity: 0.6;
}

.footer-bottom {
    padding: 1.4rem 4rem;
}

.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-bottom-left {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-copyright {
    font-size: 0.78rem;
    color: var(--color-body);
    letter-spacing: 0.05em;
}

.footer-legal {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.footer-legal a {
    display: inline-block;
    padding: 0.4rem 0;
    font-size: 0.78rem;
    color: var(--color-body);
    text-decoration: none;
    letter-spacing: 0.03em;
    transition: color 0.2s ease;
}

.footer-legal a:hover,
.footer-legal a[aria-current] {
    color: var(--emerald);
}

.footer-payments {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    max-width: 30rem;
    justify-content: flex-end;
}

.footer-payments svg {
    border-radius: 4px;
    opacity: 0.85;
    width: 38px;
    height: 24px;
}

/* responsive */

@media (max-width: 1280px) {
    .navbar {
        padding: 0 1.75rem;
    }

    .navbar-links a {
        padding: 0.4rem 0.7rem;
        font-size: 0.85rem;
    }

    .navbar-links a::after {
        left: 0.7rem;
        right: 0.7rem;
    }
}

@media (max-width: 1024px) {
    .navbar {
        flex-wrap: wrap;
        height: auto;
        padding: 0 1.2rem;
        min-height: 72px;
    }

    .navbar-logo {
        height: 48px;
    }

    .nav-icon-btn,
    .nav-hamburger {
        width: 44px;
        height: 44px;
    }

    .nav-icon-btn svg {
        width: 25px;
        height: 25px;
    }

    .nav-hamburger {
        display: flex;
        order: 0;
    }

    .navbar-brand { order: 1; }
    .navbar-right { order: 2; margin-left: auto; }

    .nav-dropdown-wrap { display: none; }

    .nav-mobile-account {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding-top: 0;
    }

    .nav-mobile-account-divider {
        height: 1px;
        background: rgba(var(--emerald-rgb), 0.12);
        margin: 0.5rem 1.2rem 0.25rem;
        width: calc(100% - 2.4rem);
    }

    .nav-mobile-account-label {
        font-size: 0.7rem;
        font-weight: 700;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: var(--color-text-muted);
        padding: 0.5rem 1.2rem 0.3rem;
    }

    .nav-mobile-account-link {
        padding: 0.82rem 1.2rem;
        font-family: var(--font-display);
        font-size: 0.88rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        width: 100%;
        color: var(--color-ink);
        text-decoration: none;
        display: block;
        border-left: 2px solid transparent;
        transition: color 0.2s ease, border-left-color 0.2s ease, background 0.2s ease;
    }

    .nav-mobile-account-link:hover {
        color: var(--emerald);
        border-left-color: var(--emerald);
        background: rgba(var(--emerald-rgb), 0.04);
        text-decoration: none;
    }

    .nav-mobile-account-link--danger {
        color: #b23b3b;
    }

    .nav-mobile-account-link--danger:hover {
        color: #b23b3b;
        border-left-color: #b23b3b;
        background: rgba(178, 59, 59, 0.04);
        opacity: 1;
    }

    .navbar-links {
        display: flex;
        flex-direction: column;
        width: 100%;
        order: 4;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        padding: 0;
        border-top: none;
        gap: 0;
        align-items: flex-start;
        transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.22s ease;
    }

    .navbar-links.open {
        max-height: 560px;
        opacity: 1;
        pointer-events: auto;
        padding: 0.75rem 0 1.25rem;
        border-top: 1px solid rgba(var(--emerald-rgb), 0.12);
    }

    .navbar-links a {
        padding: 0.82rem 1.2rem;
        font-size: 0.88rem;
        width: 100%;
        border-left: 2px solid transparent;
        transition: color 0.2s ease, border-left-color 0.2s ease, background 0.2s ease;
    }

    .navbar-links a:hover {
        border-left-color: var(--emerald);
        background: rgba(var(--emerald-rgb), 0.04);
    }

    .navbar-links a.active {
        border-left-color: var(--emerald);
        background: rgba(var(--emerald-rgb), 0.05);
    }

    .navbar-links a::after {
        display: none;
    }
}

@media (max-width: 768px) {
    .footer-top {
        grid-template-columns: 1fr 1fr;
        padding: 2.5rem 1.5rem 2rem;
        gap: 2rem;
    }

    .footer-col--brand,
    .footer-col--newsletter {
        grid-column: 1 / -1;
    }

    .footer-col--brand {
        gap: 1.25rem;
    }

    .footer-nav a {
        padding: 0.55rem 0;
    }

    .footer-tagline {
        max-width: none;
    }

    .footer-bottom {
        padding: 1.2rem 1.5rem;
    }

    .footer-bottom-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .footer-bottom-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .footer-payments {
        max-width: 100%;
        justify-content: flex-start;
        gap: 1rem;
    }

}

#wishlist-guest-toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(1rem);
    background: var(--color-text, #1a1a1a);
    color: var(--color-white, #fff);
    padding: 0.75rem 1.4rem;
    border-radius: 8px;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
    z-index: 9999;
    white-space: nowrap;
}
#wishlist-guest-toast a {
    color: var(--earth-yellow);
    text-decoration: underline;
    pointer-events: all;
}
#wishlist-guest-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: all;
}
