/* ==================== GLOBAL & RESET ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    /* Enables smooth sliding when clicking nav links */
    scroll-behavior: smooth;
    scroll-padding-top: 90px; /* Prevents sticky header from hiding section titles */
}

body {
    background-color: #fcfcfc;
    color: #333;
    line-height: 1.6;
}

/* ==================== PAGE LOADER ==================== */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #fcfcfc;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loader-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-overlay p {
    margin-top: 20px;
    font-weight: bold;
    color: #b8860b;
    letter-spacing: 1px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #eaeaea;
    border-top: 5px solid #b8860b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==================== HEADER & NAVIGATION ==================== */
#site-header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap; /* Helps responsive design */
}

.brand-logo h1 {
    font-size: 24px;
    letter-spacing: 2px;
    color: #b8860b;
    text-transform: uppercase;
}

.main-nav {
    display: flex;
    gap: 20px;
}

.main-nav a {
    text-decoration: none;
    color: #444;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: #b8860b;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.contact-info {
    display: none; /* Hidden on phones, visible on PC */
    font-size: 14px;
    color: #555;
}

.divider {
    margin: 0 10px;
    color: #ccc;
}

.cart-toggle {
    cursor: pointer;
    background-color: #333;
    color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: bold;
    transition: background 0.3s;
}

.cart-toggle:hover {
    background-color: #b8860b;
}

.cart-badge {
    background-color: #fff;
    color: #333;
    padding: 2px 6px;
    border-radius: 50%;
    font-size: 12px;
}

/* ==================== HERO BANNER ==================== */
.hero-banner {
    text-align: center;
    padding: 50px 20px;
    background-color: #faf9f6;
    border-bottom: 1px solid #eaeaea;
}

.hero-banner h2 {
    font-size: 32px;
    margin-bottom: 10px;
    color: #222;
}

.hero-banner p {
    color: #555;
    font-size: 16px;
}

/* ==================== PRODUCT GRID & BADGES ==================== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.product-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative; /* Crucial for positioning badges inside the card */
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: bold;
    color: #fff;
    border-radius: 4px;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.badge.new-arrival {
    background-color: #28a745; /* Green */
}

.badge.best-seller {
    background-color: #dc3545; /* Red */
}

.saree-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #eaeaea; 
    border-radius: 5px;
    margin-bottom: 10px;
}

.saree-title {
    font-size: 14px;
    margin-bottom: 5px;
    color: #444;
}

.saree-price {
    font-weight: bold;
    color: #222;
    margin-bottom: 10px;
}

.add-to-cart-btn {
    width: 100%;
    padding: 8px;
    background-color: #fff;
    color: #b8860b;
    border: 1px solid #b8860b;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.add-to-cart-btn:hover {
    background-color: #b8860b;
    color: #fff;
}

/* ==================== CONTACT SECTION ==================== */
.contact-section {
    padding: 60px 20px;
    text-align: center;
    background-color: #fff;
    border-top: 1px solid #eaeaea;
}

.contact-section h2 {
    font-size: 28px;
    color: #222;
    margin-bottom: 10px;
}

.contact-section p {
    color: #666;
    margin-bottom: 30px;
}

.contact-cards {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.c-card {
    background-color: #faf9f6;
    border: 1px solid #eee;
    padding: 25px 40px;
    border-radius: 8px;
    min-width: 260px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.03);
}

.c-card h3 {
    color: #b8860b;
    margin-bottom: 10px;
    font-size: 18px;
}

.c-card p {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

/* ==================== CART SIDEBAR & FORM ==================== */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 380px;
    height: 100%;
    background-color: #fff;
    box-shadow: -2px 0 15px rgba(0,0,0,0.2);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    transform: translateX(0);
}

.cart-inner {
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.close-btn {
    align-self: flex-end;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #888;
}

.cart-items-container {
    overflow-y: auto;
    max-height: 40vh; 
    margin-top: 15px;
    border-top: 1px solid #eee;
    padding: 10px 0;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 14px;
    border-bottom: 1px dashed #eee;
    padding-bottom: 10px;
}

.checkout-form {
    flex-grow: 1;
    display: none; 
    flex-direction: column;
    margin-top: 10px;
    border-top: 2px solid #eee;
    padding-top: 15px;
    overflow-y: auto;
}

.checkout-form h3 {
    margin-bottom: 10px;
    font-size: 16px;
    color: #444;
}

.form-group { margin-bottom: 10px; }
.form-row { display: flex; gap: 10px; margin-bottom: 10px; }

.checkout-form input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border 0.3s;
}

.checkout-form input:focus {
    border-color: #b8860b;
    outline: none;
    box-shadow: 0 0 5px rgba(184, 134, 11, 0.2);
}

.cart-summary {
    padding-top: 15px;
    margin-top: auto;
}

.cart-summary h3 {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 18px;
}

.proceed-btn {
    width: 100%;
    padding: 15px;
    background-color: #28a745;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.proceed-btn:hover { background-color: #218838; }

/* ==================== SUCCESS POPUP ==================== */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s;
}

.popup-overlay.hidden {
    display: none;
    opacity: 0;
}

.popup-box {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    max-width: 90%;
    width: 400px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
}

.tick-mark { font-size: 50px; margin-bottom: 10px; }
.popup-box h2 { color: #28a745; margin-bottom: 15px; font-size: 22px; }
.popup-box p { margin-bottom: 10px; font-size: 15px; }

.owner-notice {
    font-size: 12px !important;
    color: #777;
    margin-top: 15px;
    margin-bottom: 20px !important;
}

.close-popup-btn {
    padding: 10px 20px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* ==================== FOOTER ==================== */
footer {
    text-align: center;
    padding: 20px;
    background-color: #222;
    color: #fff;
}

/* ==================== MEDIA QUERIES (PC / TABLET) ==================== */
@media (max-width: 768px) {
    /* For smaller mobile screens, adjust the navigation menu layout */
    .main-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 15px;
        gap: 15px;
    }
}

@media (min-width: 768px) {
    .contact-info { display: block; }
    .product-grid { grid-template-columns: repeat(4, 1fr); gap: 25px; }
    .saree-img { height: 250px; }
}