/* Hide scrollbar for a cleaner look */
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Hide horizontal scrollbar */
.horizontal-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -ms-overflow-style: none;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

.horizontal-scroll::-webkit-scrollbar {
    display: none;
}

.no-scrollbar::-webkit-scrollbar { 
    display: none; 
}

.no-scrollbar { 
    -ms-overflow-style: none; 
    scrollbar-width: none; 
}

/* ============================================
   CATEGORY SHOWCASE - PREMIUM STYLE
   ============================================ */

#categoryShowcase {
    position: relative;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0;
    /* REMOVED: border-bottom - we use ::after on items instead */
}

#categoryShowcase::-webkit-scrollbar {
    display: none;
}

/* Category Container (wrapper inside showcase) */
#categoryScrollContainer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0.25rem;
    position: relative;
    overflow-x: auto;
    white-space: nowrap;
    scroll-behavior: smooth;
    border-bottom: 2px solid #f3f4f6; /* Subtle bottom border on container */
}

/* Category Items - Premium Design */
.category-item {
    position: relative;
    cursor: pointer;
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #4b5563;
    white-space: nowrap;
    user-select: none;
    flex-shrink: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0.5rem;
    background: transparent;
}

/* Hover State */
.category-item:hover {
    color: #1f2937;
    background: #f9fafb;
    transform: translateY(-1px);
}

/* Active State Press */
.category-item:active {
    transform: scale(0.98);
}

/* Active Category - Bold Underline (Swiggy/Flipkart Style) */
.category-item::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 80%;
    transform: translateX(-50%) scaleX(0);
    width: calc(100% - 1rem);
    height: 3.5px;
    background: linear-gradient(90deg, #f97316 0%, #ea580c 50%, #f97316 100%);
    border-radius: 3px 3px 0 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.4);
}

.category-item.active-category::after {
    transform: translateX(-50%) scaleX(1);
}

/* Active Category Styling */
.category-item.active-category {
    font-weight: 700;
    color: #ea580c; /* Orange color matching the underline */
    background: #fff7ed; /* Very subtle orange tint */
}

/* ============================================
   SCROLL INDICATORS (Flipkart Style)
   ============================================ */

.scroll-indicator {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s, transform 0.2s;
    pointer-events: none;
}

.scroll-indicator.visible {
    opacity: 1;
    pointer-events: auto;
}

.scroll-indicator:hover {
    background: #f9fafb;
    transform: translateY(-50%) scale(1.1);
}

.scroll-indicator:active {
    transform: translateY(-50%) scale(0.95);
}

.scroll-indicator-left {
    left: 0;
}

.scroll-indicator-right {
    right: 0;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

/* Mobile */
@media (max-width: 640px) {
    .category-item {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }
    
    .subcategory-item {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }
    
    .scroll-indicator {
        width: 32px;
        height: 32px;
    }
}

/* Tablet */
@media (min-width: 641px) and (max-width: 1024px) {
    .category-item {
        padding: 0.75rem 1.125rem;
        font-size: 0.9rem;
    }
}

/* Desktop - Slightly larger for better readability */
@media (min-width: 1025px) {
    .category-item {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .category-item::after {
        height: 3.5px; /* Slightly thicker on desktop */
    }
}



/* Product List */
#productList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

/* No Products Message */
.no-products {
    text-align: center;
    color: #555;
    font-size: 1.1rem;
    margin: 2rem 0;
}

/* Product Card */
.product-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    background-color: #fff;
    padding: 1rem;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}


/* Product Details */
.product-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.brand-name {
    font-size: 0.15rem;
    color: #333;
    background-color: #f0f0f0; /* Light gray background */
  padding: 0.3rem;
    border-radius: 0.4rem;
    display: inline-block;
    text-align: center;
    font-weight: 600;
    width: fit-content; /* Wrap content width */
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.brand-name:hover {
    background-color: #005f43;
}

.product-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
}

.product-pricing {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.mrp {
    font-size: 0.9rem;
    color: #888;
    text-decoration: line-through;
}

.sp {
    font-size: 1.1rem;
    font-weight: bold;
    color: #007B55;
}

.discount {
    font-size: 1.1rem;
    font-weight: bold;
    color: #E53E3E;
    background-color: #FFE4E4;
    padding: 0.2rem 0.6rem;
    border-radius: 0.4rem;
    display: inline-block;
    animation: pulse 1.5s infinite;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin-top: 0.2rem;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Size Info */
.size-info {
    font-size: 0.9rem;
    color: #555;
}

.more-sizes {
    font-size: 0.8rem;
    color: #999;
}





/* Tags Container */
.tags {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    z-index: 10;
    pointer-events: none;
}

.tags > * {
    pointer-events: auto;
}

/* Base Tag Styling */
.tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Roboto, sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #fff;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    letter-spacing: 0.03em;
    white-space: nowrap;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    cursor: default;
}

.tag:hover {
    transform: translateY(-1px) scale(1.05);
    filter: brightness(1.1) saturate(1.1);
}


/* Popular Tag */
.tag-popular {
    background: linear-gradient(135deg, #ff9a9e, #fad0c4);
    color: #6b0f1a;
}

.tag-popular::before {
    content: "⭐";
    margin-right: 0.25rem;
}

/* New Tag */
.tag-new {
    background: linear-gradient(135deg, #00b894, #00cec9);
}

.tag-new::before {
    content: "✨";
    margin-right: 0.25rem;
    animation: sparkle 1.5s ease-in-out infinite;
}

/* Discount Tag */
.tag-discount {
    background: linear-gradient(135deg, #fd79a8, #e84393);
}

.tag-discount::before {
    content: "💥";
    margin-right: 0.25rem;
}

/* Seasonal Tag */
.tag-seasonal {
    background: linear-gradient(135deg, #f6d365, #fda085);
}

.tag-seasonal::before {
    content: "🍂";
    margin-right: 0.25rem;
}

/* Best Seller Tag */
.tag-best-seller {
    background-color: #fef3c7;
    color: #78350f;
    border: 1px solid #fcd34d;
}

.tag-best-seller::before {
    content: "🏆";
    margin-right: 0.25rem;
}

/* Out Of Stock Tag */
.tag-out-of-stock {
    background: #a0a0a0;
    color: #fff;
}

.tag-out-of-stock::before {
    content: "❌";
    margin-right: 0.25rem;
}

/* Organic Tag */
.tag-organic {
    background: linear-gradient(135deg, #55efc4, #00b894);
}

.tag-organic::before {
    content: "🌿";
    margin-right: 0.25rem;
}

/* Hybrid Tag */
.tag-hybrid {
    background: linear-gradient(135deg, #ffeaa7, #fab1a0);
}

.tag-hybrid::before {
    content: "⚡";
    margin-right: 0.25rem;
}

/* High Yield Tag */
.tag-high-yield {
    background: linear-gradient(135deg, #81ecec, #00cec9);
}

.tag-high-yield::before {
    content: "📈";
    margin-right: 0.25rem;
}

/* Low Cost Tag */
.tag-low-cost {
    background: linear-gradient(135deg, #dfe6e9, #b2bec3);
    color: #2d3436;
}

.tag-low-cost::before {
    content: "💲";
    margin-right: 0.25rem;
}

/* Quick Growing Tag */
.tag-quick-growing {
    background: linear-gradient(135deg, #fdcb6e, #e17055);
}

.tag-quick-growing::before {
    content: "⚡🌱";
    margin-right: 0.25rem;
}

/* Slow Release Tag */
.tag-slow-release {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
}

.tag-slow-release::before {
    content: "⏳";
    margin-right: 0.25rem;
}

/* Top Brand Tag */
.tag-top-brand {
    background: linear-gradient(135deg, #fd79a8, #e84393);
}

.tag-top-brand::before {
    content: "🏅";
    margin-right: 0.25rem;
}

/* Limited Stock Tag */
.tag-limited-stock {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    animation: pulse-glow 2s ease-in-out infinite alternate;
}

.tag-limited-stock::before {
    content: "⏰";
    margin-right: 0.25rem;
}

/* Animations */
@keyframes sparkle {
    0%,100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

@keyframes pulse-glow {
    0% { box-shadow: 0 2px 8px rgba(231,76,60,0.3); }
    100% { box-shadow: 0 4px 16px rgba(231,76,60,0.6); }
}





@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeUp {
    animation: fadeUp 0.5s ease-out forwards;
}






/* Subtle metallic shine */
@keyframes metallic-shine {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Metallic red background with subtle gradients and darker lines */
.sale-metallic-red {
  background: linear-gradient(
    90deg,
    #8B0000 0%,      /* Dark Red edge */
    #C21807 50%,     /* Bright Metallic Red center */
    #8B0000 100%     /* Dark Red edge */
  );
  background-size: 200% 100%;
  animation: metallic-shine 3s linear infinite;
  box-shadow: inset 0 -2px 4px rgba(0,0,0,0.4); /* subtle dark lines for depth */
  border-bottom: 1px solid rgba(0,0,0,0.5);    /* subtle bottom line */
  color: #fff;
}

/* Hover: subtle lift + shadow */
.hover-subtle-lift:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
}

/* Metallic text shadow */
.sale-text-metallic {
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}





/* glowing mic effect */
#voiceBtn.listening {
    animation: pulse 1s infinite;
    box-shadow: 0 0 15px 5px rgba(16, 185, 129, 0.7);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* smooth slide up */
#gopalJeeSheet.show {
    transform: translateY(0);
}

#gopalJeeOverlay {
    z-index: 50; /* overlay below */
}

#gopalJeeSheet {
    z-index: 60; /* sheet above overlay */
}





.sale-rupee-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;            /* Makes it circular */
    background: rgba(255, 255, 255, 0.2); /* Semi-transparent white */
    color: white;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Base banner */
.premium-sale-banner {
    position: absolute;      /* Stick to bottom of product card */
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 12px 2px 12px; /* Add some padding from edges */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    z-index: 10; /* Make sure it sits above product content */
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
        0%, 100% { 
            box-shadow: 0 0 10px rgba(239, 68, 68, 0.5), 0 -2px 15px rgba(239, 68, 68, 0.3); 
        }
        50% { 
            box-shadow: 0 0 20px rgba(239, 68, 68, 0.8), 0 -2px 25px rgba(239, 68, 68, 0.5), 0 0 30px rgba(239, 68, 68, 0.4); 
        }
    }
    
/* Left / right text */
.premium-sale-banner .main-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1rem;
}
.premium-sale-banner .sub-text {
    font-size: 0.75rem;
    opacity: 0.9;
    margin-top: 2px;
}
.premium-sale-banner .chevron {
    font-size: 1.1rem;
}

/* Banner type variants */
.premium-sale-banner.product {
    background: linear-gradient(135deg, #f97316 0%, #f43f5e 50%, #d946ef 100%);
    box-shadow: 
        0 4px 15px rgba(244, 63, 94, 0.5),
        0 8px 25px rgba(244, 63, 94, 0.2),
        0 12px 40px rgba(244, 63, 94, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px); /* soft blur for elegance */
    border-radius: 14px;
    padding: 14px 18px;
    color: white;
    font-family: 'Inter', sans-serif;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 12px 0 12px;
    z-index: 10;
    transition: all 0.3s ease;
}

/* Optional: hover effect for subtle shine */
.premium-sale-banner.product:hover {
    box-shadow: 
        0 6px 20px rgba(244, 63, 94, 0.6),
        0 10px 35px rgba(244, 63, 94, 0.3),
        0 14px 50px rgba(244, 63, 94, 0.15);
    transform: translateY(-2px);
}

.premium-sale-banner.clearance {
    background: linear-gradient(135deg, #7c2d12 0%, #dc2626 50%, #ea580c 100%);
        animation: clearanceGlow 2s ease-in-out infinite;
}


 @keyframes clearanceGlow {
        0%, 100% { 
            box-shadow: 0 0 15px rgba(220, 38, 38, 0.6), 0 -2px 20px rgba(234, 88, 12, 0.4); 
        }
        50% { 
            box-shadow: 0 0 25px rgba(220, 38, 38, 0.9), 0 -2px 30px rgba(234, 88, 12, 0.6), 0 0 35px rgba(234, 88, 12, 0.5); 
        }
    }
    
    
.premium-sale-banner.category {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    box-shadow: 0 4px 12px rgba(59,130,246,0.4);
}

.premium-sale-banner.brand {
    background: linear-gradient(135deg, #facc15, #f59e0b);
    box-shadow: 0 4px 12px rgba(245,158,11,0.4);
}
