/* ========================================= */
/* ⭐️ JYOTHI TAILORS - MASTER SHOP STYLES ⭐️ */
/* ========================================= */

/* === 1. BASE STYLES & VARIABLES === */
:root {
    --primary-color: #3A1E58; 
    --secondary-color: #f43f7d; 
    --accent-color: #CBBF81; 
    --text-dark: #141726;
    --text-light: #666666;
    --bg-light: #fcfcfc;
    --white: #ffffff;
    --border-color: #E3E9EF;
    --transition: all 0.3s ease;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Poppins', sans-serif; 
    -webkit-tap-highlight-color: transparent;
}

body { 
    background-color: var(--bg-light); 
    color: var(--text-dark); 
    line-height: 1.6; 
    -webkit-font-smoothing: antialiased; 
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

h1, h2, h3, h4, h5 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
}

.container { 
    max-width: 1450px; 
    margin: 0 auto; 
    padding: 0 20px; 
    width: 100%;
}

/* === 2. PREMIUM DESKTOP NAVBAR === */
header { 
    background-color: var(--white); 
    box-shadow: 0px 4px 16px rgba(43, 52, 69, 0.05); 
    position: sticky; 
    top: 0; 
    z-index: 9999; 
    border-bottom: 1px solid var(--border-color); 
}

.navbar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    height: 85px; 
    position: relative; 
}

.nav-left { display: none; } 

.logo {
    display: flex;
    align-items: center;
    margin-right: auto; 
}

.logo img {
    height: 65px; 
    object-fit: contain;
}

.nav-links { 
    display: flex; 
    gap: 2.8rem; 
    align-items: center; 
    position: absolute; 
    left: 50%; 
    transform: translateX(-50%); 
    margin: 0; 
}

.nav-links a { 
    font-weight: 600; 
    font-size: 0.95rem; 
    color: var(--primary-color); 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    position: relative; 
    padding-bottom: 5px; 
}

.nav-links a::after { 
    content: ''; 
    position: absolute; 
    width: 100%; 
    height: 2px; 
    bottom: 0; 
    left: 0; 
    background-color: var(--secondary-color); 
    transform: scaleX(0); 
    transition: transform 0.3s ease-out; 
}

.nav-links a:hover::after, 
.nav-links a.active-link::after { 
    transform: scaleX(1); 
}

.nav-links a:hover, .nav-links a.active-link { 
    color: var(--secondary-color); 
}

.nav-icons { 
    display: flex; 
    gap: 1.8rem; 
    font-size: 1.4rem; 
    color: var(--primary-color); 
    align-items: center; 
}

.nav-icons i { cursor: pointer; transition: var(--transition); }
.nav-icons i:hover { color: var(--secondary-color); transform: translateY(-2px); }

.cart-wrapper { position: relative; display: flex; align-items: center; cursor: pointer; }

.cart-badge { 
    position: absolute; 
    top: -6px; 
    right: -8px; 
    background-color: var(--secondary-color); 
    color: white; 
    font-size: 0.65rem; 
    font-weight: 700; 
    height: 18px; 
    width: 18px; 
    border-radius: 50%; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    border: 2px solid var(--white); 
}

.close-menu-btn, .mobile-bottom-nav { display: none; }

/* === 3. PAGE BANNER === */
.page-banner { 
    background-color: var(--accent-color); 
    padding: 1.5rem 20px; 
    margin-bottom: 2rem; 
    color: var(--primary-color); 
    text-align: center; 
}

.page-banner h1 { 
    font-size: 2.8rem; 
    margin-bottom: 0.5rem; 
    letter-spacing: 1px;
}

.page-banner p { 
    font-size: 1.1rem; 
    color: var(--primary-color); 
    font-weight: 500;
}

/* === 4. INTERACTIVE CATEGORY TABS === */
.tabs-section { margin-bottom: 3rem; }

.tabs-container { 
    display: flex; 
    justify-content: center; 
    gap: 1rem; 
    flex-wrap: wrap; 
    border-bottom: 2px solid var(--border-color); 
    padding-bottom: 1rem; 
}

.tab-btn { 
    background: none; 
    border: 1px solid var(--primary-color); 
    font-size: 1rem; 
    font-weight: 600; 
    color: var(--primary-color); 
    padding: 0.6rem 1.8rem; 
    cursor: pointer; 
    transition: var(--transition); 
    border-radius: 50px; 
}

.tab-btn:hover { background-color: rgba(58, 30, 88, 0.05); }

.tab-btn.active { 
    background-color: var(--primary-color); 
    color: var(--white); 
    box-shadow: 0 4px 10px rgba(58, 30, 88, 0.2); 
}

/* === 5. PRODUCTS GRID (SHOP PAGES) === */
.products-section { padding-bottom: 5rem; flex-grow: 1; }

.product-grid { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 2rem; 
}

.product-item { 
    background: var(--white); 
    border-radius: 12px; 
    overflow: hidden; 
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.05); 
    transition: var(--transition); 
    border: 1px solid var(--border-color); 
    display: flex; 
    flex-direction: column; 
}

.product-item:hover { 
    transform: translateY(-5px); 
    box-shadow: 0px 10px 25px rgba(0, 0, 0, 0.1); 
}

.product-img-wrapper { 
    width: 100%; 
    height: 380px; 
    overflow: hidden; 
    background-color: #f9f9f9; 
    position: relative;
}

.product-img-wrapper img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    object-position: top; 
    transition: transform 0.5s ease; 
}

.product-item:hover .product-img-wrapper img { transform: scale(1.05); }

.product-details { 
    padding: 1.2rem; 
    display: flex; 
    flex-direction: column; 
    flex-grow: 1; 
}

.product-details h3 { 
    font-size: 1.1rem; 
    font-weight: 600; 
    color: var(--primary-color); 
    margin-bottom: 1rem; 
    line-height: 1.3; 
    text-align: left;
}

.price-action { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-top: auto; 
}

.price { font-size: 1.15rem; font-weight: 700; color: var(--text-dark); }

.add-to-cart-btn { 
    background-color: var(--secondary-color); 
    color: var(--white); 
    border: none; 
    padding: 0.6rem 1.2rem; 
    border-radius: 6px; 
    font-weight: 600; 
    font-size: 0.85rem; 
    cursor: pointer; 
    transition: var(--transition); 
    display: flex; 
    align-items: center; 
    gap: 0.4rem; 
}

.add-to-cart-btn:hover { background-color: #d12b63; box-shadow: 0 4px 10px rgba(244, 63, 125, 0.3); }

/* === 6. CART LAYOUT & ITEMS (CART PAGE) === */
.cart-section { padding-bottom: 5rem; flex-grow: 1; }
.cart-layout { display: grid; grid-template-columns: 1.8fr 1fr; gap: 2.5rem; align-items: start; }

.cart-table-labels {
    display: grid;
    grid-template-columns: 3fr 140px 120px 50px;
    padding: 15px 20px;
    background: #f8fafc;
    border-radius: 12px 12px 0 0;
    font-weight: 600;
    color: var(--text-light);
    border: 1px solid var(--border-color);
    align-items: center;
}

.cart-table-labels span:nth-child(1) { text-align: left; }
.cart-table-labels span:nth-child(2) { text-align: center; }
.cart-table-labels span:nth-child(3) { text-align: center; }
.cart-table-labels span:nth-child(4) { text-align: center; }

.cart-item {
    display: grid;
    grid-template-columns: 3fr 140px 120px 50px; 
    align-items: center;
    padding: 20px;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-top: none;
    transition: var(--transition);
}

.cart-item:last-child { border-radius: 0 0 12px 12px; }
.cart-item:hover { background-color: #fcfdfe; }

.product-info-group { display: flex; align-items: center; gap: 20px; }
.product-info-group img { height: 100px; width: 85px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border-color); flex-shrink: 0; }
.cart-item-details { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cart-item-details br { display: none; } 
.cart-item-details h4 { font-size: 1.15rem; color: var(--text-dark); margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.category-text { font-size: 0.8rem; color: var(--secondary-color); font-weight: 600; }
.unit-price { font-size: 0.95rem; color: var(--text-light); font-weight: 500; }

.cart-qty-controls {
    display: flex; align-items: center; justify-content: space-between; gap: 5px;
    background: #f1f5f9; border-radius: 50px; padding: 6px 15px; width: 100%; max-width: 100px; margin: 0 auto;
}
.cart-qty-controls button { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: var(--primary-color); font-weight: 600; width: 20px; text-align: center; }
.cart-qty-controls span { font-weight: 700; font-size: 1.05rem; text-align: center; }

.item-total-price { font-weight: 800; color: var(--primary-color); font-size: 1.2rem; text-align: center; }
.remove-btn { background: none; border: none; color: #cbd5e1; font-size: 1.4rem; cursor: pointer; transition: var(--transition); text-align: center; display: block; margin: 0 auto; }
.remove-btn:hover { color: #ef4444; transform: scale(1.1); }

/* === 7. ⭐️ STATIC CHECKOUT CARD (STICKY) ⭐️ === */
.cart-summary-column { position: sticky; top: 110px; height: max-content; }
.summary-card { background: var(--white); padding: 2.5rem; border-radius: 16px; box-shadow: 0 15px 35px rgba(58, 30, 88, 0.08); border: 1px solid var(--border-color); }
.summary-card h3 { font-size: 1.6rem; margin-bottom: 1.5rem; }
.summary-row { display: flex; justify-content: space-between; margin-bottom: 1.2rem; color: var(--text-light); font-weight: 500; }
.total-row { color: var(--text-dark); font-weight: 800; font-size: 1.5rem; border-top: 1px solid var(--border-color); padding-top: 1.5rem; }

.pay-now-btn {
    width: 100%; background-color: var(--secondary-color); color: var(--white);
    border: none; padding: 1.2rem; border-radius: 12px; font-size: 1.1rem;
    font-weight: 700; cursor: pointer; margin-top: 2rem; transition: var(--transition);
    display: flex; justify-content: center; align-items: center; gap: 10px;
}
.pay-now-btn:hover { background-color: #d12b63; transform: translateY(-3px); box-shadow: 0 10px 20px rgba(244, 63, 125, 0.2); }

/* === 8. PREMIUM FOOTER === */
footer { background-color: var(--white); padding: 0.5rem 0.5rem 0.5rem; border-top: 1px solid var(--border-color); margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 3rem; max-width: 1400px; margin: 0 auto; }
.footer-col h4 { color: var(--primary-color); font-size: 1.1rem; margin-bottom: 1.5rem; font-weight: 700; }
.footer-col ul li { margin-bottom: 0.8rem; }
.footer-col ul li a { color: var(--text-light); transition: var(--transition); font-size: 0.95rem; }
.footer-col ul li a:hover { color: var(--primary-color); font-weight: 500; }
.social-icons { display: flex; gap: 1.2rem; margin-top: 1rem; }
.social-icons i { font-size: 1.5rem; color: var(--primary-color); cursor: pointer; transition: var(--transition); }
.social-icons i:hover { color: var(--secondary-color); transform: scale(1.1); }
.footer-bottom { text-align: center; padding-top: 2rem; margin-top: 3rem; border-top: 1px solid var(--border-color); color: var(--text-light); font-size: 0.9rem; }

/* === 9. TOAST NOTIFICATIONS (BOTTOM CENTER) === */
.toast-container { 
    position: fixed; 
    bottom: 30px; 
    left: 50%; 
    transform: translateX(-50%); 
    z-index: 100001; 
    display: flex;
    flex-direction: column;
    align-items: center;
}

.custom-toast { 
    background: var(--primary-color); 
    color: var(--white); 
    padding: 12px 25px; 
    border-radius: 50px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.2); 
    margin-top: 10px; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    font-weight: 500; 
    animation: popUp 0.4s ease forwards;
}

@keyframes popUp { 
    from { transform: translateY(100px); opacity: 0;} 
    to { transform: translateY(0); opacity: 1;} 
}

/* ========================================= */
/* 📱 NATIVE APP MOBILE ENGINE (Under 768px) */
/* ========================================= */
@media (max-width: 768px) {
    
    body { padding-bottom: 80px; } /* Space for App Bar */

    /* 1. "TRUE CENTER" MOBILE HEADER */
    .navbar {
        display: flex !important;
        align-items: center !important;
        padding: 10px 20px !important;
        height: 65px !important;
    }
    
    .nav-left { display: flex !important; flex: 1; justify-content: flex-start; }
    .logo { display: flex; flex: 1; justify-content: center; position: static; margin: 0; }
    .nav-icons { display: flex !important; flex: 1; justify-content: flex-end; gap: 1rem; }

    .logo img { height: 50px !important; } 
    .desktop-only { display: none !important; }

    /* 2. Hamburger Mechanics */
    .mobile-menu-toggle {
        background: none;
        border: none;
        font-size: 1.6rem;
        color: var(--primary-color);
        cursor: pointer;
    }

    .nav-links {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important; 
        width: 75vw !important; 
        height: 100vh !important;
        background: var(--white) !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        padding: 80px 30px !important;
        box-shadow: 5px 0 15px rgba(0,0,0,0.3) !important;
        transition: left 0.3s ease !important;
        z-index: 100000 !important;
        gap: 25px !important;
        transform: none !important;
    }
    .nav-links.active { left: 0 !important; }

    .close-menu-btn {
        display: block !important;
        position: absolute;
        top: 20px;
        right: 20px;
        background: none;
        border: none;
        font-size: 1.8rem;
        color: var(--primary-color);
    }

    /* 3. Mobile Banner Adjustments */
    .page-banner { padding: 0.5rem 1px; margin-bottom: 0.5rem; }
    .page-banner h1 { font-size: 1.8rem; }
    .page-banner p { font-size: 0.9rem; }
    .tabs-section { margin-bottom: 0.5rem; }

    /* 4. Fixed Tabs on Mobile (No Scroll) */
    .tabs-container {
        display: flex;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 8px;
        overflow-x: hidden;
        padding: 10px 5px;
        width: 100%;
    }

    .tab-btn {
        flex: 1;
        padding: 10px 5px;
        font-size: 11px;
        text-align: center;
        white-space: nowrap;
        border-radius: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
    }

    /* 5. ⭐️ THE 2-COLUMN VERTICAL GRID (Downward Scrolling) ⭐️ */
    .products-section { padding: 0 10px 30px 10px; }

    .product-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important; /* EXACTLY 2 COLUMNS */
        gap: 12px !important; 
    }

    .product-item {
        border-radius: 8px;
    }

    .product-img-wrapper {
        height: 180px !important; /* Small enough so 2 products fit perfectly on screen */
    }

    .product-details {
        padding: 10px !important;
    }

    .product-details h3 {
        font-size: 0.8rem !important; 
        margin-bottom: 8px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis; /* Stops long titles from breaking the grid */
    }

    .price {
        font-size: 0.9rem !important;
    }

    .add-to-cart-btn {
        padding: 5px 8px !important;
        font-size: 0.75rem !important;
    }

    .add-to-cart-btn i {
        font-size: 0.75rem;
    }

    /* 6. Sticky Bottom Navigation */
    .mobile-bottom-nav {
        display: flex !important;
        justify-content: space-around;
        align-items: center;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: var(--white);
        box-shadow: 0 -4px 15px rgba(0,0,0,0.08);
        padding: 10px 0 15px 0;
        z-index: 99999;
    }

    .mobile-bottom-nav .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: var(--text-light);
        font-size: 0.65rem;
        gap: 4px;
        font-weight: 500;
    }
    /* ⭐️ TOAST MOBILE FIX (Pushed above bottom nav) ⭐️ */
    /* ⭐️ TOAST MOBILE FIX (Pushed above bottom nav) ⭐️ */
    .toast-container { 
        bottom: 70px !important; /* Increased from 95px to completely clear the icons! */
        width: 90%; 
        left: 50%;
        transform: translateX(-50%);
    }
    
    .custom-toast { 
        width: 75%; 
        justify-content: center; 
        text-align: center; 
        font-size: 0.85rem; 
        padding: 10px 15px; 
    }

    .mobile-bottom-nav .nav-item i { font-size: 1.2rem; }
    .mobile-bottom-nav .nav-item.active { color: var(--primary-color); font-weight: 700; }
}
    