/* =========================================
   1. GLOBAL VARIABLES & RESET (Purple Theme)
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&display=swap');

:root {
    --bg-color: ##fff1ff;        /* Soft Pink Background */
    --primary-color: #590d56;   /* Deep Purple (Logo Main) */
    --accent-color: #9c27b0;    /* Light Purple */
    --gold: #ffc20e;            /* Highlight */
    --white: #ffffff;
    --text-dark: #333;
    --shadow: 0 5px 15px rgba(89, 13, 86, 0.1);
}

* { box-sizing: border-box; }

body {
    margin: 0; padding: 0;
    font-family: 'Quicksand', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    font-size: 16px; /* Base font size fixed */
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; padding: 0; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font-family: 'Quicksand', sans-serif; }

/* Focus States */
input:focus, textarea:focus, select:focus { 
    outline: none; 
    border-color: var(--primary-color); 
}

/* =========================================
   2. HEADER & NAVIGATION
   ========================================= */
header {
    background: #fff1ff ;
    padding: 10px 5%;
    display: flex; justify-content: space-between; align-items: center;
    position: sticky; top: 0; z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.header-left { display: flex; align-items: center; gap: 20px; }

/* Logo Size Fix */
.logo img { 
    height: 100px; 
    width: auto; 
    object-fit: contain; 
}

.nav-links a { 
    margin: 0 10px; 
    font-weight: 600; 
    font-size: 15px; 
    color: var(--text-dark); 
}
.nav-links a:hover { color: var(--primary-color); }

.header-right { display: flex; align-items: center; gap: 20px; }
.header-right i { font-size: 20px; cursor: pointer; color: var(--primary-color); }

.cart-icon { position: relative; }
.cart-icon span {
    background: var(--primary-color); color: white;
    font-size: 11px; padding: 3px 6px; border-radius: 50%;
    position: absolute; top: -8px; right: -8px; font-weight: bold;
}

/* User Dropdown */
.user-dropdown {
    position: absolute; right: 0; top: 50px; background: white;
    width: 250px; box-shadow: var(--shadow);
    border-radius: 12px; padding: 20px; border: 1px solid #eee;
    display: none; z-index: 1001;
}

/* =========================================
   3. HERO SECTION
   ========================================= */
.hero {
    background: linear-gradient(135deg, #590d56 0%, #8e24aa 100%);
    min-height: 450px; display: flex; align-items: center; justify-content: space-around;
    padding: 20px 5%; color: white; position: relative; overflow: hidden;
}

.hero-content h1 { 
    font-size: 48px; line-height: 1.2; margin: 15px 0; font-weight: 800; 
}
.hero-btn {
    padding: 12px 35px; background: var(--white); color: var(--primary-color);
    font-weight: bold; border-radius: 30px; display: inline-block; margin-top: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.hero-btn:hover { transform: scale(1.05); background: var(--gold); color: black; }

/* =========================================
   4. PRODUCT GRID & CARDS
   ========================================= */
.section-container { padding: 50px 5%; max-width: 1200px; margin: auto; }
.section-title { 
    text-align: center; color: var(--primary-color); 
    margin-bottom: 40px; font-size: 28px; font-weight: 700; 
}

/* Product Grid */
.product-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
    gap: 25px; 
}

.product-card {
    background: var(--white); border-radius: 15px; padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); text-align: center; transition: 0.3s;
    border: 1px solid #fff; position: relative;
}
.product-card:hover { 
    transform: translateY(-5px); 
    box-shadow: var(--shadow); 
    border: 1px solid var(--primary-color); 
}
.product-card img { 
    height: 200px; width: 100%; object-fit: contain; margin-bottom: 15px; 
}
.product-card h3 { font-size: 16px; margin: 10px 0; color: #333; }
.product-card p { 
    color: var(--primary-color); font-weight: bold; font-size: 18px; margin: 5px 0; 
}

.add-cart-btn {
    width: 100%; padding: 10px; background: var(--primary-color); color: white;
    border: none; border-radius: 8px; cursor: pointer; font-weight: bold; margin-top: 10px;
}
.add-cart-btn:hover { background: var(--accent-color); }

/* Category Grid */
.category-grid { 
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px; 
}
.cat-card {
    background: var(--white); border-radius: 15px; padding: 15px; text-align: center;
    cursor: pointer; transition: 0.3s; box-shadow: 0 5px 10px rgba(0,0,0,0.05);
}
.cat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.arch-img img { width: 100%; height: 200px; object-fit: cover; border-radius: 100px 100px 10px 10px; }

/* Filter Pills */
.filter-pills { display: flex; justify-content: center; gap: 10px; margin-bottom: 30px; flex-wrap: wrap; }
.pill {
    padding: 8px 25px; border-radius: 20px; border: 1px solid var(--primary-color);
    background: transparent; color: var(--primary-color); cursor: pointer; font-weight: 600;
}
.pill.active, .pill:hover { background: var(--primary-color); color: white; }

/* =========================================
   5. SEARCH OVERLAY
   ========================================= */
.search-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(253, 240, 246, 0.98); z-index: 2000;
    display: none; flex-direction: column; align-items: center; padding-top: 100px; overflow-y: auto;
}
.search-input {
    width: 80%; max-width: 600px; padding: 15px; font-size: 24px; border: none;
    border-bottom: 3px solid var(--primary-color); background: transparent;
    color: var(--primary-color); text-align: center; font-weight: bold; outline: none;
}
.close-search {
    position: absolute; top: 30px; right: 40px; font-size: 40px;
    color: var(--primary-color); cursor: pointer;
}

/* =========================================
   6. ADMIN PANEL (Premium Fixed)
   ========================================= */
.admin-wrapper { max-width: 850px; margin: 50px auto; padding: 0 20px; }

.admin-card {
    background: #ffffff; padding: 30px; border-radius: 16px;
    box-shadow: var(--shadow); margin-bottom: 25px; 
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.section-head {
    font-size: 20px; font-weight: 700; color: var(--primary-color);
    margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px dashed #e0c0d0;
}

/* Admin Input Fields */
.admin-card input, 
.admin-card textarea, 
.admin-card select {
    width: 100%; padding: 12px; margin-bottom: 20px;
    border: 2px solid #f0f0f0; border-radius: 10px; background: #fdfbfd;
    box-sizing: border-box; font-size: 15px;
}
.admin-card input:focus { border-color: var(--primary-color); background: #fff; }

/* Admin Checkboxes */
.checkbox-group { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.checkbox-group label { display: flex; align-items: center; gap: 5px; cursor: pointer; }

/* Dynamic Variant Rows */
#variants-container { display: flex; flex-direction: column; gap: 15px; }

.variant-box {
    display: flex; gap: 15px; align-items: center; background: #fff; 
    padding: 15px; border-radius: 12px; border: 1px solid #eee; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}
.variant-box input { margin-bottom: 0 !important; }

.btn-remove {
    background: #ffecf0; color: #d32f2f; border: none; width: 40px; height: 40px;
    border-radius: 50%; cursor: pointer; font-weight: bold; flex-shrink: 0;
}
.btn-add {
    background: #4caf50; color: white; padding: 12px; width: 100%; border: none; 
    border-radius: 10px; font-weight: bold; cursor: pointer; margin-top: 10px;
}
.upload-btn {
    background: var(--primary-color); color: white; width: 100%; padding: 15px; 
    font-size: 18px; font-weight: 800; border: none; border-radius: 12px; 
    cursor: pointer; text-transform: uppercase; margin-top: 20px;
}

/* =========================================
   7. PRODUCT DETAILS PAGE SPECIFIC
   ========================================= */
.details-container {
    display: flex; gap: 40px; background: white; padding: 30px;
    border-radius: 15px; margin: 30px auto; max-width: 1200px;
    flex-wrap: wrap; box-shadow: var(--shadow);
}
.details-img-box {
    flex: 1; min-width: 300px; text-align: center;
    border: 1px solid #eee; border-radius: 10px; padding: 20px;
}
.details-info { flex: 1; min-width: 300px; }

.thumbs-row {
    display: flex; gap: 10px; margin-top: 15px; overflow-x: auto;
}
.thumb-img {
    width: 60px; height: 60px; border: 2px solid transparent; 
    cursor: pointer; object-fit: cover; border-radius: 8px; opacity: 0.7;
}
.thumb-img.active { border-color: var(--primary-color); opacity: 1; }

.color-btn {
    padding: 8px 15px; border: 1px solid #ddd; cursor: pointer;
    background: white; border-radius: 5px; font-weight: 600; margin-right: 10px;
}
.color-btn.selected {
    background: var(--primary-color); color: white; border-color: var(--primary-color);
}

/* =========================================
   8. FOOTER
   ========================================= */
footer { 
    background: var(--primary-color); color: white; 
    padding: 50px 5%; text-align: center; margin-top: 50px;
}

/* =========================================
   9. MOBILE RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    .hero { flex-direction: column; text-align: center; height: auto; padding: 40px 20px; }
    .hero-content h1 { font-size: 32px; }
    .nav-links { display: none; } /* Hide menu on mobile for simplicity */
    .variant-box { flex-direction: column; align-items: stretch; }
    .details-container { flex-direction: column; padding: 20px; }
    .product-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}


/* --- ORDER PAGE STYLING (Flipkart Style) --- */
.order-card {
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.order-header {
    background: #f8f9fa;
    padding: 10px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #555;
}

.order-body {
    display: flex;
    padding: 20px;
    flex-wrap: wrap;
}

.items-list { flex: 2; min-width: 300px; border-right: 1px solid #eee; padding-right: 20px; }

.order-item {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.order-item img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.item-details h4 { margin: 0 0 5px; font-size: 16px; color: #212121; }
.item-details .variant { font-size: 12px; color: gray; margin: 0; }
.item-details .price { font-size: 16px; font-weight: bold; margin-top: 5px; }

.order-status {
    flex: 1;
    min-width: 200px;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.status-badge {
    width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 8px;
}

.order-status h3 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.order-status p { font-size: 12px; color: gray; margin-top: 5px; }

.order-footer {
    padding: 10px 20px;
    border-top: 1px solid #eee;
    background: #fff;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

/* Mobile Fix */
@media (max-width: 768px) {
    .order-body { flex-direction: column; }
    .items-list { border-right: none; border-bottom: 1px solid #eee; padding-bottom: 15px; margin-bottom: 15px; }
    .order-status { padding-left: 0; }
}


/* --- CHECKOUT PAGE STYLING --- */
.checkout-wrapper {
    max-width: 800px;
    margin: 40px auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.checkout-header {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    padding: 20px;
    color: white;
    text-align: center;
}

.checkout-body {
    padding: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #444;
    font-size: 14px;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: 0.3s;
    font-family: 'Quicksand', sans-serif;
}

.form-group input:focus, 
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    background: #fdfbfd;
}

.order-summary {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border: 1px dashed #ccc;
    text-align: center;
}

.total-amount {
    font-size: 24px;
    color: var(--primary-color);
    font-weight: 800;
    margin: 10px 0 0 0;
}

.payment-badge {
    background: #e3f2fd;
    color: #1565c0;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    text-align: center;
    border: 1px solid #bbdefb;
    margin-bottom: 20px;
}

        .main-content {
            flex: 1;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 20px;
        }
        .login-box {
            background: var(--white);
            padding: 40px;
            text-align: center;
            border-radius: 16px;
            width: 100%;
            max-width: 380px;
            box-shadow: var(--shadow);
            border: 1px solid rgba(255, 255, 255, 0.5);
        }
        .login-box h2 {
            color: var(--primary-color);
            margin-bottom: 20px;
        }
        .login-box p {
            color: var(--text-light);
            margin-bottom: 15px;
        }
        .login-box input {
            width: 100%;
            padding: 12px;
            margin: 10px 0;
            border: 1px solid #ddd;
            border-radius: 8px;
            font-size: 16px;
            outline: none;
        }
        .login-box input:focus {
            border-color: var(--primary-color);
        }
        .login-box button {
            background: var(--primary-color);
            color: white;
            border: none;
            padding: 12px;
            width: 100%;
            font-weight: bold;
            font-size: 16px;
            border-radius: 8px;
            cursor: pointer;
            margin-top: 10px;
            transition: 0.3s;
        }
        .login-box button:hover {
            background: var(--secondary-color);
        }
        #recaptcha-container {
            margin-top: 10px;
            display: flex;
            justify-content: center;
        }