/* Global Megamenu & Scroll-to-Top (B2B Pivot) */
:root {
    --nav-obsidian: #0A0A0A;
    --nav-brass: #C6A87C;
    --nav-parchment: #F5F5DC;
    --nav-charcoal: #1A1A1A;
}

/* ========================================================================= */
/* INSTANT PRELOADER MASK — Hide navbar + megamenu while page loads           */
/* The body.is-loading class is set in the <body> tag and removed by JS      */
/* after the preloader animation finishes.                                   */
/* ========================================================================= */
body.is-loading .gn-navbar,
body.is-loading .gn-megamenu {
    opacity: 0;
    pointer-events: none;
}

/* ========================================================================= */
/* MEGAMENU OVERLAY                                                          */
/* ========================================================================= */
.gn-megamenu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--nav-obsidian);
    z-index: 999990;
    transform: translateY(-100%);
    transition: transform 0.6s cubic-bezier(0.76, 0, 0.24, 1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5rem 5% 2rem 5%;
    overflow-y: auto;
    font-family: 'Montserrat', sans-serif;
    color: #fff;
    box-sizing: border-box;
}

.gn-megamenu.is-open {
    transform: translateY(0);
}

/* Close Button inside megamenu (Top Right) */
.gn-megamenu__close {
    position: absolute;
    top: 2rem;
    right: 5%;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
    padding: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gn-megamenu__close svg {
    width: 32px;
    height: 32px;
}

.gn-megamenu__close:hover { 
    color: var(--nav-brass);
    transform: rotate(90deg);
}

.gn-megamenu__inner {
    max-width: 1000px;
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .gn-megamenu__inner {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
}

.gn-col__title {
    font-size: 9px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--nav-brass);
    margin-bottom: 0.8rem;
    display: block;
    font-weight: 500;
}

.gn-col__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.gn-col__link {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
    display: inline-block;
}
@media (min-width: 768px) {
    .gn-col__link { font-size: 1.3rem; }
}

.gn-col__link:hover {
    color: var(--nav-brass);
    padding-left: 0.4rem;
}

.gn-megamenu__footer {
    max-width: 1200px;
    margin: 2rem auto 0;
    width: 100%;
    border-top: 1px solid rgba(198, 168, 124, 0.12);
    padding-top: 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    font-size: 9px;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: rgba(245, 245, 220, 0.4);
    font-weight: 500;
}

@media (min-width: 768px) {
    .gn-megamenu__footer {
        flex-direction: row;
        justify-content: space-between;
    }
}

.gn-megamenu__footer a {
    color: rgba(245, 245, 220, 0.4);
    text-decoration: none;
    transition: color 0.3s ease;
}

.gn-megamenu__footer a:hover {
    color: var(--nav-brass);
}

/* ========================================================================= */
/* GLOBAL BASKET / DEVIS DRAWER                                              */
/* ========================================================================= */
.gn-basket {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    pointer-events: none;
    display: flex;
    justify-content: flex-end;
}

.gn-basket.is-active {
    pointer-events: auto;
}

.gn-basket__overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 10, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    will-change: opacity;
}

.gn-basket__drawer {
    position: relative;
    width: 100%;
    max-width: 480px;
    height: 100%;
    background: var(--nav-obsidian, #111111);
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    will-change: transform;
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0); /* Managed dynamically via GSAP */
}

.gn-basket__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.gn-basket__title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 500;
    color: #fff;
    margin: 0;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.gn-basket__close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    cursor: pointer;
    padding: 0;
    transition: color 0.3s;
}

.gn-basket__close:hover {
    color: #c6a87c;
}

.gn-basket__body {
    flex: 1;
    overflow-y: auto;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Custom minimal scrollbar */
.gn-basket__body::-webkit-scrollbar {
    width: 4px;
}
.gn-basket__body::-webkit-scrollbar-track {
    background: transparent;
}
.gn-basket__body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}
.gn-basket__body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.gn-basket__item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    opacity: 0; /* for GSAP stagger */
}

.gn-basket__item-img-wrap {
    width: 80px;
    height: 100px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    padding: 0.5rem;
}

.gn-basket__item-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.gn-basket__item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.gn-basket__item-title {
    font-family: inherit;
    font-weight: 500;
    font-size: 0.95rem;
    color: #fff;
    margin: 0;
    letter-spacing: 0.05em;
}

.gn-basket__item-meta {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.05em;
}

.gn-basket__item-price {
    font-size: 0.85rem;
    color: #c6a87c; /* Gold accent */
    margin-top: 0.5rem;
}

.gn-basket__item-remove {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    line-height: 1;
    transition: color 0.3s, transform 0.3s;
}

.gn-basket__item-remove:hover {
    color: #ff4a4a;
    transform: scale(1.1);
}

.gn-basket__footer {
    padding: 2.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.01);
}

.gn-basket__summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.gn-basket__summary-label {
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
}

.gn-basket__summary-value {
    font-size: 1.2rem;
    color: #c6a87c;
    font-weight: 500;
}

.gn-basket__checkout-btn {
    display: block;
    width: 100%;
    padding: 1.2rem;
    background: #fff;
    color: #000;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.2em;
    font-size: 0.8rem;
    text-transform: uppercase;
    transition: background 0.3s, color 0.3s;
    border-radius: 2px;
}

.gn-basket__checkout-btn:hover {
    background: #c6a87c;
    color: #fff;
}

.gn-footer-legal {
    display: flex;
    gap: 2rem;
}

/* ========================================================================= */
/* SCROLL TO TOP BUTTON                                                      */
/* ========================================================================= */
.gn-scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background-color: var(--nav-charcoal);
    border: 1px solid rgba(198, 168, 124, 0.3);
    color: var(--nav-brass);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999995;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s ease;
    cursor: pointer;
}

.gn-scroll-top.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.gn-scroll-top:hover {
    background-color: var(--nav-brass);
    color: var(--nav-obsidian);
}

.gn-scroll-top svg {
    width: 1.5rem;
    height: 1.5rem;
    transition: transform 0.3s ease;
}

.gn-scroll-top:hover svg {
    transform: translateY(-4px);
}

/* ========================================================================= */
/* NAVBAR BASE & TRANSPARENCY                                                */
/* ========================================================================= */
.gn-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999980;
    background: var(--nav-obsidian);
    border-bottom: 1px solid rgba(198, 168, 124, 0.15);
    transition: background-color 0.4s ease, border-bottom-color 0.4s ease;
    height: 80px;
}

.gn-navbar.is-transparent {
    background: transparent;
    border-bottom: 1px solid rgba(198, 168, 124, 0);
}

.gn-navbar__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 0 5%;
    font-family: 'Montserrat', sans-serif;
    box-sizing: border-box;
}

.gn-menu-toggle {
    background: none;
    border: none;
    color: #fff;
    font-size: 10px;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    font-family: inherit;
    font-weight: 500;
    cursor: pointer;
    width: 100px;
    text-align: left;
    transition: color 0.3s ease;
    padding: 0;
}
.gn-menu-toggle:hover { color: var(--nav-brass); }

.gn-logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-style: italic;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
}

.gn-quote-container {
    width: 100px;
    display: flex;
    justify-content: flex-end;
}
.gn-quote-link {
    color: #fff;
    font-size: 10px;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid rgba(198, 168, 124, 0.5);
    padding-bottom: 4px;
    transition: color 0.3s ease, border-bottom-color 0.3s ease;
}
.gn-quote-link:hover {
    color: var(--nav-brass);
    border-bottom-color: var(--nav-brass);
}

/* ========================================================================= */
/* NAVBAR: CART & ACCOUNT SYSTEM (E-Commerce)                                */
/* ========================================================================= */
.gn-cart-container {
    min-width: 100px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.2rem;
}

.gn-account-link {
    color: #fff;
    display: flex;
    align-items: center;
    transition: color 0.3s ease, transform 0.3s ease;
}

.gn-account-link:hover {
    color: var(--nav-brass);
    transform: translateY(-1px);
}

.gn-cart-divider {
    width: 1px;
    height: 14px;
    background-color: rgba(255, 255, 255, 0.2);
}

.gn-cart-link {
    color: #fff;
    font-size: 10px;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid rgba(198, 168, 124, 0.5);
    padding-bottom: 4px;
    transition: color 0.3s ease, border-bottom-color 0.3s ease;
}

.gn-cart-link:hover {
    color: var(--nav-brass);
    border-bottom-color: var(--nav-brass);
}
