/* ========================================================
   CSS VARIABLES & BASE STYLES
======================================================== */
:root {
    --bg-color: #F5F1E6; 
    --card-bg: #ffffff;
    --text-color: #3C3C3C;
    --primary-color: #6A1A2E; 
    --secondary-color: #254B13; 
    --input-border: #ddd;
    --transition-speed: 0.4s;
}

[data-theme="dark"] {
    --bg-color: #121212;
    --card-bg: #1E1E1E;
    --text-color: #E0E0E0;
    --primary-color: #E66A85; 
    --secondary-color: #4CAF50; 
    --input-border: #444;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; }

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
    line-height: 1.6;
}

/* ========================================================
   TOP BAR & HEADER
======================================================== */
.creator-badge {
    background: linear-gradient(90deg, #6A1A2E, #8B5E3C, #254B13, #6A1A2E);
    background-size: 300% 300%;
    color: white;
    text-align: center;
    padding: 8px 10px;
    font-size: 13px;
    animation: gradientMove 3s ease infinite;
}
.creator-text strong { color: #FFD700; }
@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

header {
    background-color: var(--card-bg);
    padding: 15px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: background-color var(--transition-speed) ease;
}
header h1 { color: var(--secondary-color); font-size: 18px; }

/* Theme Switcher */
.theme-switch-wrapper { display: flex; align-items: center; }
.theme-icon { font-size: 14px; margin: 0 8px; }
.theme-switch { display: inline-block; height: 24px; position: relative; width: 50px; }
.theme-switch input { display: none; }
.slider {
    background-color: #ccc; bottom: 0; cursor: pointer; left: 0;
    position: absolute; right: 0; top: 0; transition: .4s; border-radius: 34px;
}
.slider:before {
    background-color: #fff; bottom: 4px; content: ""; height: 16px;
    left: 4px; position: absolute; transition: .4s; width: 16px; border-radius: 50%;
}
input:checked + .slider { background-color: var(--secondary-color); }
input:checked + .slider:before { transform: translateX(26px); }
[data-theme="dark"] .slider { background-color: #555; }

/* Buttons & Hero */
.btn {
    background-color: var(--primary-color); color: white; padding: 12px 25px;
    text-decoration: none; border-radius: 30px; font-weight: 600;
    border: 2px solid var(--primary-color); cursor: pointer; transition: 0.3s; display: inline-block;
}
.btn:hover { background-color: transparent; color: var(--primary-color); }
.hero {
    background: linear-gradient(rgba(0,0,0, 0.6), rgba(0,0,0, 0.4)), url('img_Web/bac.jpeg') center/cover;
    color: white; text-align: center; padding: 120px 20px;
}
.hero h2 { font-size: 45px; margin-bottom: 20px; }

/* ========================================================
   PRODUCTS SECTION
======================================================== */
.products { padding: 60px 20px; text-align: center; }
.products h2 { color: var(--secondary-color); margin-bottom: 40px; font-size: 32px; }
.product-container { display: flex; justify-content: center; gap: 40px; flex-wrap: wrap; }

.product-card {
    background: var(--card-bg); width: 340px; padding: 25px;
    border-radius: 18px; box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, background-color var(--transition-speed);
}
.product-card:hover { transform: translateY(-8px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.product-image-container {
    width: 100%; height: 250px; background-color: #f7f3e8;
    border-radius: 12px; margin-bottom: 20px; display: flex; align-items: center; justify-content: center;
}
.product-image { max-width: 90%; max-height: 90%; object-fit: contain; }
[data-theme="dark"] .product-image-container { background-color: #2c2c2c; }

/* Weight Dropdown */
.weight-selector { text-align: left; margin: 10px 0; width: 100%; }
.weight-selector label { font-size: 13px; font-weight: 600; color: var(--text-color); }
.size-dropdown {
    width: 100%; padding: 10px; margin-top: 5px; border-radius: 8px;
    border: 1px solid var(--input-border); background: var(--bg-color);
    color: var(--text-color); outline: none; font-size: 14px; font-weight: 500; cursor: pointer;
}
.size-dropdown:focus { border-color: var(--secondary-color); }

/* Pricing */
.pricing-section { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 15px 0; }
.discount-price { font-size: 24px; font-weight: 700; color: var(--primary-color); }
.original-price { font-size: 16px; color: #888; text-decoration: line-through; }
.discount-badge { background-color: #4CAF50; color: white; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 5px; }

/* +/- Counter */
.quantity-wrapper {
    display: flex; justify-content: space-between; align-items: center;
    background: var(--bg-color); padding: 10px 15px; border-radius: 10px; margin-top: 15px;
    border: 1px solid var(--input-border);
}
.qty-text { font-weight: 600; font-size: 15px; }
.counter-container { display: flex; align-items: center; background: var(--card-bg); border: 1px solid var(--input-border); border-radius: 8px; overflow: hidden; }
.counter-btn { background: transparent; border: none; color: var(--text-color); font-size: 20px; width: 35px; height: 35px; cursor: pointer; transition: 0.2s; }
.counter-btn:hover { background: var(--primary-color); color: white; }
.qty-input {
    width: 40px; height: 35px; text-align: center; border: none;
    border-left: 1px solid var(--input-border); border-right: 1px solid var(--input-border);
    background: var(--card-bg); color: var(--text-color); font-weight: bold; pointer-events: none;
}

/* ========================================================
   CHECKOUT & OVERLAY
======================================================== */
.checkout {
    background: var(--card-bg); max-width: 600px; margin: 0 auto 80px;
    padding: 40px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}
.checkout h2 { color: var(--secondary-color); text-align: center; margin-bottom: 20px; }
.grand-total-box {
    background: rgba(37, 75, 19, 0.05); border: 2px dashed var(--secondary-color);
    padding: 15px; border-radius: 10px; text-align: center; margin-bottom: 25px;
}
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; }
.form-group input, .form-group textarea {
    width: 100%; padding: 12px; border: 1px solid var(--input-border);
    border-radius: 8px; background: var(--bg-color); color: var(--text-color); outline: none;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--secondary-color); }
.finalize-btn { width: 100%; padding: 15px; font-size: 16px; border-radius: 10px; }

.confirmation-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85); display: flex; align-items: center; justify-content: center;
    z-index: 1000; opacity: 0; transition: 0.5s;
}
.confirmation-overlay.visible { opacity: 1; }
.hidden { display: none; }
.confirmation-content { background: var(--card-bg); padding: 50px; border-radius: 20px; text-align: center; }
.tick-icon { font-size: 70px; color: #4CAF50; margin-bottom: 20px; animation: popIn 0.5s cubic-bezier(0.18, 0.89, 0.32, 1.28); }
@keyframes popIn { 0% { transform: scale(0); } 100% { transform: scale(1); } }
footer { background: var(--secondary-color); color: white; text-align: center; padding: 25px; }

@media (max-width: 768px) {
    header { padding: 15px 20px; }
    .hero h2 { font-size: 30px; }
    .product-card { width: 100%; max-width: 350px; }
    .checkout { padding: 25px; margin: 0 15px 60px 15px; }
}
/* ========================================================
   PREMIUM BUTTONS & CART DRAWER (NAYA UPDATE)
======================================================== */
/* Premium 3D Button */
.btn-premium {
    background: linear-gradient(135deg, var(--primary-color), #8B233C);
    color: white; border: none; padding: 14px 20px;
    font-size: 16px; font-weight: 600; border-radius: 12px;
    cursor: pointer; width: 100%; transition: all 0.3s ease;
    box-shadow: 0 6px 15px rgba(106, 26, 46, 0.25);
    margin-top: 15px; text-align: center;
}
.btn-premium:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(106, 26, 46, 0.4);
    background: linear-gradient(135deg, #8B233C, var(--primary-color));
}

/* Header Cart Icon */
.cart-icon-wrapper {
    position: relative; font-size: 26px; cursor: pointer;
    margin-left: 15px; transition: transform 0.2s;
}
.cart-icon-wrapper:hover { transform: scale(1.1); }
.cart-badge {
    position: absolute; top: -5px; right: -10px;
    background: #E53935; color: white; font-size: 11px;
    font-weight: bold; height: 20px; width: 20px;
    border-radius: 50%; display: flex; align-items: center;
    justify-content: center; box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Cart Overlay (Peeche ka andhera) */
.cart-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 999;
    opacity: 0; visibility: hidden; transition: 0.3s ease;
}
.cart-overlay.active { opacity: 1; visibility: visible; }

/* Side Drawer (Myntra Style) */
.cart-drawer {
    position: fixed; top: 0; right: -400px; width: 100%; max-width: 380px;
    height: 100vh; background: var(--card-bg); z-index: 1000;
    box-shadow: -5px 0 25px rgba(0,0,0,0.1); 
    transition: right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); /* Smooth Slide */
    display: flex; flex-direction: column;
}
.cart-drawer.active { right: 0; }
[data-theme="dark"] .cart-drawer { border-left: 1px solid #444; }

/* Drawer Internals */
.cart-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px; border-bottom: 1px solid var(--input-border);
}
.cart-header h2 { color: var(--primary-color); font-size: 22px; }
.close-btn { background: none; border: none; font-size: 30px; cursor: pointer; color: var(--text-color); }

.cart-items { flex: 1; overflow-y: auto; padding: 20px; }
.cart-item {
    display: flex; align-items: center; gap: 15px; margin-bottom: 20px;
    padding-bottom: 15px; border-bottom: 1px solid var(--input-border);
}
.cart-item img { width: 65px; height: 65px; object-fit: cover; border-radius: 8px; background: #f7f3e8; }
[data-theme="dark"] .cart-item img { background: #2c2c2c; }
.cart-item-details { flex: 1; }
.cart-item-title { font-size: 14px; font-weight: 600; color: var(--text-color); line-height: 1.3; margin-bottom: 5px; }
.cart-item-price { color: var(--secondary-color); font-weight: bold; font-size: 15px; }
.remove-btn { color: #E53935; background: none; border: none; font-size: 20px; cursor: pointer; transition: 0.2s; }
.remove-btn:hover { transform: scale(1.2); }

.cart-footer { padding: 20px; border-top: 1px solid var(--input-border); background: var(--bg-color); }
.cart-total { display: flex; justify-content: space-between; font-size: 20px; font-weight: 700; margin-bottom: 15px; color: var(--text-color); }
/* ========================================================
   CHECKOUT PAGE SUMMARY BOX
======================================================== */
.checkout-summary-box {
    background: rgba(0,0,0,0.02);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 20px;
}
[data-theme="dark"] .checkout-summary-box { background: rgba(255,255,255,0.02); }

.summary-item {
    display: flex; justify-content: space-between;
    margin-bottom: 10px; padding-bottom: 10px;
    border-bottom: 1px dashed var(--input-border);
    font-size: 15px; color: var(--text-color);
}
.summary-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.summary-item-name { font-weight: 500; }
.summary-item-price { font-weight: 700; color: var(--secondary-color); }