/* --- Base Variables & Reset --- */
:root {
    --primary-color: #ff7c7c; /* Vibrant green matching reference banners */
    --primary-dark: #b53f3f;
    --text-main: #1a1a1a;
    --text-muted: #757575;
    --bg-main: #f8f9fa;
    --bg-card: #ffffff;
    --border-color: #eaeaea;
    --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: #e5e5e5; /* Outside app container background */
    display: flex;
    justify-content: center;
    color: var(--text-main);
}

/* --- Main Layout --- */
.app-container {
    background-color: var(--bg-main);
    width: 100%;
    max-width: 480px; /* Mobile-first width based on references */
    min-height: 100vh;
    position: relative;
    box-shadow: var(--shadow-md);
    overflow-x: hidden;
    padding-bottom: 80px; /* Space for bottom nav */
}

/* --- Header Section --- */
header {
    padding: 24px 24px 16px;
    background-color: var(--bg-main);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.greeting p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.greeting h1 {
    font-size: 22px;
    font-weight: 700;
}

.header-icons {
    display: flex;
    gap: 12px;
}

.icon-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-main);
    transition: all 0.2s ease;
    position: relative;
}

.icon-btn:hover {
    background: var(--border-color);
}

.cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--text-main);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-main);
}

.search-bar {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 12px 16px;
    box-shadow: var(--shadow-sm);
}

.search-bar input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 0 12px;
    font-size: 14px;
}

.search-icon, .filter-icon {
    color: var(--text-muted);
}

.filter-icon {
    cursor: pointer;
    color: var(--text-main);
}

/* --- Promo Banner --- */
.promo-banner {
    margin: 0 24px 24px;
    background: linear-gradient(135deg, var(--primary-color), #e87a7a);
    border-radius: 20px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    color: #0b4516;
}

.banner-content {
    position: relative;
    z-index: 2;
}

.banner-content .badge {
    background: #000;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 12px;
}

.banner-content h2 {
    font-size: 20px;
    line-height: 1.2;
    margin-bottom: 8px;
}

.banner-content p {
    font-size: 12px;
    margin-bottom: 16px;
    opacity: 0.9;
    max-width: 60%;
}

.shop-now-btn {
    background: #000;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 24px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.banner-image {
    position: absolute;
    right: -20px;
    bottom: -20px;
    width: 150px;
    height: 150px;
    z-index: 1;
}

.circle-decoration {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

/* --- Categories --- */
.categories {
    margin-bottom: 24px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    margin-bottom: 16px;
}

.section-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.section-header .see-all {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
}

.category-list {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 0 24px;
    scrollbar-width: none;
}

.category-list::-webkit-scrollbar {
    display: none;
}

.category-pill {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    background: transparent;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.category-pill.active {
    background: var(--text-main);
    color: #fff;
    border-color: var(--text-main);
}

/* --- Product Grid --- */
.new-arrivals {
    margin-bottom: 24px;
}

.product-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 0 24px;
}

.product-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 12px;
    box-shadow: var(--shadow-sm);
}

.card-image-container {
    background: var(--bg-main);
    border-radius: 12px;
    height: 140px;
    position: relative;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-placeholder i {
    font-size: 48px;
    color: var(--border-color);
}

.product-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #000;
    color: #fff;
    font-size: 9px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
}

.product-badge.sale {
    background: #ff4757;
}

.wishlist-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--bg-card);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    color: var(--text-main);
}

.card-details .brand {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.card-details .product-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-bottom .price {
    font-size: 14px;
    font-weight: 700;
}

.old-price {
    font-size: 11px;
    color: var(--text-muted);
    text-decoration: line-through;
    font-weight: 400;
    margin-left: 4px;
}

.add-to-cart-btn {
    background: #000;
    color: #fff;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.add-to-cart-btn:hover {
    background: var(--primary-color);
}

/* --- Footer & Nav --- */
footer {
    position: absolute;
    bottom: 0;
    width: 100%;
}

.footer-info {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-main);
}

.bottom-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: var(--bg-card);
    padding: 16px 24px;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
}
/* --- Footer & Nav --- */
footer {
    position: fixed; /* Changed from absolute to fixed */
    bottom: 0;
    width: 100%;
    max-width: 480px; /* Keeps it aligned with the app container */
    z-index: 50; /* Ensures it stays on top of scrolling content */
}
.nav-item {
    color: var(--text-muted);
    font-size: 20px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-item.active {
    color: var(--text-main);
    position: relative;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-main);
}
/* --- Toast Notification Styles --- */
.toast-container {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    width: 90%;
    max-width: 400px;
    align-items: center;
}

.toast {
    background: #222;
    color: #fff;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}
/* --- SPA Page Layout --- */
.main-content {
    min-height: calc(100vh - 160px);
}
.page {
    display: none;
    animation: fadeIn 0.3s ease;
}
.page.active {
    display: block;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Empty States (Notifications/Cart) --- */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-muted);
}
.empty-state .empty-icon {
    font-size: 64px;
    color: var(--border-color);
    margin-bottom: 20px;
}
.empty-state h3 {
    color: var(--text-main);
    margin-bottom: 8px;
}
.empty-state p {
    font-size: 13px;
    line-height: 1.5;
}

/* --- Categories Page Grid --- */
.grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 0 24px;
}
.cat-card {
    background: var(--bg-card);
    padding: 30px 10px;
    text-align: center;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}
.cat-card i {
    display: block;
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 12px;
}

/* --- Contact Page --- */
.contact-info {
    padding: 0 24px 20px;
}
.contact-info h3 {
    font-size: 24px;
    margin-bottom: 12px;
}
.contact-info p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 8px;
}
.contact-info i {
    color: var(--primary-color);
    width: 20px;
}
.contact-form {
    padding: 0 24px;
}
.form-group {
    margin-bottom: 16px;
}
.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-muted);
}
.form-group input, .form-group textarea {
    width: 100%;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    font-size: 14px;
    font-family: inherit;
    outline: none;
}
.form-group input:focus, .form-group textarea:focus {
    border-color: var(--primary-color);
}
.submit-btn {
    width: 100%;
    background: #000;
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 24px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    margin-top: 10px;
}

/* --- Cart Page --- */
#cart-items-container {
    padding: 0 24px 20px;
}
.cart-item {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    padding: 12px;
    border-radius: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}
.cart-item-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-main);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--text-muted);
    margin-right: 16px;
}
.cart-item-details {
    flex: 1;
}
.cart-item-details h4 {
    font-size: 14px;
    margin-bottom: 4px;
}
.cart-item-details p {
    font-size: 14px;
    font-weight: 700;
}
.remove-item-btn {
    background: #ffeaa7;
    color: #d63031;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
}
.cart-summary {
    background: var(--bg-card);
    padding: 24px;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
}
.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-muted);
}
.summary-row.total {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    margin-top: 12px;
    margin-bottom: 24px;
}
.cart-summary hr {
    border: none;
    border-top: 1px dashed var(--border-color);
    margin: 16px 0;
}
.checkout-btn {
    width: 100%;
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: 24px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
}
/* --- Product Details Overlay Page --- */
.details-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-main);
    z-index: 100; /* Covers header and bottom nav */
    display: flex;
    flex-direction: column;
    transform: translateX(100%); /* Hidden off-screen to the right by default */
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.details-overlay.active {
    transform: translateX(0); /* Slides in */
}

.details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 16px;
    background: transparent;
}
.details-header h4 {
    font-size: 16px;
    font-weight: 600;
}

.details-scroll-content {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 100px; /* space for bottom bar */
}

.details-image-container {
    margin: 0 24px 24px;
    height: 300px;
    background: #ebebeb;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.details-image-container i {
    font-size: 120px;
    color: #c4c4c4;
}

.details-info {
    padding: 0 24px;
}
.details-info .brand {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.details-info .title {
    font-size: 22px;
    line-height: 1.3;
    margin-bottom: 12px;
}

.rating-row {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
}
.rating-row i {
    color: #ffb800;
    margin-right: 6px;
}
.rating-row .reviews {
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 6px;
}

.price-row {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}
.price-row .current-price {
    font-size: 24px;
    font-weight: 700;
}
.price-row .old-price {
    font-size: 16px;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 12px;
}
.discount-badge {
    background: #e2fbd7;
    color: #34b53a;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    margin-left: 12px;
}

.desc-title {
    font-size: 16px;
    margin-bottom: 8px;
}
.desc-text {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

.details-bottom-bar {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: var(--bg-card);
    padding: 16px 24px;
    display: flex;
    gap: 16px;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
}
.qty-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-main);
    border-radius: 24px;
    padding: 8px 16px;
    width: 120px;
}
.qty-control button {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: var(--text-main);
}
.qty-control span {
    font-weight: 600;
    font-size: 16px;
}

.add-to-cart-large {
    flex: 1;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 24px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 8px 16px rgba(83, 208, 102, 0.3);
}
/* --- Filter & Sort Modal (Bottom Sheet) --- */
.modal-overlay {
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    background: var(--bg-main);
    width: 100%;
    max-width: 480px; /* Matches your app container */
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    padding: 24px;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 -10px 25px rgba(0,0,0,0.1);
}
.modal-overlay.active .modal-content {
    transform: translateY(0);
}
.modal-header {
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 24px;
}
.modal-header h4 {
    font-size: 18px;
}
.modal-body h5 {
    margin-bottom: 12px; 
    font-size: 14px;
    color: var(--text-muted);
}
.filter-options {
    display: flex; 
    gap: 8px; 
    flex-wrap: wrap; 
    margin-bottom: 24px;
}
.filter-chip {
    padding: 10px 16px; 
    border: 1px solid var(--border-color); 
    border-radius: 24px; 
    background: var(--bg-card); 
    cursor: pointer; 
    font-size: 13px; 
    font-weight: 500;
    color: var(--text-main);
    transition: all 0.2s;
}
.filter-chip.active {
    background: var(--text-main); 
    color: #fff; 
    border-color: var(--text-main);
}
.apply-filter-btn {
    width: 100%; 
    background: var(--primary-color); 
    color: #fff; 
    border: none; 
    padding: 16px; 
    border-radius: 24px; 
    font-weight: 600; 
    font-size: 16px; 
    cursor: pointer;
}
/* --- WhatsApp Wholesale Button --- */
.whatsapp-btn {
    background-color: #25D366 !important;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 16px rgba(37, 211, 102, 0.3);
}
.whatsapp-btn:hover {
    background-color: #1ebc5a !important;
}
/* --- About Us Page --- */
.about-header {
    padding: 0 24px 16px;
}
.about-header h3 {
    font-size: 24px;
}
.about-content {
    padding: 0 24px 40px;
}
.about-image {
    width: 100%;
    height: 180px;
    border-radius: 16px;
    margin-bottom: 20px;
    object-fit: cover;
    background-color: var(--border-color);
}
.about-content p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
}
.about-content h4 {
    font-size: 18px;
    margin-bottom: 8px;
    margin-top: 24px;
    color: var(--text-main);
}

/* --- Cart Quantity Controls --- */
.cart-qty-control {
    display: flex;
    align-items: center;
    background: var(--bg-main);
    border-radius: 12px;
    padding: 4px 8px;
    margin-top: 8px;
    width: fit-content;
}
.cart-qty-control button {
    background: none;
    border: none;
    font-size: 12px;
    cursor: pointer;
    color: var(--text-main);
    padding: 4px 8px;
}
.cart-qty-control span {
    font-weight: 600;
    font-size: 13px;
    min-width: 20px;
    text-align: center;
}
/* --- Typable Quantity Inputs --- */
.qty-input {
    width: 45px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    border: none;
    background: transparent;
    color: var(--text-main);
    outline: none;
    font-family: inherit;
    -moz-appearance: textfield; /* Hides Firefox spinner */
}

/* Hides Chrome/Safari/Edge spinners */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-qty-control .qty-input {
    font-size: 13px;
    width: 35px;
}
/* --- Real Image Styling Updates --- */
.product-image {
    max-width: 90%;
    max-height: 100px;
    object-fit: contain;
}

#details-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply; /* Helps images with white backgrounds blend in */
}

.cart-item-image {
    width: 45px;
    height: 45px;
    object-fit: contain;
    margin-right: 16px;
    border-radius: 8px;
    background: #fff;
}

/* Formats the \n in your specs string into line breaks automatically */
.desc-text {
    white-space: pre-line;
    line-height: 1.8;
    margin-top: -10px;
}
/* --- SPACING & GAP FIXES --- */

/* 1. Reduces the gap between the cards themselves */
.product-grid {
    gap: 12px; 
}

/* 2. Tightens the padding inside each individual card */
.product-card {
    padding: 10px; 
}

/* 3. Shrinks the grey image box and pulls the text up */
.card-image-container {
    height: 150px; /* Reduced from 140px */
    margin-bottom: 8px; /* Reduced from 12px */
}

/* 4. Allows the actual cooler/fan images to fill more of the box */
.product-image {
    max-width: 100%;
    max-height: 100%; /* Increased from 100px */
}

/* 5. Pulls the "Enquire Price" row closer to the product name */
.card-details .product-title {
    margin-bottom: 8px; /* Reduced from 12px */
}

/* 6. Fixes the massive empty space on the Full-Screen Details Page */
.details-image-container {
    height: 220px; /* Reduced from 300px */
    margin: 0 24px 16px; /* Shrinks the bottom margin */
}
/* --- REMOVE IMAGE PADDING --- */
.card-image-container {
    padding: 0 !important;
}

.product-image {
    padding: 0 !important;
}
/* --- KILL ALL REMAINING SPACES --- */
.card-image-container {
    padding: 0 !important;
    background: transparent !important; /* Removes the grey box so it blends perfectly */
}

.image-placeholder {
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

.product-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* This zooms the image to fill 100% of the box without squishing */
    border-radius: 12px !important; /* Keeps the corners smoothly rounded */
}
/* =========================================
   UI/UX OVERHAUL & SPACING FIXES 
   ========================================= */

/* --- 1. FULL BLEED PRODUCT CARDS --- */
.product-card {
    padding: 0 !important; /* Removes the white gap pushing the image inward */
    overflow: hidden !important; /* Ensures the image respects the card's rounded corners */
    display: flex;
    flex-direction: column;
}

.card-image-container {
    border-radius: 0 !important; /* Removes inner rounding so it sits flush */
    margin-bottom: 0 !important; /* Removes the gap between image and text */
    border-bottom: 1px solid var(--border-color); /* Adds a clean line under the image */
}

.product-image {
    border-radius: 0 !important;
}

.card-details {
    padding: 12px !important; /* Adds the breathing room BACK, but only for the text */
}

.card-details .product-title {
    margin-bottom: 12px !important; /* Fixes spacing above the Add button */
}


/* --- 2. PRODUCT DETAILS COMPACT UX --- */

/* Shrink the giant image so specs are immediately visible */
.details-image-container {
    height: 360px !important; 
    margin: 0 16px 16px !important;
    background: transparent !important;
}

.details-info {
    padding: 0 16px !important;
}

.details-info .title {
    font-size: 20px !important;
    margin-bottom: 12px !important;
}

.desc-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    margin-bottom: 4px !important;
}

/* Turn the long list of specs into a compact, highly readable box */
.desc-text {
    white-space: pre-line !important; /* Keeps your \n line breaks working */
    line-height: 1.4 !important; /* Tightens the massive gap between lines */
    font-size: 12px !important; /* Smaller, sleeker font for specs */
    margin-top: 0 !important;
    background: #f1f3f5 !important; /* Light grey background box */
    padding: 16px !important;
    border-radius: 12px !important;
    border: 1px solid var(--border-color) !important;
    color: #444 !important;
}

/* Fix scrolling into empty space at the bottom */
.details-scroll-content {
    padding-bottom: 80px !important; 
}
/* =========================================
   OVERLAY SCROLL LOCK & STICKY BOTTOM BAR
   ========================================= */

/* Class toggled by JavaScript to freeze the background */
body.no-scroll {
    overflow: hidden !important;
}

/* Force the overlay to lock to the actual screen viewport */
.details-overlay {
    position: fixed !important; 
    top: 0 !important;
    left: 0 !important;
    height: 100vh !important; /* Forces it to be exactly 100% of the screen height */
    height: 100dvh !important; /* Better support for mobile browsers with dynamic search bars */
    z-index: 999 !important; /* Keeps it above absolutely everything */
}

/* Ensure only the middle content scrolls */
.details-scroll-content {
    flex: 1 !important;
    overflow-y: auto !important; 
    padding-bottom: 100px !important; /* Space so text doesn't hide behind the sticky bar */
}

/* Stick the bar exactly to the bottom */
.details-bottom-bar {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 1000 !important;
    background: var(--bg-card) !important; /* Ensures it isn't transparent */
}
/* --- Cart Back Button --- */
.back-to-shop-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 600;
    padding: 0 24px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}
/* =========================================
   DESKTOP & TABLET OPTIMIZATION
   ========================================= */

@media (min-width: 768px) {
    /* 1. Widen the main app container, footer, and filter popup */
    /* 1. Stretch the app to the absolute edges of the screen */
    .app-container,
    footer,
    .modal-content {
        max-width: 100% !important;
        border-radius: 0 !important; 
    }

    body {
        padding: 0 !important; /* Removes the empty space above and below */
    }

    /* 2. Show 4 products per row instead of 2 */
    .product-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 20px !important;
    }

    /* 3. Categories page grid - 4 items across */
    .grid-layout {
        grid-template-columns: repeat(4, 1fr) !important;
    }

    /* 4. Product Details Page - Split Side-by-Side (Image Left, Specs Right) */
    .details-scroll-content {
        display: flex !important;
        align-items: flex-start !important;
        padding: 32px !important;
        gap: 40px !important;
    }

    .details-image-container {
        flex: 1 !important; /* Takes up the left half */
        height: 400px !important; /* Makes the image larger for desktop */
        margin: 0 !important;
    }

    .details-info {
        flex: 1 !important; /* Takes up the right half */
        padding: 0 !important;
    }

    /* 5. Stretch the Promo Banner nicely */
    .promo-banner {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 32px 40px !important;
    }

    .banner-image {
        position: relative !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 250px !important;
        height: 250px !important;
    }
}