/*
Theme Name: Virelle
Theme URI: https://virelle.in
Author: Custom Brand Build
Description: Minimal custom jewellery theme - Final Polished Version
Version: 7.0 (Zero Scrollbar Fix)
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Playfair+Display:wght@500;600&display=swap');

/* =========================
   1. COLOR SYSTEM (LOCKED)
========================= */
:root {
  --bg-primary: #F0E6DE;      
  --bg-secondary: #E3D7CA;    
  --text-primary: #5C472E;    
  --text-secondary: #A98354;  
  --accent-gold: #CBaf8F;     
}

/* =========================
   2. RESET & GLOBAL (FINAL FIX HERE)
========================= */
* { box-sizing: border-box; margin: 0; padding: 0; }

/* FIX: Apply overflow hidden to both HTML and BODY to kill simulator scrollbars */
html, body {
    overflow-x: hidden !important;
    width: 100%;
    margin: 0;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* overflow-x: hidden; <-- Moved up to html, body selector */
}

a { color: inherit; text-decoration: none; transition: 0.3s; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; width: 100%; }

img { max-width: 100%; height: auto; display: block; }

/* --- BUTTON RESET (CRITICAL FIX) --- */
button.icon-btn, button.menu-toggle, button.close-drawer {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #333;
}
button.icon-btn:focus, button.menu-toggle:focus { outline: none; }


/* =========================
   3. HEADER STRUCTURE (FIXED)
========================= */
.site-header {
    position: relative; 
    z-index: 1001;      
    background-color: var(--bg-primary); 
}

/* Base Style (Mobile First) */
.header-grid {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    justify-content: space-between; /* Mobile: Logo Left, Icons Right */
    gap: 15px;
}

/* Desktop Override */
@media (min-width: 992px) {
    .header-grid {
        justify-content: flex-start; /* Desktop: Menu flows normally */
        gap: 40px;
    }
}

/* =========================
   4. TYPOGRAPHY & BUTTONS
========================= */
h1, h2, h3 { font-family: 'Playfair Display', serif; color: var(--text-primary); }

.btn {
  background: var(--text-primary);
  color: var(--bg-primary);
  padding: 14px 32px;
  font-weight: 600;
  display: inline-block;
  transition: 0.3s;
  border: 1px solid var(--text-primary);
  cursor: pointer;
  letter-spacing: 1px;
}

.btn:hover { background: var(--accent-gold); color: var(--text-primary); border-color: var(--accent-gold); }

/* =========================
   5. HERO SECTION (POLISHED)
========================= */
.hero-section { padding: 60px 0; min-height: 70vh; display: flex; align-items: center; }
.hero-layout { display: flex; align-items: center; gap: 40px; }

.hero-text { flex: 1.2; }
.hero-subtitle { font-size: 13px; text-transform: uppercase; letter-spacing: 2px; color: var(--text-secondary); margin-bottom: 10px; font-weight: 600; }
.hero-title { font-size: 3.5rem; line-height: 1.1; margin-bottom: 20px; }
.hero-desc { font-size: 1.1rem; opacity: 0.8; margin-bottom: 30px; max-width: 480px; }

.hero-image-container { flex: 1; display: flex; justify-content: flex-end; }
.hero-img { width: 100%; max-width: 450px; border-radius: 4px; box-shadow: 15px 15px 0px var(--bg-secondary); }

/* =========================
   6. PRODUCT GRID (LUXE)
========================= */
.featured-products { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 50px; }
.section-title { font-size: 2.2rem; margin-bottom: 5px; }
.section-subtitle { color: var(--text-secondary); font-size: 13px; text-transform: uppercase; letter-spacing: 1.5px; }

.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; }

.product-card {
  background: #fff;
  padding: 15px;
  border-radius: 8px;
  transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  display: flex;
  flex-direction: column;
}

.product-card:hover { transform: translateY(-8px); box-shadow: 0 10px 25px rgba(92, 71, 46, 0.08); }

.product-image-wrapper { overflow: hidden; border-radius: 4px; margin-bottom: 15px; }
.product-card img { width: 100%; height: auto; transition: 0.5s; display: block; aspect-ratio: 1/1; object-fit: cover; }
.product-card:hover img { transform: scale(1.08); }

.product-title { font-size: 15px; margin-bottom: 8px; min-height: 45px; font-weight: 500; }
.price { color: var(--text-secondary); font-weight: 600; margin-bottom: 15px; display: block; }
.price del { color: #ccc; font-size: 13px; margin-right: 5px; font-weight: 400; }

.btn-add-cart { 
    padding: 12px 10px !important; 
    font-size: 13px !important;
    background: transparent; 
    color: var(--text-primary); 
    border: 1px solid var(--text-primary); 
    margin-top: 15px;
    letter-spacing: 1px;
}

/* =========================
   7. CATEGORY SECTION
========================= */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.category-card { display: block; transition: 0.3s; }
.category-card:hover { transform: translateY(-5px); }

.cat-img-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 15px;
    border: 2px solid transparent;
    transition: 0.3s;
    background: #fff;
}

.category-card:hover .cat-img-wrapper { border-color: var(--text-secondary); }
.cat-img-wrapper img { width: 100%; height: 100%; object-fit: cover; }

.category-card span {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    color: var(--text-primary);
}

/* =========================
   8. BRAND STORY SECTION
========================= */
.brand-story {
    background-color: var(--bg-secondary);
    padding: 80px 0;
    margin-top: 50px;
}

.story-layout { display: flex; align-items: center; gap: 60px; justify-content: space-between; }
.story-image-col { flex: 1; }
.story-img-wrapper {
    position: relative; overflow: hidden; border-radius: 8px;
    box-shadow: 20px 20px 0px rgba(92, 71, 46, 0.1);
}
.story-img { width: 100%; height: auto; display: block; aspect-ratio: 4/5; object-fit: cover; }

.story-text-col { flex: 1; }
.story-title { font-size: 2.8rem; line-height: 1.2; margin-bottom: 20px; color: var(--text-primary); }
.story-desc { font-size: 1.1rem; color: var(--text-primary); opacity: 0.9; margin-bottom: 30px; line-height: 1.8; }

.story-usps {
    display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 35px;
    font-family: 'Inter', sans-serif; font-weight: 600; font-size: 14px;
    color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px;
}
.usp-item {
    background: rgba(255, 255, 255, 0.5); padding: 8px 15px;
    border-radius: 4px; border: 1px solid rgba(169, 131, 84, 0.2);
}

.btn-text-only {
    background: transparent; color: var(--text-primary); padding: 0;
    border: none; border-bottom: 1px solid var(--text-primary); border-radius: 0;
    font-size: 14px;
}
.btn-text-only:hover { color: var(--text-secondary); border-color: var(--text-secondary); }

/* =========================
   9. SINGLE PRODUCT PAGE
========================= */
.virelle-trust-badges {
    width: 100%; clear: both; margin-top: 25px; padding-top: 20px;
    border-top: 1px solid rgba(92, 71, 46, 0.1);
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px;
}
.badge-item { display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 1.2; color: var(--text-primary); }
.badge-icon { font-size: 18px; min-width: 20px; }

.woocommerce-variation-add-to-cart, form.cart { margin-top: 30px; margin-bottom: 20px; }

.single_add_to_cart_button {
    background-color: var(--text-primary) !important; color: var(--bg-primary) !important;
    padding: 16px 40px !important; font-size: 15px !important; letter-spacing: 1px;
    width: 100%; border-radius: 2px;
}
.single_add_to_cart_button:hover { background-color: var(--accent-gold) !important; color: var(--text-primary) !important; }

.quantity .qty {
    padding: 12px; border: 1px solid var(--text-primary); margin-right: 10px;
    background: transparent; color: var(--text-primary);
}

@media (min-width: 768px) {
    .single_add_to_cart_button { width: auto; }
}

/* =========================================
   10. CHECKOUT PAGE DESIGN (PREMIUM & FIXED)
   ========================================= */

/* 10.1 Page Background & Heading */
.woocommerce-checkout {
    background-color: #FAFAFA;
    padding-bottom: 60px;
}
.woocommerce-checkout h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    color: var(--text-primary);
}

/* 10.2 Fix Input Fields Layout (Prevent small squares) */
.woocommerce form .form-row {
    display: block; 
    width: 100%; 
    margin-bottom: 15px; 
    padding: 0;
}

/* Split First Name / Last Name on Desktop */
@media (min-width: 768px) {
    .woocommerce form .form-row-first,
    .woocommerce form .form-row-last {
        width: 48%;
        float: left;
    }
    .woocommerce form .form-row-last {
        float: right;
    }
}

/* Input Styles */
.woocommerce-checkout input.input-text, 
.woocommerce-checkout textarea,
.select2-selection {
    width: 100%;
    padding: 14px 15px !important;
    border: 1px solid #E0E0E0 !important;
    border-radius: 6px !important;
    background-color: #fff !important;
    font-size: 15px !important;
    color: var(--text-primary) !important;
    box-shadow: none !important;
    min-height: 48px;
}

.woocommerce-checkout input.input-text:focus,
.select2-selection:focus {
    border-color: var(--text-primary) !important;
    outline: none;
}

/* 10.3 Desktop 2-Column Layout (The Main Fix) */
@media (min-width: 992px) {
    .woocommerce-checkout form.checkout {
        display: flex;
        flex-wrap: wrap;
        gap: 40px;
        align-items: flex-start;
    }

    /* Left Side: Billing Details */
    #customer_details {
        flex: 1;
        width: 58%; /* Specific width for left side */
        min-width: 300px;
    }
    
    .col2-set {
        width: 100%;
        float: none;
    }

    /* Right Side: Order Review & Payment */
    #order_review_heading, 
    #order_review {
        width: 100%;
    }
    
    /* Wrapper for Right Side (Sticky Box) */
    .woocommerce-checkout-review-order {
        flex: 0 0 38%; /* Specific width for right side */
        background: #fff;
        padding: 30px;
        border-radius: 8px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.05);
        position: sticky;
        top: 30px;
    }
}

/* 10.4 Payment Box Styling */
#payment {
    background: #FAFAFA !important;
    border-radius: 6px;
    padding: 20px !important;
}
#place_order {
    background-color: var(--text-primary) !important;
    color: #fff !important;
    font-size: 16px !important;
    padding: 18px !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    width: 100%;
    margin-top: 20px !important;
}
#place_order:hover {
    background-color: var(--accent-gold) !important;
}

/* 10.5 Terms Checkbox (Visible Fix) */
.woocommerce-terms-and-conditions-wrapper {
    margin-top: 15px;
    padding: 15px;
    background: #fff;
    border: 1px dashed #ccc;
    border-radius: 4px;
}

/* Force Checkbox Visibility */
input[type="checkbox"][name="terms"] {
    opacity: 1 !important;
    position: relative !important;
    display: inline-block !important;
    width: 18px !important;
    height: 18px !important;
    margin-right: 10px !important;
    appearance: auto !important;
    -webkit-appearance: auto !important;
    z-index: 1000 !important;
    cursor: pointer;
    vertical-align: middle;
}

/* Align Label Text */
.woocommerce-form__label-for-checkbox {
    display: flex !important;
    align-items: center !important;
    font-size: 14px !important;
}

/* Style Links (Privacy/Terms) */
.woocommerce-terms-and-conditions-checkbox-text a,
.woocommerce-privacy-policy-text a {
    color: var(--text-secondary) !important;
    text-decoration: underline !important;
    font-weight: 700 !important;
}

/* =========================
   11. DESKTOP HEADER & MENU (FIXED & ALIGNED)
========================= */

/* --- 1. GLOBAL STYLES (Mobile & Desktop) --- */
.header-icons {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto; /* Right alignment for flex containers */
}

.icon-link {
    color: #333;
    display: flex;
    align-items: center;
    position: relative;
    transition: color 0.3s;
    text-decoration: none;
}

/* Mobile Defaults: Hide Desktop Menu */
.desktop-nav { display: none; } 
.menu-toggle { display: block; }

/* --- 2. DESKTOP SPECIFIC (ONLY FOR 992px+) --- */
@media (min-width: 992px) {

    /* Logo Size */
    .brand img { max-width: 180px; }

    /* Show Desktop Menu */
    .desktop-nav { display: block !important; }

    /* Menu Layout */
    .desktop-menu-list {
        display: flex; 
        gap: 30px; 
        list-style: none; 
        margin: 0; 
        padding: 0;
    }

    .desktop-menu-list a {
        text-decoration: none; 
        color: #333; 
        font-weight: 500; 
        font-size: 15px;
        text-transform: uppercase; 
        letter-spacing: 1px;
    }

    /* Desktop par icons ka gap thoda badha do */
    .header-icons { gap: 20px; }

    .icon-link:hover { color: #D4AF37; }

    /* Cart Count Badge */
    .cart-count {
        position: absolute; 
        top: -8px; 
        right: -8px;
        background-color: #D4AF37; 
        color: #fff;
        font-size: 10px; 
        font-weight: bold; 
        height: 16px; 
        width: 16px;
        display: flex; 
        align-items: center; 
        justify-content: center; 
        border-radius: 50%;
    }

    /* Mobile Elements Hide */
    .menu-toggle { display: none !important; }
    #mobile-menu { display: none !important; }
}

/* =========================
   12. MOBILE MENU (FINAL LUXURY FIX)
========================= */

@media (max-width: 992px) {
    
    /* --- 1. HEADER ALIGNMENT --- */
    .header-grid {
        justify-content: space-between !important; 
        padding: 15px 20px;
        gap: 10px;
    }
    
    .header-icons {
        margin-left: 0;
        gap: 15px;
    }
    
    .brand img { max-width: 130px !important; }

    /* --- 2. MOBILE MENU DRAWER (FULL SCREEN WHITE) --- */
    #mobile-menu {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: #ffffff;
        z-index: 999999;
        display: none;
        overflow-y: auto;
        padding: 0;
    }

    #mobile-menu.active {
        display: block !important;
        animation: fadeIn 0.2s ease-out;
    }

    .drawer-content {
        display: flex;
        flex-direction: column;
        min-height: 100%;
        padding: 25px;
    }

    /* --- 3. DRAWER HEADER --- */
    .drawer-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 30px;
        padding-bottom: 15px;
        border-bottom: 1px solid #f5f5f5;
    }
    
    .drawer-header img {
        max-width: 120px !important;
        height: auto;
    }

    /* Close Button (X) */
    .close-drawer {
        font-size: 30px;
        line-height: 1;
        color: #333;
    }

    /* --- 4. MENU LINKS --- */
    .drawer-nav { flex: 1; }

    .mobile-menu-list, 
    .mobile-menu-list ul, 
    .mobile-menu-list li {
        list-style: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .mobile-menu-list > li {
        border-bottom: 1px solid #fafafa;
    }

    .mobile-menu-list > li > a {
        display: block;
        padding: 15px 0;
        font-family: 'Inter', sans-serif;
        font-size: 18px;
        font-weight: 500;
        color: var(--text-primary);
        text-transform: uppercase;
        letter-spacing: 1px;
        text-decoration: none;
    }

    /* Sub-menu styling */
    .mobile-menu-list .sub-menu {
        padding-left: 0 !important;
        display: block;
        background: #fff;
    }

    .mobile-menu-list .sub-menu a {
        font-size: 15px;
        color: #666;
        padding: 10px 0;
        text-transform: capitalize;
        font-weight: 400;
    }
    
    /* Remove bullets */
    .mobile-menu-list li::before, .mobile-menu-list .sub-menu li::before {
        content: none !important; display: none !important;
    }

    /* --- 5. FOOTER --- */
    .drawer-footer {
        margin-top: 30px;
        text-align: center;
        padding-top: 20px;
        border-top: 1px solid #f5f5f5;
    }

    .drawer-tagline {
        font-family: 'Playfair Display', serif;
        font-style: italic;
        color: #999;
        font-size: 14px;
        margin-bottom: 15px;
    }

    .drawer-socials {
        display: flex;
        justify-content: center;
        gap: 25px;
    }

    .drawer-socials a {
        font-size: 13px;
        font-weight: 600;
        color: #333;
        text-transform: uppercase;
        letter-spacing: 1px;
        text-decoration: none;
        border-bottom: 1px solid #333;
    }
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }

/* =========================
   13. GLOBAL SEARCH DRAWER (FIXED FOR DESKTOP & MOBILE)
========================= */
.search-drawer {
    display: none;
    position: absolute;
    top: 100%; /* Header ke bilkul neeche */
    left: 0;
    width: 100%;
    background-color: #ffffff;
    border-bottom: 1px solid #eee;
    padding: 20px 0;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    z-index: 999; /* Header (1001) ke neeche rahega lekin content ke upar */
}

.search-drawer.active {
    display: block !important;
    animation: slideDown 0.3s ease;
}

.search-drawer .container {
    max-width: 800px; /* Desktop par search bar bohot chauda na ho */
    margin: 0 auto;
    padding: 0 20px;
}

.search-form {
    display: flex;
    gap: 10px;
    width: 100%;
}

.search-field {
    flex: 1;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    outline: none;
}

.search-submit {
    background: var(--text-primary);
    color: #fff;
    border: none;
    padding: 0 30px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.3s;
}
.search-submit:hover {
    background: var(--accent-gold);
    color: #000;
}


/* =========================
   14. MY ACCOUNT / LOGIN
========================= */
.woocommerce-account .woocommerce {
    background: #fff; padding: 40px; border-radius: 8px;
    box-shadow: 0 10px 30px rgba(92, 71, 46, 0.05);
    max-width: 1000px; margin: 40px auto;
}
.woocommerce-account h2 {
    font-family: 'Playfair Display', serif; font-size: 2rem; color: var(--text-primary);
    margin-bottom: 25px; text-align: center; border-bottom: 2px solid var(--bg-secondary);
    display: inline-block; padding-bottom: 5px;
}
.u-columns.col2-set { display: flex; gap: 60px; justify-content: space-between; }
.u-column1, .u-column2 { flex: 1; width: 100%; }
.u-column1 { border-right: 1px solid #eee; padding-right: 60px; }

.woocommerce form .form-row input.input-text {
    width: 100%; padding: 14px; border: 1px solid #ddd; border-radius: 4px;
    background-color: #FAFAFA; font-size: 15px; color: var(--text-primary); margin-top: 5px;
}
.woocommerce form .form-row input.input-text:focus {
    background-color: #fff; border-color: var(--text-secondary); outline: none;
}
.woocommerce form .form-row label { font-weight: 600; font-size: 14px; color: var(--text-primary); }

.woocommerce-button, .woocommerce form .form-row .button {
    background-color: var(--text-primary) !important; color: #fff !important;
    padding: 15px 30px !important; font-weight: 600 !important; border-radius: 4px !important;
    width: 100%; margin-top: 10px; cursor: pointer; transition: 0.3s;
}
.woocommerce-button:hover, .woocommerce form .form-row .button:hover {
    background-color: var(--accent-gold) !important; color: var(--text-primary) !important;
}

.woocommerce-form-login__rememberme { margin-top: 10px; display: block; }
.woocommerce-LostPassword { margin-top: 15px; display: block; font-size: 13px; color: var(--text-secondary); }

.woocommerce-MyAccount-navigation ul {
    list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px;
}
.woocommerce-MyAccount-navigation li { flex: 1 1 45%; }
.woocommerce-MyAccount-navigation a {
    display: block; padding: 12px 15px; background-color: #FAFAFA; border: 1px solid #EAEAEA;
    color: var(--text-primary); text-decoration: none; border-radius: 6px; text-align: center;
    font-size: 14px; font-weight: 500; transition: 0.3s;
}
.woocommerce-MyAccount-navigation a:hover, .woocommerce-MyAccount-navigation li.is-active a {
    background-color: var(--text-primary); color: #fff; border-color: var(--text-primary);
}
.woocommerce-MyAccount-content {
    font-size: 15px; line-height: 1.8; color: var(--text-primary);
    background: #fff; border-top: 1px solid #eee; padding-top: 25px; margin-top: 20px;
}

@media (max-width: 768px) {
    .u-columns.col2-set { flex-direction: column; gap: 40px; }
    .u-column1 { border-right: none; border-bottom: 1px solid #eee; padding-right: 0; padding-bottom: 40px; }
    .woocommerce-account .woocommerce { padding: 20px; margin: 20px; }
    /* Hero fixes for mobile */
    .hero-layout { flex-direction: column-reverse; text-align: center; gap: 30px; }
    .hero-text { padding-right: 0; }
    .hero-title { font-size: 2.2rem; }
    .hero-desc { margin: 0 auto 25px; }
    .hero-image-container { justify-content: center; }
    .hero-img { max-width: 85%; }
    .category-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .cat-img-wrapper { border-radius: 16px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .story-layout { flex-direction: column; gap: 40px; }
    .story-title { font-size: 2.2rem; }
    .story-usps { flex-direction: column; gap: 10px; }
    .footer-grid { grid-template-columns: 1fr; gap: 40px; text-align: center; }
    .brand-col p { margin: 0 auto; }
}

@media (min-width: 992px) {
    .woocommerce-account .woocommerce { display: flex; gap: 50px; align-items: flex-start; }
    .woocommerce-MyAccount-navigation { flex: 0 0 260px; margin-bottom: 0; border-right: 1px solid #eee; padding-right: 30px; }
    .woocommerce-MyAccount-navigation ul { flex-direction: column; }
    .woocommerce-MyAccount-navigation li { width: 100%; }
    .woocommerce-MyAccount-navigation a { text-align: left; padding-left: 20px; background: transparent; border: none; }
    .woocommerce-MyAccount-navigation li.is-active a {
        background-color: var(--bg-primary); color: var(--text-primary); font-weight: 700; border-left: 3px solid var(--text-primary);
    }
    .woocommerce-MyAccount-content { flex: 1; border-top: none; padding-top: 0; margin-top: 0; }
}