/*
 * DUK Design House — Shared navigation and footer
 *
 * This stylesheet is intentionally self-contained and scoped to #main-nav and
 * #main-footer so it can be loaded by both the static site and WooCommerce.
 */

#main-nav,
#main-footer {
    --duk-layout-bg: #0a0a0a;
    --duk-layout-surface: #121212;
    --duk-layout-gold: #d4af37;
    --duk-layout-champagne: #e8d7a5;
    --duk-layout-text: #f5f1e8;
    --duk-layout-muted: #a8a39a;
    box-sizing: border-box;
    font-family: "Outfit", sans-serif;
}

#main-nav *,
#main-footer * {
    box-sizing: border-box;
}

/* ==========================================================================
   Shared navigation
   ========================================================================== */

#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    background: rgba(10, 10, 10, 0.7);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--duk-layout-text);
    user-select: none;
    -webkit-user-select: none;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#main-nav.nav-hidden {
    transform: translateY(-100%);
}

#main-nav .nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 22px 5%;
}

#main-nav .nav-logo-wrapper,
#main-nav .nav-actions-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
}

#main-nav .nav-logo-wrapper {
    justify-content: flex-start;
}

#main-nav .nav-actions-wrapper {
    justify-content: flex-end;
    gap: 24px;
}

#main-nav .duk-layout-logo {
    display: inline-flex;
    align-items: center;
    color: var(--duk-layout-text);
    text-decoration: none;
}

#main-nav .duk-layout-logo img {
    display: block;
    width: auto;
    height: 45px;
    transition:
        transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.3s ease;
}

#main-nav .duk-layout-logo:hover img {
    transform: scale(1.04);
    opacity: 0.9;
}

#main-nav .nav-links {
    display: flex;
    flex: none;
    align-items: center;
    gap: 32px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

#main-nav .nav-links a {
    position: relative;
    padding: 6px 0;
    color: var(--duk-layout-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

#main-nav .nav-links a:hover,
#main-nav .nav-links a.active {
    color: var(--duk-layout-champagne);
}

#main-nav .nav-links a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--duk-layout-gold);
    transition:
        width 0.4s cubic-bezier(0.25, 1, 0.5, 1),
        left 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

#main-nav .nav-links a:hover::after,
#main-nav .nav-links a.active::after {
    left: 0;
    width: 100%;
}

#main-nav .nav-links a.lang-switch::after {
    display: none;
}

#main-nav .nav-shop-container {
    position: relative;
    display: flex;
    align-items: center;
}

@media (min-width: 901px) {
    #main-nav .nav-shop-link {
        display: inline-flex;
        align-items: center;
        gap: 7px;
    }

    #main-nav .nav-shop-link::before {
        content: "";
        order: 2;
        width: 5px;
        height: 5px;
        margin-top: -3px;
        border-right: 1px solid var(--duk-layout-gold);
        border-bottom: 1px solid var(--duk-layout-gold);
        opacity: 0.75;
        transform: rotate(45deg);
        transform-origin: center;
        transition:
            opacity 0.25s ease,
            transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    #main-nav .nav-shop-container:hover .nav-shop-link::before,
    #main-nav .nav-shop-container:focus-within .nav-shop-link::before {
        opacity: 1;
        transform: rotate(225deg);
    }
}

#main-nav .nav-shop-dropdown {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    z-index: 120;
    min-width: 260px;
    padding: 10px 0;
    background: rgba(18, 18, 18, 0.98);
    border: 1px solid rgba(232, 215, 165, 0.14);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.62);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 10px);
    transition:
        opacity 0.24s ease,
        visibility 0.24s ease,
        transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#main-nav .nav-shop-dropdown::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: 100%;
    left: 0;
    height: 15px;
}

#main-nav .nav-shop-dropdown a {
    display: block;
    padding: 11px 20px;
    color: var(--duk-layout-muted);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    line-height: 1.45;
    text-align: left;
    white-space: nowrap;
}

#main-nav .nav-shop-dropdown a::after {
    display: none;
}

#main-nav .nav-shop-dropdown a:hover,
#main-nav .nav-shop-dropdown a:focus-visible,
#main-nav .nav-shop-dropdown a.active {
    color: var(--duk-layout-champagne);
    background: rgba(212, 175, 55, 0.08);
}

#main-nav .nav-shop-container:hover .nav-shop-dropdown,
#main-nav .nav-shop-container:focus-within .nav-shop-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

#main-nav .lang-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0.85;
    cursor: pointer;
    transition:
        transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.3s ease;
}

#main-nav .lang-switch:hover {
    transform: scale(1.12);
    opacity: 1;
}

#main-nav .lang-switch .flag-icon {
    display: block;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

#main-nav .mobile-flag {
    display: none;
}

#main-nav .nav-account-container {
    position: relative;
    display: flex;
    align-items: center;
}

#main-nav .nav-account-btn,
#main-nav .nav-cart-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--duk-layout-text);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s ease;
}

#main-nav .nav-cart-btn {
    position: relative;
}

#main-nav .nav-account-btn:hover,
#main-nav .nav-cart-btn:hover {
    color: var(--duk-layout-champagne);
}

#main-nav .nav-account-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 100;
    min-width: 180px;
    margin-top: 14px;
    padding: 12px 0;
    background: var(--duk-layout-surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition:
        opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        visibility 0.3s;
}

#main-nav .nav-account-container.active .nav-account-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#main-nav .nav-account-dropdown a {
    display: block;
    padding: 8px 20px;
    color: var(--duk-layout-muted);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-align: left;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    transition:
        color 0.3s ease,
        background 0.3s ease;
}

#main-nav .nav-account-dropdown a:hover {
    color: var(--duk-layout-champagne);
    background: rgba(255, 255, 255, 0.03);
}

#main-nav .nav-account-dropdown .divider {
    height: 1px;
    margin: 8px 0;
    background: rgba(255, 255, 255, 0.06);
}

#main-nav .duk-cart-count {
    position: absolute;
    top: -6px;
    right: -8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--duk-layout-champagne);
    color: var(--duk-layout-bg) !important;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0;
}

#main-nav .menu-toggle {
    display: none;
    margin: 0;
    font: inherit;
}

#main-nav a:focus-visible,
#main-nav button:focus-visible,
#main-footer a:focus-visible {
    outline: 2px solid var(--duk-layout-gold);
    outline-offset: 4px;
}

@media (hover: hover) {
    #main-nav .nav-account-container:hover .nav-account-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Shared editorial footer
   ========================================================================== */

#main-footer {
    position: relative;
    z-index: 5;
    isolation: isolate;
    padding: 120px 0 60px;
    color: var(--duk-layout-text);
    text-align: center;
    background: #090909 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    user-select: none;
    -webkit-user-select: none;
}

#main-footer .duk-layout-container {
    width: min(1200px, 90%);
    margin: 0 auto;
}

#main-footer .footer-inner {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
    text-align: center;
}

#main-footer .footer-col h3 {
    margin: 0 0 24px;
    color: var(--duk-layout-champagne);
    font-family: "Playfair Display", serif;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.1em;
}

#main-footer .footer-col p,
#main-footer .footer-col ul {
    color: var(--duk-layout-muted);
    font-size: 0.85rem;
    line-height: 1.8;
}

#main-footer .footer-col p {
    margin: 0 0 12px;
}

#main-footer .footer-col p:last-child {
    margin-bottom: 0;
}

#main-footer .footer-col ul,
#main-footer .sitemap-col ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

#main-footer .footer-col ul li,
#main-footer .sitemap-col ul li {
    margin-bottom: 12px;
}

#main-footer .footer-col a,
#main-footer .sitemap-col a {
    color: var(--duk-layout-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

#main-footer .footer-col a:hover,
#main-footer .sitemap-col a:hover {
    color: var(--duk-layout-champagne);
}

#main-footer .footer-logo {
    display: inline-block;
    margin-bottom: 20px;
}

#main-footer .footer-logo img {
    display: block;
    width: auto;
    height: 180px;
    filter: brightness(0.85);
}

#main-footer .footer-socials {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 25px;
}

#main-footer .footer-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--duk-layout-muted);
    transition:
        color 0.3s ease,
        transform 0.3s ease;
}

#main-footer .footer-socials a:hover {
    color: var(--duk-layout-gold);
    transform: translateY(-3px);
}

#main-footer .footer-manage-cookies {
    margin-top: 20px;
}

#main-footer .footer-manage-cookies a {
    display: inline-block;
    color: var(--duk-layout-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.75rem;
    text-decoration: none;
    cursor: pointer;
    transition:
        color 0.3s ease,
        border-color 0.3s ease;
}

#main-footer .footer-manage-cookies a:hover {
    color: var(--duk-layout-gold);
    border-color: var(--duk-layout-gold);
}

#main-footer .footer-divider {
    margin: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

#main-footer .sitemap-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding-bottom: 2px;
    color: var(--duk-layout-muted);
    border-bottom: 1px solid rgba(168, 163, 154, 0.2);
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-decoration: none;
    text-transform: uppercase;
    user-select: none;
    -webkit-user-select: none;
    transition:
        color 0.3s ease,
        border-color 0.3s ease;
}

#main-footer .sitemap-toggle-btn:hover {
    color: var(--duk-layout-champagne);
    border-bottom-color: var(--duk-layout-gold);
}

#main-footer .sitemap-toggle-btn .arrow {
    display: inline-block;
    font-size: 0.65rem;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#main-footer .sitemap-toggle-btn.active .arrow {
    transform: rotate(180deg);
}

#main-footer .sitemap-drawer {
    max-height: 0;
    padding: 0;
    overflow: hidden;
    opacity: 0;
    border-top: 1px solid transparent;
    transition:
        max-height 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.6s ease,
        padding 0.6s ease;
}

#main-footer .sitemap-drawer.active {
    max-height: 500px;
    padding: 60px 0 20px;
    opacity: 1;
    border-top-color: rgba(255, 255, 255, 0.05);
}

#main-footer .sitemap-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
    text-align: left;
}

#main-footer .sitemap-col h4 {
    margin: 0 0 20px;
    color: var(--duk-layout-champagne);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

#main-footer .sitemap-col ul li a {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

#main-footer .footer-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    margin-top: 40px;
    padding-top: 30px;
    color: var(--duk-layout-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.75rem;
}

#main-footer .footer-bottom p {
    margin: 0;
}

#main-footer .footer-bottom p:first-child {
    text-align: left;
}

#main-footer .footer-bottom .footer-credit {
    text-align: center;
}

#main-footer .footer-bottom p:last-child {
    text-align: right;
}

/* ==========================================================================
   Responsive layout
   ========================================================================== */

@media (max-width: 900px) {
    #main-nav .nav-inner {
        padding: 14px 20px;
    }

    #main-nav .duk-layout-logo img {
        width: auto;
        max-width: 130px;
        height: auto;
    }

    #main-nav .nav-actions-wrapper {
        gap: 16px;
    }

    #main-nav .mobile-flag {
        display: inline-flex;
    }

    #main-nav .desktop-flag {
        display: none;
    }

    #main-nav .menu-toggle {
        position: relative;
        z-index: 100;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 18px;
        padding: 0;
        background: transparent;
        border: 0;
        cursor: pointer;
    }

    #main-nav .menu-toggle .bar {
        width: 100%;
        height: 2px;
        background: var(--duk-layout-champagne);
        transition: all 0.3s ease;
    }

    #main-nav .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    #main-nav .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    #main-nav .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    #main-nav .nav-links {
        position: fixed;
        top: 0;
        left: auto;
        right: -100%;
        z-index: 98;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        gap: 40px;
        background: rgba(10, 10, 10, 0.98);
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
        font-size: 1.25rem;
        transition: right 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    }

    #main-nav .nav-links.active {
        right: 0;
    }

    #main-nav .nav-shop-container {
        width: min(320px, 82vw);
        flex-direction: column;
    }

    #main-nav .nav-shop-dropdown {
        position: static;
        display: flex;
        width: 100%;
        min-width: 0;
        flex-direction: column;
        gap: 8px;
        padding: 12px 0 0;
        background: transparent;
        border: 0;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: none;
    }

    #main-nav .nav-shop-dropdown::before {
        display: none;
    }

    #main-nav .nav-shop-dropdown a {
        padding: 5px 12px;
        color: rgba(168, 163, 154, 0.82);
        font-size: 0.72rem;
        letter-spacing: 0.13em;
        line-height: 1.35;
        text-align: center;
        white-space: normal;
    }

    #main-nav .nav-shop-container:hover .nav-shop-dropdown,
    #main-nav .nav-shop-container:focus-within .nav-shop-dropdown {
        transform: none;
    }

    #main-nav .nav-account-dropdown {
        right: -10px;
        margin-top: 20px;
    }

    #main-footer {
        padding: 80px 0 40px;
    }

    #main-footer .footer-inner,
    #main-footer .sitemap-grid {
        grid-template-columns: 1fr;
        gap: 50px;
        text-align: center;
    }

    #main-footer .sitemap-grid {
        gap: 30px;
    }

    #main-footer .sitemap-drawer.active {
        max-height: 1000px;
    }

    #main-footer .footer-bottom {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 30px;
    }

    #main-footer .footer-bottom p:first-child,
    #main-footer .footer-bottom .footer-credit,
    #main-footer .footer-bottom p:last-child {
        text-align: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    #main-nav,
    #main-nav *,
    #main-footer *,
    #main-footer .sitemap-drawer {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}
