/* global/style.css */

/* --- VARIABLES & GLOBAL RESETS --- */
:root {
    --copper: #B87333;
    --dark-copper: #8B5A2B;
    --beige: #F5F5DC;
    --dark-text: #3a2d21;
    --light-bg: #fdfaf6;
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Poppins', sans-serif;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    --transition-fast: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    --header-height: 70px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a{
    text-decoration: none;
    color: #B87333;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--light-bg);
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* Scroll Lock when Nav is Open */
body.nav-open {
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- CUSTOM CURSOR (Hidden on Mobile) --- */
.cursor-dot, .cursor-outline {
    position: fixed;
    top: 0; left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
    display: block;
}
.cursor-dot { width: 8px; height: 8px; background-color: var(--copper); }
.cursor-outline { width: 40px; height: 40px; border: 2px solid var(--copper); opacity: 0.5; transition: width 0.3s, height 0.3s; }

@media (hover: none) and (pointer: coarse) {
    .cursor-dot, .cursor-outline { display: none; }
    body, a, button { cursor: auto !important; }
}

/* --- HEADER --- */
header {
    height: var(--header-height);
    width: 100%;
    position: fixed; /* Fixed is better for modern UI */
    top: 0;
    z-index: 1000;
    background: rgba(253, 250, 246, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--copper);
    text-decoration: none;
    font-weight: 700;
    z-index: 1002;
}

/* --- DESKTOP NAVIGATION --- */
nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

nav a {
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
}

nav a i {
    font-size: 0.9rem;
    color: var(--dark-copper);
}

nav a:hover {
    color: var(--copper);
    background: rgba(184, 115, 51, 0.05);
}

.Pactive {
    color: var(--copper) !important;
    background: rgba(184, 115, 51, 0.1) !important;
}

.cart-count {
    background-color: var(--copper);
    color: white;
    font-size: 0.7rem;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2px;
}

/* --- MOBILE TOGGLE --- */
.menu-toggle {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    z-index: 1002;
    padding: 5px;
}

.menu-toggle .line {
    width: 25px;
    height: 2px;
    background-color: var(--dark-text);
    margin: 5px 0;
    transition: var(--transition-fast);
    border-radius: 2px;
}

/* Toggle Animation */
.menu-toggle.active .line1 { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active .line2 { opacity: 0; }
.menu-toggle.active .line3 { transform: translateY(-7px) rotate(-45deg); }

/* --- SHARED COMPONENTS & UTILITIES --- */
.cta-button { display: inline-block; background: var(--copper); color: #fff; padding: 1rem 2.5rem; text-decoration: none; border-radius: 50px; font-weight: 500; border: none; transition: var(--transition-fast); box-shadow: 0 5px 15px rgba(184, 115, 51, 0.4); }
.cta-button:hover { background: var(--dark-copper); transform: translateY(-5px); box-shadow: 0 8px 20px rgba(184, 115, 51, 0.5); }
section { padding: 6rem 0; }
.section-title { font-family: var(--font-heading); font-size: 3rem; text-align: center; margin-bottom: 3.5rem; color: var(--dark-copper); }
.page-title { font-family: var(--font-heading); font-size: 3.5rem; text-align: center; margin-bottom: 3.5rem; color: var(--dark-copper); }
.loading-text { text-align: center; padding: 3rem; font-size: 1.2rem; color: #666; }
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.8s var(--transition-slow), transform 0.8s var(--transition-slow); }
.fade-in.visible { opacity: 1; transform: translateY(0); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2.5rem; perspective: 1000px; }
.product-card { background: #fff; border-radius: 10px; box-shadow: var(--shadow); overflow: hidden; text-align: center; transition: var(--transition-fast); transform-style: preserve-3d; }
.product-card:hover { transform: rotateY(5deg) rotateX(10deg) scale(1.03) translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.product-card img { width: 100%; height: 280px; object-fit: cover; }
.product-info { padding: 1.5rem; }
.product-info h3 { font-family: var(--font-heading); font-size: 1.6rem; }
.product-info .price { color: var(--copper); font-size: 1.4rem; font-weight: bold; margin: 0.5rem 0; }
.product-info p { font-size: 0.9rem; color: #666; margin-bottom: 1.5rem; }
.product-card-link { text-decoration: none; color: inherit; display: block; }

/* --- MOBILE NAVIGATION SIDEBAR --- */
@media(max-width: 992px) {
    .menu-toggle { display: block; }

    nav {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 280px; /* Fixed width for better control */
        background: white;
        z-index: 1001;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 80px 1.5rem 2rem 1.5rem;
        box-shadow: -5px 0 25px rgba(0,0,0,0.1);
        display: block; /* Ensure it's not hidden */
    }

    nav.active {
        transform: translateX(0);
    }

    nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    nav ul li {
        width: 100%;
        margin: 0;
    }

    nav a {
        width: 100%;
        padding: 1rem;
        font-size: 1.1rem;
        border-radius: 10px;
    }

    /* Staggered entry animation for links */
    nav.active ul li {
        animation: slideIn 0.4s forwards;
        opacity: 0;
    }

    nav.active ul li:nth-child(1) { animation-delay: 0.1s; }
    nav.active ul li:nth-child(2) { animation-delay: 0.15s; }
    nav.active ul li:nth-child(3) { animation-delay: 0.2s; }
    nav.active ul li:nth-child(4) { animation-delay: 0.25s; }
    nav.active ul li:nth-child(5) { animation-delay: 0.3s; }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* --- OVERLAY --- */
.nav-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(253, 250, 246, 0.9);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* --- FOOTER --- */
footer {
    background: #231912;
    color: rgba(255,255,255,0.7);
    padding: 4rem 0 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-content h3 {
    font-family: var(--font-heading);
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
}

.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 0.8rem; }
.footer-links a { color: inherit; text-decoration: none; transition: 0.2s; }
.footer-links a:hover { color: var(--copper); padding-left: 5px; }

.footer-social {
    display: flex;
    gap: 1.2rem;
}
.footer-social a { color: #fff; font-size: 1.4rem; transition: 0.3s; }
.footer-social a:hover { color: var(--copper); transform: translateY(-3px); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.85rem;
}

/* --- SHARED COMPONENTS --- */
main {
    margin-top: var(--header-height); /* Prevent content from hiding behind fixed header */
}
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 2fr)); gap: 1.5rem; perspective: 200px; }
.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--dark-copper);
}

.cta-button {
    display: inline-block;
    background: var(--copper);
    color: white;
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
    border: none;
    box-shadow: 0 4px 15px rgba(184, 115, 51, 0.3);
}

.cta-button:hover {
    background: var(--dark-copper);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(184, 115, 51, 0.4);
}

/* --- RESPONSIVE FIXES --- */
@media(max-width: 768px) {
    .section-title { font-size: 2rem; margin-bottom: 2rem; }
    .page-title { font-size: 2.2rem; }
    section { padding: 4rem 0; }
}