/* ==========================================================================
   1. CSS RESET & VARIABLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark-primary: #f7f9fc;
    --bg-dark-secondary: #ffffff;
    --accent-orange: #2563eb;
    --accent-orange-hover: #1d4ed8;
    --accent-yellow: #ffc107;
    --accent-green: #25d366; /* WhatsApp green */
    --text-white: #16213e;
    --text-gray: #64748b;
    --border-color: #dbe4f0;
    --transition-speed: 0.3s;
    --accent-danger: #d72929;
    --accent-danger-hover: #ec1313;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 180px; /* Prevents sticky header from blocking content on anchor jump */
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark-primary);
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 92%;
    max-width: 1200px;
    margin: 0 auto;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-speed), background var(--transition-speed);
}

/* ==========================================================================
   2. STICKY HEADER SYSTEM (Top Utility, Brand Header & Nav)
   ========================================================================== */
.sticky-header-wrapper {
    position: -webkit-sticky; /* Support for older Safari */
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(22, 33, 62, 0.08);
    background-color: var(--bg-dark-primary);
    transition: transform var(--transition-speed) ease;
}

/* Top Announcement bar */
.utility-bar {
    background: linear-gradient(90deg, #0b1830, #12294d 50%, #0b1830);
    font-size: 11px;
    color: #e8dfd0;
    border-bottom: 2px solid var(--accent-orange);
    padding: 8px 0;
}

.utility-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.utility-flex div {
    display: flex;
    align-items: center;
    gap: 6px;
}

.utility-flex div i {
    color: var(--accent-yellow);
}

/* Brand Header */
.main-header {
    background-color: var(--bg-dark-primary);
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
    transition: padding var(--transition-speed) ease;
}

.header-scrolled .main-header {
    padding: 10px 0; /* Shrinks height dynamically on scroll */
}

.header-grid {
    display: flex;
    flex-direction: column; /* Stacked layout for small screens by default */
    gap: 15px;
}

/* Logo block */
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.logo-sparkle {
    font-size: 2rem;
    animation: pulse 1.5s infinite alternate;
}

.logo-text {
    text-align: left;
}

.logo-text h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(to right, #16213e, var(--accent-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text p {
    font-size: 8px;
    letter-spacing: 2px;
    color: var(--text-gray);
}

/* Central Search Input */
.search-bar {
    display: flex;
    width: 100%;
    position: relative;
}

.search-bar input {
    width: 100%;
    padding: 11px 45px 11px 18px;
    border-radius: 25px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-dark-secondary);
    color: var(--text-white);
    outline: none;
    font-size: 13px;
    transition: border var(--transition-speed);
}

.search-bar input:focus {
    border-color: var(--accent-orange);
}

.search-bar button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-gray);
    cursor: pointer;
    padding: 8px 12px;
}

/* Header Actions (WhatsApp & Cart Buttons) */
.header-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    width: 100%;
}

.action-item {
    padding: 10px 16px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1; /* Stretch action buttons to even widths on small devices */
    max-width: 200px;
    white-space: nowrap;
    min-width: 0;
}

.whatsapp-btn {
    background-color: var(--accent-green);
    color: white;
}

.whatsapp-btn:hover {
    background-color: #1ebd58;
}

.action-item.download-btn {
    background-color: var(--bg-dark-secondary);
    color: var(--text-white);
    border: 1px solid var(--border-color);
}
.action-item.download-btn:hover {
    background-color: #e6eefc;
}

.cart-btn {
    background-color: var(--bg-dark-secondary);
    border: 1px solid var(--border-color);
}

.cart-count {
    background-color: var(--accent-orange);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 50%;
}

/* Categories Filter Bar */
.nav-bar {
    background-color: #eef4ff;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    display: flex;
    flex-direction: column;
    padding: 0;
}

.menu-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    color: var(--text-white);
    padding: 15px 20px;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    width: 100%;
    border-bottom: 1px solid var(--border-color);
}

.nav-links {
    display: none; /* Hidden by default on mobile devices */
    flex-direction: column;
    list-style: none;
    width: 100%;
}

.nav-links.active {
    display: flex; /* Script toggles class "active" on click */
}

.nav-links li {
    border-bottom: 1px solid var(--border-color);
}

.nav-links li a {
    display: block;
    padding: 12px 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--text-gray);
    width: 100%;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--text-white);
    background-color: var(--bg-dark-secondary);
}

/* ==========================================================================
   3. HERO BANNER
   ========================================================================== */
.hero-section {
    background: radial-gradient(circle at 85% 15%, #eaf2ff 0%, transparent 45%),
                radial-gradient(circle at 50% 100%, #dbe9ff 0%, var(--bg-dark-primary) 60%);
    padding: 40px 0;
    text-align: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr); /* MOBILE: single column (image on top, text below) */
    align-items: center;
    gap: 24px;
}

.hero-content {
    min-width: 0;
}

.hero-graphics {
    position: relative;
    order: -1; /* Display graphic above heading details on mobile screens */
    align-self: center;
    max-width: 1050px;
    width: 100%;
}

.hero-main-img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;      /* same box for every banner */
    object-fit: contain;       /* full image visible, no cropping */
    background: #0f172a;       /* fills any empty side space */
    border-radius: 12px;
    box-shadow: 0 20px 45px rgba(37, 99, 235, 0.18), 0 8px 20px rgba(22, 33, 62, 0.12);
}

.discount-sticker {
    position: absolute;
    top: -10px;
    right: -10px;
    background: radial-gradient(circle, #60a5fa, var(--accent-orange));
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    color: #ffffff;
    box-shadow: 0 5px 15px rgba(37, 99, 235, 0.4);
    animation: bounce 2s infinite alternate;
}

.discount-sticker span {
    font-size: 8px;
}

.discount-sticker strong {
    font-size: 18px;
    line-height: 1.1;
}

.hero-subtitle {
    letter-spacing: 2px;
    color: var(--accent-orange-hover);
    font-weight: bold;
    font-size: 12px;
}

.hero-title {
    overflow-wrap: break-word;
    font-family: 'Montserrat', sans-serif;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
    margin: 10px 0;
    color: var(--text-white);
}

.hero-title span {
    color: var(--accent-orange);
}

.hero-features {
    color: var(--text-gray);
    font-size: 13px;
    margin-bottom: 20px;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 25px;
}

.hero-badge {
    background-color: var(--bg-dark-secondary);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-white);
    box-shadow: 0 2px 8px rgba(22, 33, 62, 0.05);
}

.hero-badge i {
    color: var(--accent-orange);
    margin-right: 2px;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    font-size: 12px;
}

.btn-primary {
    background-color: var(--accent-orange);
    color: white;
    width: 100%;
    max-width: 280px;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
    transition: background var(--transition-speed), transform var(--transition-speed), box-shadow var(--transition-speed);
}

.btn-primary:hover {
    background-color: var(--accent-orange-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.4);
}

.btn-danger {
    background-color: var(--accent-danger);
    color: white;
    width: 100%;
    max-width: 280px;
    box-shadow: 0 8px 20px rgba(215, 41, 41, 0.3);
    transition: background var(--transition-speed), transform var(--transition-speed), box-shadow var(--transition-speed);
}

.btn-danger:hover {
    background-color: var(--accent-danger-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(215, 41, 41, 0.4);
}

/* ==========================================================================
   4. PRODUCT DIRECTORY GRID
   ========================================================================== */
.store-catalog {
    padding: 40px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
    position: relative;
}

.section-header::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 56px;
    height: 2px;
    background-color: var(--accent-orange);
}

.section-header h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    color: var(--text-white);
}

.yellow-text {
    color: var(--accent-orange-hover);
}

.results-count {
    font-size: 11px;
    color: var(--text-gray);
}

/* Two-column layout by default on mobile devices to optimize space */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 12px;
}

.product-card {
    background-color: var(--bg-dark-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 10px rgba(22, 33, 62, 0.05);
    transition: transform var(--transition-speed), border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.product-card:hover {
    border-color: var(--accent-orange);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.15);
    transform: translateY(-3px);
}

.card-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: var(--accent-orange);
    color: #ffffff;
    font-size: 8px;
    font-weight: bold;
    padding: 3px 6px;
    border-radius: 3px;
    z-index: 2;
}

.product-img {
    width: 100%;
    height: 145px; /* Constrains height on card grid layout */
    object-fit: cover;
}

.product-info {
    padding: 12px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 3px;
    line-height: 1.3;
    color: var(--text-white);
}

.product-sub {
    font-size: 12px;
    color: var(--text-gray);
    margin-bottom: 10px;
}

.price-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-top: auto;
    margin-bottom: 10px;
}

.current-price {
    font-size: 14px;
    font-weight: 800;
    color: var(--accent-orange-hover);
}

.old-price {
    font-size: 11px;
    color: var(--text-gray);
    text-decoration: line-through;
}

.btn-add-cart {
    background-color: transparent;
    border: 1px solid var(--accent-orange);
    color: var(--accent-orange);
    padding: 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    transition: all var(--transition-speed);
}

.btn-add-cart:hover {
    background-color: var(--accent-orange);
    color: white;
}

/* ---- Product-card quantity stepper (Add to Cart <-> − qty + ) ----
   Lives inside .cart-control-wrapper on each product card. Scoped
   with that parent so it never collides with the cart-blade's own
   .qty-stepper rules further down this file. */
.cart-control-wrapper {
    width: 100%;
}

.cart-control-wrapper .qty-stepper {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    width: 100%;
    border: 1px solid var(--accent-orange);
    border-radius: 4px;
    overflow: hidden;
    background-color: rgba(37, 99, 235, 0.08);
    margin-top: 0;
}

.cart-control-wrapper .qty-btn {
    flex: 0 0 30%;
    background-color: transparent;
    border: none;
    color: var(--accent-orange);
    font-size: 11px;
    padding: 8px 0;
    cursor: pointer;
    transition: background var(--transition-speed), color var(--transition-speed);
}

.cart-control-wrapper .qty-btn:hover {
    background-color: var(--accent-orange);
    color: white;
}

.cart-control-wrapper .qty-btn:active {
    transform: scale(0.95);
}

.cart-control-wrapper .qty-count {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: var(--text-white);
    border-left: 1px solid var(--accent-orange);
    border-right: 1px solid var(--accent-orange);
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 10px;
    color: var(--text-gray);
    font-size: 13px;
}

/* ==========================================================================
   5. FOOTER
   ========================================================================== */
.footer-section {
    background-color: #0b1830;
    padding: 40px 0 20px 0;
    border-top: 3px solid var(--accent-orange);
    color: #cfc6b8;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr; /* Single column stack for mobile screen orientation */
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h4 {
    font-size: 11px;
    letter-spacing: 1px;
    margin-bottom: 15px;
    font-family: 'Montserrat', sans-serif;
    color: #ffffff;
}

.footer-col p {
    font-size: 12px;
    color: #a9b8d1;
    margin-bottom: 10px;
    line-height: 1.7;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    font-size: 12px;
    color: #a9b8d1;
    margin-bottom: 8px;
}

.footer-bottom {
    text-align: center;
    font-size: 10px;
    color: #8593ad;
    border-top: 1px solid #223a5e;
    padding-top: 20px;
}

/* ==========================================================================
   6. ANIMATIONS
   ========================================================================== */
@keyframes pulse {
    0% { transform: scale(1); }
    100% { transform: scale(1.08); }
}

@keyframes bounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-6px); }
}


/* ==========================================================================
   7. MEDIA QUERIES FOR LARGER VIEWPORTS (Tablet & Desktop Compatibility)
   ========================================================================== */

/* TABLET LANDSCAPE & PORTRAIT VIEWPORTS (min-width: 768px) */
@media (min-width: 768px) {
    .container {
        width: 88%;
    }

    /* Top Utility Area */
    .utility-bar {
        font-size: 12px;
    }

    /* Header changes to horizontal blocks */
    .header-grid {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 20px;
    }

    .logo {
        justify-content: flex-start;
    }

    .search-bar {
        max-width: 320px;
    }

    .header-actions {
        width: auto;
        justify-content: flex-end;
    }

    .action-item {
        flex: none;
        width: auto;
        padding: 10px 20px;
    }

    /* Menu drawer merges back into standard nav menu */
    .menu-toggle {
        display: none;
    }

    .nav-links {
        display: flex !important; /* Forces visible categories layout */
        flex-direction: row;
        justify-content: center;
    }

    .nav-links li {
        border-bottom: none;
    }

    .nav-links li a {
        padding: 15px 12px;
        font-size: 11px;
    }

    /* Hero section layouts */
    .hero-section {
        text-align: left;
        padding: 60px 0;
    }

    /* TWO COLUMN ROW: left = text content, right = image */
    .hero-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
        align-items: center;
        gap: 32px;
    }

    .hero-content {
        grid-column: 1;
        grid-row: 1;
        min-width: 0;
    }

    .hero-graphics {
        grid-column: 2;
        grid-row: 1;
        order: 0;
        width: 100%;
        max-width: none;      /* removed 400px limit -> bigger image */
        align-self: center;
        min-width: 0;
    }

    .discount-sticker {
        width: 84px;
        height: 84px;
        top: -14px;
        right: -14px;
    }

    .discount-sticker span {
        font-size: 10px;
    }

    .discount-sticker strong {
        font-size: 22px;
    }

    .hero-title {
        font-size: 38px;
    }

    .hero-badges {
        justify-content: flex-start;
    }

    .btn-primary {
        width: auto;
    }

    /* Catalog cards structure expands */
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .product-img {
        height: 180px;
    }

    /* Footer layouts */
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

/* DESKTOP MONITORS VIEWPORTS (min-width: 1024px) */
@media (min-width: 1124px) {
    .container {
        max-width: 1400px;
    }

    .search-bar {
        max-width: 480px;
    }

    .nav-links li a {
        padding: 15px 20px;
        font-size: 12px;
    }

    .hero-grid {
        grid-template-columns: minmax(0, 60fr) minmax(0, 40fr); /* content 60% | image 40% */
        gap: 56px;
    }

    .hero-title {
        font-size: 44px;
    }

    .hero-features {
        font-size: 15px;
    }

    .discount-sticker {
        width: 100px;
        height: 100px;
        top: -18px;
        right: -18px;
    }

    .discount-sticker span {
        font-size: 12px;
    }

    .discount-sticker strong {
        font-size: 26px;
    }

    .products-grid {
        grid-template-columns: repeat(3, 1fr); /* fewer, larger cards on desktop */
        gap: 22px;
    }

    .product-img {
        height: 210px;
    }
    
    .product-title {
        font-size: 16px;
    }

    .product-sub {
        font-size: 13px;
    }

    .current-price {
        font-size: 18px;
    }
}

/* ==========================================
   CHECKOUT MODAL STYLES
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 18, 34, 0.55);
    z-index: 2000;
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    padding: 15px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background-color: var(--bg-dark-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    width: 100%;
    max-width: 65%;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(22, 33, 62, 0.25);
    animation: fadeIn 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #eef4ff;
    border-bottom: 1px solid var(--border-color);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-gray);
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.order-summary-box {
    background-color: var(--bg-dark-primary);
    border: 1px solid var(--border-color);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.order-summary-box h4 {
    font-size: 13px;
    color: var(--accent-orange-hover);
    margin-bottom: 10px;
}

#summary-items-list {
    list-style: none;
    max-height: 160px;
    overflow-y: auto;
    margin-bottom: 10px;
    padding-right: 12px; /* keeps the scrollbar clear of the remove button column */
}

/* Clean 5-column row: name | pack size | qty | price | remove.
   Fixed-width columns for uom/qty/price/remove keep every row lined
   up regardless of how long a product name is. */
.summary-item-row {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) 56px 30px 64px 28px;
    align-items: center;
    column-gap: 10px;
    font-size: 12px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--border-color);
}

.summary-item-row:last-child {
    border-bottom: none;
}

.summary-item-name {
    color: var(--text-white);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.summary-item-uom {
    color: var(--text-gray);
    font-size: 11px;
    text-align: left;
    white-space: nowrap;
}

.summary-item-qty {
    color: var(--text-gray);
    text-align: center;
    font-weight: 600;
}

.summary-item-price {
    color: var(--text-white);
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
}

.btn-remove-item {
    background: transparent;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 14px;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    transition: background var(--transition-speed), transform var(--transition-speed);
    justify-self: center;
}

#checkout-form {
    list-style: none;
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 10px;
}

.summary-total {
    text-align: right;
    font-size: 15px;
    padding-right: 26px;
    color: var(--text-white);
}

.summary-total strong {
    color: var(--accent-orange-hover);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-gray);
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-dark-primary);
    color: var(--text-white);
    outline: none;
    font-size: 13px;
}

.form-group input:focus {
    border-color: var(--accent-orange);
}

.submit-order-btn {
    width: 100%;
    margin-top: 10px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}


/*!
 * Font Awesome Free 6.x.x (Local Webfonts Bundle CSS)
 * Setup for Brands (fa-brands-400.woff2) & Solid (fa-solid-900.woff2)
 */

/* ==========================================================================
   1. @FONT-FACE REGISTRATIONS (Linking to local webfonts directory)
   ========================================================================== */

/* Brands Style (e.g. WhatsApp, Facebook icons) */
@font-face {
  font-family: 'Font Awesome 6 Brands';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("../webfonts/fa-brands-400.woff2") format("woff2");
}

/* Solid Style (e.g. Stars, Carts, Phone, Search icons) */
@font-face {
  font-family: 'Font Awesome 6 Free';
  font-style: normal;
  font-weight: 900;
  font-display: block;
  src: url("../webfonts/fa-solid-900.woff2") format("woff2");
}


/* ==========================================================================
   2. FONT CLASS MAPPINGS (Assigns font-family & weights)
   ========================================================================== */

/* Core rendering setup for all icons */
.fa,
.fas,
.fa-solid,
.fab,
.fa-brands {
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  display: inline-block;
  font-style: normal;
  font-variant: normal;
  line-height: 1;
  text-rendering: auto;
}

/* Map Brands Classes */
.fab,
.fa-brands {
  font-family: 'Font Awesome 6 Brands' !important;
  font-weight: 400;
}

/* Map Solid Classes */
.fas,
.fa-solid {
  font-family: 'Font Awesome 6 Free' !important;
  font-weight: 900;
}


/* ==========================================================================
   3. BASE HELPER SIZES & ANIMATIONS (Standard Font Awesome helpers)
   ========================================================================== */
.fa-xs { font-size: .75em; }
.fa-sm { font-size: .875em; }
.fa-lg { font-size: 1.25em; line-height: .05em; vertical-align: -.075em; }
.fa-xl { font-size: 1.5em; line-height: .0625em; vertical-align: -.125em; }
.fa-2xl { font-size: 2em; line-height: .0625em; vertical-align: -.125em; }

/* Spin / Pulse animation classes for loading spinners */
.fa-spin {
  animation: fa-spin 2s infinite linear;
}
@keyframes fa-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


/* Container wrap mapping */
.nav-links {
    display: grid !important;
    /* Clean-a exact-a orey row-la 5 columns ariyum */
    grid-template-columns: repeat(5, minmax(0, 1fr)); 
    gap: 12px; /* Elements-ku naduvula spacing */
    width: 100%;
    /* padding: 15px 0; */
    margin: 0;
    list-style: none;
}

/* Individual list item layout configuration */
.nav-links li {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Button styling structure update */
.nav-links li a.filter-btn {
    display: block;
    width: 100%;
    text-align: center;
    white-space: normal; /* Inga text clear-a automatic line wrap aagum */
    word-wrap: break-word;
    font-size: 13px; /* Screenshot design look-u thagundha padding text tuning */
    font-weight: 600;
    padding: 10px 8px;
    letter-spacing: 0.5px;
    line-height: 1.3; /* Multi-word strings (e.g., AMAZING GROUND CHAKKARAM) ulla overlap aagama iruka */
    background-color: var(--bg-dark-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    transition: background var(--transition-speed), border-color var(--transition-speed), color var(--transition-speed);
}

.nav-links li a.filter-btn:hover,
.nav-links li a.filter-btn.active {
    background-color: rgba(37, 99, 235, 0.08);
    border-color: var(--accent-orange);
    color: var(--accent-orange-hover);
}


/* Responsive media screen settings */
@media (max-width: 1024px) {
    .nav-links {
        /* Ipad, Tablet standard sizes-ku row-ku 3 items dynamic structure grid mapping */
        grid-template-columns: repeat(3, minmax(0, 1fr)); 
    }
}

@media (max-width: 600px) {
    .nav-links {
        /* Normal Mobile layout tracking-ku row-ku 2 items configuration */
        grid-template-columns: repeat(2, minmax(0, 1fr)); 
    }
}

/* ==========================================================================
   8. CART BAR (Swiggy-style bottom bar) + CART BLADE (slide-in panel)
   Uses existing :root variables above — no new variables needed.
   ========================================================================== */

/* ---- Bottom "View Cart" bar, Swiggy-style ---- */
.cart-bar {
    position: fixed;
    left: 50%;
    bottom: 16px;
    width: 92%;
    max-width: 480px;
    transform: translateX(-50%) translateY(120%); /* parked off-screen below */
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-hover));
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    cursor: pointer;
    z-index: 1500;
    opacity: 0;
    transition: transform var(--transition-speed) cubic-bezier(.22,1,.36,1), opacity var(--transition-speed);
}

/* JS toggles this class on/off based on cart-count > 0 */
.cart-bar.is-visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.cart-bar-info {
    display: flex;
    flex-direction: column;
    color: white;
    line-height: 1.3;
}

.cart-bar-info .cart-bar-count {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.9;
}

.cart-bar-info .cart-bar-total {
    font-size: 16px;
    font-weight: 800;
}

.cart-bar-action {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.cart-bar-action i {
    font-size: 12px;
    transition: transform var(--transition-speed);
}

.cart-bar:hover .cart-bar-action i {
    transform: translateX(4px);
}

/* Sits above the desktop header's z-index but doesn't fight mobile browser chrome */
@media (min-width: 1024px) {
    .cart-bar {
        max-width: 420px;
        bottom: 24px;
    }
}

/* ---- Cart blade (slide-in panel from the right) ---- */
.blade-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(10, 18, 34, 0.5);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-speed) ease;
}

.blade-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.cart-blade {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 88%;
    max-width: 380px;
    background-color: var(--bg-dark-secondary);
    border-left: 1px solid var(--border-color);
    z-index: 2001;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform var(--transition-speed) ease;
    box-shadow: -10px 0 40px rgba(22, 33, 62, 0.15);
}

.cart-blade.active {
    transform: translateX(0);
}

.blade-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background-color: #eef4ff;
    border-bottom: 1px solid var(--border-color);
}

.blade-header h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-white);
}

.blade-header h3 span {
    color: var(--accent-orange-hover);
}

.blade-close {
    background: none;
    border: none;
    color: var(--text-gray);
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
}

.blade-close:hover {
    color: var(--text-white);
}

.blade-items {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
}

.blade-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.blade-item img {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    object-fit: cover;
    background-color: var(--bg-dark-primary);
    flex-shrink: 0;
}

.blade-item-info {
    flex: 1;
    min-width: 0;
}

.blade-item-info .name {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-white);
}

.blade-item-info .price {
    font-size: 13px;
    font-weight: 800;
    color: var(--accent-orange-hover);
}

/* ---- Cart-blade quantity stepper (list-row style, unrelated to the
   product-card stepper defined in section 4 above) ---- */
.blade-item-info .qty-stepper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.blade-item-info .qty-stepper button {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-dark-primary);
    color: var(--text-white);
    font-size: 12px;
    cursor: pointer;
}

.blade-item-info .qty-stepper span {
    font-size: 12px;
    min-width: 14px;
    text-align: center;
    color: var(--text-white);
}

.remove-item {
    background: none;
    border: none;
    color: var(--text-gray);
    font-size: 11px;
    cursor: pointer;
    align-self: flex-start;
    text-decoration: underline;
}

.remove-item:hover {
    color: var(--accent-orange);
}

.blade-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-gray);
    font-size: 13px;
}

.blade-footer {
    padding: 16px 18px;
    border-top: 1px solid var(--border-color);
    background-color: #eef4ff;
}

.blade-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-gray);
}

.blade-total-row strong {
    font-size: 18px;
    color: var(--accent-orange-hover);
    font-weight: 800;
}

.blade-checkout-btn {
    width: 100%;
    padding: 13px;
    border-radius: 6px;
    border: none;
    background-color: var(--accent-orange);
    color: white;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: background var(--transition-speed);
}

.blade-checkout-btn:hover {
    background-color: var(--accent-orange-hover);
}

/* ==========================================================================
   9. CHECKOUT FORM — 3-column row (name / phone / email)
   ========================================================================== */
.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.form-row .form-group {
    margin-bottom: 0; /* row's own gap handles spacing */
}

/* Stack back to single column on very small screens so inputs stay usable */
@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .form-row .form-group {
        margin-bottom: 15px;
    }
}

/* ==========================================================================
   10. CUSTOM SCROLLBAR (checkout modal — items list, form body, textarea)
   ========================================================================== */
#summary-items-list::-webkit-scrollbar,
#checkout-form::-webkit-scrollbar,
.modal-body::-webkit-scrollbar,
.blade-items::-webkit-scrollbar,
textarea::-webkit-scrollbar {
    width: 5px;
}

#summary-items-list::-webkit-scrollbar-track,
#checkout-form::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track,
.blade-items::-webkit-scrollbar-track,
textarea::-webkit-scrollbar-track {
    background: transparent;
}

#summary-items-list::-webkit-scrollbar-thumb,
#checkout-form::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb,
.blade-items::-webkit-scrollbar-thumb,
textarea::-webkit-scrollbar-thumb {
    background-color: var(--accent-orange);
    border-radius: 10px;
    opacity: 0.5;
}

#summary-items-list::-webkit-scrollbar-thumb:hover,
#checkout-form::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover,
.blade-items::-webkit-scrollbar-thumb:hover,
textarea::-webkit-scrollbar-thumb:hover {
    background-color: var(--accent-orange-hover);
}

/* Kill the native up/down arrow buttons Chrome/Edge add on Windows */
#summary-items-list::-webkit-scrollbar-button,
#checkout-form::-webkit-scrollbar-button,
.modal-body::-webkit-scrollbar-button,
.blade-items::-webkit-scrollbar-button,
textarea::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

/* Firefox */
#summary-items-list,
#checkout-form,
.modal-body,
.blade-items,
textarea {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-orange) transparent;
}

/* Keep the checkout form fields scrolling inside their own box,
   not pushing the whole modal / page to scroll */
#checkout-form {
    max-height: 320px;
    overflow-y: auto;
    padding-right: 6px; /* room for the thin scrollbar so it doesn't sit on top of text */
}

/* Style the textarea itself to match the theme inputs */
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-dark-primary);
    color: var(--text-white);
    outline: none;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    resize: vertical; /* only vertical drag, keeps layout intact */
    min-height: 50px;
}

.form-group textarea::placeholder {
    color: var(--text-gray);
}

.form-group textarea:focus {
    border-color: var(--accent-orange);
}

.skeleton-block {
    background: linear-gradient(90deg, var(--border-color) 25%, #f7f1e5 50%, var(--border-color) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
    border-radius: 4px;
}
.skeleton-img { width: 100%; height: 180px; border-radius: 4px 4px 0 0; }
.skeleton-line { height: 12px; margin-bottom: 6px; }
.skeleton-btn { height: 30px; margin-top: 8px; border-radius: 4px; }
.skeleton-card { pointer-events: none; }

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.btn-remove-item:hover {
    background-color: rgba(220, 53, 69, 0.1) !important;
    transform: scale(1.15);
}

.spark{
    position:absolute;
    width:4px;
    height:4px;
    border-radius:50%;
    pointer-events:none;
    animation: explode 1s ease-out forwards;
}
@keyframes explode{
    0%{transform:translate(0,0) scale(1); opacity:1;}
    100%{transform:translate(var(--x), var(--y)) scale(0); opacity:0;}
}
.hint{
    /* position:absolute; */
    bottom:20px;
    width:100%;
    text-align:center;
    color: var(--text-white);
    font-size:14px;
    /* opacity:0.7; */
}

/* ==========================================================================
   11. ORDER CONFIRMATION PAGE
   ========================================================================== */
.confirmation-page {
    padding: 40px 0 60px;
}

.confirmation-wrapper {
    width: 92%;
    max-width: 930px;
    margin: 0 auto;
}

.confirmation-card {
    background-color: var(--bg-dark-secondary);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(22, 33, 62, 0.06);
}

/* Company header — hidden on the live page, only shown inside the
   downloaded screenshot. JS toggles the .capture-mode class on this
   element right before html2canvas runs, then removes it again. */
.receipt-company-header {
    display: none;
    align-items: center;
    gap: 14px;
    text-align: left;
    padding-bottom: 20px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
}

.receipt-company-header.capture-mode {
    display: flex;
}

.receipt-company-logo {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-orange), var(--accent-orange-hover));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
    flex-shrink: 0;
}

.receipt-company-info h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 19px;
    font-weight: 800;
    color: var(--text-white);
    letter-spacing: 0.3px;
    margin-bottom: 3px;
}

.receipt-company-tagline {
    display: block;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-gray);
    margin-bottom: 6px;
}

.receipt-company-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
}

.receipt-company-contact span {
    font-size: 11px;
    color: var(--text-gray);
    white-space: nowrap;
}

.confirmation-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    animation: bounce 1.5s infinite alternate;
}

.confirmation-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: var(--accent-green);
    margin-bottom: 8px;
}

.confirmation-subtitle {
    color: var(--text-gray);
    font-size: 14px;
    margin-bottom: 25px;
}

/* Order code highlight block */
.order-code-box {
    background: linear-gradient(180deg, #eaf1ff 0%, var(--bg-dark-primary) 100%);
    border: 1px dashed var(--accent-orange);
    border-radius: 10px;
    padding: 22px 15px;
    margin-bottom: 25px;
}

.order-code-label {
    color: var(--text-gray);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
}

.order-code-value {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: var(--accent-orange);
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.order-code-hint {
    color: var(--text-gray);
    font-size: 11px;
}

/* Summary card wrapping customer + items + totals */
.confirmation-summary {
    background-color: var(--bg-dark-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 18px;
    margin-bottom: 25px;
    text-align: left;
}

.summary-split-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px dashed var(--border-color);
    flex-wrap: wrap;
}

.summary-split-row .align-right {
    text-align: right;
}

.summary-label {
    color: var(--text-gray);
    font-size: 11px;
    margin-bottom: 3px;
}

.summary-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-white);
}

.summary-block {
    margin-bottom: 18px;
}

.summary-block-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-yellow);
    margin-bottom: 10px;
}

/* Items table */
.confirmation-items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.confirmation-items-table thead tr {
    border-bottom: 1px dashed var(--border-color);
}

.confirmation-items-table th {
    color: var(--text-gray);
    font-weight: 600;
    padding: 6px 4px;
    text-align: left;
}

.confirmation-items-table th.align-center { text-align: center; }
.confirmation-items-table th.align-right  { text-align: right; }

.confirmation-items-table td {
    padding: 8px 4px;
    border-bottom: 1px dashed var(--border-color);
    color: var(--text-white);
}

.confirmation-items-table td.align-center { text-align: center; color: var(--text-gray); }
.confirmation-items-table td.align-right  { text-align: right; }

/* Price breakdown */
.price-breakdown {
    border-top: 1px dashed var(--border-color);
    padding-top: 12px;
}

.price-breakdown-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-gray);
    padding: 4px 0;
}

.price-breakdown-row.discount {
    color: var(--accent-green);
}

.price-breakdown-row.total {
    border-top: 1px dashed var(--border-color);
    margin-top: 8px;
    padding-top: 10px;
    font-size: 16px;
    font-weight: 800;
    color: var(--text-white);
}

.price-breakdown-row.total .total-value {
    color: var(--accent-orange);
}

/* Action buttons stack */
.confirmation-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
}

.confirmation-actions > * {
    width: 100%; /* full width when stacked (mobile) */
}

.confirmation-actions .whatsapp-btn,
.confirmation-actions .btn-primary,
.confirmation-actions .btn-secondary {
    padding: 13px 16px;
    border-radius: 8px;
    font-size: 13px;
    max-width: none;
    flex: 1;
}

.confirmation-actions .btn-secondary {
    background-color: transparent;
    border: 1px dashed var(--accent-orange);
    color: var(--accent-orange);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all var(--transition-speed);
}

.confirmation-actions .btn-secondary:hover {
    background-color: var(--accent-orange);
    color: white;
}

/* Info / what happens next box */
.confirmation-info-box {
    background-color: var(--bg-dark-primary);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    padding: 18px;
    text-align: left;
}

.confirmation-info-box h3 {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-yellow);
    margin-bottom: 12px;
}

.confirmation-info-box ol {
    list-style: decimal inside;
    color: var(--text-gray);
    font-size: 12px;
}

.confirmation-info-box ol li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.confirmation-info-box ol li strong {
    color: var(--text-white);
}

.confirmation-countdown {
    text-align: center;
    margin-top: 25px;
    color: var(--text-gray);
    font-size: 12px;
}

.confirmation-countdown #countdown {
    color: var(--accent-orange);
    font-weight: 700;
}

/* Tablet+ layout tweaks */
@media (min-width: 768px) {
    .confirmation-card {
        padding: 40px 45px;
    }

    .order-code-value {
        font-size: 34px;
    }

    .confirmation-actions {
        flex-direction: row;
    }

    .confirmation-actions > * {
        width: auto;
        flex: 1;
    }

    .confirmation-actions .whatsapp-btn,
    .confirmation-actions .btn-primary,
    .confirmation-actions .btn-secondary {
        white-space: nowrap;
    }
}
/* ==========================================================================
   MOBILE FIXES (phones <= 480px)
   ========================================================================== */
@media (max-width: 480px) {
    .header-actions { gap: 6px; }
    .action-item {
        padding: 10px 8px;
        font-size: 11px;
        gap: 5px;
    }
    .hero-section { padding: 28px 0; }
    .hero-title { font-size: 28px; }
    .hero-graphics { max-width: 100%; }
    .discount-sticker {
        top: -8px;
        right: -4px;
        width: 62px;
        height: 62px;
    }
    .hero-badges { flex-direction: column; align-items: stretch; }
    .hero-badge { text-align: center; }
}


/* ===== ADMIN HEADER ONLY (does not affect frontend) ===== */
.admin-header {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
}

/* Mobile: [logo ........ user] on row 1, nav full width on row 2 */
.admin-header .logo { order: 1; justify-content: flex-start; }
.admin-header .logo-text img { max-height: 50px !important; }
.admin-header .user-menu-wrapper {
    order: 2;
    margin-left: auto;
    position: relative;
}
.admin-header .admin-nav {
    order: 3;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
}
.admin-header .admin-nav .nav-container { width: 100%; max-width: 100%; padding: 0; }

/* Horizontal single-row menu (scrolls sideways on small screens) */
.admin-header .admin-nav .nav-links {
    display: flex !important;
    grid-template-columns: none !important;
    flex-direction: row;
    justify-content: flex-start;
    gap: 6px;
    padding: 6px;
    overflow-x: auto;
    scrollbar-width: none;
}
.admin-header .admin-nav .nav-links::-webkit-scrollbar { display: none; }
.admin-header .admin-nav .nav-links li {
    width: auto;
    flex: 0 0 auto;
    border-bottom: none;
}
.admin-header .admin-nav .nav-links li a {
    width: auto;
    padding: 10px 18px;
    border-radius: 8px;
    white-space: nowrap;
    text-align: center;
}

/* Dropdown opens under the avatar, aligned to the right edge */
.admin-header .user-dropdown-box {
    right: 0;
    left: auto;
}

/* Desktop: [logo] [ nav (centered, fills space) ] [user] on ONE row */
@media (min-width: 992px) {
    .admin-header { flex-wrap: nowrap; }
    .admin-header .logo-text img { max-height: 70px !important; }
    .admin-header .admin-nav {
        order: 2;
        width: auto;
        flex: 1;
        max-width: 700px;
        margin: 0 auto;
    }
    .admin-header .admin-nav .nav-links { justify-content: center; }
    .admin-header .user-menu-wrapper { order: 3; margin-left: 0; }
}