/* ==========================================================================
   JAI CRACKERS - Mobile-First Clean & Fast Design System
   Theme: Sivakasi Festive Crimson & Royal Amber Gold
   ========================================================================== */

:root {
    --primary: #990000;
    --primary-dark: #660000;
    --accent-gold: #ffb703;
    --accent-gold-bright: #ffd700;
    --accent-orange: #fb8500;
    --bg-dark: #0d0202;
    --bg-card: #170707;
    --bg-card-alt: #220b0b;
    --text-light: #ffffff;
    --text-muted: #d1b8b8;
    --border-color: #3d1010;
    --success: #10b981;
    --font-heading: 'Outfit', -apple-system, sans-serif;
    --font-body: 'Poppins', -apple-system, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-body);
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.5;
    min-height: 100vh;
    padding-bottom: 90px;
}

/* Announcement Bar */
.announcement-bar {
    background: linear-gradient(90deg, #800000, #ff8c00, #800000);
    color: #fff;
    text-align: center;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

/* Header */
header {
    background: rgba(23, 7, 7, 0.98);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 183, 3, 0.3);
    padding: 10px 16px;
}

.header-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.logo-icon {
    font-size: 1.6rem;
}

.logo-text h1 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent-gold-bright);
    line-height: 1.1;
}

.logo-text p {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-brochure-header {
    background: rgba(255, 183, 3, 0.15);
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold-bright);
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-contact-header {
    background: rgba(255, 183, 3, 0.15);
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold-bright);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 0.85rem;
}

.cart-btn-trigger {
    background: linear-gradient(135deg, var(--accent-orange), var(--primary));
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
}

.cart-badge {
    background: var(--accent-gold-bright);
    color: #000;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 800;
}

/* Compact Banner Hero */
.hero-compact {
    background: linear-gradient(to bottom, rgba(13,2,2,0.7), rgba(13,2,2,0.98)), url('images/hero_banner.jpg');
    background-size: cover;
    background-position: center;
    padding: 22px 16px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.hero-compact h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--accent-gold-bright);
    margin-bottom: 4px;
}

.hero-compact p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.badge-50-off {
    display: inline-block;
    background: linear-gradient(90deg, #dc2626, #ff8c00);
    color: #fff;
    padding: 5px 12px;
    border-radius: 15px;
    font-weight: 800;
    font-size: 0.78rem;
}

.btn-download-brochure {
    background: rgba(255, 183, 3, 0.2);
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold-bright);
    padding: 5px 14px;
    border-radius: 15px;
    font-weight: 700;
    font-size: 0.78rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Search Bar */
.search-container {
    max-width: 1100px;
    margin: 15px auto 10px;
    padding: 0 16px;
}

.search-box {
    position: relative;
}

.search-box input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 12px 16px 12px 40px;
    border-radius: 25px;
    font-size: 0.9rem;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-gold);
}

/* Horizontal Category Filter Slider */
.category-nav-wrapper {
    max-width: 1100px;
    margin: 0 auto 15px;
    padding: 0 16px;
    position: sticky;
    top: 58px;
    z-index: 900;
    background: var(--bg-dark);
}

.category-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.cat-pill {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 6px 14px;
    border-radius: 20px;
    white-space: nowrap;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.cat-pill.active {
    background: var(--primary);
    border-color: var(--accent-gold);
    color: #fff;
    box-shadow: 0 2px 8px rgba(153,0,0,0.5);
}

/* Product List Container */
.catalog-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Mobile-First Item Card Row */
.product-item-row {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.item-left-info {
    flex: 1;
    min-width: 0;
}

.item-sno-tag {
    font-size: 0.7rem;
    color: var(--accent-gold);
    font-weight: 700;
}

.item-title-main {
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-title-tamil {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.item-price-box {
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.price-actual {
    text-decoration: line-through;
    color: #888;
    font-size: 0.78rem;
}

.price-discount {
    color: var(--success);
    font-weight: 800;
    font-size: 0.95rem;
}

.unit-label {
    font-size: 0.7rem;
    color: #aaa;
    background: rgba(255,255,255,0.06);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Quantity Controls */
.qty-control-touch {
    display: flex;
    align-items: center;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.qty-btn-touch {
    background: var(--bg-card-alt);
    border: none;
    color: var(--accent-gold);
    width: 34px;
    height: 34px;
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.qty-btn-touch:active {
    background: var(--primary);
    color: #fff;
}

.qty-input-touch {
    width: 38px;
    height: 34px;
    background: transparent;
    border: none;
    color: #fff;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.category-divider {
    color: var(--accent-gold-bright);
    font-size: 0.95rem;
    font-weight: 800;
    margin: 18px 0 10px;
    padding-bottom: 4px;
    border-bottom: 2px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Sticky Bottom WhatsApp Checkout Bar */
.sticky-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(18, 5, 5, 0.97);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--accent-gold);
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 999;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.8);
}

.cart-summary-info {
    display: flex;
    flex-direction: column;
}

.summary-net-price {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent-gold-bright);
    line-height: 1.1;
}

.summary-savings {
    font-size: 0.72rem;
    color: var(--success);
    font-weight: 600;
}

.btn-whatsapp-checkout {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 25px;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}

/* Modal Popup */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(6px);
    display: flex;
    justify-content: center;
    align-items: flex-end;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-container {
    background: var(--bg-card);
    border-top: 2px solid var(--accent-gold);
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 550px;
    max-height: 85vh;
    overflow-y: auto;
    padding: 20px 18px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--accent-gold-bright);
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 4px;
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.order-summary-box {
    background: rgba(0,0,0,0.3);
    border: 1px dashed var(--border-color);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 15px;
    max-height: 150px;
    overflow-y: auto;
    font-size: 0.82rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
}

/* Footer */
footer {
    background: #050101;
    border-top: 1px solid var(--border-color);
    padding: 25px 16px 40px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
}

footer p {
    margin-bottom: 6px;
}

.footer-phones {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 10px 0;
}

.footer-phones a {
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 600;
}
