/* ==========================================================================
   1. GLOBAL VARIABLES & RESET
   ========================================================================== */
:root {
    --bg-main: #0a0a0a;         /* Pure deep black background */
    --bg-card: #141414;         /* Premium lighter gray for product cards */
    --bg-modal: #1a1a1a;        /* Elegant shade for forms and checkout */
    --text-primary: #ffffff;    /* Stark white for titles & pricing */
    --text-muted: #999999;      /* Smooth gray for item descriptions */
    --accent-color: #ffffff;    /* Primary highlight color */
    --border-color: #262626;    /* Discrete dividing lines */
    --gpay-color: #ffffff;      /* Theme colors for seamless checkout UX */
    --phonepe-color: #5f259f;   /* Signature PhonePe Violet */
    --font-main: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
    -webkit-tap-highlight-color: transparent; /* Smooth mobile touches */
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* ==========================================================================
   2. NAVIGATION HEADER & TOP ANNOUNCEMENTS
   ========================================================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background-color: rgba(10, 10, 10, 0.95);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 2px;
    background: linear-gradient(45deg, #fff, #888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-icons {
    display: flex;
    gap: 20px;
}

.nav-link {
    color: var(--text-primary);
    font-size: 1.2rem;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.nav-link:hover {
    opacity: 0.7;
}

.announcement-bar {
    background-color: #111;
    color: var(--text-primary);
    text-align: center;
    padding: 8px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 3px;
    border-bottom: 1px solid var(--border-color);
}

/* ==========================================================================
   3. PRODUCT TILES & GRID SYSTEM (FLIPKART / GYMKHA INSPIRED)
   ========================================================================== */
.products-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 30px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.product-card {
    background-color: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.product-card:hover {
    border-color: #444;
}

/* ==========================================================================
   4. INTERACTIVE IMAGE SLIDERS
   ========================================================================== */
.image-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4; /* Keeps clothes pictures standard across devices */
    background-color: #1a1a1a;
    overflow: hidden;
}

.slider-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Prevents cloth images from stretching or squeezing */
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
    z-index: 1;
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

/* Slide Navigation Arrows */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    border: none;
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    backdrop-filter: blur(4px);
    transition: background 0.2s;
}

.slider-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.prev-btn { left: 12px; }
.next-btn { right: 12px; }

/* Hide arrows when item has only 1 picture total */
.no-arrows .slider-btn {
    display: none !important;
}

/* Bottom Progress Slider Dots */
.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: background 0.3s style, width 0.3s ease;
}

.dot.active {
    background: var(--text-primary);
    width: 16px; /* Pill effect for active image indicator */
    border-radius: 10px;
}

/* ==========================================================================
   5. PRODUCT INFORMATION METADATA
   ========================================================================== */
.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.product-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 16px;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.price {
    font-size: 1.4rem;
    font-weight: 700;
}

.color-indicator {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #333;
    box-shadow: inset 0 0 4px rgba(0,0,0,0.5);
}

/* Dynamic Size Selection Boxes */
.size-selector {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.size-btn {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid #333;
    padding: 8px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    min-width: 42px;
    transition: all 0.2s ease;
}

.size-btn:hover {
    border-color: #666;
}

.size-btn.selected {
    background-color: var(--accent-color);
    color: #000;
    border-color: var(--accent-color);
}

/* Buy Action Call to Action Button */
.buy-now-btn {
    background-color: var(--accent-color);
    color: #000;
    border: none;
    padding: 14px;
    width: 100%;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 1px;
    cursor: pointer;
    margin-top: auto;
    transition: background-color 0.2s ease;
}

.buy-now-btn:hover {
    background-color: #e5e5e5;
}

/* ==========================================================================
   6. PREMIUM CHECKOUT MODALS (ADDRESS & GATEWAYS)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: none; /* Controlled dynamically via JavaScript */
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(8px);
}

/* Displays open whenever active */
.modal-overlay.active {
    display: flex;
}

.modal-box {
    background-color: var(--bg-modal);
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 460px;
    border-radius: 16px;
    padding: 28px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-modal-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
}

.close-modal-btn:hover {
    color: var(--text-primary);
}

.modal-heading {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.modal-subheading {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.4;
}

/* Mini receipt tracking module */
.order-summary-snippet {
    background-color: rgba(255,255,255,0.04);
    border-radius: 8px;
    padding: 12px;
    font-size: 0.85rem;
    border-left: 3px solid var(--accent-color);
    margin-bottom: 20px;
    line-height: 1.4;
}

/* Standardized Custom Forms */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #cccccc;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #666;
}

.submit-form-btn {
    background-color: var(--accent-color);
    color: #000;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    margin-top: 10px;
}

/* Payment Layout Addons */
.amount-to-pay {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 24px;
    padding: 12px;
    border-bottom: 1px dashed var(--border-color);
}

.payment-options-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pay-method-btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: opacity 0.2s, transform 0.1s;
}

.pay-method-btn:active {
    transform: scale(0.98);
}

.gpay-btn {
    background-color: var(--gpay-color);
    color: #000000;
}

.phonepe-btn {
    background-color: var(--phonepe-color);
    color: #ffffff;
}

.secure-footer {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 24px;
}

.secure-footer i {
    color: #00ff66;
    margin-right: 4px;
}

/* ==========================================================================
   7. FOOTER SECTION
   ========================================================================== */
.main-footer {
    border-top: 1px solid var(--border-color);
    background-color: #0a0a0a;
    padding: 40px 20px;
    text-align: center;
}

.main-footer h3 {
    font-size: 1.2rem;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.main-footer p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.main-footer i {
    margin-right: 6px;
}

.rights {
    margin-top: 24px;
    font-size: 0.75rem;
    color: #444444;
}

/* ==========================================================================
   8. MOBILE RESPONSIVENESS ADJUSTMENTS
   ========================================================================== */
@media (max-width: 480px) {
    .products-container {
        grid-template-columns: 1fr; /* Stack single files nicely on phones */
        padding: 15px 10px;
        gap: 20px;
    }
    
    .modal-box {
        padding: 20px;
    }
    
    .logo {
        font-size: 1.2rem;
    }
}