/* Jumia-Style Mobile E-Commerce UI */

:root {
    --primary-color: #0b1b3c;
    --accent-color: #FE6A07;
    --background-color: #F9F9F9;
    --white: #ffffff;
    --text-dark: #333333;
    --text-light: #666666;
    --border-color: #e0e0e0;
    --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 4px 12px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --padding: 16px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
}

/* Removed bottom nav padding */

/* Compact Hero Banner - Full-width with text included in image */
/* Mobile-first: Start with smallest size, scale up */
/* Override #heroCarousel from style.css with higher specificity */
#heroCarousel.compact-hero-banner,
.compact-hero-banner,
#heroCarousel.compact-hero-banner.carousel {
    width: 100% !important;
    height: 200px !important;
    max-height: 200px !important;
    min-height: 200px !important;
    position: relative;
    overflow: hidden !important;
    margin-bottom: var(--padding);
    border-radius: 0;
    background-color: #f0f0f0;
    display: block;
}

#heroCarousel.compact-hero-banner .carousel-inner,
.compact-hero-banner .carousel-inner {
    width: 100% !important;
    height: 200px !important;
    max-height: 200px !important;
    min-height: 200px !important;
    overflow: hidden !important;
}

#heroCarousel.compact-hero-banner .carousel-item,
.compact-hero-banner .carousel-item {
    width: 100% !important;
    height: 200px !important;
    max-height: 200px !important;
    min-height: 200px !important;
    position: relative;
    overflow: hidden !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

#heroCarousel.compact-hero-banner .compact-banner-image,
.compact-hero-banner .compact-banner-image,
.compact-banner-image {
    width: 100% !important;
    height: 200px !important;
    max-height: 200px !important;
    min-height: 200px !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    flex-shrink: 0;
    /* Prevent image from stretching beyond container */
    max-width: 100%;
}

.banner-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.banner-link:hover {
    opacity: 0.98;
    transition: opacity 0.3s ease;
}

/* Navigation Arrows - REMOVED (user requested) */
.compact-carousel-control {
    display: none !important;
}

/* Indicator Dots - Professional e-commerce style */
.compact-carousel-indicators {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    padding: 8px 12px;
    z-index: 15;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.compact-carousel-indicators button {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.9);
    margin: 0;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.7;
    flex-shrink: 0;
}

.compact-carousel-indicators button:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.9);
    transform: scale(1.2);
}

.compact-carousel-indicators button.active {
    width: 24px;
    height: 8px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 1);
    opacity: 1;
    transform: scale(1);
}

/* Tablet - Slightly smaller */
@media (min-width: 768px) and (max-width: 1279px) {
    #heroCarousel.compact-hero-banner,
    .compact-hero-banner {
        height: 280px !important;
        max-height: 280px !important;
        min-height: 280px !important;
    }
    
    #heroCarousel.compact-hero-banner .carousel-inner,
    .compact-hero-banner .carousel-inner {
        height: 280px !important;
        max-height: 280px !important;
        min-height: 280px !important;
    }
    
    .compact-hero-banner .carousel-item {
        height: 280px !important;
    }
    
    #heroCarousel.compact-hero-banner .carousel-item,
    .compact-hero-banner .carousel-item {
        height: 280px !important;
        max-height: 280px !important;
        min-height: 280px !important;
    }
    
    #heroCarousel.compact-hero-banner .compact-banner-image,
    .compact-hero-banner .compact-banner-image,
    .compact-banner-image {
        height: 280px !important;
        max-height: 280px !important;
        min-height: 280px !important;
        object-fit: cover !important;
        object-position: center !important;
    }
}

/* Desktop - Standard size */
@media (min-width: 1280px) {
    #heroCarousel.compact-hero-banner,
    .compact-hero-banner {
        height: 320px !important;
        max-height: 320px !important;
        min-height: 320px !important;
    }
    
    #heroCarousel.compact-hero-banner .carousel-inner,
    .compact-hero-banner .carousel-inner {
        height: 320px !important;
        max-height: 320px !important;
        min-height: 320px !important;
    }
    
    .compact-hero-banner .carousel-item {
        height: 320px !important;
    }
    
    #heroCarousel.compact-hero-banner .carousel-item,
    .compact-hero-banner .carousel-item {
        height: 320px !important;
        max-height: 320px !important;
        min-height: 320px !important;
    }
    
    #heroCarousel.compact-hero-banner .compact-banner-image,
    .compact-hero-banner .compact-banner-image,
    .compact-banner-image {
        height: 320px !important;
        max-height: 320px !important;
        min-height: 320px !important;
        object-fit: cover !important;
        object-position: center !important;
    }
}

/* Mobile - Compact and Responsive */
@media (min-width: 481px) and (max-width: 767px) {
    #heroCarousel.compact-hero-banner,
    .compact-hero-banner {
        height: 240px !important;
        max-height: 240px !important;
        min-height: 240px !important;
        width: 100% !important;
    }
    
    #heroCarousel.compact-hero-banner .carousel-inner,
    .compact-hero-banner .carousel-inner {
        height: 240px !important;
        max-height: 240px !important;
        min-height: 240px !important;
        width: 100% !important;
    }
    
    .compact-hero-banner .carousel-item {
        height: 240px !important;
    }
    
    #heroCarousel.compact-hero-banner .carousel-item,
    .compact-hero-banner .carousel-item {
        height: 240px !important;
        max-height: 240px !important;
        min-height: 240px !important;
        width: 100% !important;
    }
    
    #heroCarousel.compact-hero-banner .compact-banner-image,
    .compact-hero-banner .compact-banner-image,
    .compact-banner-image {
        height: 240px !important;
        max-height: 240px !important;
        min-height: 240px !important;
        width: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
    }
    
    .compact-carousel-control {
        width: 28px;
        height: 28px;
    }
    
    .compact-carousel-control.carousel-control-prev {
        left: 8px;
    }
    
    .compact-carousel-control.carousel-control-next {
        right: 8px;
    }
    
    .compact-carousel-control .carousel-control-prev-icon,
    .compact-carousel-control .carousel-control-next-icon {
        width: 14px;
        height: 14px;
        background-size: 14px 14px;
    }
    
    .compact-carousel-indicators {
        bottom: 6px;
    }
    
    .compact-carousel-indicators button {
        width: 5px;
        height: 5px;
        border-width: 1px;
    }
    
    .compact-carousel-indicators button.active {
        width: 16px;
        height: 5px;
    }
}

/* Small Mobile - Extra Compact (default, mobile-first) */
@media (max-width: 480px) {
    #heroCarousel.compact-hero-banner,
    .compact-hero-banner {
        height: 200px !important;
        max-height: 200px !important;
        min-height: 200px !important;
    }
    
    #heroCarousel.compact-hero-banner .carousel-inner,
    .compact-hero-banner .carousel-inner {
        height: 200px !important;
        max-height: 200px !important;
        min-height: 200px !important;
    }
    
    .compact-hero-banner .carousel-item {
        height: 200px !important;
    }
    
    #heroCarousel.compact-hero-banner .carousel-item,
    .compact-hero-banner .carousel-item {
        height: 200px !important;
        max-height: 200px !important;
        min-height: 200px !important;
    }
    
    #heroCarousel.compact-hero-banner .compact-banner-image,
    .compact-hero-banner .compact-banner-image,
    .compact-banner-image {
        height: 200px !important;
        max-height: 200px !important;
        min-height: 200px !important;
        object-fit: cover !important;
        object-position: center !important;
    }
    
    .compact-carousel-control {
        width: 24px;
        height: 24px;
    }
    
    .compact-carousel-control.carousel-control-prev {
        left: 6px;
    }
    
    .compact-carousel-control.carousel-control-next {
        right: 6px;
    }
    
    .compact-carousel-control .carousel-control-prev-icon,
    .compact-carousel-control .carousel-control-next-icon {
        width: 12px;
        height: 12px;
        background-size: 12px 12px;
    }
    
    .compact-carousel-indicators {
        bottom: 6px;
        padding: 4px 8px;
        gap: 5px;
    }
    
    .compact-carousel-indicators button {
        width: 5px;
        height: 5px;
        border-width: 1.5px;
    }
    
    .compact-carousel-indicators button.active {
        width: 18px;
        height: 5px;
    }
}

/* Smooth fade transitions - Professional e-commerce style */
/* Bootstrap fade carousel - Let Bootstrap handle opacity transitions */
.compact-hero-banner.carousel-fade .carousel-item {
    opacity: 0;
    transition-property: opacity;
    transform: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block !important;
    transition-duration: 0.6s;
    transition-timing-function: ease-in-out;
}

/* Active item - fully visible */
.compact-hero-banner.carousel-fade .carousel-item.active {
    opacity: 1;
    z-index: 3;
}

/* Next item - ready to fade in */
.compact-hero-banner.carousel-fade .carousel-item-next:not(.carousel-item-start) {
    opacity: 0;
    z-index: 2;
}

/* Prev item - ready to fade in */
.compact-hero-banner.carousel-fade .carousel-item-prev:not(.carousel-item-end) {
    opacity: 0;
    z-index: 2;
}

/* During transition - next item fading in (on top) */
.compact-hero-banner.carousel-fade .carousel-item-next.carousel-item-start {
    opacity: 1;
    z-index: 4;
}

/* During transition - prev item fading in (on top) */
.compact-hero-banner.carousel-fade .carousel-item-prev.carousel-item-end {
    opacity: 1;
    z-index: 4;
}

/* During transition - active item fading out (below) */
.compact-hero-banner.carousel-fade .active.carousel-item-start {
    opacity: 0;
    z-index: 3;
}

.compact-hero-banner.carousel-fade .active.carousel-item-end {
    opacity: 0;
    z-index: 3;
}

.compact-hero-banner .carousel-inner {
    position: relative;
    width: 100%;
    overflow: hidden;
    /* Fixed height prevents layout shift */
    height: 200px;
    /* Background color prevents blank states during transitions */
    background-color: #f0f0f0;
}

/* Ensure no layout shift - all items same size and positioned */
/* All items positioned absolutely to prevent blank states */
/* IMPORTANT: All carousel items must be visible in DOM for Bootstrap carousel to work */
/* NOTE: Don't set default opacity here - let Bootstrap carousel-fade handle it */
.compact-hero-banner .carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Don't set opacity here - Bootstrap carousel-fade will handle it */
    transition: opacity 0.6s ease-in-out;
    will-change: opacity;
    pointer-events: none;
    display: block !important; /* Ensure all items are rendered */
}

.compact-hero-banner .carousel-item.active {
    position: absolute;
    opacity: 1 !important; /* Force active item to be visible */
    z-index: 3;
    pointer-events: auto;
    display: block !important;
}

/* Ensure next/prev items are ready but hidden */
.compact-hero-banner .carousel-item-next,
.compact-hero-banner .carousel-item-prev {
    display: block !important;
    opacity: 0;
    z-index: 1;
}

/* During transition - both visible for smooth fade */
.compact-hero-banner .carousel-item-next.carousel-item-start,
.compact-hero-banner .carousel-item-prev.carousel-item-end {
    opacity: 1;
    z-index: 2;
    display: block !important;
}

/* Prevent overlapping and layout shift */
/* CRITICAL: Ensure images are always visible, even when parent has opacity 0 */
.compact-hero-banner .carousel-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important; /* Images should always be fully opaque */
    pointer-events: none;
}

/* Ensure images in active items are visible */
.compact-hero-banner .carousel-item.active img {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* Ensure images in transitioning items are visible */
.compact-hero-banner .carousel-item-next img,
.compact-hero-banner .carousel-item-prev img {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* Default banner text responsive sizing */
@media (max-width: 767px) {
    .banner-default-title {
        font-size: 16px !important;
        margin-bottom: 6px !important;
    }
    
    .banner-default-text {
        font-size: 13px !important;
        margin-bottom: 8px !important;
    }
    
    .banner-default-btn {
        padding: 8px 18px !important;
        font-size: 12px !important;
    }
}

@media (max-width: 480px) {
    .banner-default-title {
        font-size: 14px !important;
        margin-bottom: 4px !important;
    }
    
    .banner-default-text {
        font-size: 12px !important;
        margin-bottom: 6px !important;
    }
    
    .banner-default-btn {
        padding: 6px 16px !important;
        font-size: 11px !important;
    }
}

/* Jumia-Style Hero Banner - Responsive 1280-2000px width × 200px height */
.jumia-hero-banner {
    width: 100%;
    max-width: 2000px;
    height: 200px;
    position: relative;
    overflow: hidden;
    margin: 0 auto var(--padding);
    border-radius: 0;
    background-color: #f0f0f0;
}

.jumia-hero-banner .carousel-inner {
    width: 100%;
    height: 200px;
}

.jumia-hero-banner .carousel-item {
    width: 100%;
    height: 200px;
    position: relative;
}

.jumia-banner-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.banner-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.banner-link:hover {
    opacity: 0.98;
    transition: opacity 0.3s ease;
}

/* Navigation Arrows - Overlaying banner, centered vertically (Jumia style) */
.jumia-carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    opacity: 0.8;
    z-index: 10;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.jumia-carousel-control:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.jumia-carousel-control.carousel-control-prev {
    left: 15px;
}

.jumia-carousel-control.carousel-control-next {
    right: 15px;
}

.jumia-carousel-control .carousel-control-prev-icon,
.jumia-carousel-control .carousel-control-next-icon {
    width: 18px;
    height: 18px;
    background-size: 18px 18px;
    filter: brightness(0) saturate(100%) invert(0%);
}

/* Indicator Dots - Overlaying banner, bottom centered (Jumia style) */
.jumia-carousel-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    padding: 0;
    z-index: 10;
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
}

.jumia-carousel-indicators button {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 1.5px solid rgba(255, 255, 255, 0.8);
    margin: 0;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.jumia-carousel-indicators button:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.8);
}

.jumia-carousel-indicators button.active {
    width: 20px;
    height: 6px;
    border-radius: 3px;
    background-color: rgba(255, 255, 255, 1);
    border-color: rgba(255, 255, 255, 1);
    opacity: 1;
}

/* Large Desktop - 1600px to 2000px */
@media (min-width: 1600px) and (max-width: 2000px) {
    .jumia-hero-banner {
        width: 100%;
        max-width: 2000px;
        height: 200px;
    }
    
    .jumia-hero-banner .carousel-inner {
        height: 200px;
    }
    
    .jumia-hero-banner .carousel-item {
        height: 200px;
    }
    
    .jumia-banner-image {
        height: 200px;
    }
}

/* Desktop - 1280px to 1599px */
@media (min-width: 1280px) and (max-width: 1599px) {
    .jumia-hero-banner {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        height: 200px;
    }
    
    .jumia-hero-banner .carousel-inner {
        height: 200px;
    }
    
    .jumia-hero-banner .carousel-item {
        height: 200px;
    }
    
    .jumia-banner-image {
        height: 200px;
    }
}

/* Tablet - 768px to 1279px */
@media (min-width: 768px) and (max-width: 1279px) {
    .jumia-hero-banner {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        height: 150px;
    }
    
    .jumia-hero-banner .carousel-inner {
        height: 150px;
    }
    
    .jumia-hero-banner .carousel-item {
        height: 150px;
    }
    
    .jumia-banner-image {
        height: 150px;
    }
    
    .jumia-carousel-control {
        width: 36px;
        height: 36px;
    }
    
    .jumia-carousel-control .carousel-control-prev-icon,
    .jumia-carousel-control .carousel-control-next-icon {
        width: 18px;
        height: 18px;
        background-size: 18px 18px;
    }
}

/* Mobile - Below 768px */
@media (max-width: 767px) {
    .jumia-hero-banner {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
        height: 120px;
    }
    
    .jumia-hero-banner .carousel-inner {
        height: 120px;
    }
    
    .jumia-hero-banner .carousel-item {
        height: 120px;
    }
    
    .jumia-banner-image {
        height: 120px;
    }
    
    .jumia-carousel-control {
        width: 32px;
        height: 32px;
    }
    
    .jumia-carousel-control.carousel-control-prev {
        left: 10px;
    }
    
    .jumia-carousel-control.carousel-control-next {
        right: 10px;
    }
    
    .jumia-carousel-control .carousel-control-prev-icon,
    .jumia-carousel-control .carousel-control-next-icon {
        width: 16px;
        height: 16px;
        background-size: 16px 16px;
    }
    
    .jumia-carousel-indicators {
        bottom: 10px;
    }
    
    .jumia-carousel-indicators button {
        width: 6px;
        height: 6px;
        border-width: 1.5px;
    }
    
    .jumia-carousel-indicators button.active {
        width: 18px;
        height: 6px;
    }
}

/* Smooth auto-rotation */
.jumia-hero-banner .carousel-item {
    transition: transform 0.6s ease-in-out;
}

/* Extra Large Screens - Above 2000px */
@media (min-width: 2001px) {
    .jumia-hero-banner {
        max-width: 2000px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Small Mobile - Below 480px */
@media (max-width: 480px) {
    .jumia-hero-banner {
        height: 100px;
    }
    
    .jumia-hero-banner .carousel-inner {
        height: 100px;
    }
    
    .jumia-hero-banner .carousel-item {
        height: 100px;
    }
    
    .jumia-banner-image {
        height: 100px;
    }
    
    .jumia-carousel-control {
        width: 28px;
        height: 28px;
    }
    
    .jumia-carousel-control .carousel-control-prev-icon,
    .jumia-carousel-control .carousel-control-next-icon {
        width: 14px;
        height: 14px;
        background-size: 14px 14px;
    }
}

/* Navbar Logo */
.navbar-logo {
    height: 50px !important;
    width: auto !important;
    max-width: 200px !important;
}

@media (max-width: 768px) {
    .navbar-logo {
        height: 40px !important;
        max-width: 150px !important;
    }
}

.hero-carousel-mobile .carousel-indicators button.active {
    background-color: var(--accent-color);
}

/* Categories Horizontal Scroll - 100px height */
.categories-scroll {
    background: var(--white);
    padding: var(--padding) 0;
    margin-bottom: var(--padding);
    border-radius: 0;
}

.categories-scroll-header {
    padding: 0 var(--padding);
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.categories-scroll-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.categories-scroll-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 0 var(--padding);
    gap: 12px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.categories-scroll-container::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.category-item {
    min-width: 80px;
    text-align: center;
    flex-shrink: 0;
}

.category-item-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--background-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 24px;
    color: var(--accent-color);
    box-shadow: var(--shadow-soft);
}

.category-item-label {
    font-size: 12px;
    color: var(--text-dark);
    font-weight: 500;
    margin-top: 4px;
    display: block;
    text-decoration: none;
}

.category-item-label:hover {
    color: var(--accent-color);
    text-decoration: none;
}

/* Product Carousel - Horizontal Scroll */
.product-carousel-section {
    background: var(--white);
    padding: var(--padding) 0;
    margin-bottom: var(--padding);
    border-radius: 0;
}

.product-carousel-header {
    padding: 0 var(--padding);
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-carousel-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.product-carousel-header a {
    font-size: 14px;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.product-carousel-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding: 0 var(--padding);
    gap: 12px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.product-carousel-container::-webkit-scrollbar {
    display: none;
}

/* Product Card - 140px width, flexible height */
.product-card-mobile {
    min-width: 140px;
    width: 140px;
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    overflow: visible;
    flex-shrink: 0;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 230px; /* Minimum height, can expand if needed */
}

.product-card-mobile:active {
    transform: scale(0.98);
}

.product-card-mobile-image {
    width: 140px;
    height: 140px;
    object-fit: cover;
    background: var(--background-color);
    display: block;
}

.product-card-mobile-body {
    padding: 8px 10px 12px 10px;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    overflow: visible;
    flex: 1;
    gap: 4px;
}

.product-card-mobile-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-dark);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    min-height: 32px;
    max-height: 32px;
    flex-shrink: 0;
}

.product-card-mobile-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-color);
    margin: 0;
    margin-top: auto;
    padding-top: 4px;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 3px;
    flex-shrink: 0;
    white-space: normal;
    overflow: visible;
    min-height: 20px;
}

.product-card-mobile-old-price {
    font-size: 10px;
    color: var(--text-light);
    text-decoration: line-through;
    display: inline-block;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.4;
}

.product-card-mobile-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--accent-color);
    color: var(--white);
    font-size: 10px;
    font-weight: 600;
    padding: 4px 6px;
    border-radius: 4px;
    z-index: 1;
}

/* Top Header Bar Styling */
.top-header-bar {
    position: relative;
    z-index: 1030;
}

.top-header-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: opacity 0.2s ease;
}

.top-header-item:hover {
    opacity: 0.9;
}

.top-header-item i {
    font-size: 14px;
}

@media (max-width: 575px) {
    .top-header-bar {
        padding: 0.4rem 0 !important;
    }
    
    .top-header-item {
        font-size: 11px !important;
    }
    
    .top-header-item strong {
        font-size: 12px;
    }
}

/* Flash Sale Banner - Enhanced E-commerce Style */
.flash-sale-banner {
    height: 112px; /* Reduced by 20% from 140px */
    background: linear-gradient(135deg, #FF1744 0%, #FF6B35 50%, #FE6A07 100%);
    margin: 0 0 var(--padding) 0;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px var(--padding);
    color: var(--white);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(254, 106, 7, 0.3);
}

.flash-sale-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.flash-sale-banner::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.flash-sale-content {
    position: relative;
    z-index: 1;
    flex: 1;
}

.flash-sale-title {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 6px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.5px;
}

.flash-sale-subtitle {
    font-size: 15px;
    margin: 0;
    opacity: 0.95;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.flash-sale-cta {
    position: relative;
    z-index: 1;
    background: var(--white);
    color: #FF1744;
    padding: 14px 32px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
    margin-left: 20px;
}

.flash-sale-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    color: #FF1744;
}

.flash-sale-cta:active {
    transform: translateY(0) scale(0.98);
}

/* Flash Sale Responsive */
@media (max-width: 767px) {
    .flash-sale-banner {
        height: 96px; /* Reduced by 20% from 120px */
        padding: 16px var(--padding);
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .flash-sale-title {
        font-size: 18px;
        margin-bottom: 4px;
    }
    
    .flash-sale-content .bi {
        font-size: 20px !important;
    }
    
    .flash-sale-subtitle {
        font-size: 13px;
    }
    
    .flash-sale-cta {
        padding: 10px 24px;
        font-size: 13px;
        margin-left: 0;
        align-self: flex-end;
    }
}

@media (max-width: 480px) {
    .flash-sale-banner {
        height: 88px; /* Reduced by 20% from 110px */
        padding: 14px var(--padding);
        border-radius: 8px;
    }
    
    .flash-sale-title {
        font-size: 16px;
    }
    
    .flash-sale-content .bi {
        font-size: 18px !important;
    }
    
    .flash-sale-subtitle {
        font-size: 12px;
    }
    
    .flash-sale-cta {
        padding: 8px 20px;
        font-size: 12px;
    }
}

/* Product Grid - 2 columns */
.product-grid-section {
    padding: var(--padding);
    background: var(--white);
    margin-bottom: var(--padding);
}

.product-grid-header {
    margin-bottom: 12px;
}

.product-grid-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.product-grid-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    overflow: visible;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    min-height: 280px;
}

.product-grid-card:active {
    transform: scale(0.98);
}

.product-grid-card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: var(--background-color);
    display: block;
}

.product-grid-card-body {
    padding: 10px 12px 14px 12px;
    min-height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 4px;
    overflow: visible;
    flex: 1;
}

.product-grid-card-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    min-height: 40px;
    max-height: 40px;
    flex-shrink: 0;
}

.product-grid-card-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent-color);
    margin: 0;
    margin-top: auto;
    padding-top: 4px;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: break-word;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 3px;
    flex-shrink: 0;
    white-space: normal;
    overflow: visible;
    min-height: 20px;
}

.product-grid-card-old-price {
    font-size: 11px;
    color: var(--text-light);
    text-decoration: line-through;
    display: inline-block;
    white-space: nowrap;
    flex-shrink: 0;
    line-height: 1.4;
}

.product-grid-card-rating {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

/* Bottom Navbar Removed - No longer needed */

/* Lazy Loading */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Security - Prevent image drag */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: auto;
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .product-card-mobile {
        min-width: 160px;
        width: 160px;
    }
    
    .product-card-mobile-image {
        width: 160px;
        height: 160px;
    }
}

@media (min-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Add to Cart Button in Carousel - Moved to top */
.product-card-mobile-cart {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    background: var(--accent-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    box-shadow: var(--shadow-medium);
    transition: transform 0.2s, background 0.2s;
    z-index: 2;
    text-decoration: none;
}

.product-card-mobile-cart:active {
    transform: scale(0.9);
}

.product-card-mobile-cart:hover {
    background: #d45906;
    color: var(--white);
    text-decoration: none;
}

/* Wishlist Button in Carousel - Top left */
.product-card-mobile-wishlist {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.9);
    color: #dc3545;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    box-shadow: var(--shadow-medium);
    transition: transform 0.2s, background 0.2s;
    z-index: 2;
    text-decoration: none;
}

.product-card-mobile-wishlist:active {
    transform: scale(0.9);
}

.product-card-mobile-wishlist:hover {
    background: var(--white);
    color: #dc3545;
    text-decoration: none;
}

.product-card-mobile-wishlist.active {
    background: #dc3545;
    color: var(--white);
}

/* Adjust badge position when wishlist and cart are present */
/* Badge moves down when both buttons are at top */
.product-card-mobile:has(.product-card-mobile-wishlist):has(.product-card-mobile-cart) .product-card-mobile-badge {
    top: 48px; /* Move down to make room for buttons at top */
    right: 8px; /* Keep original right position */
}

/* Badge moves right when only cart is present (no wishlist) */
.product-card-mobile:not(:has(.product-card-mobile-wishlist)):has(.product-card-mobile-cart) .product-card-mobile-badge {
    top: 8px;
    right: 48px; /* Move right to make room for cart button */
}

/* Section Spacing */
.home-section {
    margin-bottom: var(--padding);
}

/* Loading Placeholder */
.loading-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}


