body {
    background: #f5f7fa;
    font-family: 'Segoe UI', Roboto, sans-serif;
}
.econtainer {
    width: 90%;
    max-width: 1400px;
    margin: auto;
}

.ecom-nav {
    background: linear-gradient(135deg, #1a237e, #0d47a1) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    margin-bottom: 30px;
    padding: 0 20px;
}

.ecom-nav .brand-logo {
    font-weight: 700;
    font-size: 1.8rem;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.ecom-nav ul li a {
    font-weight: 500;
    transition: all 0.3s ease;
}

.ecom-nav ul li a:hover {
    background: rgba(255,255,255,0.15) !important;
    transform: translateY(-2px);
}

.category-banner {
    background: white;
    padding: 15px 15px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-radius: 12px;
}
.category-banner .chip {
    background: #cdd2ee;
    padding: 0 18px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 36px;
    line-height: 36px;
}
.chip.active {
    background: #1a237e !important;
    color: white !important;
    border-color: #1a237e;
}

/* ---------- PRODUCT CARDS ENHANCEMENT ---------- */
.sale-card {
    background: white !important;
    border-radius: 16px !important;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08) !important;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.sale-card:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15) !important;
}

.sale-card .card-image {
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
    padding: 15px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sale-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

.sale-card:hover .card-image img {
    transform: scale(1.05);
}

/* Badge overlay for products */
.sale-card .card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.02));
    pointer-events: none;
}

/* Sale badge */
.sale-card .sale-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #e53935;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(229,57,53,0.4);
    z-index: 2;
}

/* ---------- CARD CONTENT ---------- */
.sale-content {
    padding: 16px 20px 10px !important;
    flex: 1;
}

.sale-content h6 {
    font-weight: 600;
    color: #1a2332;
    font-size: 1rem;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Product rating stars (add to HTML) */
.rating-stars {
    color: #ffa726;
    font-size: 0.8rem;
    margin-top: 5px;
    letter-spacing: 2px;
}

.rating-stars .reviews {
    color: #9e9e9e;
    font-size: 0.7rem;
    margin-left: 5px;
}

/* ---------- CARD ACTION / PRICE ---------- */
.sale-action {
    padding: 10px 20px 1px !important;
    border-top: 1px solid #f0f0f0 !important;
    background: transparent !important;
}

.sale-action a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #1a237e !important;
    text-decoration: none !important;
}

.sale-action h6 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a237e;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Price styling */
.sale-action .price {
    color: #0d47a1;
}

.sale-action .price .original {
    color: #9e9e9e;
    font-size: 0.8rem;
    text-decoration: line-through;
    margin-left: 8px;
    font-weight: 400;
}

/* See Details button - enhanced */
/* Table-based alignment (bulletproof) */
.sale-action .chip {
    background: linear-gradient(135deg, #1a237e, #0d47a1) !important;
    color: white !important;
    font-weight: 600;
    padding: 5px 16px !important;
    border-radius: 20px !important;
    font-size: 0.75rem !important;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(26,35,126,0.3);
    cursor: pointer;
    display: inline-table;
    *display: inline; /* IE7 hack */
    *zoom: 1; /* IE7 hack */
    height: 32px;
}

.sale-action .chip i,
.sale-action .chip span {
    display: table-cell;
    vertical-align: middle;
}

.sale-action .chip i {
    font-size: 1rem !important;
    padding-right: 4px;
}

.sale-action .chip:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(26,35,126,0.4);
}

/* Mobile Sidenav */
.sidenav {
    padding-top: 0 !important;
}

.sidenav .user-view {
    margin-bottom: 0 !important;
    padding: 30px 20px 20px !important;
    background: linear-gradient(135deg, #1a237e, #0d47a1);
}

.sidenav .user-view .background {
    overflow: hidden;
}

.sidenav .user-view .background img {
    opacity: 0.3;
    filter: blur(2px);
}

.sidenav .user-view h5 {
    font-weight: 700;
    margin: 0;
}

.sidenav .user-view .email {
    font-size: 0.85rem;
    opacity: 0.8;
}

.sidenav li a {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    padding: 12px 20px !important;
    color: #1a2332 !important;
    font-weight: 500;
    transition: all 0.3s ease;
}

.sidenav li a i {
    font-size: 1.5rem;
    color: #1a237e;
}

.sidenav li a:hover {
    background: #e8eaf6 !important;
}

.sidenav li.active a {
    background: #e8eaf6 !important;
    border-left: 4px solid #1a237e;
    font-weight: 700;
}

.sidenav li.active a i {
    color: #1a237e;
}

.sidenav .mobile-search {
    padding: 10px 20px;
}

.sidenav .mobile-search .input-field {
    margin: 0 !important;
    padding: 0 !important;
}

.sidenav .mobile-search input[type="search"] {
    background: #f5f7fa;
    border-radius: 25px;
    padding: 0 40px 0 20px !important;
    height: 40px;
    border: 1px solid #e0e0e0;
    margin: 0 !important;
}

.sidenav .mobile-search input[type="search"]:focus {
    border-color: #1a237e;
    box-shadow: 0 0 0 2px rgba(26,35,126,0.1);
}

.sidenav .mobile-search label {
    left: 0 !important;
    color: #999 !important;
}

.sidenav .mobile-search label i {
    color: #999 !important;
}

.sidenav .mobile-search .material-icons {
    color: #999 !important;
}

/* Logo that works on all screen sizes */
/* Logo stays on left always */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 5px;
    color: white !important;
    font-size: 1.3rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
    white-space: nowrap;
    float: left;  /* Keep logo on left */
}

.nav-logo i {
    font-size: 1.6rem;
}

/* Hamburger menu visible on mobile */
.sidenav-trigger {
    float: right;
    color: white !important;
    margin-left: 15px;
}

/* Fix materialboxed overlay z-index */
.materialboxed {
    position: relative;
    z-index: 1;
    cursor: pointer;
}

/* Ensure materialbox overlay is on top */
.materialbox-overlay {
    z-index: 1000 !important;
}

/* Ensure caption is above overlay */
.materialbox-caption {
    z-index: 1001 !important;
}

/* Fix card stacking context */
.sale-card {
    position: relative;
    z-index: auto;
}

/* When materialbox is active, push card above */
.sale-card:has(.materialboxed.active) {
    z-index: 999;
}
/* Mobile adjustments */
@media only screen and (max-width: 600px) {
    .nav-logo {
        font-size: 1rem;
    }
    .nav-logo i {
        font-size: 1.3rem;
    }
}

/* ---------- RESPONSIVE GRID ENHANCEMENTS ---------- */
@media only screen and (max-width: 600px) {
    .sale-card .card-image {
        height: 180px;
        padding: 10px;
    }

    .sale-action h6 {
        font-size: 1.1rem;
        flex-direction: column;
        gap: 8px;
        align-items: flex-start;
    }

    .sale-action .chip {
        align-self: flex-start;
    }

    .category-banner {
        padding: 10px 0;
        overflow-x: auto;
        white-space: nowrap;
        flex-wrap: nowrap;
        display: flex;
    }

    .category-chip {
        display: inline-block;
        margin: 0 5px;
    }
}

/* ---------- LOADING PRELOADER ---------- */
.wrapper-load {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
}

.spinner-custom .circle {
    border-color: #1a237e !important;
}

#broadcastDIV {
    height: 200px !important;
}
#broadcastDIV h2 {
    font-size: 3rem;
    font-weight: 500;
}
#broadcastDIV p {
    font-size: 1.2rem;
    font-weight: bold;
}
/* ---------- MODAL ENHANCEMENTS ---------- */
#modalAlert .modal-content,
#modalWTK .modal-content {
    border-radius: 16px !important;
}

#modalAlert .modal-content .btn {
    background: linear-gradient(135deg, #1a237e, #0d47a1) !important;
    border-radius: 25px !important;
    padding: 0 30px;
}

/* ---------- UTILITY ADDITIONS ---------- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

/* Free shipping badge */
.free-ship {
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 0.65rem;
    padding: 2px 10px;
    border-radius: 12px;
    display: inline-block;
    font-weight: 600;
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sale-card {
    animation: fadeInUp 0.6s ease forwards;
}

.sale-card:nth-child(1) { animation-delay: 0.1s; }
.sale-card:nth-child(2) { animation-delay: 0.2s; }
.sale-card:nth-child(3) { animation-delay: 0.3s; }
.sale-card:nth-child(4) { animation-delay: 0.4s; }
.sale-card:nth-child(5) { animation-delay: 0.5s; }
