:root {
    --bg-cream: #F9F7F2;
    --text-dark: #333333;
    --text-muted: #777777;
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Montserrat', sans-serif;
    
    /* Modern Variables */
    --primary-dark: #1a1a1a;
    --primary-light: #f8f5f0;
    --accent-gold: #c9a96e;
    --accent-beige: #d4c5b2;
}

body {
    background-color: #fff;
    color: var(--text-dark);
    font-family: var(--font-body);
    font-weight: 300;
    overflow-x: hidden;
}

h1, h2, h3, h4, 
.display-1, .display-5 {
    font-family: var(--font-heading);
    font-weight: 600;
}

/* ===== UTILITIES ===== */
.bg-cream { background-color: var(--bg-cream); }
.text-justify { text-align: justify; }
.font-serif { font-family: var(--font-heading); }
.tracking-wider { letter-spacing: 2px; }

/* ===== NAVBAR ===== */
.navbar-modern {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1.2rem 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.navbar-modern.scrolled {
    padding: 0.8rem 0;
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.navbar-brand img {
    height: 55px;
    transition: all 0.3s ease;
    object-fit: contain;
}

.navbar-modern.scrolled .navbar-brand img {
    height: 45px;
}

.nav-link-modern {
    color: var(--text-dark) !important;
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    margin: 0 1rem;
    padding: 0; /* Remove padding to let flexbox align */
    position: relative;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    height: 40px; /* Fixed height matching icons */
}

.nav-link-modern:after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: 5px; /* Adjust for fixed height */
    left: 0;
    background-color: var(--accent-gold);
    transition: width 0.3s ease;
}

.nav-link-modern:hover:after,
.nav-link-modern.active:after {
    width: 100%;
}

/* Cart Icon */
.cart-icon-modern {
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px; /* Fixed height */
    width: 40px;
}

.cart-icon-modern:hover {
    transform: translateY(-2px);
}

.cart-icon-modern ion-icon {
    color: var(--text-dark);
    font-size: 1.4rem;
}

.cart-badge-modern {
    position: absolute;
    top: 5px; /* Adjusted for fixed height container */
    right: 5px;
    background-color: var(--accent-gold);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 600;
}

.navbar-toggler-modern {
    border: none;
    padding: 0;
    height: 40px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem; /* Slightly larger for better visibility */
    color: var(--text-dark);
    background: transparent;
    margin-left: 0.5rem !important; /* Override ms-3 slightly if needed, but ms-3 is 1rem */
}

/* ===== CART DRAWER ===== */
.cart-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1040; /* Below Modal (1055) but above navbar if needed */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background-color: #fff;
    z-index: 1050; /* High z-index */
    box-shadow: -5px 0 30px rgba(0,0,0,0.1);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.cart-drawer.active {
    transform: translateX(-400px);
}

.cart-body {
    flex-grow: 1;
    overflow-y: auto;
}

/* Animations for Cart Items */
.animate-item {
    animation: slideInRight 0.3s ease forwards;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Modal styling tweak */
.modal-backdrop {
    z-index: 1050;
}
.modal {
    z-index: 1060;
}
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.close-menu-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    font-size: 2.5rem;
    color: var(--text-dark);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.close-menu-btn:hover {
    transform: rotate(90deg) scale(1.1);
}

.mobile-nav-link {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--text-dark);
    text-decoration: none;
    margin: 1rem 0;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s ease;
}

.mobile-overlay.active .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-overlay.active .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
.mobile-overlay.active .mobile-nav-link:nth-child(2) { transition-delay: 0.2s; }
.mobile-overlay.active .mobile-nav-link:nth-child(3) { transition-delay: 0.3s; }
.mobile-overlay.active .mobile-nav-link:nth-child(4) { transition-delay: 0.4s; }

.mobile-nav-link:hover {
    color: var(--accent-gold);
}

/* ===== HERO ===== */
.hero-v3 {
    height: 100vh;
    min-height: 800px;
    background-color: var(--primary-light);
    position: relative;
    overflow: hidden;
}

.hero-title {
    font-size: 5rem;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
}

.hero-img-wrapper {
    position: relative;
    height: 100%;
    overflow: hidden;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.8s ease;
    animation: slowZoom 20s infinite alternate;
}

@keyframes slowZoom {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

/* ===== GALLERY & PRODUCTS ===== */
.gallery-img-wrapper {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.gallery-img {
    transition: all 0.5s ease;
    width: 100%;
    object-fit: cover;
}

.gallery-img-wrapper:hover .gallery-img {
    transform: scale(1.05);
}

.overlay-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 1rem 2rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-img-wrapper:hover .overlay-text {
    opacity: 1;
}

.category-tag {
    display: inline-block;
    padding: 0.3rem 1rem;
    background-color: var(--accent-beige);
    color: var(--text-dark);
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.price-tag {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--accent-gold);
    font-size: 1.8rem;
}

/* ===== MODAL & ZOOM ===== */
.magnify-wrapper {
    position: relative;
    overflow: hidden;
    cursor: crosshair;
    height: 100%;
}

.magnify-glass {
    position: absolute;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 150px;
    height: 150px;
    pointer-events: none;
    background-repeat: no-repeat;
    background-size: 200%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: none;
}

/* ===== FOOTER (EDITORIAL) ===== */
.site-footer {
    background-color: #111;
    color: #fff;
    font-family: var(--font-body);
}

.footer-logo {
    height: 50px;
    filter: invert(1);
    margin-bottom: 1.5rem;
}

.footer-nav a {
    color: #888;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.footer-nav a:hover {
    color: #fff;
    padding-left: 5px;
}

.social-icons-modern {
    display: flex;
    gap: 1.2rem;
    margin-top: 1.5rem;
}

.social-icons-modern a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    color: #aaa;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-icons-modern a:hover {
    background-color: var(--accent-gold);
    color: var(--primary-dark);
    transform: translateY(-3px);
}

.newsletter-input {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    color: #fff;
    padding: 0.8rem 0;
    font-size: 1rem;
}

.newsletter-input:focus {
    box-shadow: none;
    border-bottom-color: var(--accent-gold);
    background: transparent;
    color: #fff;
}

.newsletter-btn {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    font-weight: 600;
    letter-spacing: 1px;
    padding: 0.8rem 1.5rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.newsletter-btn:hover {
    background-color: rgba(201, 169, 110, 0.1);
}

.footer-bottom-modern {
    background-color: rgba(0, 0, 0, 0.5);
    padding: 1.5rem 0;
    margin-top: 3rem;
}

.footer-bottom-modern p {
    color: #777; 
    font-size: 0.85rem; 
    margin: 0; 
}

/* ===== ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease forwards;
}
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

/* ===== BUTTONS ===== */
.btn-outline-dark {
    border: 1px solid var(--text-dark);
    color: var(--text-dark);
    padding: 0.8rem 2rem;
    border-radius: 0;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}
.btn-outline-dark:hover {
    background-color: var(--text-dark);
    color: white;
}
.btn-dark {
    background-color: var(--text-dark);
    border: 1px solid var(--text-dark);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 0;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}
.btn-dark:hover {
    background-color: var(--accent-gold);
    border-color: var(--accent-gold);
    color: white;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
    .navbar-toggler-modern {
        display: block;
    }
    .hero-title {
        font-size: 3.5rem;
    }
}
@media (max-width: 768px) {
    .hero-v3 {
        padding-top: 100px;
        padding-bottom: 50px;
    }
}
