/* Lafinda Mobile Shop 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;
    --home-section-gap: 0.55rem;
    --home-inline-pad: 0.75rem;
}

* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    overflow-x: clip;
    overscroll-behavior-x: none;
    width: 100%;
    max-width: 100%;
    touch-action: pan-y;
}

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 — fluid responsive scaling without distortion */
#heroCarousel.compact-hero-banner,
.compact-hero-banner,
#heroCarousel.compact-hero-banner.carousel {
    --hero-h: clamp(150px, 45vw, 190px);
    width: 100% !important;
    height: var(--hero-h) !important;
    max-height: var(--hero-h) !important;
    min-height: var(--hero-h) !important;
    position: relative;
    overflow: hidden !important;
    margin-bottom: 0 !important;
    border-radius: 0;
    background-color: #f8fafc;
    display: block;
}

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

#heroCarousel.compact-hero-banner .carousel-item,
.compact-hero-banner .carousel-item {
    width: 100% !important;
    height: var(--hero-h) !important;
    max-height: var(--hero-h) !important;
    min-height: var(--hero-h) !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: var(--hero-h) !important;
    max-height: var(--hero-h) !important;
    min-height: var(--hero-h) !important;
    object-fit: cover !important;
    object-position: center !important;
    flex-shrink: 0;
    max-width: 100%;
}

.compact-hero-banner .carousel-item .banner-link {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#heroCarousel.compact-hero-banner .carousel-item .compact-banner-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
}

/* Phone/tablet: mobile flyer. Laptop/desktop: 1920×320 flyer. */
#heroCarousel.compact-hero-banner .banner-image-desktop,
.compact-hero-banner .banner-image-desktop,
.feed-slot-banner .banner-image-desktop {
    display: none !important;
}

#heroCarousel.compact-hero-banner .banner-image-mobile,
.compact-hero-banner .banner-image-mobile,
.feed-slot-banner .banner-image-mobile {
    display: block !important;
}

@media (min-width: 768px) {
    #heroCarousel.compact-hero-banner .banner-image-desktop,
    .compact-hero-banner .banner-image-desktop,
    .feed-slot-banner .banner-image-desktop,
    #heroCarouselDesktop .compact-banner-image {
        display: block !important;
    }

    #heroCarousel.compact-hero-banner .banner-image-mobile,
    .compact-hero-banner .banner-image-mobile,
    .feed-slot-banner .banner-image-mobile {
        display: none !important;
    }
}

.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 */
.compact-carousel-control {
    display: none !important;
}

/* Indicator Dots — hidden; banners auto-advance */
.compact-carousel-indicators,
.feed-slot-indicators,
.marketplace-hero-indicators {
    display: none !important;
}

@media (min-width: 481px) {
    #heroCarousel.compact-hero-banner,
    .compact-hero-banner,
    #heroCarousel.compact-hero-banner.carousel {
        --hero-h: clamp(180px, 38vw, 220px);
    }
}

@media (min-width: 768px) {
    #heroCarousel.compact-hero-banner,
    .compact-hero-banner,
    #heroCarousel.compact-hero-banner.carousel {
        --hero-h: clamp(210px, 28vw, 260px);
        max-width: 100%;
        border-radius: 8px;
        margin: 0.5rem auto;
    }
}

/* Desktop billboard — shorter compact size so catalog rows stay on screen */
@media (min-width: 992px) {
    #heroCarousel.compact-hero-banner,
    .compact-hero-banner,
    #heroCarousel.compact-hero-banner.carousel {
        --hero-h: 200px;
        max-width: 1240px;
        border-radius: 12px;
        margin: 0.75rem auto 1rem;
        box-shadow: 0 4px 16px rgba(11, 27, 60, 0.06);
    }

    #heroCarousel.compact-hero-banner .compact-banner-image.banner-image-desktop,
    .compact-hero-banner .compact-banner-image.banner-image-desktop {
        object-fit: cover !important;
        object-position: center !important;
    }
}

/* Small tablet leftover controls */
@media (min-width: 481px) and (max-width: 767px) {
    
    .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;
    }
}

/* Mobile — up to 480px */
@media (max-width: 480px) {
    #heroCarousel.compact-hero-banner,
    .compact-hero-banner,
    #heroCarousel.compact-hero-banner.carousel {
        --hero-h: 188px;
    }

    #heroCarousel.compact-hero-banner .compact-banner-image.banner-image-mobile,
    .compact-hero-banner .compact-banner-image.banner-image-mobile {
        object-position: center 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;
    height: var(--hero-h) !important;
    background-color: #f4ece3;
}

/* 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 — legacy full-bleed banner images only */
.compact-hero-banner .carousel-item img.compact-banner-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: left center !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: none;
}

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

/* Ensure images in transitioning items are visible */
.compact-hero-banner .carousel-item-next img.compact-banner-image,
.compact-hero-banner .carousel-item-prev img.compact-banner-image {
    opacity: 1 !important;
    visibility: visible !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;
    }
}

/* Promo hero banner — responsive 1280–2000px width × 200px height */
.promo-hero-banner {
    width: 100%;
    max-width: 2000px;
    height: 200px;
    position: relative;
    overflow: hidden;
    margin: 0 auto var(--padding);
    border-radius: 0;
    background-color: #f0f0f0;
}

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

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

.promo-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 */
.promo-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);
}

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

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

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

.promo-carousel-control .carousel-control-prev-icon,
.promo-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 */
.promo-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;
}

.promo-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;
}

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

.promo-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) {
    .promo-hero-banner {
        width: 100%;
        max-width: 2000px;
        height: 200px;
    }
    
    .promo-hero-banner .carousel-inner {
        height: 200px;
    }
    
    .promo-hero-banner .carousel-item {
        height: 200px;
    }
    
    .promo-banner-image {
        height: 200px;
    }
}

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

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

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

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

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

/* Small Mobile - Below 480px */
@media (max-width: 480px) {
    .promo-hero-banner {
        height: 100px;
    }
    
    .promo-hero-banner .carousel-inner {
        height: 100px;
    }
    
    .promo-hero-banner .carousel-item {
        height: 100px;
    }
    
    .promo-banner-image {
        height: 100px;
    }
    
    .promo-carousel-control {
        width: 28px;
        height: 28px;
    }
    
    .promo-carousel-control .carousel-control-prev-icon,
    .promo-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;
    overscroll-behavior-x: contain;
    scroll-behavior: auto;
    -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: 72px;
    max-width: 88px;
    text-align: center;
    flex: 0 0 auto;
    flex-shrink: 0;
}

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

.category-item-label {
    font-size: 10px;
    color: var(--text-dark);
    font-weight: 500;
    margin-top: 2px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-decoration: none;
    max-width: 84px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.2;
    min-height: 2.4em;
    word-break: break-word;
}

.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;
    overscroll-behavior-x: contain;
    scroll-behavior: auto;
    -webkit-overflow-scrolling: touch;
    scroll-padding-inline: var(--home-inline-pad);
    gap: 12px;
    padding: 0 var(--home-inline-pad);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.product-carousel-container::after {
    content: '';
    flex: 0 0 var(--home-inline-pad);
}

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

/* Product Card — legacy fallback when not using lp-card */
.product-card-mobile:not(.lp-card) {
    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: auto;
}

.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: 2.6em;
    max-height: 2.6em;
    flex-shrink: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.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: 0.75rem;
    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: 0.6875rem;
    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 fade — product thumbnails only; category/nav images stay visible */
#home-feed-root .lp-card__image[loading="lazy"],
.product-grid-card-image[loading="lazy"],
.lp-card__image[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

#home-feed-root .lp-card__image[loading="lazy"].loaded,
.product-grid-card-image[loading="lazy"].loaded,
.lp-card__image[loading="lazy"].loaded {
    opacity: 1;
}

.category-nav-card__media img[loading="lazy"],
.category-nav-row__icon img[loading="lazy"] {
    opacity: 1;
}

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

@media (hover: hover) and (pointer: fine) {
    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(--home-section-gap);
}

/* 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;
    }
}

/* Keep Call to Order and delivery icon on phones */
@media (max-width: 991.98px) {
    .top-header-modern {
        display: block;
        padding: 0.4rem 0;
        background: #000000;
    }

    .top-header-content {
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 0.5rem;
    }

    .top-header-features {
        display: flex;
        align-items: center;
        margin-left: auto;
    }

    .top-header-feature--shield {
        display: none !important;
    }

    .top-header-feature--truck {
        display: flex !important;
    }

    .top-header-link {
        font-size: 0.8125rem;
        justify-content: flex-start;
        width: auto;
    }

    .navbar-modern {
        padding: 0.45rem 0;
        box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
    }

    .navbar-logo-img {
        height: 34px !important;
        max-width: 110px !important;
    }

    .navbar-search-mobile {
        margin-top: 0.35rem !important;
    }

    .navbar-search-input {
        padding: 0.4rem 0.6rem !important;
        font-size: 16px !important;
    }

    input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="range"]),
    select,
    textarea {
        font-size: 16px !important;
    }

    .categories-scroll {
        padding: 0.55rem 0;
        margin-bottom: 0.55rem;
    }

    .categories-scroll-header {
        margin-bottom: 0.45rem;
        padding: 0 0.75rem;
    }

    .categories-scroll-header h3 {
        font-size: 0.95rem;
    }

    .categories-scroll-container {
        padding: 0 0.75rem;
        gap: 0.55rem;
    }

    .category-item-icon {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .home-section {
        margin-bottom: 0.55rem;
    }

    .home-categories.home-section {
        margin-bottom: 0.3rem;
    }

    .product-carousel-section,
    .product-grid-section {
        padding: 0.55rem 0;
        margin-bottom: 0.55rem;
    }

    .product-carousel-header {
        margin-bottom: 0.45rem;
        padding: 0 0.75rem;
    }

    .product-carousel-header h3 {
        font-size: 0.95rem;
    }
}


/* Progressive home feed (Phase 2) */
.home-feed-sentinel {
    width: 100%;
    height: 1px;
}

.home-feed-lazy-placeholder {
    padding: 0 0.75rem;
}

.home-feed-skeleton {
    padding: 0.75rem 0;
}

.home-feed-skeleton-header {
    width: 42%;
    height: 14px;
    border-radius: 8px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: home-feed-shimmer 1.2s infinite;
    margin-bottom: 0.75rem;
}

.home-feed-skeleton-row {
    display: flex;
    gap: 0.75rem;
    overflow: hidden;
}

.home-feed-skeleton-card {
    flex: 0 0 46%;
    height: 210px;
    border-radius: 8px;
    background: linear-gradient(90deg, #f5f5f5 25%, #ececec 50%, #f5f5f5 75%);
    background-size: 200% 100%;
    animation: home-feed-shimmer 1.2s infinite;
}

.home-feed-error {
    text-align: center;
    padding: 1rem 0.75rem;
}

.home-feed-error-text {
    margin-bottom: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

@keyframes home-feed-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Promo pills row (Phase 3) */
.promo-pills-section {
    padding: 0.35rem 0 0.65rem;
}

.promo-pills-scroll-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 var(--padding, 0.75rem);
    gap: 0.5rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.promo-pills-scroll-container::-webkit-scrollbar {
    display: none;
}

.promo-pill-item {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #ececec;
    color: var(--text-dark, #222);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.promo-pill-item:hover {
    border-color: var(--primary-color, #fe6a07);
    color: var(--primary-color, #fe6a07);
}

.promo-pill-item--button {
    cursor: pointer;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}

.promo-pill-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    font-size: 0.95rem;
    color: var(--primary-color, #fe6a07);
}

/* Mid-feed banner slots (Phase 3) */
.feed-slot-banner {
    width: calc(100% - 1.5rem);
    max-width: 100%;
    height: 120px;
    margin: 0.35rem auto 0.65rem;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f5f5;
}

.feed-slot-banner .carousel-inner,
.feed-slot-banner .carousel-item {
    height: 120px;
}

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

@media (min-width: 768px) {
    .feed-slot-banner,
    .feed-slot-banner .carousel-inner,
    .feed-slot-banner .carousel-item,
    .feed-slot-banner-image {
        height: 140px;
    }
}

@media (min-width: 1280px) {
    .feed-slot-banner,
    .feed-slot-banner .carousel-inner,
    .feed-slot-banner .carousel-item,
    .feed-slot-banner-image {
        height: 160px;
    }
}

/* ── Home feed section consistency ── */
.product-carousel-header__subtitle {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    line-height: 1.35;
    color: var(--text-light);
}

.product-carousel-header__link {
    font-size: 0.75rem;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

.campaign-section,
.blackfriday-section {
    margin: var(--home-section-gap) var(--home-inline-pad);
    padding: 0.85rem var(--home-inline-pad);
    border-radius: 14px;
    color: #fff;
}

.campaign-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.deal-of-day-section {
    margin: 0.45rem var(--home-inline-pad) 0.55rem;
    padding: 0.45rem var(--home-inline-pad) 0.5rem;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, #0b1b3c 0%, #152b57 100%);
    border: 1px solid rgba(254, 106, 7, 0.22);
    box-shadow: 0 2px 12px rgba(11, 27, 60, 0.1);
}

.blackfriday-section {
    background: #000;
}

.deal-header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.35rem;
    flex-wrap: wrap;
    margin-bottom: 0.35rem;
}

.deal-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.deal-section-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    letter-spacing: -0.01em;
}

.deal-flash-icon {
    color: #FE6A07;
    font-size: 0.95rem;
    filter: drop-shadow(0 0 4px rgba(254, 106, 7, 0.5));
}

.deal-countdown-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 0.15rem 0.45rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.2;
}

.deal-clock-icon {
    color: #FE6A07;
    font-size: 0.78rem;
}

.deal-time-text {
    opacity: 0.85;
    font-size: 0.68rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.deal-digits {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 700;
    color: #ffeb3b;
    letter-spacing: 0.04em;
}

.deal-see-all-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.deal-see-all-link:hover {
    opacity: 1;
    color: #FE6A07;
    text-decoration: none;
}

/* Compact Carousel Cards within Deal of the Day Section */
.deal-of-day-section .product-carousel-container {
    padding: 0.1rem 0 0.2rem 0;
    gap: 8px;
}

.deal-of-day-section .lp-card--carousel.product-card-mobile {
    min-width: 136px;
    width: 136px;
    max-width: 136px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.deal-of-day-section .lp-card--carousel .lp-card__body,
.deal-of-day-section .lp-card--carousel .product-card-mobile-body {
    padding: 6px 8px 8px;
}

.deal-of-day-section .lp-card--carousel .lp-card__title,
.deal-of-day-section .lp-card--carousel .product-card-mobile-title {
    font-size: 0.75rem;
    min-height: 1.15rem;
    line-height: 1.2;
    margin-bottom: 2px;
    -webkit-line-clamp: 1;
}

.deal-of-day-section .lp-card--carousel .lp-card__price-row,
.deal-of-day-section .lp-card--carousel .product-card-mobile-price {
    font-size: 0.8rem;
    margin-top: 1px;
}

.deal-of-day-section .lp-card--carousel .lp-card__price-current {
    font-size: 0.82rem;
    font-weight: 700;
}

.deal-of-day-section .lp-card--carousel .lp-card__price-old {
    font-size: 0.68rem;
}

.deal-of-day-section .lp-card--carousel .lp-card__discount-inline {
    font-size: 0.65rem;
    padding: 1px 4px;
}

.campaign-section .product-carousel-header,
.deal-of-day-section .product-carousel-header,
.blackfriday-section .product-carousel-header {
    color: #fff;
    margin-bottom: 0.25rem;
    padding: 0;
}

.campaign-section .product-carousel-header h3,
.deal-of-day-section .product-carousel-header h3,
.blackfriday-section .product-carousel-header h3 {
    color: #fff;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.campaign-section .product-carousel-header__subtitle,
.deal-of-day-section .product-carousel-header__subtitle,
.blackfriday-section .product-carousel-header__subtitle {
    color: rgba(255, 255, 255, 0.85);
}

.campaign-section .product-carousel-header__link,
.deal-of-day-section .product-carousel-header__link,
.blackfriday-section .product-carousel-header__link {
    color: #fff;
}

.campaign-section .product-carousel-container,
.deal-of-day-section .product-carousel-container,
.blackfriday-section .product-carousel-container {
    padding: 0.25rem 0 0.5rem 0;
    margin: 0 calc(var(--home-inline-pad) * -1);
    scroll-padding-inline: var(--home-inline-pad);
    touch-action: pan-x pan-y !important;
}

.countdown-timer {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .campaign-section,
    .deal-of-day-section,
    .blackfriday-section {
        margin-left: auto;
        margin-right: auto;
        max-width: 1240px;
    }
}

@media (min-width: 992px) {
    .product-carousel-container {
        gap: 18px;
        padding: 0 16px;
    }

    .product-carousel-container::after {
        display: none;
    }

    .product-carousel-header {
        padding: 0 16px;
    }
}
