/* layout.css - Navigation, Footer, and Common Structures */

/* Header / Navigation */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 2rem 0;
    transition: var(--transition-smooth);
    background: transparent;
}

.site-header.scrolled {
    padding: 1rem 0;
    background: rgba(250, 246, 240, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-soft);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 2px;
    color: var(--clr-text);
}

.nav-links {
    display: flex;
    gap: 3rem;
}

.nav-links li a {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    color: var(--clr-text);
}

.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--clr-text);
    transition: var(--transition-smooth);
}

.nav-links li a:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    gap: 1.5rem;
}

.nav-actions .icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--clr-text);
    transition: var(--transition-fast);
}

.nav-actions .icon-btn:hover {
    color: var(--clr-accent);
}

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

/* Footer */
.site-footer {
    background-color: var(--clr-text);
    color: var(--clr-bg);
    padding: 5rem 0 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-brand {
    grid-column: span 4;
}

.footer-brand h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--clr-bg);
}

.footer-brand p {
    opacity: 0.7;
    margin-bottom: 2rem;
    max-width: 300px;
}

.footer-links {
    grid-column: span 2;
}

.footer-links h4, .footer-contact h4, .footer-newsletter h4 {
    font-family: var(--font-sans);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    color: var(--clr-accent);
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links ul li a {
    opacity: 0.7;
}

.footer-links ul li a:hover {
    opacity: 1;
    color: var(--clr-bg);
    padding-left: 5px;
}

.footer-contact {
    grid-column: span 3;
}

.footer-contact p {
    opacity: 0.7;
    margin-bottom: 0.5rem;
}

.footer-newsletter {
    grid-column: span 3;
}

.newsletter-form {
    display: flex;
    margin-top: 1rem;
    border-bottom: 1px solid rgba(250, 246, 240, 0.3);
}

.newsletter-form input {
    background: transparent;
    border: none;
    color: var(--clr-bg);
    padding: 0.8rem 0;
    flex-grow: 1;
    outline: none;
    font-family: var(--font-sans);
}

.newsletter-form input::placeholder {
    color: rgba(250, 246, 240, 0.5);
}

.newsletter-form button {
    background: transparent;
    border: none;
    color: var(--clr-accent);
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(250, 246, 240, 0.1);
    padding-top: 2rem;
    font-size: 0.85rem;
    opacity: 0.5;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: var(--clr-bg);
}

.social-links a:hover {
    color: var(--clr-accent);
}

/* Offcanvas Cart Drawer */
.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(8, 8, 8, 0.4);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    z-index: 2000;
    transition: var(--transition-fast);
}

.cart-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -450px;
    width: 100%;
    max-width: 450px;
    height: 100vh;
    background-color: var(--clr-bg);
    z-index: 2001;
    box-shadow: -10px 0 30px rgba(8, 8, 8, 0.1);
    display: flex;
    flex-direction: column;
    transition: right 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.cart-drawer.active {
    right: 0;
}

.cart-drawer-header {
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--clr-divider);
}

.cart-drawer-header h3 {
    font-size: 1.5rem;
    color: var(--clr-text);
}

.cart-close-btn {
    background: none;
    border: none;
    color: var(--clr-text);
    cursor: pointer;
    transition: var(--transition-fast);
}

.cart-close-btn:hover {
    color: var(--clr-accent);
    transform: rotate(90deg);
}

.cart-drawer-body {
    padding: 2rem;
    flex-grow: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.empty-cart-msg {
    text-align: center;
    font-family: var(--font-sans);
    opacity: 0.6;
    margin-top: auto;
    margin-bottom: auto;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--clr-divider);
}

.cart-item-img {
    width: 80px;
    height: 100px;
    background-color: var(--clr-bg-alt);
    border-radius: 4px;
}

.cart-item-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cart-drawer-footer {
    padding: 2rem;
    border-top: 1px solid var(--clr-divider);
    background-color: var(--clr-bg);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-serif);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/* Responsive Layout Styles */
@media (max-width: 1024px) {
    .nav-links {
        gap: 1.5rem;
    }
    .footer-grid {
        grid-template-columns: repeat(6, 1fr);
    }
    .footer-brand, .footer-contact, .footer-newsletter {
        grid-column: span 6;
    }
    .footer-links {
        grid-column: span 3;
    }
}

@media (max-width: 768px) {
    /* Header & Navigation */
    .mobile-menu-toggle {
        display: inline-flex !important;
    }

    nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100vw;
        height: 100vh;
        background-color: var(--clr-bg);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: var(--transition-smooth);
        z-index: 1001; /* Above header if needed, but let's make it below or full screen */
    }

    nav.active {
        left: 0;
    }

    .nav-links {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    .nav-links li a {
        font-size: 1.5rem;
    }

    .nav-actions {
        gap: 1rem;
    }
    
    .site-header {
        padding: 1rem 0;
    }

    /* Close button for mobile nav */
    .mobile-nav-close {
        position: absolute;
        top: 2rem;
        right: 2rem;
        background: none;
        border: none;
        color: var(--clr-text);
        font-size: 2rem;
        cursor: pointer;
    }

    nav.active .mobile-nav-close {
        display: block;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .footer-brand, .footer-links, .footer-contact, .footer-newsletter {
        grid-column: span 1;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    .site-footer {
        padding: 3rem 0 2rem;
    }
}
