/* storefront bundle: beta — built 2026-05-12T21:01:36Z — do not edit by hand; run php tools/build_storefront_css.php */

/* ===== common.css ===== */
/* Mobile: compress .px-4 horizontally only, keep vertical spacing */
@media (max-width: 576px) {
  .px-4 { padding-left: 0.25rem !important; padding-right: 0.25rem !important; }
}

/* Remove .card padding on store product tiles only (do not affect checkout/cart cards) */
@media (max-width: 480px) {
  #products-grid .card { padding: 0 !important; }
}
@media (max-width: 576px) {
  #products-grid .card { padding: 0 !important; }
}
@media (max-width: 768px) {
  #products-grid .card { padding: 0 !important; }
}

/* Products Grid Layout - STORE PAGE ONLY - Use flexbox with proper sizing */
/* Scope to store page only to avoid affecting home page */
#products-grid {
    width: 100%;
}

/* Store page category products */
#products-grid .category-products {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
    width: 100% !important;
}

@media (max-width: 576px) {
    #products-grid .category-products {
        gap: 10px !important;
    }
}

/* Store page product items only */
#products-grid .product-item {
    flex: 0 0 calc(25% - 15px) !important;
    max-width: calc(25% - 15px) !important;
    min-width: 0;
    transition: flex 0.4s ease, max-width 0.4s ease, width 0.4s ease !important;
}

/* Override for special layouts - must come after base rules */
#products-grid .category-products.single-item-category .product-item,
#products-grid .category-products.list-view-active .product-item {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
}

#products-grid .category-products.two-item-category {
    display: flex !important;
    flex-wrap: wrap !important; /* Allow wrapping when cards expand */
    gap: 20px !important;
}

#products-grid .category-products.two-item-category .product-item:not(.product-expanded):not(.single-item-wide):not(.featured-product),
#products-grid .product-item.two-item-layout-card:not(.product-expanded):not(.single-item-wide):not(.featured-product) {
    flex: 0 0 calc(50% - 10px) !important;
    max-width: calc(50% - 10px) !important;
    width: calc(50% - 10px) !important;
}

/* Featured items in two-item categories should be full width */
#products-grid .category-products.two-item-category .product-item.single-item-wide,
#products-grid .category-products.two-item-category .product-item.featured-product {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* Responsive sizing for store product items */
@media (max-width: 1200px) {
    #products-grid .product-item:not(.single-item-wide):not(.two-item-layout) {
        flex: 0 0 calc(33.333% - 14px) !important;
        max-width: calc(33.333% - 14px) !important;
    }
}

@media (max-width: 768px) {
    /* Ensure single-item-wide is always full width (single column) on mobile */
    #products-grid .product-item.single-item-wide,
    #products-grid .category-products .product-item.single-item-wide {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    #products-grid .product-item:not(.single-item-wide):not(.two-item-layout) {
        flex: 0 0 calc(50% - 10px) !important;
        max-width: calc(50% - 10px) !important;
    }
}

@media (max-width: 576px) {
    #products-grid .product-item:not(.single-item-wide):not(.two-item-layout) {
        flex: 0 0 calc(50% - 5px) !important;
        max-width: calc(50% - 5px) !important;
        margin-bottom: 10px !important;
    }
}

/* Ensure store product cards don't overflow */
#products-grid .product-item .product-card,
#products-grid .product-item .card {
    width: 100%;
    max-width: 100%;
    height: 100%;
}

/* Home / carousel featured cards (horizontal lists on index, etc.) */
.featured-item-card {
    flex: 0 0 350px !important;
    max-width: 350px !important;
    min-width: 350px !important;
    width: 350px !important;
}

/* Product card images - responsive sizing */
#products-grid .product-item .product-image,
#products-grid .product-item img.product-image {
    position: relative;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

@media (max-width: 768px) {
    #products-grid .product-item .product-image,
    #products-grid .product-item img.product-image {
        height: 180px;
    }
}

@media (max-width: 576px) {
    #products-grid .product-item .product-image,
    #products-grid .product-item img.product-image {
        height: 150px;
    }
}

/* Common Styles - Shared across all pages */

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Navigation Bar */
.navbar {
    background-color: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.navbar-nav {
    flex-wrap: nowrap;
}

.navbar-collapse {
    flex-wrap: nowrap;
}

.navbar-brand {
    font-weight: bold;
    color: #DC143C !important;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--primary-color) !important;
    font-weight: 500;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    padding: 0.2rem 0.8rem;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
}

.navbar-nav .nav-link:hover, .navbar-nav .nav-link:focus {
    background: var(--primary-color);
    color: #fff !important;
    border-color: var(--primary-color);
}

.navbar-nav .nav-link i {
    margin-right: 0.6em;
}

/* Remove border for dropdown toggles and cart badge */
.navbar-nav .dropdown-toggle.nav-link {
    border: 2px solid var(--primary-color);
}

.navbar-nav .nav-link .cart-badge {
    margin-left: 0.3rem;
}

/* Dark theme override for nav links */
.dark-theme .navbar-nav .nav-link {
    border-color: #f1f1f1;
    color: #f1f1f1 !important;
    background: transparent;
}

.dark-theme .navbar-nav .nav-link:hover, .dark-theme .navbar-nav .nav-link:focus {
    background: #f1f1f1;
    color: var(--primary-color) !important;
    border-color: #f1f1f1;
}

.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.fruit-icon {
    color: #DC143C;
    margin-right: 8px;
}

/* Footer */
footer {
    background-color: #DC143C;
    color: white;
    margin-top: auto;
}

footer h5, footer h6 {
    color: white;
    margin-bottom: 1rem;
}

footer a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: white;
}

footer .text-muted {
    color: #ccc !important;
}

/* General Layout */
.container {
    max-width: 1200px;
}

main {
    min-height: 60vh;
}

/* Card Styles (shared) */
.card {
    border: none;
    border-radius: 0;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.card-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-text {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Button Styles */
.btn-primary {
    background: linear-gradient(45deg, #DC143C, #B22222);
    border: none;
    border-radius: 0;
    padding: 6px 16px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #B22222, #DC143C);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Color Variables */
:root {
    --primary-color: #DC143C;
    --secondary-color: #B22222;
    --light-bg: #f8f9fa;
    --text-dark: #333;
    --text-muted: #666;
    --border-color: #ddd;
}

/* Utility Classes */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

/* Responsive Typography */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.3rem;
    }
    
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
}

@media (max-width: 991.98px) {
    .navbar-nav .nav-link,
    .dropdown-menu .dropdown-item {
        border: 1px solid var(--primary-color);
        width: 100%;
        margin: 0 0 0.5rem 0;
        justify-content: flex-start;
        text-align: left;
        display: flex;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* === Unified Card Header Style === */
.card-header.d-flex.align-items-center {
    min-height: 48px;
    padding: 0.5rem 0.8rem;
    border-radius: 0;
}
.card-header.d-flex.align-items-center h5,
.card-header.d-flex.align-items-center i {
    color: inherit;
}

/* Ensure store product cards do not clip action buttons */
.product-card { overflow: visible; }
.product-card .add-to-cart-btn { position: relative; z-index: 2; }
.product-card .quantity-input { max-width: 80px; }

/* Prevent bottom overlap on store */
.store-page main { padding-bottom: 80px; }

/* Focus States */
.btn:focus,
.form-control:focus,
.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 20, 60, 0.25);
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .slide-nav,
    .slide-arrow {
        display: none !important;
    }
    
    .hero-slideshow {
        height: auto;
        margin-bottom: 1rem;
    }
    
    .slide:not(.carousel) {
        position: static;
        opacity: 1;
        margin-bottom: 1rem;
    }
}

/* Ensure Bootstrap dropdowns are visible */
.dropdown-menu.show {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  z-index: 3000 !important;
}

/* Dark Theme Styles */
.dark-theme {
    background: #181a1b !important;
    color: #f1f1f1 !important;
}

/* Exclude slideshow articles from dark theme background override */
.dark-theme .ai-hero-slide,
.dark-theme .community-hero-slide,
.dark-theme .order-again-slide,
.dark-theme .product-group-hero-slide,
.dark-theme .specials-hero-slide,
.dark-theme .featured-hero-slide {
    background: inherit !important;
}


/* Override specific elements that need different backgrounds */
.dark-theme .card,
.dark-theme .home-info-card,
.dark-theme .card-header,
.dark-theme .modal-content,
.dark-theme .form-control,
.dark-theme .form-select,
.dark-theme .btn-secondary,
.dark-theme .list-group-item,
.dark-theme .table,
.dark-theme .alert,
.dark-theme .family-member,
.dark-theme .review-slide,
.dark-theme .special-offer,
.dark-theme .featured-item,
.dark-theme .quick-info-item,
.dark-theme .values-item {
    color: #f1f1f1 !important;
}

.dark-theme .card-header,
.dark-theme .modal-header,
.dark-theme .modal-footer {
    background-color: #2c3136 !important;
    color: #f1f1f1 !important;
}

.dark-theme .card-body,
.dark-theme .modal-body {
    background-color: #23272b !important;
    color: #f1f1f1 !important;
}


.dark-theme .text-muted {
    color: #b0b0b0 !important;
}

/* Dark Theme for Hero Text Elements */
.dark-theme #pageHeroTitle {
    color: #f1f1f1 !important;
}

.dark-theme #pageHeroSubtitle {
    color: #f1f1f1 !important;
}

.dark-theme #pageHeroIcon {
    color: #f1f1f1 !important;
}

/* Dark Theme for Hero Section */
.dark-theme .hero-section {
    background: #23272b !important;
    color: #f1f1f1 !important;
}

.dark-theme .hero-section h1,
.dark-theme .hero-section h2,
.dark-theme .hero-section h3,
.dark-theme .hero-section h4,
.dark-theme .hero-section h5,
.dark-theme .hero-section h6 {
    color: #f1f1f1 !important;
}

.dark-theme .hero-section p {
    color: #d1d1d1 !important;
}

.dark-theme .hero-section span {
    color: #f1f1f1 !important;
}

/* Dark Theme for Hero Description */
.dark-theme .home-description {
    color: #d1d1d1 !important;
}

/* Dark Theme for Edit Buttons in Hero Section */
.dark-theme .hero-section .btn-outline-primary {
    color: #f1f1f1 !important;
    border-color: #f1f1f1 !important;
}

.dark-theme .hero-section .btn-outline-primary:hover {
    background: #f1f1f1 !important;
    color: #23272b !important;
}

.dark-theme .hero-section .btn-outline-secondary {
    color: #f1f1f1 !important;
    border-color: #f1f1f1 !important;
}

.dark-theme .hero-section .btn-outline-secondary:hover {
    background: #f1f1f1 !important;
    color: #23272b !important;
}

.dark-theme .hero-section .btn-outline-info {
    color: #f1f1f1 !important;
    border-color: #f1f1f1 !important;
}

.dark-theme .hero-section .btn-outline-info:hover {
    background: #f1f1f1 !important;
    color: #23272b !important;
}

.dark-theme .hero-section .btn-outline-warning {
    color: #f1f1f1 !important;
    border-color: #f1f1f1 !important;
}

.dark-theme .hero-section .btn-outline-warning:hover {
    background: #f1f1f1 !important;
    color: #23272b !important;
}

/* Dark Theme for Color Picker Icons in Buttons */
.dark-theme .btn-outline-primary i,
.dark-theme .btn-outline-secondary i,
.dark-theme .btn-outline-info i,
.dark-theme .btn-outline-warning i,
.dark-theme .btn-outline-danger i,
.dark-theme .btn-outline-success i,
.dark-theme .btn-outline-light i {
    color: inherit !important;
}

/* Dark Theme for All Edit Buttons */
.dark-theme .btn-outline-primary {
    color: #f1f1f1 !important;
    border-color: #f1f1f1 !important;
}

.dark-theme .btn-outline-primary:hover {
    background: #f1f1f1 !important;
    color: #23272b !important;
}

.dark-theme .btn-outline-secondary {
    color: #f1f1f1 !important;
    border-color: #f1f1f1 !important;
}

.dark-theme .btn-outline-secondary:hover {
    background: #f1f1f1 !important;
    color: #23272b !important;
}

.dark-theme .btn-outline-info {
    color: #f1f1f1 !important;
    border-color: #f1f1f1 !important;
}

.dark-theme .btn-outline-info:hover {
    background: #f1f1f1 !important;
    color: #23272b !important;
}

.dark-theme .btn-outline-warning {
    color: #f1f1f1 !important;
    border-color: #f1f1f1 !important;
}

.dark-theme .btn-outline-warning:hover {
    background: #f1f1f1 !important;
    color: #23272b !important;
}

.dark-theme .btn-outline-danger {
    color: #f1f1f1 !important;
    border-color: #f1f1f1 !important;
}

.dark-theme .btn-outline-danger:hover {
    background: #f1f1f1 !important;
    color: #23272b !important;
}

.dark-theme .btn-outline-success {
    color: #f1f1f1 !important;
    border-color: #f1f1f1 !important;
}

.dark-theme .btn-outline-success:hover {
    background: #f1f1f1 !important;
    color: #23272b !important;
}

.dark-theme .btn-outline-light {
    color: #f1f1f1 !important;
    border-color: #f1f1f1 !important;
}

.dark-theme .btn-outline-light:hover {
    background: #f1f1f1 !important;
    color: #23272b !important;
}

.dark-theme .navbar, .dark-theme .navbar-light, .dark-theme .navbar-brand, .dark-theme .navbar-nav .nav-link {
    background: #23272b !important;
    color: #f1f1f1 !important;
}
.dark-theme .navbar .nav-link {
    color: #f1f1f1 !important;
}

.dark-theme .navbar .navbar-brand {
    color: #DC143C !important;
}
.dark-theme .navbar .nav-link.active, .dark-theme .navbar .nav-link:focus, .dark-theme .navbar .nav-link:hover {
    color: #DC143C !important;
}
.dark-theme .dropdown-menu {
    background: #23272b !important;
    color: #f1f1f1 !important;
}
.dark-theme .dropdown-item {
    color: #f1f1f1 !important;
}
.dark-theme .dropdown-item:hover, .dark-theme .dropdown-item:focus {
    background: #343a40 !important;
    color: #DC143C !important;
}
.dark-theme .btn, .dark-theme .btn-outline-secondary {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border-color: #444 !important;
}
.dark-theme .btn-outline-secondary:hover {
    background: #444 !important;
    color: #DC143C !important;
}
.dark-theme .form-control, .dark-theme .form-select {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border-color: #444 !important;
}
.dark-theme .form-control:focus, .dark-theme .form-select:focus {
    background: #23272b !important;
    color: #DC143C !important;
    border-color: #DC143C !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 20, 60, 0.15);
}
.dark-theme .input-group-text {
    background: #23272b !important;
    color: #DC143C !important;
    border-color: #444 !important;
}
.dark-theme .category-header {
    background: linear-gradient(45deg, #23272b, #181a1b) !important;
    color: #DC143C !important;
    border: 1px solid #DC143C !important;
}
.dark-theme .list-group-item {
    color: #f1f1f1 !important;
    border-color: #444 !important;
}
.dark-theme .list-group-item.active {
    background: #DC143C !important;
    color: #fff !important;
    border-color: #DC143C !important;
}

/* HIGH PRIORITY: Preserve background images for all list group items */
#category-list .list-group-item[style*="background-image"],
.list-group-item[style*="background-image"] {
    background-color: transparent !important;
    background: transparent !important;
}

#category-list .dark-theme .list-group-item[style*="background-image"],
.dark-theme .list-group-item[style*="background-image"] {
    background-color: transparent !important;
    background: transparent !important;
}

#category-list .list-group-item[style*="background-image"]:hover,
.list-group-item[style*="background-image"]:hover {
    background-color: transparent !important;
    background: transparent !important;
}

#category-list .dark-theme .list-group-item[style*="background-image"]:hover,
.dark-theme .list-group-item[style*="background-image"]:hover {
    background-color: transparent !important;
    background: transparent !important;
}

#category-list .list-group-item[style*="background-image"].active,
.list-group-item[style*="background-image"].active {
    background-color: transparent !important;
    background: transparent !important;
}

#category-list .dark-theme .list-group-item[style*="background-image"].active,
.dark-theme .list-group-item[style*="background-image"].active {
    background-color: transparent !important;
    background: transparent !important;
}
/* Dark Theme Modal Styling */
.dark-theme .modal-content {
    background: linear-gradient(135deg, #2c3136 0%, #23272b 100%) !important;
    color: #f1f1f1 !important;
    border: 0px !important;
    backdrop-filter: blur(10px);
}

.dark-theme .modal-header {
    background: #2c3136 !important;
    border-bottom: 1px solid #444 !important;
}

.dark-theme .modal-footer {
    background: linear-gradient(135deg, #2c3136 0%, #23272b 100%) !important;
    border-top: 1px solid #444 !important;
}

.dark-theme .modal-title {
    color: #f1f1f1 !important;
}

.dark-theme .modal-body {
    background: transparent !important;
    color: #f1f1f1 !important;
}

.dark-theme .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.dark-theme .btn-close:hover {
    filter: invert(1) grayscale(100%) brightness(300%);
}

/* Dark Theme Container Styling */
.dark-theme .container,
.dark-theme .container-fluid {
    background: transparent !important;
}

.dark-theme .card {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border: 0px !important;
}

.dark-theme .card-header {
    background: #2c3136 !important;
    border-bottom: 1px solid #444 !important;
    color: #f1f1f1 !important;
}

.dark-theme .card-body {
    background: #23272b !important;
    color: #f1f1f1 !important;
}

/* Dark Theme for All Card Body Elements - More Comprehensive */
.dark-theme .card .card-body {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border-color: #444 !important;
}

/* Only apply dark theme to specific text elements, not all elements */
.dark-theme .card-body p:not([class*="text-"]):not([class*="bg-"]) {
    color: #d1d1d1 !important;
}


.dark-theme .card-body div:not([class*="text-"]):not([class*="bg-"]) {
    color: #f1f1f1 !important;
}

.dark-theme .card-body h1,
.dark-theme .card-body h2,
.dark-theme .card-body h3,
.dark-theme .card-body h4,
.dark-theme .card-body h5,
.dark-theme .card-body h6 {
    color: #f1f1f1 !important;
}

.dark-theme .card-body p {
    color: #d1d1d1 !important;
}


.dark-theme .card-body a:hover {
    color: #ff6b6b !important;
}

.dark-theme .card-body strong,
.dark-theme .card-body b {
    color: #f1f1f1 !important;
}

.dark-theme .card-body em,
.dark-theme .card-body i {
    color: #d1d1d1 !important;
}

.dark-theme .card-body small {
    color: #b0b0b0 !important;
}

.dark-theme .card-body ul,
.dark-theme .card-body ol {
    color: #d1d1d1 !important;
}

.dark-theme .card-body li {
    color: #d1d1d1 !important;
}

.dark-theme .card-body blockquote {
    background: #2c3136 !important;
    border-left: 4px solid #DC143C !important;
    color: #d1d1d1 !important;
}

.dark-theme .card-body code {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border: 0px !important;
}

.dark-theme .card-body pre {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border: 0px !important;
}

.pageHeroCard{
padding:0 !important;
}

#pageHeroCard > div{
    padding: 0 !important;
}
body > div:nth-child(5) > div > div{
    padding: 0 !important;
}
/* Dark Theme for Specific Card Body Classes */
.dark-theme .home-info-card .card-body {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border-color: #444 !important;
}

.dark-theme .categories-card .card-body {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border-color: #444 !important;
}

.dark-theme .family-member-card .card-body {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border-color: #444 !important;
}

.dark-theme .product-card .card-body {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border-color: #444 !important;
}

/* Dark theme for product titles and descriptions on store page */
.dark-theme .product-card .product-title,
.dark-theme .product-card h5.product-title,
.dark-theme .product-card .card-title.product-title {
    color: #f1f1f1 !important;
}

.dark-theme .product-card .product-description,
.dark-theme .product-card .card-text.product-description,
.dark-theme .product-card p.product-description {
    color: #d1d1d1 !important;
}

/* Light theme - ensure product titles and descriptions are dark */
.product-card .product-title,
.product-card h5.product-title,
.product-card .card-title.product-title {
    color: #333 !important;
}

.product-card .product-description,
.product-card .card-text.product-description,
.product-card p.product-description {
    color: #666 !important;
}

.dark-theme .review-card .card-body {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border-color: #444 !important;
}

.dark-theme .special-offer-card .card-body {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border-color: #444 !important;
}


/* Dark Theme for Card Body Text Elements - Only for elements without existing text classes */
.dark-theme .card-body .text-muted:not([class*="bg-"]) {
    color: #b0b0b0 !important;
}

.dark-theme .card-body .text-primary:not([class*="bg-"]) {
    color: #DC143C !important;
}

.dark-theme .card-body .text-secondary:not([class*="bg-"]) {
    color: #b0b0b0 !important;
}

.dark-theme .card-body .text-success:not([class*="bg-"]) {
    color: #28a745 !important;
}

.dark-theme .card-body .text-danger:not([class*="bg-"]) {
    color: #ed1c24 !important;
}


.dark-theme .card-body .text-info:not([class*="bg-"]) {
    color: #17a2b8 !important;
}

.dark-theme .card-body .text-light:not([class*="bg-"]) {
    color: #f1f1f1 !important;
}

.dark-theme .card-body .text-dark:not([class*="bg-"]) {
    color: #f1f1f1 !important;
}

/* Dark Theme for Card Body Buttons */
.dark-theme .card-body .btn {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border-color: #444 !important;
}

.dark-theme .card-body .btn:hover {
    background: #3a3f44 !important;
    color: #f1f1f1 !important;
}

.dark-theme .card-body .btn-primary {
    background: #DC143C !important;
    color: #fff !important;
    border-color: #DC143C !important;
}

.dark-theme .card-body .btn-primary:hover {
    background: #c41230 !important;
    color: #fff !important;
}

/* Dark Theme for Card Body Forms */
.dark-theme .card-body .form-control {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border-color: #444 !important;
}

.dark-theme .card-body .form-control:focus {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border-color: #DC143C !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 20, 60, 0.25) !important;
}

.dark-theme .card-body .form-label {
    color: #f1f1f1 !important;
}

/* Dark Theme for Card Body Tables */
.dark-theme .card-body .table {
    background: #23272b !important;
    color: #f1f1f1 !important;
}

.dark-theme .card-body .table th {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border-color: #444 !important;
}

.dark-theme .card-body .table td {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border-color: #444 !important;
}

/* Dark Theme for Card Body Lists */
.dark-theme .card-body .list-group {
    background: #23272b !important;
    border-color: #444 !important;
}

.dark-theme .card-body .list-group-item {
    color: #f1f1f1 !important;
    border-color: #444 !important;
}

.dark-theme .card-body .list-group-item:hover {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
}

/* Dark Theme for Card Body Alerts */
.dark-theme .card-body .alert {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border-color: #444 !important;
}

.dark-theme .card-body .alert-success {
    background: #1e4d2b !important;
    color: #d4edda !important;
    border-color: #28a745 !important;
}

.dark-theme .card-body .alert-danger {
    background: #4d1e1e !important;
    color: #f8d7da !important;
    border-color: #ed1c24 !important;
}

.dark-theme .card-body .alert-warning {
    background: #4d3e1e !important;
    color: #fff3cd !important;
    border-color: #ffc107 !important;
}

.dark-theme .card-body .alert-info {
    background: #1e3d4d !important;
    color: #d1ecf1 !important;
    border-color: #17a2b8 !important;
}

.dark-theme .card-footer {
    background: #2c3136 !important;
    border-top: 1px solid #444 !important;
    color: #f1f1f1 !important;
}

.dark-theme .card-title {
    color: #f1f1f1 !important;
}

.dark-theme .card-text {
    color: #d1d1d1 !important;
}

/* Dark Theme Form Elements */
.dark-theme .form-control,
.dark-theme .form-select,
.dark-theme .form-textarea {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border: 1px solid #555 !important;
}

.dark-theme .form-control:focus,
.dark-theme .form-select:focus,
.dark-theme .form-textarea:focus {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border-color: #DC143C !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 20, 60, 0.25) !important;
}

.dark-theme .form-label {
    color: #f1f1f1 !important;
}

.dark-theme .form-text {
    color: #b0b0b0 !important;
}

.dark-theme .input-group-text {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border: 1px solid #555 !important;
}

/* Dark Theme Button Styling */
.dark-theme .btn-secondary {
    background: #555 !important;
    border-color: #555 !important;
    color: #f1f1f1 !important;
}

.dark-theme .btn-secondary:hover {
    background: #666 !important;
    border-color: #666 !important;
    color: #fff !important;
}

.dark-theme .btn-outline-secondary {
    color: #f1f1f1 !important;
    border-color: #555 !important;
}

.dark-theme .btn-outline-secondary:hover {
    background: #555 !important;
    color: #fff !important;
}

/* Dark Theme List Group */
.dark-theme .list-group {
    background: #23272b !important;
    border: 0px !important;
}

.dark-theme .list-group-item {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border-color: #444 !important;
}

.dark-theme .list-group-item:hover {
    background: #2c3136 !important;
}

.dark-theme .list-group-item.active {
    background: #DC143C !important;
    border-color: #DC143C !important;
    color: #fff !important;
}

/* Dark Theme Table Styling */
.dark-theme .table {
    background: #23272b !important;
    color: #f1f1f1 !important;
}

.dark-theme .table th {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border-color: #444 !important;
}

.dark-theme .table td {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border-color: #444 !important;
}

.dark-theme .table-striped > tbody > tr:nth-of-type(odd) > td {
    background: #2c3136 !important;
}

.dark-theme .table-hover > tbody > tr:hover > td {
    background: #3a3f44 !important;
}

/* Dark Theme Alert Styling */
.dark-theme .alert {
    background: #2c3136 !important;
    border: 0px !important;
    color: #f1f1f1 !important;
}

.dark-theme .alert-success {
    background: #1e4d2b !important;
    border-color: #28a745 !important;
    color: #d4edda !important;
}

.dark-theme .alert-danger {
    background: #4d1e1e !important;
    border-color: #DC143C !important;
    color: #f8d7da !important;
}

.dark-theme .alert-warning {
    background: #4d3e1e !important;
    border-color: #ffc107 !important;
    color: #fff3cd !important;
}

.dark-theme .alert-info {
    background: #1e3d4d !important;
    border-color: #17a2b8 !important;
    color: #d1ecf1 !important;
}

/* Dark Theme Badge Styling */
.dark-theme .badge {
    color: #fff !important;
}

.dark-theme .badge-secondary {
    background: #555 !important;
}

.dark-theme .badge-light {
    background: #666 !important;
    color: #f1f1f1 !important;
}

/* Dark Theme Progress Bar */
.dark-theme .progress {
    background: #2c3136 !important;
}

.dark-theme .progress-bar {
    background: #DC143C !important;
}

/* Dark Theme Pagination */
.dark-theme .pagination {
    background: #23272b !important;
}

.dark-theme .page-link {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border-color: #444 !important;
}

.dark-theme .page-link:hover {
    background: #3a3f44 !important;
    color: #fff !important;
}

.dark-theme .page-item.active .page-link {
    background: #DC143C !important;
    border-color: #DC143C !important;
    color: #fff !important;
}

.dark-theme .page-item.disabled .page-link {
    background: #23272b !important;
    color: #666 !important;
    border-color: #444 !important;
}

/* Dark Theme Tooltip */
.dark-theme .tooltip-inner {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
}

.dark-theme .tooltip.bs-tooltip-top .tooltip-arrow::before {
    border-top-color: #2c3136 !important;
}

.dark-theme .tooltip.bs-tooltip-bottom .tooltip-arrow::before {
    border-bottom-color: #2c3136 !important;
}

.dark-theme .tooltip.bs-tooltip-start .tooltip-arrow::before {
    border-left-color: #2c3136 !important;
}

.dark-theme .tooltip.bs-tooltip-end .tooltip-arrow::before {
    border-right-color: #2c3136 !important;
}

/* Dark Theme Popover */
.dark-theme .popover {
    background: #23272b !important;
    border: 0px !important;
}

.dark-theme .popover-header {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border-bottom: 1px solid #444 !important;
}

.dark-theme .popover-body {
    background: #23272b !important;
    color: #f1f1f1 !important;
}

/* Dark Theme Dropdown */
.dark-theme .dropdown-menu {
    background: #23272b !important;
    border: 0px !important;
}

.dark-theme .dropdown-item {
    color: #f1f1f1 !important;
}

.dark-theme .dropdown-item:hover {
    background: #2c3136 !important;
    color: #fff !important;
}

.dark-theme .dropdown-divider {
    border-color: #444 !important;
}

/* Dark Theme Nav Tabs */
.dark-theme .nav-tabs {
    border-bottom: 1px solid #444 !important;
}

.dark-theme .nav-tabs .nav-link {
    color: #f1f1f1 !important;
    border: 1px solid transparent !important;
}

.dark-theme .nav-tabs .nav-link:hover {
    background: #2c3136 !important;
    border-color: #444 #444 transparent !important;
}

.dark-theme .nav-tabs .nav-link.active {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border-color: #444 #444 #23272b !important;
}

/* Dark Theme Accordion */
.dark-theme .accordion-item {
    background: #23272b !important;
    border: 0px !important;
}

.dark-theme .accordion-button {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border: 0px !important;
}

.dark-theme .accordion-button:not(.collapsed) {
    background: #3a3f44 !important;
    color: #f1f1f1 !important;
}

.dark-theme .accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(220, 20, 60, 0.25) !important;
}

.dark-theme .accordion-button::after {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.dark-theme .accordion-body {
    background: #23272b !important;
    color: #f1f1f1 !important;
}

/* Dark Theme Breadcrumb */
.dark-theme .breadcrumb {
    background: #2c3136 !important;
}

.dark-theme .breadcrumb-item + .breadcrumb-item::before {
    color: #666 !important;
}

.dark-theme .breadcrumb-item.active {
    color: #b0b0b0 !important;
}

/* Dark Theme Spinner */
.dark-theme .spinner-border {
    color: #DC143C !important;
}

.dark-theme .spinner-grow {
    color: #DC143C !important;
}

/* Dark Theme Close Button */
.dark-theme .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.dark-theme .btn-close:hover {
    filter: invert(1) grayscale(100%) brightness(300%);
}

/* Dark Theme Form Check */
.dark-theme .form-check-input {
    background: #2c3136 !important;
    border: 1px solid #555 !important;
}

.dark-theme .form-check-input:checked {
    background: #DC143C !important;
    border-color: #DC143C !important;
}

.dark-theme .form-check-label {
    color: #f1f1f1 !important;
}

/* Dark Theme Range Input */
.dark-theme .form-range::-webkit-slider-track {
    background: #2c3136 !important;
}

.dark-theme .form-range::-webkit-slider-thumb {
    background: #DC143C !important;
}

.dark-theme .form-range::-moz-range-track {
    background: #2c3136 !important;
}

.dark-theme .form-range::-moz-range-thumb {
    background: #DC143C !important;
}

/* Dark Theme File Input */
.dark-theme .form-control[type="file"] {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
}

.dark-theme .form-control[type="file"]::file-selector-button {
    background: #DC143C !important;
    color: #fff !important;
    border: none !important;
}

/* Dark Theme Select Multiple */
.dark-theme .form-select[multiple] {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
}

/* Dark Theme Textarea */
.dark-theme textarea.form-control {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border: 1px solid #555 !important;
}

/* Dark Theme Input Group */
.dark-theme .input-group > .form-control,
.dark-theme .input-group > .form-select {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border: 1px solid #555 !important;
}

.dark-theme .input-group-text {
    background: #3a3f44 !important;
    color: #f1f1f1 !important;
    border: 1px solid #555 !important;
}

/* Dark Theme Validation */
.dark-theme .form-control.is-valid {
    border-color: #28a745 !important;
    background: #1e4d2b !important;
}

.dark-theme .form-control.is-invalid {
    border-color: #DC143C !important;
    background: #4d1e1e !important;
}

.dark-theme .valid-feedback {
    color: #28a745 !important;
}

.dark-theme .invalid-feedback {
    color: #DC143C !important;
}

/* Dark Theme Custom Select */
.dark-theme .custom-select {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border: 1px solid #555 !important;
}

/* Dark Theme Custom File */
.dark-theme .custom-file-label {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border: 1px solid #555 !important;
}

.dark-theme .custom-file-label::after {
    background: #DC143C !important;
    color: #fff !important;
    border-left: 1px solid #555 !important;
}

/* Dark Theme Icon Picker Modal */
.dark-theme .icon-grid {
    background: #23272b !important;
    border: 0px !important;
}

.dark-theme .icon-option {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border: 0px !important;
}

.dark-theme .icon-option:hover {
    background: #3a3f44 !important;
    border-color: #DC143C !important;
}

.dark-theme .icon-option.selected {
    background: #DC143C !important;
    color: #fff !important;
    border-color: #DC143C !important;
}

.dark-theme .icon-option i {
    color: inherit !important;
}

.dark-theme .icon-option span {
    color: inherit !important;
}

/* Dark Theme for Icon Picker Modal - More Specific */
.dark-theme #iconColorModal .icon-grid {
    background: #23272b !important;
    border: 0px !important;
}

.dark-theme #iconColorModal .icon-option {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border: 0px !important;
}

.dark-theme #iconColorModal .icon-option:hover {
    background: #3a3f44 !important;
    border-color: #DC143C !important;
}

.dark-theme #iconColorModal .icon-option.selected {
    background: #DC143C !important;
    color: #fff !important;
    border-color: #DC143C !important;
}

.dark-theme #iconColorModal .icon-option i {
    color: #f1f1f1 !important;
}

.dark-theme #iconColorModal .icon-option.selected i {
    color: #fff !important;
}

.dark-theme #iconColorModal .icon-option span {
    color: #f1f1f1 !important;
}

.dark-theme #iconColorModal .icon-option.selected span {
    color: #fff !important;
}

/* Dark Theme for Color Picker in Icon Modal */
.dark-theme #iconColorModal .color-grid {
    background: #23272b !important;
    border: 0px !important;
}

.dark-theme #iconColorModal .color-option {
    background: #2c3136 !important;
    border: 0px !important;
}

.dark-theme #iconColorModal .color-option:hover {
    background: #3a3f44 !important;
    border-color: #DC143C !important;
}

.dark-theme #iconColorModal .color-option.selected {
    border-color: #DC143C !important;
    box-shadow: 0 0 0 2px rgba(220, 20, 60, 0.5) !important;
}

.dark-theme #iconColorModal .color-option span {
    color: #f1f1f1 !important;
}

/* Dark Theme for Background Color Picker in Icon Modal */
.dark-theme #iconColorModal .bg-color-grid {
    background: #23272b !important;
    border: 0px !important;
}

.dark-theme #iconColorModal .bg-color-option {
    background: #2c3136 !important;
    border: 0px !important;
}

.dark-theme #iconColorModal .bg-color-option:hover {
    background: #3a3f44 !important;
    border-color: #DC143C !important;
}

.dark-theme #iconColorModal .bg-color-option.selected {
    border-color: #DC143C !important;
    box-shadow: 0 0 0 2px rgba(220, 20, 60, 0.5) !important;
}

.dark-theme #iconColorModal .bg-color-option span {
    color: #f1f1f1 !important;
}

/* Dark Theme for Icon Search in Modal */
.dark-theme #iconColorModal #iconSearch {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border: 1px solid #555 !important;
}

.dark-theme #iconColorModal #iconSearch:focus {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border-color: #DC143C !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 20, 60, 0.25) !important;
}

.dark-theme #iconColorModal #iconSearch::placeholder {
    color: #888 !important;
}

/* Dark Theme for Modal Labels and Text */
.dark-theme #iconColorModal .modal-title {
    color: #f1f1f1 !important;
}

.dark-theme #iconColorModal .form-label {
    color: #f1f1f1 !important;
}

.dark-theme #iconColorModal .form-control {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border: 1px solid #555 !important;
}

.dark-theme #iconColorModal .form-control:focus {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border-color: #DC143C !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 20, 60, 0.25) !important;
}

/* Dark Theme for Icon Grid Items - Force Icon Colors */
.dark-theme #iconColorModal .icon-option[data-icon] i {
    color: #f1f1f1 !important;
}

.dark-theme #iconColorModal .icon-option[data-icon].selected i {
    color: #fff !important;
}

/* Dark Theme for Color Options - Force Text Colors */
.dark-theme #iconColorModal .color-option[data-color] {
    color: #f1f1f1 !important;
}

.dark-theme #iconColorModal .color-option[data-color].selected {
    color: #fff !important;
}

/* Dark Theme for Background Color Options - Force Text Colors */
.dark-theme #iconColorModal .bg-color-option[data-bg-color] {
    color: #f1f1f1 !important;
}

.dark-theme #iconColorModal .bg-color-option[data-bg-color].selected {
    color: #fff !important;
}

/* Dark Theme Color Picker Modal */
.dark-theme .color-grid {
    background: #23272b !important;
    border: 0px !important;
}

.dark-theme .color-option {
    background: #2c3136 !important;
    border: 0px !important;
}

.dark-theme .color-option:hover {
    background: #3a3f44 !important;
    border-color: #DC143C !important;
}

.dark-theme .color-option.selected {
    border-color: #DC143C !important;
    box-shadow: 0 0 0 2px rgba(220, 20, 60, 0.5) !important;
}

.dark-theme .color-option span {
    color: #f1f1f1 !important;
}

/* Dark Theme Background Color Picker Modal */
.dark-theme .bg-color-grid {
    background: #23272b !important;
    border: 0px !important;
}

.dark-theme .bg-color-option:hover {
    background: #3a3f44 !important;
    border-color: #DC143C !important;
}

.dark-theme .bg-color-option.selected {
    border-color: #DC143C !important;
    box-shadow: 0 0 0 2px rgba(220, 20, 60, 0.5) !important;
}

.dark-theme .bg-color-option span {
    color: #f1f1f1 !important;
}

/* Dark Theme for Header Background Modal - More Specific */
.dark-theme #headerBackgroundModal .bg-color-grid {
    background: #23272b !important;
    border: 0px !important;
}

.dark-theme #headerBackgroundModal .bg-color-option {
    background: #2c3136 !important;
    border: 0px !important;
}

.dark-theme #headerBackgroundModal .bg-color-option:hover {
    background: #3a3f44 !important;
    border-color: #DC143C !important;
}

.dark-theme #headerBackgroundModal .bg-color-option.selected {
    border-color: #DC143C !important;
    box-shadow: 0 0 0 2px rgba(220, 20, 60, 0.5) !important;
}

.dark-theme #headerBackgroundModal .bg-color-option span {
    color: #f1f1f1 !important;
}

/* Dark Theme for Header Background Modal Labels and Text */
.dark-theme #headerBackgroundModal .modal-title {
    color: #f1f1f1 !important;
}

.dark-theme #headerBackgroundModal .form-label {
    color: #f1f1f1 !important;
}

.dark-theme #headerBackgroundModal .form-control {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border: 1px solid #555 !important;
}

.dark-theme #headerBackgroundModal .form-control:focus {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border-color: #DC143C !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 20, 60, 0.25) !important;
}

/* Dark Theme for Background Color Options - Force Text Colors */
.dark-theme #headerBackgroundModal .bg-color-option[data-bg-color] {
    color: #f1f1f1 !important;
}

.dark-theme #headerBackgroundModal .bg-color-option[data-bg-color].selected {
    color: #fff !important;
}

/* Dark Theme Search Input */
.dark-theme #iconSearch {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border: 1px solid #555 !important;
}

.dark-theme #iconSearch:focus {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border-color: #DC143C !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 20, 60, 0.25) !important;
}

.dark-theme #iconSearch::placeholder {
    color: #888 !important;
}

/* Dark Theme Modal Backdrop */
.dark-theme .modal-backdrop {
    background: rgba(0, 0, 0, 0.7) !important;
}

/* Dark Theme Toast Notifications */
.dark-theme .toast {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border: 0px !important;
}

.dark-theme .toast-header {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border-bottom: 1px solid #444 !important;
}

.dark-theme .toast-body {
    background: #23272b !important;
    color: #f1f1f1 !important;
}

/* Ensure warning/info toasts are readable: dark text on light yellow/blue */
.toast.bg-warning .toast-body,
.toast.bg-info .toast-body {
    color: #212529 !important;
}

.dark-theme .toast .toast-body {
    color: #f1f1f1 !important;
}

/* Dark Theme Loading Spinner */
.dark-theme .loading {
    background: rgba(35, 39, 43, 0.9) !important;
    color: #f1f1f1 !important;
}

.dark-theme .loading::after {
    border-color: #DC143C !important;
    border-top-color: transparent !important;
}

/* Dark Theme Scrollbar */
.dark-theme ::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.dark-theme ::-webkit-scrollbar-track {
    background: #2c3136 !important;
}

.dark-theme ::-webkit-scrollbar-thumb {
    background: #555 !important;
    border-radius: 0;
}

.dark-theme ::-webkit-scrollbar-thumb:hover {
    background: #666 !important;
}

.dark-theme ::-webkit-scrollbar-corner {
    background: #2c3136 !important;
}

/* Bootstrap Override - Remove All Rounded Corners */
.card,
.card-header,
.card-footer,
.card-img,
.card-img-top,
.card-img-bottom,
.modal,
.modal-content,
.modal-header,
.modal-footer,
.modal-body,
.btn,
.btn-sm,
.btn-lg,
.btn-group,
.btn-group-vertical,
.input-group,
.input-group-text,
.form-control,
.form-select,
.form-check-input,
.form-check-label,
.alert,
.badge,
.nav,
.nav-tabs,
.nav-pills,
.nav-link,
.tab-content,
.tab-pane,
.list-group,
.list-group-item,
.dropdown-menu,
.dropdown-item,
.pagination,
.page-link,
.progress,
.progress-bar,
.tooltip,
.popover,
.popover-header,
.popover-body,
.accordion,
.accordion-item,
.accordion-header,
.accordion-button,
.accordion-body,
.carousel,
.carousel-item,
.carousel-caption,
.carousel-control-prev,
.carousel-control-next,
.carousel-indicators,
.carousel-indicator,
.offcanvas,
.offcanvas-header,
.offcanvas-body,
.toast,
.toast-header,
.toast-body,
.border,
.border-top,
.border-bottom,
.border-start,
.border-end,
.rounded,
.rounded-0,
.rounded-1,
.rounded-2,
.rounded-3,
.rounded-4,
.rounded-5,
.rounded-top,
.rounded-bottom,
.rounded-start,
.rounded-end,
.rounded-pill,
.img-thumbnail,
.table,
.table-responsive,
.navbar,
.navbar-brand,
.navbar-nav,
.navbar-toggler,
.navbar-collapse,
.navbar-text,
.breadcrumb,
.breadcrumb-item,
.close,
.btn-close,
.ratio,
.ratio-1x1,
.ratio-4x3,
.ratio-16x9,
.ratio-21x9,
.position-relative,
.position-absolute,
.position-fixed,
.position-sticky,
.position-static,
.top-0,
.top-50,
.top-100,
.bottom-0,
.bottom-50,
.bottom-100,
.start-0,
.start-50,
.start-100,
.end-0,
.end-50,
.end-100,
.translate-middle,
.translate-middle-x,
.translate-middle-y,
.overflow-auto,
.overflow-hidden,
.overflow-visible,
.overflow-scroll,
.d-inline,
.d-inline-block,
.d-block,
.d-grid,
.d-table,
.d-table-row,
.d-table-cell,
.d-flex,
.d-inline-flex,
.d-none,
.d-sm-inline,
.d-sm-inline-block,
.d-sm-block,
.d-sm-grid,
.d-sm-table,
.d-sm-table-row,
.d-sm-table-cell,
.d-sm-flex,
.d-sm-inline-flex,
.d-sm-none,
.d-md-inline,
.d-md-inline-block,
.d-md-block,
.d-md-grid,
.d-md-table,
.d-md-table-row,
.d-md-table-cell,
.d-md-flex,
.d-md-inline-flex,
.d-md-none,
.d-lg-inline,
.d-lg-inline-block,
.d-lg-block,
.d-lg-grid,
.d-lg-table,
.d-lg-table-row,
.d-lg-table-cell,
.d-lg-flex,
.d-lg-inline-flex,
.d-lg-none,
.d-xl-inline,
.d-xl-inline-block,
.d-xl-block,
.d-xl-grid,
.d-xl-table,
.d-xl-table-row,
.d-xl-table-cell,
.d-xl-flex,
.d-xl-inline-flex,
.d-xl-none,
.d-xxl-inline,
.d-xxl-inline-block,
.d-xxl-block,
.d-xxl-grid,
.d-xxl-table,
.d-xxl-table-row,
.d-xxl-table-cell,
.d-xxl-flex,
.d-xxl-inline-flex,
.d-xxl-none {
    border-radius: 0 !important;
}

/* Keep essential circular elements circular */
.rounded-circle,
.spinner-border,
.spinner-grow,
.spinner-border-sm,
.spinner-grow-sm,
.loading-spinner,
.fa-spinner,
.btn .fa-spinner,
[class*="spinner"],
.loading-content .spinner-border {
    border-radius: 50% !important;
}

/* Profile/avatar images: always display as circle */
.community-profile-avatar img,
.post-author img,
[class*="profile-avatar"] img,
[class*="author-profile"] img,
[class*="user-profile"] img,
img.tiktok-comment-avatar {
    border-radius: 50% !important;
    object-fit: cover;
}



/* Dark Theme Code Blocks */
.dark-theme pre,
.dark-theme code {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border: 0px !important;
}

/* Dark Theme Blockquote */
.dark-theme blockquote {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border-left: 4px solid #DC143C !important;
}

/* Dark Theme Horizontal Rule */
.dark-theme hr {
    border-color: #444 !important;
}

/* Dark Theme Selection */
.dark-theme ::selection {
    background: #DC143C !important;
    color: #fff !important;
}

.dark-theme ::-moz-selection {
    background: #DC143C !important;
    color: #fff !important;
}

/* Dark Theme Focus Outline */
.dark-theme *:focus {
    outline-color: #DC143C !important;
}

/* Dark Theme Disabled Elements */
.dark-theme .disabled,
.dark-theme [disabled] {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

/* Dark Theme Placeholder Text */
.dark-theme ::placeholder {
    color: #888 !important;
    opacity: 1 !important;
}

.dark-theme ::-webkit-input-placeholder {
    color: #888 !important;
    opacity: 1 !important;
}

.dark-theme ::-moz-placeholder {
    color: #888 !important;
    opacity: 1 !important;
}

.dark-theme ::-ms-input-placeholder {
    color: #888 !important;
    opacity: 1 !important;
}

/*
 * Bootstrap .form-floating (profile + anywhere else):
 * - Floated label “notch” uses var(--bs-body-bg) → stays white on body.dark-theme unless overridden.
 * - Floating inputs need transparent placeholders; the rules above color all ::placeholder #888.
 * - Use body + .form-floating so this wins over .dark-theme .form-control::placeholder in profile.css.
 */
body.dark-theme .form-floating {
    --bs-body-bg: #2c3136;
    --bs-secondary-bg: #1e2226;
}

body.dark-theme .form-floating > .form-control,
body.dark-theme .form-floating > .form-select {
    background-color: #2c3136 !important;
    color: #f1f1f1 !important;
    border-color: #555 !important;
}

body.dark-theme .form-floating > .form-control:focus,
body.dark-theme .form-floating > .form-select:focus {
    background-color: #2c3136 !important;
    color: #f1f1f1 !important;
    border-color: #dc143c !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 20, 60, 0.25) !important;
}

body.dark-theme .form-floating > .form-control::placeholder,
body.dark-theme .form-floating > .form-control::-webkit-input-placeholder,
body.dark-theme .form-floating > .form-control::-moz-placeholder,
body.dark-theme .form-floating > .form-control:-ms-input-placeholder {
    color: transparent !important;
    opacity: 0 !important;
}

body.dark-theme .form-floating > label {
    color: rgba(241, 241, 241, 0.78) !important;
}

body.dark-theme .form-floating > .form-control:focus ~ label,
body.dark-theme .form-floating > .form-control:not(:placeholder-shown) ~ label,
body.dark-theme .form-floating > .form-select ~ label {
    color: rgba(241, 241, 241, 0.92) !important;
}

body.dark-theme .form-floating > textarea.form-control {
    height: auto !important;
    min-height: 7.5rem;
}

body.dark-theme .form-floating > .form-control:not(:-moz-placeholder-shown) ~ label::after,
body.dark-theme .form-floating > .form-control:focus ~ label::after,
body.dark-theme .form-floating > .form-control:not(:placeholder-shown) ~ label::after,
body.dark-theme .form-floating > .form-control-plaintext ~ label::after,
body.dark-theme .form-floating > .form-select ~ label::after,
body.dark-theme .form-floating > .form-control:-webkit-autofill ~ label::after {
    background-color: #2c3136 !important;
}

body.dark-theme .form-floating > :disabled ~ label::after,
body.dark-theme .form-floating > .form-control:disabled ~ label::after {
    background-color: #1e2226 !important;
}

/* -------------------------------------------------------------------------- */
/* Browser autofill — keep dark-theme background + light text                 */
/* Chrome/Safari/Edge paint -webkit-autofill with a yellow background + black */
/* text. Override with the box-shadow inset trick + -webkit-text-fill-color   */
/* so autofilled values match typed values across the site.                   */
/* -------------------------------------------------------------------------- */
body.dark-theme input:-webkit-autofill,
body.dark-theme input:-webkit-autofill:hover,
body.dark-theme input:-webkit-autofill:focus,
body.dark-theme input:-webkit-autofill:active,
body.dark-theme textarea:-webkit-autofill,
body.dark-theme textarea:-webkit-autofill:hover,
body.dark-theme textarea:-webkit-autofill:focus,
body.dark-theme textarea:-webkit-autofill:active,
body.dark-theme select:-webkit-autofill,
body.dark-theme select:-webkit-autofill:hover,
body.dark-theme select:-webkit-autofill:focus,
body.dark-theme select:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #2c3136 inset !important;
    box-shadow: 0 0 0 1000px #2c3136 inset !important;
    -webkit-text-fill-color: #f1f1f1 !important;
    caret-color: #f1f1f1 !important;
    border-color: #555 !important;
    transition: background-color 600000s ease-in-out 0s, color 600000s ease-in-out 0s;
}

body.dark-theme input:-webkit-autofill:focus,
body.dark-theme textarea:-webkit-autofill:focus,
body.dark-theme select:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #2c3136 inset, 0 0 0 0.2rem rgba(220, 20, 60, 0.25) !important;
    box-shadow: 0 0 0 1000px #2c3136 inset, 0 0 0 0.2rem rgba(220, 20, 60, 0.25) !important;
    border-color: #dc143c !important;
}

body.dark-theme .form-floating > .form-control:-webkit-autofill ~ label {
    color: rgba(241, 241, 241, 0.92) !important;
    opacity: 0.85;
    transform: scale(.85) translateY(-.5rem) translateX(.15rem);
}

/* Light theme: keep autofilled fields on a clean white background to match
   typed values (the default Chrome lemon-yellow is jarring). */
body:not(.dark-theme) input:-webkit-autofill,
body:not(.dark-theme) input:-webkit-autofill:hover,
body:not(.dark-theme) input:-webkit-autofill:focus,
body:not(.dark-theme) input:-webkit-autofill:active,
body:not(.dark-theme) textarea:-webkit-autofill,
body:not(.dark-theme) textarea:-webkit-autofill:hover,
body:not(.dark-theme) textarea:-webkit-autofill:focus,
body:not(.dark-theme) textarea:-webkit-autofill:active,
body:not(.dark-theme) select:-webkit-autofill,
body:not(.dark-theme) select:-webkit-autofill:hover,
body:not(.dark-theme) select:-webkit-autofill:focus,
body:not(.dark-theme) select:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: #212529 !important;
    caret-color: #212529 !important;
    transition: background-color 600000s ease-in-out 0s, color 600000s ease-in-out 0s;
}

/* -------------------------------------------------------------------------- */
/* Placeholders — no visible placeholder copy on form controls site-wide       */
/* Labels carry field meaning. This prevents label/placeholder collisions and */
/* covers the first paint before js/form-floating-site.js strips placeholder  */
/* attributes at runtime.                                                     */
/* -------------------------------------------------------------------------- */
input::placeholder,
textarea::placeholder,
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder,
input::-moz-placeholder,
textarea::-moz-placeholder,
input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
    color: transparent !important;
    opacity: 0 !important;
}

/* Dark Theme Main Content Areas */
.dark-theme main {
    background: #1a1d20 !important;
    color: #f1f1f1 !important;
}

.dark-theme .hero-section {
    background: #23272b !important;
    color: #f1f1f1 !important;
}

.dark-theme .content-section {
    background: #1a1d20 !important;
    color: #f1f1f1 !important;
}

.dark-theme .section-container {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border: 0px !important;
}

/* Dark Theme Home Page Specific */
.dark-theme .home-info-card {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border: 0px !important;
}

.dark-theme .home-info-card .card-header {
    border-bottom: 1px solid #444 !important;
}

.dark-theme .home-info-card .card-body {
    background: #23272b !important;
    color: #f1f1f1 !important;
}

/* Dark Theme for all info cards and sections */
.dark-theme .home-info-card,
.dark-theme .categories-card,
.dark-theme .family-members-grid {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border: none !important;
}

/* Home Page Specific Styles */
.home-fullwidth-card {
    background: #fff;
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    margin-bottom: 2rem;
    overflow: hidden;
}

.home-section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.home-tile {
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.home-card-header {
    background: linear-gradient(135deg, #ed1c24 0%, #c82333 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Override default background when site text background classes are applied */
.home-card-header.bg-primary {
    background: #007bff !important;
}

.home-card-header.bg-secondary {
    background: #6c757d !important;
}

.home-card-header.bg-success {
    background: #28a745 !important;
}

.home-card-header.bg-danger {
    background: #ed1c24 !important;
}

.home-card-header.bg-warning {
    background: #ffc107 !important;
}

.home-card-header.bg-info {
    background: #17a2b8 !important;
}

.home-card-header.bg-light {
    background: #f8f9fa !important;
    color: #333 !important;
}

.home-card-header.bg-dark {
    background: #343a40 !important;
}

.home-card-header.bg-muted {
    background: #6c757d !important;
}

.home-card-header.bg-amber {
    background: #ffc107 !important;
}

.home-card-header.bg-fuchsia {
    background: #e83e8c !important;
}

.home-card-header.bg-lime {
    background: #84cc16 !important;
}

.home-card-header.bg-rose {
    background: #e11d48 !important;
}

.home-card-header.bg-orange {
    background: #f97316 !important;
}

.home-card-header.bg-emerald {
    background: #10b981 !important;
}

.home-card-header.bg-teal {
    background: #14b8a6 !important;
}

.home-card-header.bg-cyan2 {
    background: #06b6d4 !important;
}

.home-card-header.bg-sky {
    background: #0ea5e9 !important;
}

.home-card-header.bg-indigo {
    background: #6366f1 !important;
}

.home-card-header.bg-violet {
    background: #8b5cf6 !important;
}

.home-card-header.bg-stone {
    background: #78716c !important;
}

.home-card-header.bg-white {
    background: #ffffff !important;
    color: #333 !important;
}

.home-card-header h2,
.home-card-header h3 {
    font-size: 1.1rem; /* Decreased from default */
    margin: 0;
    font-weight: 600;
}

.home-card-body {
    padding: 1.5rem;
    background: #fff;
}

.home-tile-header {
    background: linear-gradient(135deg, #ed1c24 0%, #c82333 100%);
    color: white;
    padding: 1rem;
    border-bottom: none;
}

/* Override default background when site text background classes are applied */
.home-tile-header.bg-primary {
    background: #007bff !important;
}

.home-tile-header.bg-secondary {
    background: #6c757d !important;
}

.home-tile-header.bg-success {
    background: #28a745 !important;
}

.home-tile-header.bg-danger {
    background: #ed1c24 !important;
}

.home-tile-header.bg-warning {
    background: #ffc107 !important;
}

.home-tile-header.bg-info {
    background: #17a2b8 !important;
}

.home-tile-header.bg-light {
    background: #f8f9fa !important;
    color: #333 !important;
}

.home-tile-header.bg-dark {
    background: #343a40 !important;
}

.home-tile-header.bg-muted {
    background: #6c757d !important;
}

.home-tile-header.bg-amber {
    background: #ffc107 !important;
}

.home-tile-header.bg-fuchsia {
    background: #e83e8c !important;
}

.home-tile-header.bg-lime {
    background: #84cc16 !important;
}

.home-tile-header.bg-rose {
    background: #e11d48 !important;
}

.home-tile-header.bg-orange {
    background: #f97316 !important;
}

.home-tile-header.bg-emerald {
    background: #10b981 !important;
}

.home-tile-header.bg-teal {
    background: #14b8a6 !important;
}

.home-tile-header.bg-cyan2 {
    background: #06b6d4 !important;
}

.home-tile-header.bg-sky {
    background: #0ea5e9 !important;
}

.home-tile-header.bg-indigo {
    background: #6366f1 !important;
}

.home-tile-header.bg-violet {
    background: #8b5cf6 !important;
}

.home-tile-header.bg-stone {
    background: #78716c !important;
}

.home-tile-header.bg-white {
    background: #ffffff !important;
    color: #333 !important;
}

.home-tile-header h2,
.home-tile-header h3 {
    font-size: 1.1rem; /* Decreased from default */
    margin: 0;
    font-weight: 600;
}



.home-tile-body {
    padding: 0;
    background: #fff;
}

.home-two-column-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* When family card is hidden, make quick info take full width */
.home-two-column-grid:has(.home-info-card:only-child) {
    grid-template-columns: 1fr;
}

/* Alternative approach for browsers that don't support :has() */
.home-two-column-grid .home-info-card:only-child {
    grid-column: 1 / -1;
}

/* More robust approach - when one card is hidden, make the other full width */
.home-two-column-grid .home-info-card[style*="display: none"] + .home-info-card {
    grid-column: 1 / -1;
}

.home-two-column-grid .home-info-card:first-child[style*="display: none"] ~ .home-info-card {
    grid-column: 1 / -1;
}

.home-info-card {
    background: #fff;
    border-radius: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.home-slider-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-style: italic;
    /* Reserve space before JS injects horizontal scrollers (reduces CLS on legacy home tiles) */
    min-height: clamp(9rem, 32vw, 14rem);
    box-sizing: border-box;
}
/* Once real content is present, let height follow content */
.home-slider-placeholder:has(.horizontal-scroller),
.home-slider-placeholder:has(.specials-grid),
.home-slider-placeholder:has(.featured-items-scroll) {
    min-height: 0;
}

/* Once a horizontal scroller is injected, stack vertically — default flex row put multiple blocks on one line */
.home-slider-placeholder:has(.horizontal-scroller) {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
}

.home-slider-placeholder:has(.horizontal-scroller) > .horizontal-scroller {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
}

.home-toolbar {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
}

/* Dark Theme for Home Page Styles */
.dark-theme .home-fullwidth-card,
.dark-theme .home-tile,
.dark-theme .home-info-card {
    background: #23272b !important;
    border-color: #444 !important;
    color: #f1f1f1 !important;
}

.dark-theme .home-card-body,
.dark-theme .home-tile-body {
    background: #23272b !important;
    color: #f1f1f1 !important;
}

.dark-theme .home-toolbar {
    background: #2d3748 !important;
    border-color: #444 !important;
    color: #f1f1f1 !important;
}

.dark-theme .home-slider-placeholder {
    color: #a0aec0 !important;
}

/* Specials Grid Layout */
.specials-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 1rem;
    padding: 0.5rem;
    align-items: stretch !important;
    justify-content: flex-start !important;
    min-height: auto !important;
    width: 100% !important;
}

/* Override home-slider-placeholder styles when it contains specials grid */
#customerSpecialOffers .specials-grid,
.home-slider-placeholder .specials-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    min-height: auto !important;
    width: 100% !important;
}

/* Ensure container has proper width */
#customerSpecialOffers {
    width: 100% !important;
    display: block !important;
}

/* Tiered special: two claim buttons inside one card */
#customerSpecialOffers .tiered-special-claim-buttons .tier-claim-cell {
    min-width: 0;
}
#customerSpecialOffers .tiered-special-claim-buttons .tier-claim-actions .btn {
    max-width: 100%;
}

.home-card-body {
    padding: 1.5rem !important;
    width: 100% !important;
}

/* Force flex layout on the container */
.home-card-body .specials-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 1rem !important;
    width: 100% !important;
}

.specials-grid-card {
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border: 2px solid #e9ecef;
    padding: 1.25rem;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 0 0 calc(33.333% - 1rem);
    min-width: 300px;
    max-width: 400px;
}

.specials-grid-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(220, 53, 69, 0.15);
}

/* Special offers (yellow) */
.specials-grid-card.special-offer {
    border-color: #ffc107;
}

.specials-grid-card.special-offer:hover {
    box-shadow: 0 8px 24px rgba(255, 193, 7, 0.2);
}

.specials-grid-badge {
    position: absolute;
    top: -8px;
    right: 12px;
    background: linear-gradient(135deg, #ed1c24 0%, #c82333 100%);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
    z-index: 2;
}

/* Special offers badge (yellow) */
.specials-grid-badge.special-badge {
    background: linear-gradient(135deg, #ffc107 0%, #ffc107 100%);
    color: #212529;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

/* Discount offers badge (red) - default */
.specials-grid-badge.discount-badge {
    background: linear-gradient(135deg, #ed1c24 0%, #c82333 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

.specials-grid-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #333;
    margin: 0.5rem 0 0.75rem 0;
    line-height: 1.3;
}

.specials-grid-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.specials-grid-dates {
    color: #888;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: auto;
}

.specials-grid-dates i {
    font-size: 0.75rem;
}

/* Dark theme support for grid */
.dark-theme .specials-grid-card {
    background: #2d3748;
    border-color: #4a5568;
    color: #f1f1f1;
}

.dark-theme .specials-grid-card.special-offer {
    border-color: #ffc107;
}

.dark-theme .specials-grid-title {
    color: #f1f1f1;
}

.dark-theme .specials-grid-description {
    color: #a0aec0;
}

.dark-theme .specials-grid-dates {
    color: #718096;
}

/* Featured Items Grid Layout */
.featured-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 1rem;
    padding: 0.5rem;
    align-items: stretch !important;
    justify-content: flex-start !important;
    min-height: auto !important;
    width: 100% !important;
}

.featured-grid-card {
    min-width: 300px;
    max-width: 350px;
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    flex-shrink: 0;
    position: relative;
}

.featured-grid-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(220, 53, 69, 0.15);
}

.featured-grid-image {
    height: 60%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.featured-grid-content {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.featured-grid-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.featured-grid-description {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    flex-grow: 1;
}

.featured-grid-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ed1c24;
    margin-bottom: 0.75rem;
}

.featured-grid-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
}

.featured-grid-actions .btn {
    flex: 1;
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
}

/* Dark theme support for featured grid */
.dark-theme .featured-grid-card {
    background: #23272b;
    border-color: #444;
    color: #f1f1f1;
}

.dark-theme .featured-grid-title {
    color: #f1f1f1;
}

.dark-theme .featured-grid-description {
    color: #a0aec0;
}

/* Desktop - Show more cards */
@media (min-width: 1200px) {
    .specials-grid-card,
    .featured-grid-card {
        flex: 0 0 calc(25% - 0.75rem);
        min-width: 280px;
        max-width: 320px;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .specials-grid-card,
    .featured-grid-card {
        flex: 0 0 calc(33.333% - 0.67rem);
        min-width: 280px;
        max-width: 350px;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .specials-grid-card,
    .featured-grid-card {
        min-width: 280px;
        max-width: 280px;
        scroll-snap-align: start;
        padding: 1rem;
    }
    
    .featured-grid-content {
        padding: 0.75rem;
    }
    
    .specials-grid,
    .featured-grid {
        gap: 0.75rem;
        padding: 0.25rem;
    }
    
    .specials-grid-title,
    .featured-grid-title {
        font-size: 1.1rem;
    }
    
    .specials-grid-description,
    .featured-grid-description {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .specials-grid-card,
    .featured-grid-card {
        flex: 0 0 100%;
        min-width: auto;
        padding: 0.875rem;
    }
    
    .featured-grid-content {
        padding: 0.5rem;
    }
    
    .specials-grid,
    .featured-grid {
        gap: 0.5rem;
    }
}

/* Desktop improvements for other sections */
@media (min-width: 992px) {
    /* Show more items in horizontal sliders */
    .home-slider-placeholder {
        max-height: 400px;
    }
    
    .ai-hero {
        max-height: 400px;
    }
    
    /* Reviews section - show more cards */
    .review-slideshow-container {
        max-height: 500px;
    }
    
    /* Community section - larger cards */
    .community-hero-slide {
        padding: 0 15%;
    }
    
    /* AI sections - larger cards */
    .ai-hero-slide {
        padding: 0 15%;
    }
    
    /* Order again - show more items */
    .order-again-slide {
        padding: 0 10%;
    }
}

/* Large desktop - show even more */
@media (min-width: 1400px) {
    .specials-grid-card,
    .featured-grid-card {
        flex: 0 0 calc(20% - 0.8rem);
        min-width: 260px;
        max-width: 300px;
    }
    
    .community-hero-slide,
    .ai-hero-slide {
        padding: 0 20%;
    }
}

/* Hero-Style Special Offers Slideshow */
.specials-hero {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.specials-hero-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.specials-hero-slide {
    flex: 0 0 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 10%;
}

.specials-hero-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    padding: 2rem;
    text-align: center;
    max-width: 400px;
    width: 100%;
    border: 2px solid #ed1c24;
    position: relative;
    transform: scale(1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.specials-hero-card:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 40px rgba(220, 53, 69, 0.2);
}

/* Special offers (yellow) */
.specials-hero-card.special-offer {
    border-color: #ffc107;
}

.specials-hero-card.special-offer:hover {
    box-shadow: 0 12px 40px rgba(255, 193, 7, 0.2);
}

.specials-hero-badge {
    background: linear-gradient(135deg, #ed1c24 0%, #c82333 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* Special offers badge (yellow) */
.specials-hero-badge.special-badge {
    background: linear-gradient(135deg, #ffc107 0%, #ffc107 100%);
    color: #212529;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

/* Discount offers badge (red) - default */
.specials-hero-badge.discount-badge {
    background: linear-gradient(135deg, #ed1c24 0%, #c82333 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.specials-hero-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.specials-hero-description {
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.specials-hero-dates {
    color: #888;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.specials-hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    pointer-events: none;
    z-index: 10;
}

.specials-hero-prev,
.specials-hero-next {
    display: none;
}

.specials-hero-prev:hover,
.specials-hero-next:hover {
    background: #ed1c24;
    color: white;
    transform: scale(1.1);
}

.specials-hero-prev:active,
.specials-hero-next:active {
    transform: scale(0.95);
}

.specials-hero-prev i,
.specials-hero-next i {
    font-size: 1.2rem;
    color: #ed1c24;
    transition: color 0.3s ease;
}

.specials-hero-prev:hover i,
.specials-hero-next:hover i {
    color: white;
}

/* Navigation buttons for special offers (yellow theme) */
.specials-hero.special-theme .specials-hero-prev,
.specials-hero.special-theme .specials-hero-next {
    border-color: #ffc107;
}

.specials-hero.special-theme .specials-hero-prev:hover,
.specials-hero.special-theme .specials-hero-next:hover {
    background: #ffc107;
    color: #212529;
}

.specials-hero.special-theme .specials-hero-prev i,
.specials-hero.special-theme .specials-hero-next i {
    color: #ffc107;
}

.specials-hero.special-theme .specials-hero-prev:hover i,
.specials-hero.special-theme .specials-hero-next:hover i {
    color: #212529;
}

/* Side cards (visible edges) */
.specials-hero-slide.side-card {
    opacity: 0.5;
    transform: scale(0.9);
    pointer-events: none;
    filter: blur(1px);
    position: absolute;
    z-index: 1;
}

.specials-hero-slide.side-card:nth-child(odd) {
    left: -15%;
}

.specials-hero-slide.side-card:nth-child(even) {
    right: -15%;
}

.specials-hero-slide.active {
    z-index: 10;
    position: relative;
}

.specials-hero-slide.side-card .specials-hero-card {
    border-color: #ccc;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

/* Touch/swipe support */
.specials-hero-track.swiping {
    transition: none;
}

.specials-hero-track.swipe-left {
    transform: translateX(-100%);
}

.specials-hero-track.swipe-right {
    transform: translateX(100%);
}

/* Dark theme support */
.dark-theme .specials-hero {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
}

.dark-theme .specials-hero-card {
    background: #2d3748;
    border-color: #ed1c24;
    color: #f1f1f1;
}

.dark-theme .specials-hero-card.special-offer {
    border-color: #ffc107;
}

.dark-theme .specials-hero-title {
    color: #f1f1f1;
}

.dark-theme .specials-hero-description {
    color: #a0aec0;
}

.dark-theme .specials-hero-dates {
    color: #718096;
}

.dark-theme .specials-hero-prev,
.dark-theme .specials-hero-next {
    background: rgba(45, 55, 72, 0.9);
    border-color: #ed1c24;
}

.dark-theme .specials-hero-prev i,
.dark-theme .specials-hero-next i {
    color: #ed1c24;
}

.dark-theme .specials-hero.special-theme .specials-hero-prev,
.dark-theme .specials-hero.special-theme .specials-hero-next {
    border-color: #ffc107;
}

.dark-theme .specials-hero.special-theme .specials-hero-prev:hover,
.dark-theme .specials-hero.special-theme .specials-hero-next:hover {
    background: #ffc107;
    color: #212529;
}

.dark-theme .specials-hero.special-theme .specials-hero-prev i,
.dark-theme .specials-hero.special-theme .specials-hero-next i {
    color: #ffc107;
}

.dark-theme .specials-hero.special-theme .specials-hero-prev:hover i,
.dark-theme .specials-hero.special-theme .specials-hero-next:hover i {
    color: #212529;
}

/* Community Hero Slideshow */
.community-hero {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Constrain community hero height when inside home tiles */
.home-tile .community-hero {
    height: 300px;
    max-height: 300px;
}

.community-hero-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.community-hero-slide {
    flex: 0 0 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.community-hero-card {
    width: 100%;
    height: 100%;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
    cursor: pointer;
    transition: transform 0.3s ease;
    border-radius: 0;
}

/* Community hero card without background image */
.community-hero-card:not([style*="background-image"]) {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    align-items: center;
    justify-content: center;
}

.dark-theme .community-hero-card:not([style*="background-image"]) {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
}

/* Community hero card with no image class - ensure no background image */
.community-hero-card-no-image {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    background-image: none !important;
    align-items: center;
    justify-content: center;
}

.dark-theme .community-hero-card-no-image {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%) !important;
    background-image: none !important;
}

.community-hero-card:hover {
    transform: scale(1.02);
}

.community-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 2rem;
    color: white;
}

.community-hero-text {
    max-width: 600px;
}

.community-hero-badge {
    background: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
    display: inline-block;
}

.community-hero-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.community-hero-author {
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.community-hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    pointer-events: none;
    z-index: 10;
}

.community-hero-prev,
.community-hero-next {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #ed1c24;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: all;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.community-hero-prev:hover,
.community-hero-next:hover {
    background: #ed1c24;
    color: white;
    transform: scale(1.1);
}

.community-hero-prev:active,
.community-hero-next:active {
    transform: scale(0.95);
}

.community-hero-prev i,
.community-hero-next i {
    font-size: 1.2rem;
    color: #ed1c24;
    transition: color 0.3s ease;
}

.community-hero-prev:hover i,
.community-hero-next:hover i {
    color: white;
}

/* Touch/swipe support for community */
.community-hero-track.swiping {
    transition: none;
}

.community-hero-track.swipe-left {
    transform: translateX(-100%);
}

.community-hero-track.swipe-right {
    transform: translateX(100%);
}

/* Dark theme support for community */
.dark-theme .community-hero {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
}

.dark-theme .community-hero-prev,
.dark-theme .community-hero-next {
    background: rgba(45, 55, 72, 0.9);
    border-color: #ed1c24;
}

.dark-theme .community-hero-prev i,
.dark-theme .community-hero-next i {
    color: #ed1c24;
}

/* Community Hero Dots */
.community-hero-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.community-hero-dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid #ed1c24;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0;
}

.community-hero-dot:hover {
    background: rgba(220, 53, 69, 0.7);
    transform: scale(1.1);
}

.community-hero-dot.active {
    background: #ed1c24;
    border-color: #ed1c24;
}

/* Dark theme support for community dots */
.dark-theme .community-hero-dot {
    background: rgba(45, 55, 72, 0.5);
    border-color: #ed1c24;
}

.dark-theme .community-hero-dot:hover {
    background: rgba(220, 53, 69, 0.7);
}

.dark-theme .community-hero-dot.active {
    background: #ed1c24;
    border-color: #ed1c24;
}

/* Community Poll and Survey Previews */
.community-poll-preview,
.community-survey-preview,
.community-post-preview {
    margin-top: 1rem;
}

.community-poll-question,
.community-survey-title,
.community-post-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

.community-survey-desc {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.community-post-content {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
    max-height: 3.6rem; /* Limit to 3 lines */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.community-poll-options {
    margin-bottom: 0.75rem;
}

.community-poll-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.community-poll-option:last-child {
    border-bottom: none;
}

.option-text {
    font-size: 0.85rem;
    flex: 1;
    margin-right: 0.5rem;
}

.option-votes {
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffd700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.more-options {
    font-size: 0.75rem;
    font-style: italic;
    opacity: 0.8;
    text-align: center;
    margin-top: 0.25rem;
}

.community-poll-stats,
.community-survey-info,
.community-post-meta {
    font-size: 0.75rem;
    opacity: 0.9;
    text-align: center;
    margin-top: 0.5rem;
}

/* Dark theme support for community previews */
.dark-theme .community-poll-option {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dark-theme .option-votes {
    color: #ffd700;
}

/* Popularity badge styling */
.popularity-badge {
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 4px;
    border-left: 3px solid #ed1c24;
}

.popularity-badge small {
    font-size: 0.75rem;
    font-weight: 600;
    color: #ed1c24;
}

.dark-theme .popularity-badge {
    background: rgba(220, 53, 69, 0.2);
}

.dark-theme .popularity-badge small {
    color: #ff6b7a;
}

/* AI Sections Hero Slideshow */
.ai-hero {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.ai-hero-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.ai-hero-slide {
    flex: 0 0 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.ai-hero-card {
    width: 100%;
    height: 100%;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: flex-end;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.ai-hero-card:hover {
    transform: scale(1.02);
}

/* AI hero card without background image */
.ai-hero-card-no-image {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    align-items: center;
    justify-content: center;
}

.dark-theme .ai-hero-card-no-image {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
}

.ai-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 1.5rem;
    color: white;
}

.ai-hero-text {
    max-width: 100%;
}

.ai-hero-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.ai-hero-price {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.ai-hero-packaging {
    font-size: 0.9rem;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.ai-hero-order-count {
    font-size: 0.85rem;
    opacity: 0.9;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.ai-hero-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.ai-hero-btn {
    padding: 0.375rem 0.75rem;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    min-width: 80px;
    justify-content: center;
}

.ai-hero-btn-primary {
    background: #ed1c24;
    color: white;
    border: 2px solid #ed1c24;
}

.ai-hero-btn-primary:hover {
    background: #c82333;
    border-color: #c82333;
    color: white;
    text-decoration: none;
}

.ai-hero-btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: 2px solid rgba(255, 255, 255, 0.9);
}

.ai-hero-btn-secondary:hover {
    background: white;
    color: #333;
    text-decoration: none;
}

.dark-theme .ai-hero-btn-secondary {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-color: rgba(0, 0, 0, 0.7);
}

.dark-theme .ai-hero-btn-secondary:hover {
    background: rgba(0, 0, 0, 0.9);
    color: white;
}

/* Special Items Styling - Yellow borders and buttons for special items */
.product-in-specials {
    border: 2px solid #ffc107 !important;
    background: linear-gradient(135deg, #fff 0%, #fffbf0 100%) !important;
}

/* Featured Items Styling - Red borders for featured items */
.featured-product {
    border: 2px solid #dc3545 !important;
    background: linear-gradient(135deg, #fff 0%, #fff5f5 100%) !important;
}

/* Special items filter - hide filtered out items */
.special-items-filtered-out {
    display: none !important;
}

.product-in-specials:hover {
    border-color: #ffc107 !important;
    background: linear-gradient(135deg, #fffbf0 0%, #fff3cd 100%) !important;
}

/* Special Add to Cart Button */
.special-add-to-cart-btn {
    background: linear-gradient(135deg, #ffc107 0%, #ff8c00 100%) !important;
    border-color: #ff8c00 !important;
    color: #000 !important;
    font-weight: 700;
    box-shadow: 0 3px 8px rgba(255, 193, 7, 0.4);
    transition: all 0.3s ease;
}

.special-add-to-cart-btn:hover {
    background: linear-gradient(135deg, #ff8c00 0%, #ff6b00 100%) !important;
    border-color: #ff6b00 !important;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.6);
}

.special-add-to-cart-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.4);
}

.special-add-to-cart-btn:disabled {
    background: #6c757d !important;
    border-color: #6c757d !important;
    color: #fff !important;
    opacity: 0.6;
}

/* Special Quantity Buttons (Grid View) */
.product-in-specials .quantity-btn-card {
    border-color: #ffc107 !important;
    color: #ffc107 !important;
    background: transparent !important;
}

.product-in-specials .quantity-btn-card:hover {
    background: #ffc107 !important;
    border-color: #ff8c00 !important;
    color: #000 !important;
}

/* Special Quantity Buttons (List View) */
.special-quantity-btn {
    background: linear-gradient(135deg, #ffc107 0%, #ff8c00 100%) !important;
    border-color: #ff8c00 !important;
    color: #000 !important;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(255, 193, 7, 0.3);
}

.special-quantity-btn:hover {
    background: linear-gradient(135deg, #ff8c00 0%, #ff6b00 100%) !important;
    border-color: #ff6b00 !important;
    color: #fff !important;
    transform: scale(1.05);
    box-shadow: 0 3px 6px rgba(255, 193, 7, 0.5);
}

/* Dark theme support for special elements */
.dark-theme .product-in-specials {
    border-color: #ffc107 !important;
    background: linear-gradient(135deg, #2d3748 0%, #3a4a5c 100%) !important;
}

.dark-theme .special-add-to-cart-btn {
    background: linear-gradient(135deg, #ffc107 0%, #ff8c00 100%) !important;
    color: #000 !important;
}

.dark-theme .special-add-to-cart-btn:hover {
    background: linear-gradient(135deg, #ff8c00 0%, #ff6b00 100%) !important;
    color: #fff !important;
}

/* Category Slideshow Styling */
.category-image-slideshow {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 0;
}

.category-slideshow-track {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease;
    will-change: transform;
}

.category-slide {
    flex: 0 0 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 0.3s ease;
}

.category-slide.active {
    opacity: 1;
}

.category-slideshow-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.category-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-dot.active {
    background: #ed1c24;
    transform: scale(1.2);
}

.category-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.category-dot.active:hover {
    background: #c82333;
}

.dark-theme .category-dot {
    background: rgba(0, 0, 0, 0.5);
}

.dark-theme .category-dot.active {
    background: #ed1c24;
}

.dark-theme .category-dot:hover {
    background: rgba(0, 0, 0, 0.8);
}

.dark-theme .category-dot.active:hover {
    background: #c82333;
}

.ai-hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 0.5rem;
    pointer-events: none;
    z-index: 10;
}

/* AI Hero Dots Navigation */
.ai-hero-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.ai-hero-dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: all;
}

.ai-hero-dot.active {
    background: #ed1c24;
    border-color: #ed1c24;
}

.ai-hero-dot:hover {
    background: rgba(220, 53, 69, 0.7);
    border-color: #ed1c24;
}

.dark-theme .ai-hero-dot {
    background: rgba(0, 0, 0, 0.5);
    border-color: rgba(0, 0, 0, 0.8);
}

.dark-theme .ai-hero-dot.active {
    background: #ed1c24;
    border-color: #ed1c24;
}

.dark-theme .ai-hero-dot:hover {
    background: rgba(220, 53, 69, 0.7);
    border-color: #ed1c24;
}

.ai-hero-prev,
.ai-hero-next {
    display: none;
}

.ai-hero-prev:hover,
.ai-hero-next:hover {
    background: #ed1c24;
    color: white;
    transform: scale(1.1);
}

.ai-hero-prev:active,
.ai-hero-next:active {
    transform: scale(0.95);
}

.ai-hero-prev i,
.ai-hero-next i {
    font-size: 1rem;
    color: #ed1c24;
    transition: color 0.3s ease;
}

.ai-hero-prev:hover i,
.ai-hero-next:hover i {
    color: white;
}

/* Touch/swipe support for AI sections */
.ai-hero-track.swiping {
    transition: none;
}

.ai-hero-track.swipe-left {
    transform: translateX(-100%);
}

.ai-hero-track.swipe-right {
    transform: translateX(100%);
}

/* Dark theme support for AI sections */
.dark-theme .ai-hero {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
}

.dark-theme .ai-hero-prev,
.dark-theme .ai-hero-next {
    background: rgba(45, 55, 72, 0.9);
    border-color: #ed1c24;
}

.dark-theme .ai-hero-prev i,
.dark-theme .ai-hero-next i {
    color: #ed1c24;
}

/* Product Group Heroes Styling */
.product-group-hero {
    position: relative;
    width: 100%;
    height: 400px;
    margin-bottom: 2rem;
    border-radius: 0;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-group-hero:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

.product-group-hero-media {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.product-group-hero-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.product-group-hero:hover .product-group-hero-img {
    transform: scale(1.05);
}

.product-group-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.2) 50%,
        rgba(0, 0, 0, 0.6) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.product-group-hero-text {
    color: white;
    max-width: 100%;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
    text-align: center;
}

.product-group-hero-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.2;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.8);
}

.product-group-hero-text p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    opacity: 0.95;
    line-height: 1.4;
    max-width: 100%;
}

.product-group-hero-cta {
    display: inline-block;
    background: linear-gradient(135deg, #ed1c24 0%, #c82333 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
    border: 2px solid transparent;
}

.product-group-hero-cta:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Responsive adjustments for product group heroes */
@media (max-width: 768px) {
    .product-group-hero {
        height: 300px;
        margin-bottom: 1.5rem;
    }
    
    .product-group-hero-text h2 {
        font-size: 2rem;
    }
    
    .product-group-hero-text p {
        font-size: 1rem;
        max-width: 100%;
    }
    
    .product-group-hero-overlay {
        padding: 1.5rem;
    }
    
    .product-group-hero-cta {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .product-group-hero {
        height: 250px;
    }
    
    .product-group-hero-text h2 {
        font-size: 1.75rem;
    }
    
    .product-group-hero-text p {
        font-size: 0.95rem;
    }
    
    .product-group-hero-overlay {
        padding: 1rem;
    }
}

/* Product Group Tiles Styling */
.product-group-tiles {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.5rem;
    margin-top: 1rem;
    width: 100%;
}

.product-group-tile {
    position: relative;
    min-height: 60px;
    width: 100%;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
}

/* Image tiles: explicit box height so the <img> can fill height and crop sides */
.product-group-tile:has(.product-group-tile-img) {
    aspect-ratio: 4 / 3;
    min-height: 0;
}

.product-group-tile-img {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
    width: auto;
    min-width: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center center;
    pointer-events: none;
    z-index: 0;
}

/* Store page category filters (product groups) */
.category-filter-item {
    overflow: hidden;
    padding: 0 !important;
    min-height: 60px;
}

.category-filter-content {
    padding: 16px;
}

.dark-theme .category-filter-item {
    border-color: #444 !important;
}

.product-group-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border-color: #ed1c24;
}

.product-group-tile.selected {
    border-color: #ed1c24;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.2);
}

.product-group-tile-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    background: rgba(0,0,0,0.6);
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}

.product-group-tile:hover .product-group-tile-overlay,
.product-group-tile.selected .product-group-tile-overlay {
    background: rgba(0,0,0,0.3);
}

.product-group-tile-content {
    text-align: center;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    padding: 0.25rem 0.5rem;
}

.product-group-tile-title {
    font-size: 0.75rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}

.product-group-tile-description {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

.filter-checkmark {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: #28a745;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    z-index: 10;
    transition: all 0.3s ease;
    line-height: 1;
}

.filter-checkmark i {
    margin: 0;
    padding: 0;
    line-height: 1;
}

.product-group-tile.selected .filter-checkmark {
    animation: checkmarkPulse 0.3s ease;
}

@keyframes checkmarkPulse {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* Dark theme support for product group heroes */
.dark-theme .product-group-hero {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.dark-theme .product-group-hero:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.dark-theme .product-group-hero-overlay {
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.5) 0%,
        rgba(0, 0, 0, 0.3) 50%,
        rgba(0, 0, 0, 0.7) 100%
    );
}

.dark-theme .product-group-hero-cta {
    background: linear-gradient(135deg, #ed1c24 0%, #c82333 100%);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

.dark-theme .product-group-hero-cta:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.5);
}

/* Dark theme for product group tiles */
.dark-theme .product-group-tile {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.dark-theme .product-group-tile:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* Responsive Design */
@media (max-width: 992px) and (min-width: 769px) {
    .home-section-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .home-section-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .home-two-column-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .home-card-header,
    .home-tile-header {
        padding: 0.75rem 1rem;
    }
    
    .home-card-body {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    
    .specials-hero {
        height: 350px;
    }
    
    .ai-hero {
        height: 350px;
    }
    
    .ai-hero-card {
        background-size: contain !important;
        background-position: center !important;
    }
    
    .community-hero-card {
        background-size: contain !important;
        background-position: center !important;
    }
    
    .community-card {
        background-size: cover !important;
        background-position: center !important;
    }
    
    .product-group-hero-img {
        object-fit: contain;
    }
    
    .category-slide {
        background-size: contain !important;
        background-position: center !important;
    }
    
    .specials-hero-slide {
        padding: 0 15%;
    }
    
    .specials-hero-card {
        padding: 1.5rem;
        max-width: 300px;
    }
    
    .specials-hero-title {
        font-size: 1.5rem;
    }
    
    .specials-hero-nav {
        padding: 0 0.5rem;
    }
    
    .specials-hero-prev,
    .specials-hero-next {
        width: 40px;
        height: 40px;
    }
    
    .specials-hero-prev i,
    .specials-hero-next i {
        font-size: 1rem;
    }
    
    .community-hero {
        height: 400px;
    }
    
    .community-hero-overlay {
        padding: 1.5rem;
    }
    
    .community-hero-title {
        font-size: 1.5rem;
    }
    
    .community-hero-nav {
        padding: 0 0.5rem;
    }
    
    .community-hero-prev,
    .community-hero-next {
        width: 40px;
        height: 40px;
    }
    
    .community-hero-prev i,
    .community-hero-next i {
        font-size: 1rem;
    }
}

.dark-theme .review-slideshow-container,
.dark-theme .special-offers-container,
.dark-theme .offers-transition-container,
.dark-theme .featured-items-container,
.dark-theme .quick-info-container {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border: 0px !important;
}

/* Dark Theme for all card headers */
.dark-theme .card-header {
    border-bottom: 1px solid #444 !important;
}

/* Dark Theme for all card bodies */
.dark-theme .card-body {
    background: #23272b !important;
    color: #f1f1f1 !important;
}

/* Dark Theme for specific sections */
.dark-theme .row {
    background: transparent !important;
}

.dark-theme .col-12,
.dark-theme .col-xl-6,
.dark-theme .col-lg-6,
.dark-theme .col-md-6 {
    background: transparent !important;
}

/* Dark Theme for family members */
.dark-theme .family-member {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border: 0px !important;
}

.dark-theme .family-member:hover {
    background: #2c3136 !important;
    border-color: #DC143C !important;
}

.dark-theme .family-member-name {
    color: #f1f1f1 !important;
}

.dark-theme .family-member-bio {
    color: #d1d1d1 !important;
}

/* Dark Theme for reviews */
.dark-theme .review-slide {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border: 0px !important;
}

.dark-theme .review-slide:hover {
    background: #2c3136 !important;
    border-color: #DC143C !important;
}

.dark-theme .review-author-name {
    color: #f1f1f1 !important;
}

.dark-theme .review-content {
    color: #d1d1d1 !important;
}

/* Dark Theme for special offers */
.dark-theme .special-offer {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border: 0px !important;
}

.dark-theme .special-offer:hover {
    background: #2c3136 !important;
    border-color: #DC143C !important;
}

.dark-theme .special-offer-title {
    color: #f1f1f1 !important;
}

.dark-theme .special-offer-description {
    color: #d1d1d1 !important;
}

/* Dark Theme for featured items */
.dark-theme .featured-item {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border: 0px !important;
}

.dark-theme .featured-item:hover {
    background: #2c3136 !important;
    border-color: #DC143C !important;
}

.dark-theme .featured-item-title {
    color: #f1f1f1 !important;
}

.dark-theme .featured-item-description {
    color: #d1d1d1 !important;
}

/* Quick Info Grid Layout */
.quick-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    padding: 1rem;
}

.quick-info-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.3s ease;
}

.quick-info-item:hover {
    background: #fff;
    border-color: #DC143C;
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.1);
    transform: translateY(-2px);
}

.quick-info-header {
    color: #333;
    font-weight: 600;
}

.quick-info-text {
    color: #666;
}

/* Tablet: 2 columns */
@media (max-width: 991.98px) {
    .quick-info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 0.75rem;
    }
    
    .quick-info-item {
        padding: 0.75rem;
    }
}

/* Mobile: 1 column */
@media (max-width: 575.98px) {
    .quick-info-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0.5rem;
    }
    
    .quick-info-item {
        padding: 0.75rem;
    }
}

/* Dark Theme for quick info items */
.dark-theme .quick-info-item {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border: 0px !important;
}

.dark-theme .quick-info-item:hover {
    background: #2c3136 !important;
    border-color: #DC143C !important;
}

.dark-theme .quick-info-header {
    color: #f1f1f1 !important;
}

.dark-theme .quick-info-text {
    color: #d1d1d1 !important;
}

/* Dark Theme for Our Values section */
.dark-theme .values-section,
.dark-theme .values-card,
.dark-theme .values-item {
    color: #f1f1f1 !important;
    border: 0px !important;
}

.dark-theme .values-item:hover {
    background: #2c3136 !important;
    border-color: #DC143C !important;
}

.dark-theme .values-header {
    color: #f1f1f1 !important;
}

.dark-theme .values-text {
    color: #d1d1d1 !important;
}

/* Dark Theme for Our Beginning section */
.dark-theme .beginning-section,
.dark-theme .beginning-card {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border: 0px !important;
}

.dark-theme .beginning-title {
    color: #f1f1f1 !important;
}

.dark-theme .beginning-text {
    color: #d1d1d1 !important;
}

/* Dark Theme for all sections with specific IDs */
.dark-theme #homeFamilySection,
.dark-theme #homeReviewsSection,
.dark-theme #homeSpecialOffersSection,
.dark-theme #categoriesSection,
.dark-theme #aboutFamilySection,
.dark-theme #aboutValuesSection,
.dark-theme #aboutBeginningSection {
    background: transparent !important;
}

/* Dark Theme for all divs with specific classes */
.dark-theme div[class*="info-card"],
.dark-theme div[class*="section"],
.dark-theme div[class*="container"] {
    color: #f1f1f1 !important;
    border: 0px !important;
}


.dark-theme .text-muted {
    color: #b0b0b0 !important;
}

/* Dark Theme for all buttons in cards */
.dark-theme .card .btn-outline-light {
    color: #f1f1f1 !important;
    border-color: #f1f1f1 !important;
}

.dark-theme .card .btn-outline-light:hover {
    background: #f1f1f1 !important;
    color: #23272b !important;
}

/* Dark Theme for all icons in cards */
.dark-theme .card i {
    color: inherit !important;
}

/* Dark Theme for all grid layouts */
.dark-theme .family-members-grid,
.dark-theme .reviews-grid,
.dark-theme .offers-grid,
.dark-theme .featured-grid {
    background: transparent !important;
}

/* Dark Theme for all individual grid items */
.dark-theme .family-members-grid > *,
.dark-theme .reviews-grid > *,
.dark-theme .offers-grid > *,
.dark-theme .featured-grid > * {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border: 0px !important;
}

/* Dark Theme for all hover states */
.dark-theme .family-members-grid > *:hover,
.dark-theme .reviews-grid > *:hover,
.dark-theme .offers-grid > *:hover,
.dark-theme .featured-grid > *:hover {
    background: #2c3136 !important;
    border-color: #DC143C !important;
}

/* Dark Theme About Page Specific */
.dark-theme .about-section {
    background: #23272b !important;
    color: #f1f1f1 !important;
}

.dark-theme .family-member-card {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border: 0px !important;
}

.dark-theme .family-member-card:hover {
    background: #2c3136 !important;
    border-color: #DC143C !important;
}

.dark-theme .family-member-name {
    color: #f1f1f1 !important;
}

.dark-theme .family-member-bio {
    color: #d1d1d1 !important;
}

/* Dark Theme Contact Page Specific */
.dark-theme .contact-form {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border: 0px !important;
}

.dark-theme .contact-info {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border: 0px !important;
}

/* Dark Theme Store Page Specific */
.dark-theme .product-grid {
    background: #1a1d20 !important;
}

.dark-theme .product-filters {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border: 0px !important;
}

.dark-theme .product-sorting {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border: 0px !important;
}

/* Dark Theme Community Page Specific */
.dark-theme .community-section {
    background: #23272b !important;
    color: #f1f1f1 !important;
}

.dark-theme .community-post {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border: 0px !important;
}

.dark-theme .community-post:hover {
    background: #2c3136 !important;
    border-color: #DC143C !important;
}

/* Dark Theme Profile Page Specific */
.dark-theme .profile-section {
    background: #23272b !important;
    color: #f1f1f1 !important;
}

.dark-theme .profile-card {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border: 0px !important;
}

.dark-theme .order-history {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border: 0px !important;
}

/* Dark Theme Profile Dropdowns */
.dark-theme .form-select,
.dark-theme select.form-select,
.dark-theme select.form-control {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border-color: #444 !important;
}

.dark-theme .form-select:focus,
.dark-theme select.form-select:focus,
.dark-theme select.form-control:focus {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.dark-theme .form-select option {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
}

/* Dark Theme Review Section */
.dark-theme #reviewsContent,
.dark-theme #userReviewsContainer {
    background: transparent !important;
}

.dark-theme .review-card {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border-color: #444 !important;
}

.dark-theme .review-card:hover {
    background: #2c3136 !important;
    border-color: #dc3545 !important;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3) !important;
}

/* Dark Theme Cart Page Specific */
.dark-theme .cart-container {
    background: #1a1d20 !important;
    color: #f1f1f1 !important;
}

.dark-theme .cart-item {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border: 0px !important;
}

.dark-theme .cart-summary {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border: 0px !important;
}

/* Dark Theme Checkout Page Specific */
.dark-theme .checkout-container {
    background: #1a1d20 !important;
    color: #f1f1f1 !important;
}

.dark-theme .checkout-form {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border: 0px !important;
}

/* Pickup/delivery slot date & time dropdowns – show they’re selectable */
.pickup-slot-select {
    cursor: pointer;
    border-width: 2px;
    border-color: #ced4da;
    background-color: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.pickup-slot-select:hover {
    border-color: var(--primary-color, #DC143C);
    box-shadow: 0 0 0 2px rgba(220, 20, 60, 0.15);
}
.pickup-slot-select:focus {
    border-color: var(--primary-color, #DC143C);
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.25);
}
.dark-theme .pickup-slot-select {
    border-color: #555;
    background-color: #2d2d2d;
    color: #f1f1f1;
}
.dark-theme .pickup-slot-select:hover {
    border-color: var(--primary-color, #DC143C);
    box-shadow: 0 0 0 2px rgba(220, 20, 60, 0.2);
}
.dark-theme .pickup-slot-select:focus {
    border-color: var(--primary-color, #DC143C);
    box-shadow: 0 0 0 3px rgba(220, 20, 60, 0.3);
}

.dark-theme .order-summary {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border: 0px !important;
}

/* Dark Theme Review Page Specific */
.dark-theme .review-form {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border: 0px !important;
}

.dark-theme .rating-stars {
    color: #DC143C !important;
}

/* Dark Theme Register/Login Page Specific */
.dark-theme .auth-container {
    background: #1a1d20 !important;
    color: #f1f1f1 !important;
}

.dark-theme .auth-form {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border: 0px !important;
}

/* Dark Theme Footer Specific */
.dark-theme footer {
    background: #1a1d20 !important;
    color: #f1f1f1 !important;
    border-top: 1px solid #444 !important;
}

.dark-theme footer h5,
.dark-theme footer h6 {
    color: #f1f1f1 !important;
}

.dark-theme footer a {
    color: #DC143C !important;
}

.dark-theme footer a:hover {
    color: #ff1a4d !important;
}

.dark-theme footer .text-muted {
    color: #b0b0b0 !important;
}

/* Dark Theme Sidebar Specific */
.dark-theme .sidebar {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border-right: 1px solid #444 !important;
}

.dark-theme .sidebar-nav {
    background: #23272b !important;
}

.dark-theme .sidebar-nav .nav-link {
    color: #f1f1f1 !important;
}

.dark-theme .sidebar-nav .nav-link:hover {
    background: #2c3136 !important;
    color: #DC143C !important;
}

.dark-theme .sidebar-nav .nav-link.active {
    background: #DC143C !important;
    color: #fff !important;
}

/* Dark Theme Admin Specific */
.dark-theme .admin-panel {
    background: #1a1d20 !important;
    color: #f1f1f1 !important;
}

.dark-theme .admin-sidebar {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border-right: 1px solid #444 !important;
}

.dark-theme .admin-content {
    background: #1a1d20 !important;
    color: #f1f1f1 !important;
}

/* Dark Theme Utility Classes */
.dark-theme .bg-light {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
}

.dark-theme .bg-white {
    background: #23272b !important;
    color: #f1f1f1 !important;
}

.dark-theme .text-dark {
    color: #f1f1f1 !important;
}

.dark-theme .text-muted {
    color: #b0b0b0 !important;
}

.dark-theme .border {
    border-color: #444 !important;
}

.dark-theme .border-light {
    border-color: #444 !important;
}

.dark-theme .shadow {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.5) !important;
}

.dark-theme .shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.3) !important;
}

.dark-theme .shadow-lg {
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.7) !important;
}
.dark-theme .alert {
    background: #23272b !important;
    color: #DC143C !important;
    border-color: #DC143C !important;
}
.dark-theme .table {
    background: #23272b !important;
    color: #f1f1f1 !important;
}
.dark-theme .table th, .dark-theme .table td {
    background: #23272b !important;
    color: #f1f1f1 !important;
}
.dark-theme .bg-danger, .dark-theme .btn-danger {
    background: #c41e3a !important;
    color: #fff !important;
}
.dark-theme .text-dark {
    color: #000 !important;
}
.dark-theme .text-muted {
    color: #b0b0b0 !important;
}

/* Product Items and Cards in Dark Theme */
.product-card,
.product-item,
.dark-theme .product-card,
.dark-theme .product-item {
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.08);
    transition: box-shadow 0.2s;
    outline: none !important;
    border-radius: 0 !important;
}
.product-card:hover,
.product-item:hover,
.dark-theme .product-card:hover,
.dark-theme .product-item:hover {
    transform: none !important;
    box-shadow: 0 6px 18px 2px rgba(220, 20, 60, 0.10);
    outline: none !important;
    border-radius: 0 !important;
}
.dark-theme .category-products {
    background: transparent !important;
}
.dark-theme .product-price,
.dark-theme .add-to-cart-btn,
.dark-theme .quantity-btn-card,
.dark-theme .quantity-btn-modal {
    color: #DC143C !important;
}
.dark-theme .add-to-cart-btn {
    background: #23272b !important;
    border: 1px solid #DC143C !important;
}
.dark-theme .add-to-cart-btn:hover {
    background: #DC143C !important;
    color: #fff !important;
}

/* Desktop: Sticky filters and specials */
@media (min-width: 992px) {
    #categoryFilterSidebar {
        position: sticky;
        top: 20px;
        z-index: 10;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
    }
    
    .special-offers-sticky {
        position: sticky;
        top: 20px;
        z-index: 10;
        max-height: calc(100vh - 40px);
        overflow-y: auto;
    }
}

/* Category Filter Sidebar Thinner */
.category-filter {
    padding: 10px 0 10px 0 !important;
    min-width: 0;
}
#category-list .list-group-item {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    font-size: 0.875rem !important;
    min-height: 32px !important;
    padding-left: 18px !important;
    padding-right: 18px !important;
}

/* Category Filter Content with Images */
.category-filter-content {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 4px 8px;
    transition: all 0.3s ease;
}


.category-filter-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    transition: background 0.3s ease;
}

.category-filter-with-image:hover .category-filter-overlay,
.category-filter-with-image.active .category-filter-overlay {
    background: rgba(0,0,0,0.3);
}

.category-filter-image {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
}

.category-filter-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #6c757d;
}

.category-filter-with-image .category-filter-icon {
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.category-filter-text {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    z-index: 2;
}

/* Dark theme for category filter sidebar */
.dark-theme .category-filter {
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.10);
}
.dark-theme #category-list .list-group-item {
    color: #f1f1f1 !important;
    border-color: #444 !important;
}
.dark-theme #category-list .list-group-item.active {
    background: #DC143C !important;
    color: #fff !important;
    border-color: #DC143C !important;
}

/* NUCLEAR OPTION: Maximum specificity to override ALL conflicting styles */
#category-list .list-group-item[style*="background-image"] {
    background-color: transparent !important;
    background: transparent !important;
}

#category-list .dark-theme .list-group-item[style*="background-image"] {
    background-color: transparent !important;
    background: transparent !important;
}

#category-list .list-group-item[style*="background-image"]:hover {
    background-color: transparent !important;
    background: transparent !important;
}

#category-list .dark-theme .list-group-item[style*="background-image"]:hover {
    background-color: transparent !important;
    background: transparent !important;
}

#category-list .list-group-item[style*="background-image"].active {
    background-color: transparent !important;
    background: transparent !important;
}

#category-list .dark-theme .list-group-item[style*="background-image"].active {
    background-color: transparent !important;
    background: transparent !important;
}

/* EXTREME NUCLEAR OPTION: Even higher specificity */
body #category-list .list-group-item[style*="background-image"],
body .list-group-item[style*="background-image"] {
    background-color: transparent !important;
    background: transparent !important;
}

body #category-list .dark-theme .list-group-item[style*="background-image"],
body .dark-theme .list-group-item[style*="background-image"] {
    background-color: transparent !important;
    background: transparent !important;
}

.dark-theme .navbar-toggler .navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba%28255,255,255,1%29' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

.dropdown-menu .dropdown-item {
    border: none;
    border-radius: 0;
    background: transparent;
    color: var(--primary-color) !important;
    font-weight: 500;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    padding: 0.2rem 0.8rem;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
}
.dropdown-menu .dropdown-item i {
    margin-right: 0.6em;
}
.dropdown-menu .dropdown-item:hover, .dropdown-menu .dropdown-item:focus {
    background: var(--primary-color);
    color: #fff !important;
    border-color: var(--primary-color);
}

@media (max-width: 991.98px) {
    .dropdown-menu .dropdown-item {
        width: 100%;
        margin: 0 0 0.5rem 0;
        justify-content: flex-start;
        text-align: left;
    }
}

.dark-theme .dropdown-menu .dropdown-item {
    color: #f1f1f1 !important;
    background: transparent;
    border: none;
}
.dark-theme .dropdown-menu .dropdown-item:hover, .dark-theme .dropdown-menu .dropdown-item:focus {
    background: #f1f1f1;
    color: var(--primary-color);
}

/* Hero Slideshow Styles - Shared across all pages */
.hero-slideshow {
    position: relative;
    overflow: hidden;
}

/*
 * Legacy horizontal hero used .slide per frame. Bootstrap 5 carousel uses class "slide"
 * on the ROOT (.carousel.slide) for animation mode — the old .slide { opacity:0 } rule
 * matched that root and hid the entire hero. Scope legacy rules away from .carousel.
 */
.slide:not(.carousel) {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.slide.active:not(.carousel) {
    opacity: 1;
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 2;
    width: 80%;
    padding: 0 20px;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.slide:not(.carousel) h2 {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    line-height: 1.2;
}

.slide:not(.carousel) p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    line-height: 1.4;
}

.slide-btn {
    background: linear-gradient(45deg, #4a7c59, #2c5530);
    border: none;
    color: white;
    padding: 8px 20px;
    font-size: 1rem;
    border-radius: 0;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    min-width: 120px;
}

.slide-btn:hover {
    background: linear-gradient(45deg, #2c5530, #4a7c59);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.slide-nav {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 10px;
}

.slide-dot {
    width: 12px;
    height: 12px;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slide-dot.active {
    background: white;
    transform: scale(1.2);
}

.slide-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #DC143C;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 0;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3;
}

.slide-arrow:hover {
    background: #B22222;
    transform: translateY(-50%) scale(1.1);
}

.slide-prev {
    left: 20px;
}

.slide-next {
    right: 20px;
}

/* Slideshow Responsive Styles */
@media (max-width: 768px) {
    /*
     * Legacy horizontal hero only. Do NOT apply transform:scale to .eff-hero-bootstrap:
     * scale() does not change layout height — the enlarged slide draws on top of #pageHeroCard
     * and carousel indicators sit over the welcome row (mobile).
     */
    .hero-slideshow:not(.eff-hero-bootstrap) {
        height: 450px;
        /* Zoom in 20% on mobile */
        transform: scale(1.2);
        transform-origin: center center;
        overflow: hidden;
    }
    
    .slide-content {
        width: 90%;
        padding: 0 15px;
    }
    
    .slide:not(.carousel) h2 {
        font-size: 2.2rem;
        margin-bottom: 0.8rem;
    }
    
    .slide:not(.carousel) p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .slide-btn {
        padding: 10px 25px;
        font-size: 1rem;
        min-width: 120px;
    }
    
    .slide-arrow {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .slide-prev {
        left: 10px;
    }
    
    .slide-next {
        right: 10px;
    }
    
    .slide-nav {
        bottom: 20px;
    }
    
    .slide-dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 576px) {
    .hero-slideshow:not(.eff-hero-bootstrap) {
        height: 350px;
    }
    
    .slide:not(.carousel) h2 {
        font-size: 1.8rem;
    }
    
    .slide:not(.carousel) p {
        font-size: 0.9rem;
    }
    
    .slide-btn {
        padding: 8px 20px;
        font-size: 0.9rem;
        min-width: 100px;
    }
    
    .slide-arrow {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .slide-prev {
        left: 5px;
    }
    
    .slide-next {
        right: 5px;
    }
}

@media (max-width: 480px) {
    .hero-slideshow:not(.eff-hero-bootstrap) {
        height: 300px;
    }
    
    .slide:not(.carousel) h2 {
        font-size: 1.5rem;
    }
    
    .slide:not(.carousel) p {
        font-size: 0.8rem;
    }
    
    .slide-btn {
        padding: 6px 16px;
        font-size: 0.8rem;
        min-width: 80px;
    }
    
    .slide-arrow {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
}

@media (hover: none) and (pointer: coarse) {
    .slide-arrow {
        background: rgba(255, 255, 255, 0.3);
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .slide-dot {
        width: 15px;
        height: 15px;
    }
    
    .slide-btn {
        padding: 15px 35px;
        font-size: 1.2rem;
    }
}

/* Chat bubble widget styles - Modern Design */
#chat-bubble-widget .chat-msg {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 18px;
  max-width: 85%;
  word-break: break-word;
  position: relative;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  animation: slideIn 0.3s ease-out;
  line-height: 1.4;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#chat-bubble-widget .customer-msg {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  margin-left: auto;
  margin-right: 0;
  border-bottom-right-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,123,255,0.2);
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px 18px 4px 18px;
  position: relative;
  word-wrap: break-word;
}

#chat-bubble-widget .admin-msg {
  background: linear-gradient(135deg, #ffffff, #f8f9fa);
  border: 1px solid #e9ecef;
  margin-right: auto;
  margin-left: 0;
  border-bottom-left-radius: 6px;
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px 18px 18px 4px;
  position: relative;
  word-wrap: break-word;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#chat-bubble-widget .msg-text {
  background: linear-gradient(135deg, #DC143C, #B22222);
  color: white;
  padding: 16px 20px;
  border-radius: 20px;
  font-size: 16px;
  line-height: 1.5;
  box-shadow: 0 4px 12px rgba(220,20,60,0.2);
  display: inline-block;
  max-width: 100%;
  font-weight: 600;
  letter-spacing: 0.2px;
  word-wrap: break-word;
  position: relative;
  animation: slideIn 0.3s ease-out;
  margin-bottom: 6px;
}

#chat-bubble-widget .admin-msg .msg-text {
  background: #f8f9fa;
  color: #333;
  border: 1px solid #e9ecef;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  font-weight: 600;
}

/* Dark theme support for chat bubbles */
.dark-theme #chat-bubble-widget .admin-msg .msg-text {
  background: #4a5568;
  color: #e2e8f0;
  border-color: #718096;
}

.dark-theme #chat-bubble-widget .msg-text {
  background: linear-gradient(135deg, #DC143C, #B22222);
  color: white;
}

#chat-bubble-widget .msg-time {
  font-size: 12px;
  color: #6c757d;
  text-align: right;
  margin-top: 8px;
  font-weight: 500;
  opacity: 0.9;
}

#chat-bubble-widget .admin-msg .msg-time {
  color: #6c757d;
  text-align: left;
}

/* Dark theme support for message times */
.dark-theme #chat-bubble-widget .msg-time {
  color: #a0aec0;
}

.dark-theme #chat-bubble-widget .admin-msg .msg-time {
  color: #a0aec0;
}

#chat-bubble-widget .chat-img {
  display: block;
  margin: 8px 0;
  border-radius: 12px;
  border: 1px solid #e9ecef;
  max-width: 140px;
  max-height: 140px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform 0.2s ease;
}

#chat-bubble-widget .chat-img:hover {
  transform: scale(1.05);
}

#chat-bubble-widget .chat-profile-img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #DC143C;
  margin-right: 8px;
  vertical-align: middle;
  box-shadow: 0 2px 4px rgba(220,20,60,0.2);
}

#chat-bubble-widget .chat-header {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-bottom: 2px solid #DC143C;
  border-radius: 16px 16px 0 0;
  padding: 16px 20px;
  margin-bottom: 0;
  box-shadow: 0 4px 12px rgba(220,20,60,0.1);
  animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#chat-bubble-widget .chat-header img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #DC143C;
  box-shadow: 0 4px 8px rgba(220,20,60,0.2);
}

/* Chat bubble form styling - Enhanced */
#chat-bubble-widget input,
#chat-bubble-widget textarea {
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.3s ease;
  background: #f8f9fa;
  font-family: inherit;
  line-height: 1.4;
}

#chat-bubble-widget input:focus,
#chat-bubble-widget textarea:focus {
  outline: none;
  border-color: #DC143C;
  box-shadow: 0 0 0 4px rgba(220,20,60,0.1);
  background: #ffffff;
  transform: translateY(-1px);
}

/* Dark theme support for chat inputs */
.dark-theme #chat-bubble-widget input,
.dark-theme #chat-bubble-widget textarea {
  background: #4a5568;
  border-color: #718096;
  color: #e2e8f0;
}

.dark-theme #chat-bubble-widget input:focus,
.dark-theme #chat-bubble-widget textarea:focus {
  background: #2d3748;
  border-color: #DC143C;
  color: #f7fafc;
  box-shadow: 0 0 0 4px rgba(220,20,60,0.2);
}

#chat-bubble-widget button[type="submit"] {
  background: linear-gradient(45deg, #DC143C, #B22222);
  color: white;
  border: none;
  padding: 14px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(220,20,60,0.2);
  letter-spacing: 0.2px;
}

#chat-bubble-widget button[type="submit"]:hover {
  background: linear-gradient(45deg, #B22222, #DC143C);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(220,20,60,0.3);
}

#chat-bubble-widget button[type="submit"]:active {
  transform: translateY(0);
}

/* File input styling */
#chat-bubble-widget input[type="file"] {
  cursor: pointer;
  position: relative;
}

#chat-bubble-widget input[type="file"]::before {
  content: "📎 Attach";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  font-size: 12px;
  pointer-events: none;
}

#chat-bubble-widget input[type="file"]:hover {
  border-color: #DC143C;
  background: #ffffff;
}

/* Unread message highlighting - Enhanced */
.unread-message {
  background: linear-gradient(135deg, #fff3cd, #ffeaa7) !important;
  border-left: 4px solid #DC143C !important;
  animation: fadeIn 0.5s ease-in, pulse 2s infinite;
  box-shadow: 0 4px 12px rgba(220,20,60,0.15);
  position: relative;
}

.unread-message::before {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: #DC143C;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

/* Chat FAB: round, subtle motion — no tilt (reads as square on some browsers) */
#chat-bubble-widget #open-chat-bubble {
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 50% !important;
}

#chat-bubble-widget #open-chat-bubble:hover {
  transform: scale(1.06);
  box-shadow: 0 8px 24px rgba(220,20,60,0.45);
}

#chat-bubble-widget #open-chat-bubble:active {
  transform: scale(0.96);
}

/* Unread badge - Enhanced */
.unread-badge {
  background: #DC143C;
  color: white;
  border-radius: 50%;
  padding: 4px 8px;
  font-size: 0.7em;
  font-weight: bold;
  position: absolute;
  top: -8px;
  right: -8px;
  min-width: 20px;
  text-align: center;
  line-height: 1.2;
  box-shadow: 0 4px 8px rgba(220,20,60,0.4);
  animation: bounce 1s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-3px);
  }
  60% {
    transform: translateY(-2px);
  }
}

/* Custom scrollbar for chat messages */
#chat-bubble-messages::-webkit-scrollbar {
  width: 6px;
}

#chat-bubble-messages::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

#chat-bubble-messages::-webkit-scrollbar-thumb {
  background: #DC143C;
  border-radius: 3px;
}

#chat-bubble-messages::-webkit-scrollbar-thumb:hover {
  background: #B22222;
}

/* Enhanced message animations */
#chat-bubble-widget .chat-msg {
  margin-bottom: 16px;
  padding: 12px 16px;
  border-radius: 18px;
  max-width: 85%;
  word-break: break-word;
  position: relative;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  animation: slideIn 0.3s ease-out;
  line-height: 1.4;
  transition: all 0.2s ease;
}

#chat-bubble-widget .chat-msg:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* Enhanced form inputs with better focus states */
#chat-bubble-widget input:focus,
#chat-bubble-widget textarea:focus {
  outline: none;
  border-color: #DC143C;
  box-shadow: 0 0 0 4px rgba(220,20,60,0.1);
  background: #ffffff;
  transform: translateY(-1px);
  transition: all 0.3s ease;
}

/* Enhanced send button with loading state */
#chat-bubble-widget button[type="submit"]:disabled {
  background: #6c757d;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Enhanced file input styling */
#chat-bubble-widget input[type="file"] {
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

#chat-bubble-widget input[type="file"]::before {
  content: "📎 Attach";
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
  font-size: 12px;
  pointer-events: none;
  z-index: 1;
}

#chat-bubble-widget input[type="file"]:hover {
  border-color: #DC143C;
  background: #ffffff;
  transform: translateY(-1px);
}

/* Enhanced scrollbar styling */
#chat-bubble-messages::-webkit-scrollbar {
  width: 6px;
}

#chat-bubble-messages::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
  margin: 4px 0;
}

#chat-bubble-messages::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, #DC143C, #B22222);
  border-radius: 3px;
  transition: background 0.3s ease;
}

#chat-bubble-messages::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(45deg, #B22222, #DC143C);
}

/* Enhanced close button */
#chat-bubble-widget #close-chat-bubble {
  background: none;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

#chat-bubble-widget #close-chat-bubble:hover {
  background: rgba(255,255,255,0.2);
  transform: scale(1.1);
}

#chat-bubble-widget #close-chat-bubble:active {
  transform: scale(0.9);
}

/* Enhanced chat header */
#chat-bubble-widget .chat-header {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-bottom: 2px solid #DC143C;
  border-radius: 16px 16px 0 0;
  padding: 16px 20px;
  margin-bottom: 0;
  box-shadow: 0 4px 12px rgba(220,20,60,0.1);
  animation: fadeInUp 0.4s ease-out;
  position: relative;
  overflow: hidden;
}

#chat-bubble-widget .chat-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(220,20,60,0.1), transparent);
  transition: left 0.5s ease;
}

#chat-bubble-widget .chat-header:hover::before {
  left: 100%;
}

/* Enhanced image hover effects */
#chat-bubble-widget .chat-img {
  display: block;
  margin: 8px 0;
  border-radius: 12px;
  border: 1px solid #e9ecef;
  max-width: 140px;
  max-height: 140px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

#chat-bubble-widget .chat-img::before {
  content: '🔍';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 8px;
  border-radius: 50%;
  font-size: 16px;
  transition: all 0.3s ease;
  opacity: 0;
}

#chat-bubble-widget .chat-img:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

#chat-bubble-widget .chat-img:hover::before {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* Enhanced unread message effects */
.unread-message {
  background: linear-gradient(135deg, #fff3cd, #ffeaa7) !important;
  border-left: 4px solid #DC143C !important;
  animation: fadeIn 0.5s ease-in, pulse 2s infinite;
  box-shadow: 0 4px 12px rgba(220,20,60,0.15);
  position: relative;
  transform: translateX(5px);
}

.unread-message::before {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: #DC143C;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

.unread-message::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent, rgba(220,20,60,0.05), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

/* Enhanced responsive design */
@media (max-width: 480px) {
  /* Avoid 100vw + negative offset — causes horizontal page scroll on mobile */
  #chat-bubble-widget #chat-bubble-window {
    left: 16px;
    right: 16px;
    width: auto;
    max-width: none;
    border-radius: 16px;
  }
  
  #chat-bubble-widget .chat-msg {
    max-width: 90%;
    font-size: 13px;
    padding: 10px 14px;
  }
  
  #chat-bubble-widget .chat-img {
    max-width: 120px;
    max-height: 120px;
  }
  
  #chat-bubble-widget #open-chat-bubble {
    width: 56px;
    height: 56px;
    font-size: 20px;
  }
}

/* Enhanced dark mode support */
@media (prefers-color-scheme: dark) {
  #chat-bubble-widget #chat-bubble-window {
    background: #2d3748;
    border-color: #DC143C;
  }
  
  #chat-bubble-widget .customer-msg {
    background: linear-gradient(135deg, #4a5568, #2d3748);
    color: #e2e8f0;
    border-color: #4a5568;
  }
  
  #chat-bubble-widget input,
  #chat-bubble-widget textarea {
    background: #4a5568;
    border-color: #4a5568;
    color: #e2e8f0;
  }
  
  #chat-bubble-widget input:focus,
  #chat-bubble-widget textarea:focus {
    background: #2d3748;
    border-color: #DC143C;
  }
}

/* Enhanced profile image styling for chat messages */
#chat-bubble-widget .chat-msg .chat-profile-img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #DC143C;
  margin-right: 8px;
  vertical-align: middle;
  box-shadow: 0 2px 4px rgba(220,20,60,0.2);
  transition: transform 0.2s ease;
}

#chat-bubble-widget .chat-msg .chat-profile-img:hover {
  transform: scale(1.1);
}

/* Customer message profile info styling */
#chat-bubble-widget .customer-msg .sender-info {
  margin-bottom: 6px;
  font-size: 12px;
  color: #6c757d;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

#chat-bubble-widget .customer-msg .sender-info .profile-initials {
  width: 24px;
  height: 24px;
  background: linear-gradient(45deg, #DC143C, #B22222);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 10px;
  border: 2px solid #DC143C;
  box-shadow: 0 2px 4px rgba(220,20,60,0.2);
}

/* Admin message profile styling */
#chat-bubble-widget .admin-msg .chat-profile-img {
  border-color: #ffffff;
  box-shadow: 0 2px 4px rgba(255,255,255,0.3);
}

/* Enhanced chat header styling */
#chat-bubble-widget .chat-header {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-bottom: 2px solid #DC143C;
  border-radius: 16px 16px 0 0;
  padding: 16px 20px;
  margin-bottom: 0;
  box-shadow: 0 4px 12px rgba(220,20,60,0.1);
  animation: fadeInUp 0.4s ease-out;
  position: relative;
  overflow: hidden;
}

#chat-bubble-widget .chat-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(220,20,60,0.1), transparent);
  transition: left 0.5s ease;
}

#chat-bubble-widget .chat-header:hover::before {
  left: 100%;
}

#chat-bubble-widget .chat-header img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #DC143C;
  box-shadow: 0 4px 8px rgba(220,20,60,0.2);
  transition: transform 0.2s ease;
}

#chat-bubble-widget .chat-header img:hover {
  transform: scale(1.05);
}

#chat-bubble-widget .chat-header .fallback-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(45deg, #DC143C, #B22222);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 16px;
  border: 3px solid #DC143C;
  box-shadow: 0 4px 8px rgba(220,20,60,0.2);
  transition: transform 0.2s ease;
}

#chat-bubble-widget .chat-header .fallback-avatar:hover {
  transform: scale(1.05);
}

/* Online status indicator */
#chat-bubble-widget .online-status {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #28a745;
  font-weight: 600;
}

#chat-bubble-widget .online-status .status-dot {
  width: 6px;
  height: 6px;
  background: #28a745;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

/* Logout Button Loading State */
#logoutBtn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

#logoutBtn:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* Loading Spinner Animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.btn .fa-spinner {
  animation: spin 1s linear infinite;
}

/* Toast Notifications */
#toastContainer {
  z-index: 1100;
}

.toast {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.toast .toast-body {
  padding: 12px 16px;
  font-weight: 500;
}

.toast .btn-close {
  filter: brightness(0) invert(1);
}

/* Dark theme toast adjustments */
.dark-theme .toast {
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
} 

/* Cool Slide Toggle for Theme (header) */
.theme-toggle-switch {
    display: inline-block;
    position: relative;
    width: 56px;
    height: 28px;
    vertical-align: middle;
}
.theme-toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}
.theme-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #e9ecef;
    border-radius: 0;
    transition: background 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    display: flex;
    align-items: center;
    padding: 0 6px;
}
.theme-toggle-slider:before {
    content: '';
    position: absolute;
    left: 4px;
    top: 4px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.10);
    transition: transform 0.3s cubic-bezier(.4,2.2,.2,1), background 0.3s;
}
.theme-toggle-input:checked + .theme-toggle-slider {
    background: #343a40;
}
.theme-toggle-input:checked + .theme-toggle-slider:before {
    transform: translateX(28px);
    background: #222;
}
.theme-toggle-icons {
    width: 100%;
    display: flex;
    justify-content: space-between;
    z-index: 2;
    position: relative;
    font-size: 1.1em;
    color: #ffc107;
}
.theme-toggle-input:checked + .theme-toggle-slider .fa-sun {
    color: #adb5bd;
}
.theme-toggle-input:checked + .theme-toggle-slider .fa-moon {
    color: #f8f9fa;
}
.theme-toggle-slider .fa-sun {
    color: #ffc107;
    transition: color 0.3s;
}
.theme-toggle-slider .fa-moon {
    color: #adb5bd;
    transition: color 0.3s;
} 

/* Store closed state styles */
.store-closed .add-to-cart-btn,
.store-closed .quantity-btn,
.store-closed .quantity-input {
    pointer-events: none;
    opacity: 0.5;
}

.store-closed .add-to-cart-btn {
    background: #6c757d !important;
    cursor: not-allowed;
}

.store-closed .add-to-cart-btn:hover {
    transform: none !important;
    box-shadow: none !important;
}

/* Store closed message */
.store-closed-message {
    background: linear-gradient(45deg, #ed1c24, #c82333);
    color: white;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.store-closed-message h3 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
}

.store-closed-message p {
    margin: 0;
    font-size: 1.1rem;
    opacity: 0.9;
}
/* Default Avatar Fallback */
.review-author-image[src*="default-avatar"]:not([src*="data:"]),
img[src*="default-avatar"]:not([src*="data:"]) {
    background: #e9ecef;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-weight: bold;
    text-transform: uppercase;
}

.review-author-image[src*="default-avatar"]:not([src*="data:"]):before,
img[src*="default-avatar"]:not([src*="data:"]):before {
    content: "U";
    font-size: 1.2em;
}

.chart-compact {
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

/* Store Status Icons */
.store-status-icons {
    display: flex;
    align-items: center;
    margin-right: auto;
    padding-left: 1rem;
}

.status-icon-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.status-icon-group:hover {
    background: rgba(255, 255, 255, 0.2);
}

.status-icon-group i {
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: inline-block;
}

.willcall-icon {
    color: #6c757d;
}

.pickup-icon {
    color: #6c757d;
}

.delivery-icon {
    color: #6c757d;
}

/* Status-based icon colors */
.status-icon-group.willcall-enabled .willcall-icon {
    color: #ffc107;
}

.status-icon-group.willcall-disabled .willcall-icon {
    color: #6c757d;
}

.status-icon-group.pickup-enabled .pickup-icon {
    color: #28a745;
}

.status-icon-group.pickup-disabled .pickup-icon {
    color: #6c757d;
}

.status-icon-group.delivery-enabled .delivery-icon {
    color: #007bff;
}

.status-icon-group.delivery-disabled .delivery-icon {
    color: #6c757d;
}

/* Loading animation */
.status-icon-group.loading i {
    animation: iconPulse 1.5s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .store-status-icons {
        margin-right: 0;
        padding-left: 0.5rem;
    }
    
    .status-icon-group {
        gap: 0.5rem;
        padding: 0.25rem;
    }
    
    .status-icon-group i {
        font-size: 1rem;
        padding: 0.4rem;
    }
}

@media (max-width: 576px) {
    .store-status-icons {
        margin-right: 0;
        padding-left: 0.25rem;
    }
    
    .status-icon-group {
        gap: 0.25rem;
        padding: 0.2rem;
    }
    
    .status-icon-group i {
        font-size: 0.9rem;
        padding: 0.3rem;
    }
}

/* Dark theme support */
.dark-theme .status-icon-group {
    background: rgba(255, 255, 255, 0.05);
}

.dark-theme .status-icon-group:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Compact Store Status in Header (Legacy - keeping for compatibility) */
.compact-store-status {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    position: static;
    top: auto;
    z-index: auto;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.compact-store-status .status-content {
    padding: 0;
}

.compact-store-status .status-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.compact-store-status .status-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ed1c24 0%, #c41e3a 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.compact-store-status .status-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.compact-store-status .status-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    white-space: nowrap;
}

.compact-store-status .checkout-methods {
    border: none;
    padding: 0;
    margin: 0;
}

.compact-store-status .methods-list {
    display: flex;
    gap: 0.3rem;
    flex-wrap: wrap;
    align-items: center;
}

.compact-store-status .method-badge {
    background: #f8f9fa;
    color: #333;
    padding: 0.15rem 0.4rem;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: 500;
    border: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 0.2rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.compact-store-status .method-badge:hover {
    background: #e9ecef;
    border-color: #ed1c24;
    color: #ed1c24;
    transform: translateY(-1px);
}

.compact-store-status .method-badge i {
    font-size: 0.6rem;
}

/* Compact Store Closed State */
.compact-store-status.closed .status-icon {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
}

.compact-store-status.closed .status-title {
    color: #6c757d;
}

/* Compact Store Loading State */
.compact-store-status.loading .status-icon {
    background: linear-gradient(135deg, #ffc107 0%, #ffc107 100%);
    animation: iconSpin 1s linear infinite;
}

@keyframes iconSpin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .compact-store-status .status-header {
        gap: 0.4rem;
    }
    .compact-store-status .status-icon {
        width: 18px;
        height: 18px;
        font-size: 0.6rem;
    }
    .compact-store-status .status-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    .compact-store-status .status-title {
        font-size: 0.7rem;
    }
    .compact-store-status .methods-list {
        gap: 0.2rem;
    }
    .compact-store-status .method-badge {
        font-size: 0.55rem;
        padding: 0.1rem 0.3rem;
    }
}
@media (max-width: 576px) {
    .compact-store-status .status-header {
        gap: 0.3rem;
    }
    .compact-store-status .status-icon {
        width: 16px;
        height: 16px;
        font-size: 0.5rem;
    }
    .compact-store-status .status-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }
    .compact-store-status .status-title {
        font-size: 0.65rem;
    }
    .compact-store-status .methods-list {
        gap: 0.15rem;
    }
    .compact-store-status .method-badge {
        font-size: 0.5rem;
        padding: 0.08rem 0.25rem;
    }
}

/* Dark Theme for Compact Store Status */
.dark-theme .compact-store-status {
    background: transparent;
    border-bottom-color: transparent;
}
.dark-theme .compact-store-status .status-title {
    color: #e2e8f0;
}
.dark-theme .compact-store-status .method-badge {
    background: #4a5568;
    color: #e2e8f0;
    border-color: #718096;
}
.dark-theme .compact-store-status .method-badge:hover {
    background: #718096;
    border-color: #ed1c24;
    color: #ed1c24;
}
.dark-theme .compact-store-status.closed .status-title {
    color: #a0aec0;
}


/* Featured Items Styles - Shared across all pages */
.featured-items-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    overflow: hidden; /* Prevent content from overflowing container */
}

.featured-title {
    color: #DC143C;
    font-weight: 600;
    margin-bottom: 15px;
}

.featured-title i {
    color: #ffc107;
    margin-right: 10px;
}



/* Single Featured Item - Prominent Display */
.featured-single-item {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 25px;
    max-width: 800px;
    margin: 0 auto;
    border:3px solid #DC143C;
}

.featured-single-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.2);
}

.featured-single-item .featured-item-image-container {
    flex: 0 0 200px;
    position: relative;
}

.featured-single-item .featured-item-image {
    width: 200px;
    height:200px;
    object-fit: cover;
    border:2px solid #f0f0f0;
}

.featured-single-item .featured-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: inherit;
}

.featured-single-item .featured-item-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin: 0;
}

.featured-single-item .featured-item-description {
    color: #666;
    font-size: 1rem;
    line-height: 1.4;
    margin: 0;
}

.featured-single-item .featured-item-price {
    color: #DC143C;
    font-weight: 700;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.featured-single-item .featured-item-details {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.featured-single-item .featured-item-packaging,
.featured-single-item .featured-item-availability {
    color: #666;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.featured-single-item .featured-item-category {
    color: #DC143C;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

/* Featured Items Card Style - Uses existing review-card structure */
.featured-badge-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.featured-badge {
    background: #dc3545;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.featured-price {
    color: #dc3545;
    font-weight: 700;
    font-size: 1.125rem;
}

.featured-content {
    color: #333;
}

.featured-title {
    color: #333;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.3;
}

.featured-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.featured-image {
    margin-top: 0.5rem;
}

/* Review card buttons */
.review-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.review-btn {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.review-btn-primary {
    background: #dc3545;
    color: white;
}

.review-btn-primary:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.review-btn-secondary {
    background: #6c757d;
    color: white;
}

.review-btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* Special card buttons */
.special-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.special-btn {
    flex: 1;
    padding: 0.5rem;
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.special-btn-primary {
    background: #dc3545;
    color: white;
}

.special-btn-primary:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.special-btn-secondary {
    background: #6c757d;
    color: white;
}

.special-btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* People Also Bought Section */
.people-also-bought-section {
    border-top: 1px solid #dee2e6;
    padding-top: 1rem;
}

.people-also-bought-scroller {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.people-also-bought-track {
    display: flex;
    gap: 0.75rem;
    transition: transform 0.3s ease;
}

.people-also-bought-card {
    flex: 0 0 120px;
    background: white;
    border-radius: 8px;
    padding: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.people-also-bought-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-color: #dc3545;
}

.people-also-bought-image {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    object-fit: cover;
    margin: 0 auto 0.5rem;
}

.people-also-bought-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #333 !important;
    margin-bottom: 0.25rem;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.people-also-bought-price {
    font-size: 0.8rem;
    font-weight: 700;
    color: #dc3545;
}

/* Dark theme support for People Also Bought */
.dark-theme .people-also-bought-card {
    background: #23272b;
    border-color: #444;
    color: #f1f1f1;
}

.dark-theme .people-also-bought-title {
    color: #f1f1f1;
}

.dark-theme .people-also-bought-price {
    color: #dc3545;
}


/* Responsive Design for Featured Items */
@media (max-width: 768px) {
    .featured-single-item {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        gap:20px;
    }
    
    .featured-single-item .featured-item-image-container {
        flex:0 150px;
    }
    
    .featured-single-item .featured-item-image {
        width: 150px;
        height: 150px;
    }
    
    .featured-single-item .featured-item-title {
        font-size: 1.3rem;
    }
    
    .featured-single-item .featured-item-description {
        font-size: 0.9rem;
    }
    
    .featured-single-item .featured-item-price {
        font-size: 1.2rem;
    }
    
    .featured-single-item .featured-item-details {
        justify-content: center;
    }
    
    .featured-item-card {
        flex: 0 0 320px;
        padding: 15px;
        gap: 12px;
        width: 320px;
        max-width: 320px;
    }
    
    .featured-item-card .featured-item-image-container {
        flex:0 100px;
    }
    
    .featured-item-card .featured-item-image {
        width: 100px;
        height: 100px;
    }
    
    .featured-item-card .featured-item-title {
        font-size: 0.9rem;
    }
    
    .featured-item-card .featured-item-description {
        font-size: 0.8rem;
    }
    
    .featured-item-card .featured-item-price {
        font-size:1rem;
    }
    
    .featured-item-card .featured-item-details {
        gap: 8px;
    }
    
    .featured-item-card .featured-item-packaging,
    .featured-item-card .featured-item-availability {
        font-size: 0.75rem;
    }
    
    .featured-item-card .featured-item-category {
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    .featured-single-item {
        padding: 15px;
        gap:15px;
    }
    
    .featured-single-item .featured-item-image {
        width: 120px;
        height: 120px;
    }
    
    .featured-single-item .featured-item-title {
        font-size: 1.2rem;
    }
    
    .featured-single-item .featured-item-description {
        font-size: 0.85rem;
    }
    
    .featured-single-item .featured-item-price {
        font-size: 1.1rem;
    }
    
    .featured-single-item .featured-item-details {
        flex-direction: column;
        gap: 8px;
    }
    
    .featured-item-card {
        flex: 0 0 280px;
        padding: 12px;
        gap: 10px;
        width: 280px;
        max-width: 280px;
    }
    
    .featured-item-card .featured-item-image-container {
        flex: 0 0 80px;
    }
    
    .featured-item-card .featured-item-image {
        width: 80px;
        height:80px;
    }
    
    .featured-item-card .featured-item-title {
        font-size: 0.85rem;
    }
    
    .featured-item-card .featured-item-description {
        font-size: 0.75rem;
    }
    
    .featured-item-card .featured-item-price {
        font-size: 0.95rem;
    }
    
    .featured-item-card .featured-item-details {
        gap: 6px;
    }
    
    .featured-item-card .featured-item-packaging,
    .featured-item-card .featured-item-availability {
        font-size: 0.7rem;
    }
    
    .featured-item-card .featured-item-category {
        font-size:0.7rem;
    }
}

/* Dark theme support for featured items */
.dark-theme .featured-items-container {
    background: linear-gradient(135deg, #2d3748 0%, #1a2020 100%);
}

.dark-theme .featured-single-item {
    background: #23272b;
    border-color: #4a5568;
}

.dark-theme .featured-single-item:hover {
    background: #4a5568;
}

.dark-theme .featured-single-item .featured-item-title {
    color: #e2e8f0;
}

.dark-theme .featured-single-item .featured-item-description {
    color: #a0aec0;
}

.dark-theme .featured-item-content {
    color: white;
}

.dark-theme .featured-item-title {
    color: white;
}

.dark-theme .featured-item-description {
    color: #e0e0e0;
}

/* Section Header - Shared across all pages */
.section-header {
    background: linear-gradient(45deg, #DC143C, #B22222);
    color: white;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}
.section-header i {
    font-size: 1.1rem;
}

/* Review Slideshow Container - Shared across all pages */
.review-slideshow-container {
    border-radius: 10px;
    padding: 15px;
    min-height: 200px;
    position: relative;
}

.review-slideshow-container .review-slide {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    border-left: 4px solid #ed1c24;
}

.review-slideshow-container .review-slide:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.review-slideshow-container .review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.review-slideshow-container .review-author {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.review-slideshow-container .review-author-image {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ed1c24;
    background: #f8f9fa;
}

.review-slideshow-container .review-author-info {
    flex: 1;
}

.review-slideshow-container .review-author-name {
    font-weight: 600;
    color: #333;
    margin: 0;
    font-size: 0.9rem;
}

.review-slideshow-container .review-author-stats {
    color: #666;
    font-size: 0.75rem;
    margin: 0;
}

.review-slideshow-container .review-rating {
    text-align: right;
}

.review-slideshow-container .review-stars {
    color: #ffc107;
    font-size: 0.9rem;
}

.review-slideshow-container .review-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95rem;
    line-height: 1.3;
}

.review-slideshow-container .review-content {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 10px;
}

.review-slideshow-container .review-date {
    color: #999;
    font-size: 0.75rem;
    text-align: right;
}

.review-slideshow-container .review-nav {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    gap: 5px;
}

.review-slideshow-container .review-nav-btn {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dee2e6;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.review-slideshow-container .review-nav-btn:hover {
    background: #ed1c24;
    transform: scale(1.2);
}

.review-slideshow-container .review-nav-btn.active {
    background: #ed1c24;
    transform: scale(1.2);
}

.review-slideshow-container .review-slide {
    display: none;
}

.review-slideshow-container .review-slide.active {
    display: block;
}

.review-slideshow-container .review-slideshow-wrapper {
    position: relative;
    min-height: 200px;
}

/* Special Offers Container - Shared across all pages */
.special-offers-container {
    border-radius: 10px;
    padding: 15px;
    min-height: 200px;
}

.special-offers-container .special-offer {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    border-left: 4px solid #ed1c24;
}

.special-offers-container .special-offer:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.special-offers-container .special-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.special-offers-container .special-title {
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
    margin-bottom: 0;
    line-height: 1.3;
    flex: 1;
}

.special-offers-container .special-description {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 10px;
}

.special-offers-container .special-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.special-offers-container .special-discount {
    background: #ed1c24;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.special-offers-container .special-validity {
    color: #999;
    font-size: 0.75rem;
}

.special-offers-container .special-type {
    background: #28a745;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    text-transform: uppercase;
}

/* Special Offer Items - Match store page styling */
.special-offer-item {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    border-left: 4px solid #ed1c24;
}

.special-offer-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.special-offer-red {
    border-left-color: #ed1c24;
}

.special-offer-red:hover {
    border-left-color: #c41e3a;
}

.special-offer-yellow {
    border-left-color: #ffc107;
}

.special-offer-yellow:hover {
    border-left-color: #ffc107;
}

.special-offer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.special-offer-type {
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.special-offer-red .special-offer-type {
    background: #ed1c24;
}

.special-offer-yellow .special-offer-type {
    background: #ffc107;
    color: white;
}

.special-offer-type i {
    font-size: 0.8rem;
}

.special-offer-badge {
    background: #ed1c24;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.8rem;
}

.special-offer-yellow .special-offer-badge {
    background: #ffc107;
    color: #333;
}

.special-offer-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95rem;
    line-height: 1.3;
}

.special-offer-description {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 10px;
}

.special-offer-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.offers-transition-container {
    position: relative;
    min-height: 200px;
}

.offers-slideshow {
    position: relative;
    min-height: 200px;
}

.offer-slide {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.offer-slide.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.offers-navigation {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    gap: 5px;
}

.offer-nav-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dee2e6;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.offer-nav-dot:hover {
    background: #ed1c24;
    transform: scale(1.2);
}

.offer-nav-dot.active {
    background: #ed1c24;
    transform: scale(1.2);
}

.offer-nav-dot-yellow {
    background: #ffc107;
}

.offer-nav-dot-yellow:hover {
    background: #ffc107;
}

.offer-nav-dot-yellow.active {
    background: #ffc107;
}

.offer-nav-dot-red {
    background: #ed1c24;
}

.offer-nav-dot-red:hover {
    background: #c41e3a;
}

.offer-nav-dot-red.active {
    background: #c41e3a;
}

/* Responsive Design for Review Slideshow and Special Offers */
@media (max-width: 768px) {
    .review-slideshow-container,
    .special-offers-container {
        padding: 12px;
        min-height: 150px;
    }
    
    .review-slideshow-container .review-slide,
    .special-offers-container .special-offer {
        padding: 12px;
    }
    
    .review-slideshow-container .review-author-image {
        width: 30px;
        height: 30px;
    }
    
    .review-slideshow-container .review-author-name {
        font-size: 0.85rem;
    }
    
    .review-slideshow-container .review-title {
        font-size: 0.9rem;
    }
    
    .review-slideshow-container .review-content {
        font-size: 0.8rem;
    }
    
    .special-offer-item {
        padding: 12px;
    }
    
    .special-offer-header {
        margin-bottom: 8px;
    }
    
    .special-offer-type {
        font-size: 0.7rem;
        padding: 3px 6px;
    }
    
    .special-offer-badge {
        font-size: 0.75rem;
        padding: 3px 6px;
    }
    
    .special-offer-title {
        font-size: 0.9rem;
    }
    
    .special-offer-description {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .review-slideshow-container,
    .special-offers-container {
        padding: 10px;
    }
    
    .review-slideshow-container .review-slide,
    .special-offers-container .special-offer {
        padding: 10px;
    }
    
    .review-slideshow-container .review-author-image {
        width: 25px;
        height: 25px;
    }
    
    .review-slideshow-container .review-author-name {
        font-size: 0.8rem;
    }
    
    .review-slideshow-container .review-title {
        font-size: 0.85rem;
    }
    
    .review-slideshow-container .review-content {
        font-size: 0.75rem;
    }
    
    .special-offer-item {
        padding: 10px;
    }
    
    .special-offer-title {
        font-size: 0.85rem;
    }
    
    .special-offer-description {
        font-size: 0.75rem;
    }
}

/* Dark theme support for review slideshow and special offers */
.dark-theme .review-slideshow-container {
    background: #2c3e50;
}

.dark-theme .review-slideshow-container .review-slide {
    background: #34495e;
    border-left-color: #ed1c24;
    color: #ecf0f1;
}

.dark-theme .review-slideshow-container .review-author-name {
    color: #ecf0f1;
}

.dark-theme .review-slideshow-container .review-author-stats {
    color: #bdc3c7;
}

.dark-theme .review-slideshow-container .review-title {
    color: #ecf0f1;
}

.dark-theme .review-slideshow-container .review-content {
    color: #bdc3c7;
}

.dark-theme .review-slideshow-container .review-date {
    color: #95a5a6;
}

.dark-theme .special-offers-container {
    background: #2c3e50;
}

.dark-theme .special-offer-item {
    background: #34495e;
    border-left-color: #ed1c24;
    color: #ecf0f1;
}

.dark-theme .special-offer-title {
    color: #ecf0f1;
}

.dark-theme .special-offer-description {
    color: #bdc3c7;
}

.dark-theme .special-offer-details {
    color: #95a5a6;
}

.dark-theme .special-offer-badge {
    background: #ed1c24;
    color: white;
}

.dark-theme .special-offer-yellow .special-offer-badge {
    background: #ffc107;
    color: #333;
}

/* Edit Mode Toggle Styles */
.edit-mode-toggle {
    display: inline-block;
}

.edit-mode-toggle .btn {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 2px solid #6c757d;
    background: transparent;
    color: #6c757d;
}

.edit-mode-toggle .btn:hover {
    background: #6c757d;
    color: white;
    transform: scale(1.1);
}

.edit-mode-toggle .btn.active {
    background: #ed1c24;
    border-color: #ed1c24;
    color: white;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.3);
}

.edit-mode-toggle .btn.active:hover {
    background: #c82333;
    border-color: #c82333;
}

/* Edit Button Styles */
.edit-quick-info-btn,
.edit-quick-info-title-btn,
#editFooterTextBtn,
#editFooterPhoneBtn,
#editFooterEmailBtn,
#editFooterAddressBtn,
#editTermsBtn,
#editPrivacyBtn {
    opacity: 0;
    transition: opacity 0.3s ease;
    margin-left: 0.5rem;
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
}

.edit-mode-active .edit-quick-info-btn,
.edit-mode-active .edit-quick-info-title-btn,
.edit-mode-active #editFooterTextBtn,
.edit-mode-active #editFooterPhoneBtn,
.edit-mode-active #editFooterEmailBtn,
.edit-mode-active #editFooterAddressBtn,
.edit-mode-active #editTermsBtn,
.edit-mode-active #editPrivacyBtn {
    opacity: 1;
}

/* Footer edit button containers */
#footerTextEditBtn,
#footerPhoneEditBtn,
#footerEmailEditBtn,
#footerAddressEditBtn {
    display: none;
    margin-left: 0.5rem;
}

.edit-mode-active #footerTextEditBtn,
.edit-mode-active #footerPhoneEditBtn,
.edit-mode-active #footerEmailEditBtn,
.edit-mode-active #footerAddressEditBtn {
    display: inline-block;
}

/* Dark theme support for edit buttons */
.dark-theme .edit-mode-toggle .btn {
    border-color: #adb5bd;
    color: #adb5bd;
}

.dark-theme .edit-mode-toggle .btn:hover {
    background: #adb5bd;
    color: #212529;
}

.dark-theme .edit-mode-toggle .btn.active {
    background: #ed1c24;
    border-color: #ed1c24;
    color: white;
}

.dark-theme .edit-quick-info-btn,
.dark-theme .edit-quick-info-title-btn {
    background: #495057;
    border-color: #495057;
    color: white;
}

.dark-theme .edit-quick-info-btn:hover,
.dark-theme .edit-quick-info-title-btn:hover {
    background: #6c757d;
    border-color: #6c757d;
}

/* Site Text Edit Modal - Higher z-index to appear above other modals */
#siteTextEditModal {
    z-index: 99999 !important;
}

#siteTextEditModal .modal-dialog {
    z-index: 100000 !important;
    margin: 1.75rem auto !important;
    max-width: 500px !important;
}

#siteTextEditModal .modal-content {
    z-index: 100001 !important;
}

/* Featured Items - Tile Style (Same as category tiles) - Shared across all pages */
.featured-item-tile {
    display: flex;
    background: white;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    height: 150px;
    flex-shrink: 0;
    width: 280px;
    margin-right: 1rem;
}

/* Override for header color application */
.featured-item-tile.header-color-applied {
    background-color: var(--header-bg-color) !important;
}

.featured-popup.header-color-applied {
    background-color: var(--header-bg-color) !important;
}

.featured-popup .card.header-color-applied {
    background-color: var(--header-bg-color) !important;
}

.featured-item-tile:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.featured-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 15px;
    position: relative;
    z-index: 3;
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Override static background when header background classes are applied */
.featured-item-info.bg-primary {
    background: #007bff !important;
}

.featured-item-info.bg-secondary {
    background: #6c757d !important;
}

.featured-item-info.bg-success {
    background: #28a745 !important;
}

.featured-item-info.bg-danger {
    background: #ed1c24 !important;
}

.featured-item-info.bg-warning {
    background: #ffc107 !important;
}

.featured-item-info.bg-info {
    background: #17a2b8 !important;
}

.featured-item-info.bg-light {
    background: #f8f9fa !important;
}

.featured-item-info.bg-dark {
    background: #343a40 !important;
}

.featured-item-info.bg-white {
    background: #ffffff !important;
}

/* Remove gradient effect from featured-item-info */
.featured-item-info::after {
    display: none;
}

/* Remove gradient effects for all background classes */
.featured-item-info.bg-primary::after,
.featured-item-info.bg-secondary::after,
.featured-item-info.bg-success::after,
.featured-item-info.bg-danger::after,
.featured-item-info.bg-warning::after,
.featured-item-info.bg-info::after,
.featured-item-info.bg-light::after,
.featured-item-info.bg-dark::after,
.featured-item-info.bg-white::after {
    display: none;
}

/* Remove these rules - text colors are now handled by JavaScript */

/* Hover state for featured items - will be overridden by header color when applied */
.featured-item-tile:hover .featured-item-info {
    /* Remove the black background - let the header color control the background */
    opacity: 0.9;
}

/* Hover state for featured items with header color applied */
.featured-item-tile.header-color-applied:hover .featured-item-info {
    background-color: var(--header-bg-color) !important;
    opacity: 0.8;
}

/* Hover state for featured popup with header color applied */
.featured-popup.header-color-applied:hover .card {
    background-color: var(--header-bg-color) !important;
    opacity: 0.9;
}

.featured-item-image-section {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
}

.featured-item-image-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -10px;
    width: 20px;
    height: 100%;
    background: #f8f9fa;
    filter: blur(10px);
    z-index: 4;
    pointer-events: none;
}

.featured-item-image {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.featured-item-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.featured-item-tile:hover .featured-item-image img {
    transform: scale(1.05);
}

.featured-item-content {
    text-align: center;
    color: inherit;
}

.featured-item-content h6 {
    color: white;
    font-weight: 600;
    margin: 0;
    font-size: 1.1rem;
}

.featured-item-content .price {
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 5px;
}

.featured-item-content .packaging {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8rem;
    margin-top: 3px;
    font-weight: 500;
}

.featured-item-content .description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin-top: 5px;
    line-height: 1.3;
}



/* Featured Items Popup Ad */
.featured-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.featured-popup-overlay.show {
    display: flex;
    opacity: 1;
}

.featured-popup {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    max-width: 95vw;
    max-height: 95vh;
    width: 100%;
    min-width: 800px;
    height: 600px;
    display: flex;
    position: relative;
    transform: scale(0.7);
    transition: transform 0.3s ease;
}

.featured-popup.show {
    transform: scale(1);
}

.featured-popup-content {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.featured-popup-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
    position: relative;
    z-index: 3;
    color: white;
}

.featured-popup-info::after {
    content: '';
    position: absolute;
    top: 0;
    right: -10px;
    width: 20px;
    height: 100%;
    filter: blur(10px);
    z-index: 4;
    pointer-events: none;
}

.featured-popup-image-section {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #f8f9fa;
}

.featured-popup-image-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -10px;
    width: 20px;
    height: 100%;
    background: #f8f9fa;
    filter: blur(10px);
    z-index: 4;
    pointer-events: none;
}

.featured-popup-image {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.featured-popup-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

.featured-popup-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
}

.featured-popup-price {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.featured-popup-packaging {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 15px;
}

.featured-popup-description {
    font-size: 1rem;
    opacity: 0.8;
    text-align: center;
    line-height: 1.4;
}

.featured-popup-link {
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.featured-popup-link:hover {
    opacity: 0.8;
    text-decoration: underline;
    transform: scale(1.05);
}

.featured-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.9);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.featured-popup-close i {
    color: #000000 !important;
}

.featured-popup-close:hover {
    background: rgba(0, 0, 0, 1);
    transform: scale(1.1);
}

.featured-popup-nav {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.featured-popup-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.featured-popup-dot.active {
    background: white;
    transform: scale(1.2);
}

.featured-popup-nav-left,
.featured-popup-nav-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.featured-popup-nav-left {
    left: 15px;
}

.featured-popup-nav-right {
    right: 15px;
}

.featured-popup-nav-left:hover,
.featured-popup-nav-right:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

/* Responsive styles for featured items */
@media (max-width: 768px) {
    .featured-item-tile {
        width: 240px;
        height: 120px;
    }
    
    .featured-item-info {
        padding: 10px;
    }
    
    .featured-item-content h6 {
        font-size: 1rem;
    }
    
    .featured-item-content .price {
        font-size: 1rem;
    }
    
    .featured-item-content .packaging {
        font-size: 0.7rem;
    }
}

/* Ensure featured tile text uses header icon color and centers vertically */
.featured-item-info,
.featured-popup-info {
    color: inherit;
}

.featured-item-info .featured-item-title,
.featured-item-info .featured-item-price,
.featured-popup-info .featured-popup-title,
.featured-popup-info .featured-popup-price {
    color: inherit !important;
}

.featured-item-info .featured-item-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    text-align: center;
}

.featured-popup-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Mobile Responsive Card and Text Fixes */
/* These fixes address common issues with text running out of cards on mobile */

/* General card improvements for mobile (exclude product grid - those use padding:0 above) */
@media (max-width: 768px) {
    /* Ensure text doesn't overflow cards */
    .card-title,
    .card-text,
    .card-header {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    /* Scale down text sizes on mobile */
    .card-title {
        font-size: 1.1rem;
        line-height: 1.3;
    }
    
    .card-text {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    /* Fix button text scaling */
    .btn {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
        white-space: normal;
        word-wrap: break-word;
    }
    
    /* Fix form elements */
    .form-control,
    .form-select {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }
    
    /* Fix table text */
    .table {
        font-size: 0.85rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
        word-wrap: break-word;
    }
    
    /* Fix modal content */
    .modal-body {
        padding: 1rem;
    }
    
    .modal-title {
        font-size: 1.1rem;
    }
    
    /* Fix alert text */
    .alert {
        font-size: 0.9rem;
        padding: 0.75rem;
    }
    
    /* Fix list group items */
    .list-group-item {
        font-size: 0.9rem;
        padding: 0.75rem;
    }
    
    /* Fix dropdown items */
    .dropdown-item {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }
    
    /* Fix navbar text */
    .navbar-nav .nav-link {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }
    
    /* Fix footer text */
    footer {
        font-size: 0.85rem;
    }
    
    footer h5 {
        font-size: 1rem;
    }
    
    footer h6 {
        font-size: 0.9rem;
    }
}

/* Extra small devices */
@media (max-width: 576px) {
    /* Further reduce padding and text sizes */
    .card-title {
        font-size: 1rem;
    }
    
    .card-text {
        font-size: 0.85rem;
    }
    
    .btn {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }
    
    .form-control,
    .form-select {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }
    
    .table {
        font-size: 0.8rem;
    }
    
    .table th,
    .table td {
        padding: 0.4rem 0.2rem;
    }
    
    .modal-body {
        padding: 0.75rem;
    }
    
    .modal-title {
        font-size: 1rem;
    }
    
    .alert {
        font-size: 0.85rem;
        padding: 0.6rem;
    }
    
    .list-group-item {
        font-size: 0.85rem;
        padding: 0.6rem;
    }
    
    .dropdown-item {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }
    
    .navbar-nav .nav-link {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }
    
    footer {
        font-size: 0.8rem;
    }
    
    footer h5 {
        font-size: 0.9rem;
    }
    
    footer h6 {
        font-size: 0.85rem;
    }
}

/* Ultra small devices */
@media (max-width: 480px) {
    .card-title {
        font-size: 0.95rem;
    }
    
    .card-text {
        font-size: 0.8rem;
    }
    
    .btn {
        font-size: 0.8rem;
        padding: 0.35rem 0.5rem;
    }
    
    .form-control,
    .form-select {
        font-size: 0.8rem;
        padding: 0.35rem 0.5rem;
    }
    
    .table {
        font-size: 0.75rem;
    }
    
    .table th,
    .table td {
        padding: 0.3rem 0.15rem;
    }
    
    .modal-body {
        padding: 0.5rem;
    }
    
    .modal-title {
        font-size: 0.95rem;
    }
    
    .alert {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
    
    .list-group-item {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
    
    .dropdown-item {
        font-size: 0.8rem;
        padding: 0.35rem 0.5rem;
    }
    
    .navbar-nav .nav-link {
        font-size: 0.8rem;
        padding: 0.35rem 0.5rem;
    }
    
    footer {
        font-size: 0.75rem;
    }
    
    footer h5 {
        font-size: 0.85rem;
    }
    
    footer h6 {
        font-size: 0.8rem;
    }
}

/* Specific fixes for common card types */
@media (max-width: 768px) {
    /* Product cards - scoped to store grid */
    #products-grid .product-card,
    .family-member-card,
    .home-info-card {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    /* Featured item cards - prevent overflow */
    .featured-item-card,
    .product-tile {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
        overflow: hidden;
        word-wrap: break-word;
    }
    
    .featured-item-card .card-body,
    .product-tile .product-tile-content {
        overflow: hidden;
    }
    
    /* Product titles and descriptions - scoped to store */
    #products-grid .product-card .card-title,
    #products-grid .product-name {
        font-size: 0.9rem;
        line-height: 1.2;
        margin-bottom: 0.4rem;
    }
    
    .featured-item-card .card-title,
    .featured-item-title,
    .product-tile-title {
        font-size: 0.9rem;
        line-height: 1.2;
        margin-bottom: 0.4rem;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    
    #products-grid .product-card .card-text,
    #products-grid .product-description {
        font-size: 0.8rem;
        line-height: 1.3;
        margin-bottom: 0.4rem;
    }
    
    .featured-item-card .card-text,
    .featured-item-description {
        font-size: 0.75rem;
        line-height: 1.3;
        margin-bottom: 0.4rem;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    
    /* Prices */
    #products-grid .product-price {
        font-size: 0.9rem;
        font-weight: 600;
    }
    
    .featured-item-price,
    .product-tile-price {
        font-size: 0.9rem;
        font-weight: 600;
    }
    
    /* Family member specific */
    .family-member-name {
        font-size: 0.95rem;
        margin-bottom: 0.4rem;
    }
    
    .family-member-bio {
        font-size: 0.8rem;
        line-height: 1.3;
    }
    
    /* Review cards */
    .review-slide,
    .special-offer-item {
        padding: 0.75rem;
    }
    
    .review-title,
    .special-offer-title {
        font-size: 0.95rem;
        line-height: 1.2;
    }
    
    .review-content,
    .special-offer-description {
        font-size: 0.8rem;
        line-height: 1.3;
    }
    
    /* Quick info items */
    .info-item {
        padding: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    .info-item strong {
        font-size: 0.9rem;
    }
    
    .info-item small {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    /* Further reduce sizes for very small screens */
    .product-card,
    .featured-item-card,
    .family-member-card,
    .home-info-card {
        margin-bottom: 0;
    }
    
    
    .product-card .card-title,
    .featured-item-card .card-title,
    .product-name,
    .featured-item-title {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }
    
    .product-card .card-text,
    .featured-item-card .card-text,
    .product-description,
    .featured-item-description {
        font-size: 0.8rem;
        margin-bottom: 0.4rem;
    }
    
    .product-price,
    .featured-item-price {
        font-size: 0.9rem;
    }
    
    .family-member-name {
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
    }
    
    .family-member-bio {
        font-size: 0.75rem;
    }
    
    .review-slide,
    .special-offer-item {
        padding: 0.5rem;
    }
    
    .review-title,
    .special-offer-title {
        font-size: 0.85rem;
    }
    
    .review-content,
    .special-offer-description {
        font-size: 0.75rem;
    }
    
    .info-item {
        padding: 0.4rem;
        margin-bottom: 0.4rem;
    }
    
    .info-item strong {
        font-size: 0.8rem;
    }
    
    .info-item small {
        font-size: 0.75rem;
    }
}

/* Ensure text wrapping and overflow handling */
.card *,
.product-card *,
.featured-item-card *,
.family-member-card *,
.home-info-card *,
.review-slide *,
.special-offer-item * {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
}

/* Fix for long words and URLs */
.card *,
.product-card *,
.featured-item-card *,
.family-member-card *,
.home-info-card *,
.review-slide *,
.special-offer-item * {
    word-break: break-word;
}

/* Ensure buttons don't overflow */
.btn {
    white-space: normal;
    word-wrap: break-word;
    max-width: 100%;
}

/* Fix for form inputs */
.form-control,
.form-select,
input,
textarea,
select {
    max-width: 100%;
    box-sizing: border-box;
}

/* Fix for images */
img {
    max-width: 100% !important;
    height: auto;
}

/* Fix for tables */
.table-responsive {
    overflow-x: auto;
}

/* Fix for modals */
.modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
}

@media (max-width: 576px) {
    .modal-dialog {
        margin: 0.25rem;
        max-width: calc(100% - 0.5rem);
    }
}

/* Horizontal Scrolling Reviews */
.reviews-horizontal-scroller {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.reviews-scroll-track {
    display: flex;
    gap: 1rem;
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* Horizontal Scrolling Specials */
.specials-horizontal-scroller {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.specials-scroll-track {
    display: flex;
    gap: 1rem;
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* Auto-scroll animation for horizontal scrolling */
@keyframes scrollHorizontal {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.specials-scroll-track.auto-scroll {
    animation: scrollHorizontal 30s linear infinite;
}

.specials-scroll-track.auto-scroll:hover {
    animation-play-state: paused;
}

.reviews-scroll-track.auto-scroll {
    animation: scrollHorizontal 30s linear infinite;
}

.reviews-scroll-track.auto-scroll:hover {
    animation-play-state: paused;
}

/* Horizontal Scrolling Community */
.community-horizontal-scroller {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.community-scroll-track {
    display: flex;
    gap: 1rem;
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* Horizontal Scrolling Featured Items */
.featured-items-horizontal-scroller {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.featured-items-scroll-track {
    display: flex;
    gap: 1rem;
    transition: transform 0.1s ease-out;
    will-change: transform;
}

/* Featured items scroll container - ensure it doesn't interfere with horizontal scroller */
.featured-items-scroll {
    width: 100%;
    overflow: visible;
}

.featured-items-scroll .horizontal-scroller {
    width: 100%;
}

/* Horizontal Scroller Styles - For all pages (store, home, etc.) */
.horizontal-scroller {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 1.5rem 0;
    margin-bottom: 0;
}

.horizontal-scroller-container {
    position: relative;
    overflow: visible;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.horizontal-scroller-list {
    list-style: none;
    margin: 0;
    padding: 0 0.5rem 0.75rem 0.5rem;
    overflow-x: scroll;
    overflow-y: hidden;
    display: grid;
    grid-auto-flow: column;
    max-height: fit-content;
    gap: 0.5rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    touch-action: auto; /* Allow native touch behavior */
    scrollbar-width: thin; /* Firefox - thin scrollbar */
    scrollbar-color: #dc3545 #f0f0f0; /* Firefox - thumb and track colors */
}

.horizontal-scroller-list:active {
    cursor: grabbing;
}

/* Custom scrollbar for Chrome, Safari, Opera */
.horizontal-scroller-list::-webkit-scrollbar {
    height: 8px;
    display: block;
}

.horizontal-scroller-list::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 0;
}

.horizontal-scroller-list::-webkit-scrollbar-thumb {
    background: #dc3545;
    border-radius: 0;
    transition: background 0.3s ease;
}

.horizontal-scroller-list::-webkit-scrollbar-thumb:hover {
    background: #c82333;
}

/* Prevent text selection during drag */
.horizontal-scroller-list * {
    user-select: none;
    -webkit-user-drag: none;
}

.horizontal-scroller-item {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

/*
 * Horizontal product tiles (featured, store, home lanes, buy again): one lane width everywhere.
 * Class is set on <li> by js/functions.js createProductTile — no :has() so all browsers match.
 */
.horizontal-scroller-item.product-tile-scroll-lane {
    flex: 0 0 148px;
    min-width: 148px;
    max-width: 148px;
    width: 148px;
    box-sizing: border-box;
}

.horizontal-scroller-item.product-tile-scroll-lane > .product-tile {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    flex: 1 1 auto;
}

.horizontal-scroller-item.product-tile-scroll-lane .product-tile-image-container {
    max-width: 120px;
    margin-left: auto;
    margin-right: auto;
}

.horizontal-scroller-item.product-tile-scroll-lane .unified-cart-btn-container.compact {
    width: 100%;
    max-width: 100%;
    align-self: stretch;
    box-sizing: border-box;
}

.horizontal-scroller-item.product-tile-scroll-lane .unified-cart-btn-container.compact .unified-cart-btn-add {
    width: 100%;
    justify-content: center;
}

.horizontal-scroller-item.product-tile-scroll-lane .unified-cart-btn-container.compact .unified-cart-btn-inCart {
    width: 100%;
    flex: 1 1 auto;
    min-width: 0;
    justify-content: space-between;
}

/* Hide navigation arrows - use scrollbar instead */
.horizontal-scroller-nav {
    display: none !important;
}

.review-card {
    min-width: 300px;
    max-width: 350px;
    min-height: 280px;
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    flex-shrink: 0;
    position: relative;
    display: flex;
    flex-direction: column;
}

.featured-item-card {
    min-width: 280px;
    max-width: 320px;
    min-height: 280px;
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.featured-item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border-color: #DC143C;
}

.featured-item-card .featured-item-image-container {
    position: relative;
    width: 100%;
    height: 120px;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 0.75rem;
}

.featured-item-card .featured-item-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-item-card:hover .featured-item-image-container img {
    transform: scale(1.05);
}

.featured-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #DC143C;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.featured-item-card .featured-item-title {
    color: #333;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.3;
}

.featured-item-card .featured-item-description {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.featured-item-card .featured-item-prices {
    margin-bottom: 0.75rem;
}

.featured-item-card .featured-item-price {
    color: #DC143C;
    font-size: 1.1rem;
    font-weight: 700;
}

.featured-item-card .featured-item-availability {
    color: #28a745;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Special cards (similar to review cards) */
.special-review-card {
    min-width: 300px;
    max-width: 350px;
    min-height: 280px;
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    flex-shrink: 0;
    position: relative;
}

.special-badge-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.special-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.special-badge {
    background: #ffc107;
    color: #333;
}

.discount-badge {
    background: #ed1c24;
    color: white;
}

.special-discount {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ed1c24;
}

/* Special card styling */
.special-review-card.special-card {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    border: 2px solid #ffc107;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.2);
}

.special-review-card.special-card:hover {
    box-shadow: 0 6px 16px rgba(255, 193, 7, 0.3);
    transform: translateY(-2px);
}

.special-card .special-badge {
    background: #ffc107;
    color: #333;
}

.special-card .special-discount {
    color: #ffc107;
}

/* Discount card styling */
.discount-card .special-badge {
    background: #ed1c24;
    color: white;
}

.discount-card .special-discount {
    color: #ed1c24;
}

.special-content {
    flex: 1;
}

.special-title {
    color: #333;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.special-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.special-date {
    color: #999;
    font-size: 0.8rem;
}

.review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.review-author {
    display: flex;
    align-items: center;
    flex: 1;
}

.review-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 0.75rem;
    border: 2px solid #DC143C;
}

.review-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #DC143C;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    font-weight: bold;
    font-size: 0.9rem;
}

.review-author-info {
    flex: 1;
}

.review-author-name {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    margin: 0;
}

.review-author-stats {
    font-size: 0.75rem;
    color: #666;
    margin: 0;
}

.review-rating {
    color: #ffc107;
    font-size: 0.75rem;
}

.review-title {
    color: #333;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.review-content {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.review-date {
    color: #999;
    font-size: 0.8rem;
}

/* Dark theme support for review cards */
.dark-theme .review-card {
    background: #23272b;
    border-color: #444;
    color: #f1f1f1;
}

/* Dark theme support for community cards */
.dark-theme .community-card {
    border-color: #444;
    color: #f1f1f1;
}

.dark-theme .community-card:hover {
    border-color: #DC143C;
}

.dark-theme .community-card-content {
    color: white;
}

.dark-theme .community-card-title {
    color: white;
}

.dark-theme .community-card-author {
    color: #e0e0e0;
}

.dark-theme .community-card-date {
    color: #ccc;
}

/* Dark theme support for featured items - uses existing review-card dark theme */

/* Dark theme support for special cards */
.dark-theme .special-review-card {
    background: #23272b;
    border-color: #444;
    color: #f1f1f1;
}

.dark-theme .special-title {
    color: #f1f1f1;
}

.dark-theme .special-description {
    color: #a0aec0;
}

.dark-theme .special-date {
    color: #718096;
}

.dark-theme .featured-title {
    color: #f1f1f1;
}

.dark-theme .featured-description {
    color: #a0aec0;
}

.dark-theme .featured-price {
    color: #dc3545;
}

/* Community cards (original image-based design) */
.community-card {
    flex: 0 0 auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 2px solid #e9ecef;
    min-width: 300px;
    max-width: 350px;
    min-height: 280px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    flex-shrink: 0;
    /* Fallback background color if image fails to load */
    background-color: #f8f9fa;
}

/* Color-coded borders by post type */
.community-card.post-type-text {
    border-color: rgba(220, 53, 69, 0.3); /* Red border for text/image posts */
}

.community-card.post-type-poll {
    border-color: rgba(13, 110, 253, 0.3); /* Blue border for polls */
}

.community-card.post-type-survey {
    border-color: rgba(25, 135, 84, 0.3); /* Green border for surveys */
}

.community-card.post-type-recipe {
    border-color: rgba(255, 193, 7, 0.3); /* Yellow border for recipes */
}

.community-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.community-card.post-type-text:hover {
    border-color: rgba(220, 53, 69, 0.6);
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.25);
}

.community-card.post-type-poll:hover {
    border-color: rgba(13, 110, 253, 0.6);
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.25);
}

.community-card.post-type-survey:hover {
    border-color: rgba(25, 135, 84, 0.6);
    box-shadow: 0 8px 20px rgba(25, 135, 84, 0.25);
}

.community-card.post-type-recipe:hover {
    border-color: rgba(255, 193, 7, 0.6);
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.25);
}

.community-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.2) 100%);
    display: flex;
    align-items: flex-end;
    padding: 1.25rem;
    transition: background 0.3s ease;
}

/* Enhanced overlay with subtle color tint based on post type */
.community-card.post-type-text .community-card-overlay {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.15) 0%, rgba(0, 0, 0, 0.75) 50%, rgba(0, 0, 0, 0.2) 100%);
}

.community-card.post-type-poll .community-card-overlay {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.15) 0%, rgba(0, 0, 0, 0.75) 50%, rgba(0, 0, 0, 0.2) 100%);
}

.community-card.post-type-survey .community-card-overlay {
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.15) 0%, rgba(0, 0, 0, 0.75) 50%, rgba(0, 0, 0, 0.2) 100%);
}

.community-card.post-type-recipe .community-card-overlay {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15) 0%, rgba(0, 0, 0, 0.75) 50%, rgba(0, 0, 0, 0.2) 100%);
}

.community-card-content {
    color: white;
    width: 100%;
}

.community-card-badge {
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    display: inline-block;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Color-coded badges by post type */
.community-card-badge.post-type-text {
    background: #dc3545; /* Red for text/image posts */
}

.community-card-badge.post-type-poll {
    background: #0d6efd; /* Blue for polls */
}

.community-card-badge.post-type-survey {
    background: #198754; /* Green for surveys */
}

.community-card-badge.post-type-recipe {
    background: #ffc107; /* Yellow/Orange for recipes */
}

.community-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.community-card-author {
    font-size: 0.875rem;
    color: #e0e0e0;
    margin: 0 0 0.25rem 0;
    font-style: italic;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.community-card-date {
    font-size: 0.8rem;
    color: #d0d0d0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Featured item cards (similar to community cards) */
.featured-item-card {
    min-width: 300px;
    max-width: 350px;
    background: white;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.featured-item-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border-color: #ffc107;
}

.featured-item-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.featured-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.4) 100%);
    display: flex;
    align-items: flex-end;
    padding: 1rem;
}

.featured-item-content {
    color: white;
    width: 100%;
}

.featured-item-badge {
    background: #ffc107;
    color: #333;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.featured-item-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    line-height: 1.3;
    color: white;
}

.featured-item-price {
    font-size: 1rem;
    font-weight: 700;
    color: #ffc107;
    margin-bottom: 0.5rem;
}

.featured-item-description {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    color: #f0f0f0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Special offer cards (similar to review cards) */
.special-review-card {
    min-width: 300px;
    max-width: 350px;
    background: white;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    flex-shrink: 0;
}

.special-review-card .special-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.special-review-card .special-type {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #666;
}

.special-review-card .special-type i {
    color: #DC143C;
}

/* Removed conflicting rule - using specific card type styling instead */

.special-review-card .special-title {
    color: #333;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.3;
}

.special-review-card .special-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.special-review-card .special-details {
    font-size: 0.85rem;
    color: #555;
}

.special-review-card .special-min-order {
    display: block;
    margin-bottom: 0.25rem;
}

.special-review-card .special-date {
    color: #787c82;
    display: block;
}

.dark-theme .review-author-name {
    color: #f1f1f1;
}

.dark-theme .special-review-card .special-title {
    color: #f1f1f1;
}

.dark-theme .special-review-card .special-description {
    color: #a0aec0;
}

.dark-theme .special-review-card .special-type {
    color: #a0aec0;
}

.dark-theme .special-review-card .special-details {
    color: #a0aec0;
}

/* Category Header Styling */
.category-header {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 200px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 2rem;
}

.category-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.3) 100%);
    z-index: 1;
}

.category-header h1,
.category-header h2,
.category-header h3,
.category-header h4,
.category-header h5,
.category-header h6,
.category-header p,
.category-header .category-title,
.category-header .category-description {
    position: relative;
    z-index: 2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

.category-header h1,
.category-header h2,
.category-header h3,
.category-header h4,
.category-header h5,
.category-header h6 {
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.category-header p,
.category-header .category-description {
    margin-bottom: 0;
    opacity: 0.95;
}

/* Enhanced Category Header - styled like product group headers */
.category-header-enhanced {
    position: relative;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    min-height: 200px;
    border-radius: 0px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    margin-bottom: 1rem;
}

.category-header-enhanced::before {
    display: none;
}

/* Category header content wrapper - styled like product group headers */
.category-header-content-full {
    flex: 0 0 60%;
    color: white;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 8px;
    margin: 1rem;
    text-align: left;
}

.category-header-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-header-title i {
    font-size: 1.8rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.category-header-title .category-name {
    font-size: 2rem;
    font-weight: 700;
}

.category-header-details {
    font-size: 1.1rem;
    margin-bottom: 0;
    opacity: 0.95;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Dark theme support for category headers */
.dark-theme .category-header::before {
    background: linear-gradient(135deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.5) 100%);
}

.dark-theme .category-header-enhanced::before {
    display: none;
}

/* Responsive design for category headers */
@media (max-width: 768px) {
    .category-header {
        min-height: 150px;
        padding: 1.5rem;
    }
    
    .category-header-enhanced {
        min-height: 150px;
        justify-content: center;
    }
    
    .category-header-content-full {
        flex: none;
        width: 100%;
        margin: 1rem;
        text-align: center;
    }
    
    .category-header-title {
        font-size: 1.6rem;
        justify-content: center;
    }
    
    .category-header-title .category-name {
        font-size: 1.6rem;
    }
    
    .category-header-details {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .category-header-enhanced {
        min-height: 120px;
        padding: 0 15px;
    }
    
    .category-header-title {
        font-size: 1.4rem;
    }
    
    .category-header-title .category-name {
        font-size: 1.4rem;
    }
    
    .category-header-title i {
        font-size: 1.3rem;
    }
    
    .category-header-details {
        font-size: 0.9rem;
    }
}

.dark-theme .review-author-stats {
    color: #a0aec0;
}

/* Featured item price styling */
.review-item-price {
    color: #DC143C;
    font-weight: 700;
    font-size: 1.1rem;
}

.dark-theme .review-title {
    color: #f1f1f1;
}

.dark-theme .review-content {
    color: #a0aec0;
}

.dark-theme .review-date {
    color: #718096;
}

/* Vertical Scrolling Lists for Special Offers */
.offers-vertical-list {
    max-height: 400px;
    overflow: hidden;
    /* Hide scrollbar for IE, Edge and Firefox */
    -ms-overflow-style: none;
    scrollbar-width: none;
    /* Add smooth scrolling */
    scroll-behavior: smooth;
}

.reviews-vertical-list::-webkit-scrollbar,
.offers-vertical-list::-webkit-scrollbar {
    display: none;
}

.reviews-vertical-list::-webkit-scrollbar-track,
.offers-vertical-list::-webkit-scrollbar-track {
    display: none;
}

.reviews-vertical-list::-webkit-scrollbar-thumb,
.offers-vertical-list::-webkit-scrollbar-thumb {
    display: none;
}

.reviews-vertical-list::-webkit-scrollbar-thumb:hover,
.offers-vertical-list::-webkit-scrollbar-thumb:hover {
    display: none;
}

/* Review Items */
.review-item {
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #fff;
    transition: all 0.3s ease, transform 0.5s ease-out;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.review-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.review-item:last-child {
    margin-bottom: 0;
}

/* Offer Items */
.offer-item {
    border-radius: 8px;
    transition: all 0.3s ease, transform 0.5s ease-out;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.offer-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.offer-item:last-child {
    margin-bottom: 0;
}

.dark-theme .review-item {
    background: #343a40;
    border-color: #495057;
    color: #f8f9fa;
}

.dark-theme .review-item:hover {
    background: #495057;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .reviews-horizontal-scroller,
    .specials-horizontal-scroller,
    .community-horizontal-scroller,
    .featured-items-horizontal-scroller {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        /* Show scrollbar on mobile for better UX */
        scrollbar-width: thin; /* Firefox */
        -ms-overflow-style: auto; /* IE and Edge */
        padding-bottom: 0.5rem; /* Space for scrollbar */
        /* Add visual cues for scrolling */
        position: relative;
        /* Add subtle shadow to indicate scrollable content */
        box-shadow: inset -10px 0 10px -10px rgba(0,0,0,0.1), inset 10px 0 10px -10px rgba(0,0,0,0.1);
    }
    .reviews-horizontal-scroller::-webkit-scrollbar,
    .specials-horizontal-scroller::-webkit-scrollbar,
    .community-horizontal-scroller::-webkit-scrollbar,
    .featured-items-horizontal-scroller::-webkit-scrollbar {
        height: 8px; /* Show scrollbar on mobile */
        display: block; /* Chrome, Safari, Opera */
    }
    .reviews-horizontal-scroller::-webkit-scrollbar-track,
    .specials-horizontal-scroller::-webkit-scrollbar-track,
    .community-horizontal-scroller::-webkit-scrollbar-track,
    .featured-items-horizontal-scroller::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }
    .reviews-horizontal-scroller::-webkit-scrollbar-thumb,
    .specials-horizontal-scroller::-webkit-scrollbar-thumb,
    .community-horizontal-scroller::-webkit-scrollbar-thumb,
    .featured-items-horizontal-scroller::-webkit-scrollbar-thumb {
        background: #dc3545;
        border-radius: 4px;
    }
    .reviews-horizontal-scroller::-webkit-scrollbar-thumb:hover,
    .specials-horizontal-scroller::-webkit-scrollbar-thumb:hover,
    .community-horizontal-scroller::-webkit-scrollbar-thumb:hover,
    .featured-items-horizontal-scroller::-webkit-scrollbar-thumb:hover {
        background: #c82333;
    }
    
    .reviews-scroll-track,
    .specials-scroll-track,
    .community-scroll-track,
    .featured-items-scroll-track {
        gap: 0.75rem;
        padding: 0.5rem 1rem; /* Add horizontal padding for better scrolling */
        display: flex;
        width: max-content;
    }
    
    .review-card,
    .special-review-card,
    .community-card,
    .featured-item-card {
        min-width: 280px;
        max-width: 280px;
        scroll-snap-align: start;
        flex-shrink: 0; /* Prevent cards from shrinking */
    }
    
    .offers-vertical-list {
        max-height: 350px;
    }
    
    .offer-item {
        padding: 12px;
        margin-bottom: 12px;
    }
}

@media (max-width: 576px) {
    .review-card,
    .special-review-card,
    .community-card,
    .featured-item-card,
    .featured-grid-card {
        min-width: 260px;
        max-width: 260px;
        padding: 0.75rem;
    }
    
    .review-avatar,
    .review-avatar-placeholder {
        width: 35px;
        height: 35px;
        margin-right: 0.5rem;
    }
    
    .review-author-name {
        font-size: 0.85rem;
    }
    
    .review-author-stats {
        font-size: 0.7rem;
    }
    
    .review-title {
        font-size: 0.9rem;
    }
    
    .review-content {
        font-size: 0.85rem;
    }
    
    .offers-vertical-list {
        max-height: 300px;
    }
    
    .offer-item {
        padding: 10px;
        margin-bottom: 10px;
    }
}

/* Hide scrollbars for reviews and specials vertical lists */
.reviews-vertical-list,
.offers-vertical-list {
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

.reviews-vertical-list::-webkit-scrollbar,
.offers-vertical-list::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.reviews-vertical-list::-webkit-scrollbar-track,
.offers-vertical-list::-webkit-scrollbar-track {
    display: none; /* Chrome, Safari, Opera */
}

.reviews-vertical-list::-webkit-scrollbar-thumb,
.offers-vertical-list::-webkit-scrollbar-thumb {
    display: none; /* Chrome, Safari, Opera */
}

.reviews-vertical-list::-webkit-scrollbar-thumb:hover,
.offers-vertical-list::-webkit-scrollbar-thumb:hover {
    display: none; /* Chrome, Safari, Opera */
}

/* Product Modal Styles */
.product-modal-image {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.image-slideshow-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Product modal image container - align to top and theme */
#productModal .image-slideshow-container {
    display: flex;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    background: var(--card-bg, #f8f9fa);
    border: 1px solid var(--border-color, #dee2e6);
}

.dark-theme #productModal .image-slideshow-container {
    background: var(--card-bg, #2d2d2d);
    border-color: var(--border-color, #444);
}

/* Align modal images to top instead of center */
#productModal .slideshow-image-wrapper,
#productModal .image-slideshow .slideshow-image-wrapper {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    background-position: top center !important;
    background-size: contain !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease-in-out !important;
    z-index: 1 !important;
}

/* Active image should be visible */
#productModal .slideshow-image-wrapper.active,
#productModal .image-slideshow .slideshow-image-wrapper.active {
    opacity: 1 !important;
    z-index: 2 !important;
}

#productModal .slideshow-image-wrapper.active,
#productModal .image-slideshow .slideshow-image-wrapper.active {
    align-items: flex-start !important;
    justify-content: flex-start !important;
    background-position: top center !important;
    background-size: contain !important;
}

/* Ensure the image inside the wrapper is also aligned to top */
#productModal .slideshow-image-wrapper img,
#productModal .slideshow-image-wrapper .slideshow-image {
    object-position: top center !important;
    object-fit: contain !important;
}

#productModal .image-slideshow-container {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
}

#productModal .image-slideshow {
    position: relative !important;
    width: 100% !important;
    height: 300px !important; /* Desktop height */
    overflow: hidden !important;
}

/* Mobile: Make modal image larger */
@media (max-width: 768px) {
    #productModal .image-slideshow-container {
        height: 450px !important; /* Larger on mobile */
        min-height: 450px;
    }
    
    #productModal .image-slideshow {
        height: 450px !important; /* Larger on mobile */
        min-height: 450px;
    }
    
    #productModal .modal-slide,
    #productModal .slideshow-image-wrapper,
    #productModal .slideshow-image-wrapper img,
    #productModal .slideshow-image-wrapper .slideshow-image {
        height: 450px !important;
        min-height: 450px;
    }
}

.image-slideshow {
    position: relative;
    width: 100%;
    height: 100%;
}

.slideshow-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.slideshow-image.active {
    opacity: 1;
}

/* Optional: visual debug style you liked */
#productModal .slideshow-image.active {
    border: 2px solid red;
    z-index: 10;
}

/* Fullscreen slideshow image styles */
#fullscreenImageSlideshow {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
}

#fullscreenImageSlideshow .fullscreen-image {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease-in-out !important;
    z-index: 1 !important;
    display: none !important;
}

#fullscreenImageSlideshow .fullscreen-image.active {
    opacity: 1 !important;
    z-index: 2 !important;
    display: block !important;
}

/* Fullscreen modal navigation buttons */
.image-lightbox-nav {
    background: rgba(0, 0, 0, 0.5) !important;
    color: white !important;
    border: none !important;
    border-radius: 50% !important;
    width: 50px !important;
    height: 50px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: background 0.3s ease !important;
    margin: 0 20px !important;
}

.image-lightbox-nav:hover {
    background: rgba(0, 0, 0, 0.7) !important;
}

.image-lightbox-nav i {
    font-size: 1.5rem !important;
}

/* Fullscreen modal indicators */
#fullscreenIndicators {
    gap: 8px !important;
}

.image-lightbox-indicator {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.5) !important;
    cursor: pointer !important;
    transition: background 0.3s ease !important;
}

.image-lightbox-indicator.active {
    background: rgba(255, 255, 255, 1) !important;
}

/* Ensure Bootstrap modal appears above fixed header (header z-index = 12000) */
.modal,
.modal.show {
    z-index: 13000 !important;
}

.modal .modal-dialog,
.modal.show .modal-dialog {
    z-index: 13005 !important;
    position: relative;
}

.modal-backdrop {
    z-index: 12990 !important;
}

/* Checkout: delivery terms modal — default width; on small screens match left/right gutter */
#deliveryAcknowledgementModal .delivery-acknowledgement-dialog {
    max-width: 500px;
}

@media (max-width: 576px) {
    #deliveryAcknowledgementModal .delivery-acknowledgement-dialog {
        width: calc(100% - 1.5rem);
        max-width: none;
        margin-left: 0.75rem;
        margin-right: 0.75rem;
    }
}

/* Modal in-cart badge layout */
#productModal #modalCartCount {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}
/* Product card quantity buttons */
.quantity-btn-card, .quantity-btn-modal {
    width: 38px;
    height: 38px;
    border-radius: 0 !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: bold;
    background: #fff;
    border: 2px solid #DC143C;
    color: #DC143C;
    margin: 0 6px;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    cursor: pointer;
}

.quantity-btn-card:hover, .quantity-btn-modal:hover {
    background: #DC143C;
    color: #fff;
    border-color: #B22222;
    transform: scale(1.12);
}

.quantity-input {
    margin: 0 8px;
    width: 60px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 5px;
    font-size: 1.1rem;
}

/* Stack quantity input on top, keep buttons side-by-side on mobile */
@media (max-width: 768px) {
    .product-card .d-flex.align-items-center.mb-2 {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 8px !important;
    }
    
    .product-card .quantity-input {
        order: -1;
        width: 100%;
        max-width: 120px;
        margin: 0 auto !important;
        flex-basis: 100%;
    }
    
    .product-card .quantity-btn-card {
        flex: 0 0 auto;
        width: auto;
        min-width: 50px;
    }
}

/* Modal quantity buttons */
.quantity-btn-modal {
    width: 38px;
    height: 38px;
    border-radius: 0 !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: bold;
    background: #fff;
    border: 1px solid #dee2e6;
    color: #DC143C;
    margin: 0 6px;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    cursor: pointer;
}

.quantity-btn-modal:hover {
    background: #DC143C;
    color: #fff;
    border-color: #B22222;
    transform: scale(1.05);
}

/* Center quantity controls in product modal */
#productModal .quantity-controls {
    display: flex;
    justify-content: center;
}

#productModal .quantity-controls .d-flex {
    justify-content: center;
    align-items: center;
    gap: 8px;
}

#productModal #modalQuantityInput {
    width: 72px;
    text-align: center;
}

/* Prefer no body padding shift or lock when modal opens */
body.modal-open {
    padding-right: 0 !important;
}

/* When in edit mode, do not lock scrolling */
body.edit-mode-active.modal-open,
body.admin-user.edit-mode-active.modal-open {
    overflow: auto !important;
    padding-right: 0 !important;
}

.slideshow-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 10;
}

.slideshow-nav:hover {
    background: rgba(0, 0, 0, 0.7);
}

.slideshow-prev {
    left: 10px;
}

.slideshow-next {
    right: 10px;
}

/* Related Products (People Also Bought) Styles */
.related-product-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 8px;
    background: var(--card-bg, #fff);
    transition: all 0.3s ease;
}

.related-product-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.dark-theme .related-product-item {
    background: var(--card-bg, #23272b);
    border-color: var(--border-color, #444);
    color: var(--text-color, #f1f1f1);
}

/* Light theme - ensure dark text */
.related-product-item .related-product-name,
.related-product-item .related-product-price {
    color: #333 !important;
}

/* Dark theme override */
.dark-theme .related-product-item .related-product-name,
.dark-theme .related-product-item .related-product-price {
    color: #f1f1f1 !important;
}

.related-product-image {
    width: 60px;
    height: 60px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    flex-shrink: 0;
}

.dark-theme .related-product-image {
    background-color: #2d2d2d;
    border-color: #444;
}

.related-product-details {
    flex: 1;
    cursor: pointer;
    min-width: 0;
}

.related-product-name {
    font-weight: 600;
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
    color: #333 !important;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.dark-theme .related-product-name {
    color: #f1f1f1 !important;
}

.related-product-price {
    font-size: 0.8rem;
    margin-bottom: 0;
    color: #333 !important;
}

.dark-theme .related-product-price {
    color: #f1f1f1 !important;
}

.related-product-actions {
    flex-shrink: 0;
    margin-top: 0;
}

/* Themed People Also Bought Section */
.related-products-column.themed-card {
    background: var(--card-bg, #fff);
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 8px;
    padding: 1rem;
}

.related-products-column .themed-title {
    color: var(--text-color, #333);
    font-weight: 600;
}

.dark-theme .related-products-column.themed-card {
    background: #23272b;
    border-color: #444;
}

.dark-theme .related-products-column .themed-title {
    color: #f1f1f1;
}

.dark-theme .related-product-price {
    color: #d1d1d1;
}

.related-product-item.related-product-special {
    border-color: #ffc107;
    background: linear-gradient(to bottom, #fff9e6 0%, var(--card-bg, #fff) 20%);
}

.dark-theme .related-product-item.related-product-special {
    background: linear-gradient(to bottom, rgba(255, 193, 7, 0.1) 0%, var(--card-bg, #2d2d2d) 20%);
}

.image-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.image-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.image-indicator:hover {
    background: rgba(255, 255, 255, 0.8);
}

.image-indicator.active {
    background: white;
}

.product-modal-details {
    padding: 1rem;
}

.price-section {
    margin-bottom: 1rem;
}

.current-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ed1c24;
}

.msrp-price {
    font-size: 1rem;
    color: #6c757d;
    text-decoration: line-through;
}

.product-info {
    margin-bottom: 1rem;
}

.info-item {
    margin-bottom: 0.5rem;
}

.info-item strong {
    color: #495057;
}

.quantity-controls {
    margin-bottom: 1rem;
}

#modalQuantityInput {
    width: 60px;
    text-align: center;
    border: 1px solid #ced4da;
    border-radius: 4px;
    margin: 0 10px;
}

/* Responsive Modal Styles */
@media (max-width: 768px) {
    .product-modal-image {
        height: 250px;
    }
    
    .slideshow-nav {
        width: 35px;
        height: 35px;
    }
    
    .slideshow-prev {
        left: 5px;
    }
    
    .slideshow-next {
        right: 5px;
    }
    
    .image-indicators {
        bottom: 5px;
    }
    
    .image-indicator {
        width: 10px;
        height: 10px;
    }
    
    .product-modal-details {
        padding: 0.5rem;
    }
    
    .current-price {
        font-size: 1.25rem;
    }
    
    .quantity-btn-modal {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    #modalQuantityInput {
        width: 50px;
        margin: 0 8px;
    }
}

@media (max-width: 576px) {
    .product-modal-image {
        height: 200px;
    }
    
    .slideshow-nav {
        width: 30px;
        height: 30px;
    }
    
    .slideshow-nav i {
        font-size: 0.8rem;
    }
    
    .image-indicator {
        width: 8px;
        height: 8px;
    }
    
    .current-price {
        font-size: 1.1rem;
    }
    
    .quantity-btn-modal {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    #modalQuantityInput {
        width: 40px;
        margin: 0 5px;
    }
}

/* Dark theme styles for slideshow images - ensure they remain visible */
.dark-theme .hero-slideshow img,
.dark-theme .eff-hero-carousel img,
.dark-theme .slideshow-section img,
.dark-theme .slideshow-container img,
.dark-theme .slide:not(.carousel) img,
.dark-theme .slideshow-image {
    opacity: 1 !important;
    visibility: visible !important;
    filter: none !important;
}

/* Dark theme styles for product modal */
.dark-theme .product-modal-details {
    color: #e9ecef;
}

.dark-theme .info-item strong {
    color: #adb5bd;
}

.dark-theme .quantity-btn-modal {
    background: #343a40;
    border-color: #ed1c24;
    color: #ed1c24;
}

.dark-theme .quantity-btn-modal:hover {
    background: #ed1c24;
    color: white;
}

.dark-theme #modalQuantityInput {
    background: #343a40;
    border-color: #495057;
    color: #e9ecef;
}

.dark-theme #modalQuantityInput:focus {
    background: #495057;
    border-color: #ed1c24;
    color: #e9ecef;
}

/* Ensure slideshow videos are visible in dark mode */
.dark-theme .hero-slideshow video,
.dark-theme .slideshow-section video,
.dark-theme .slideshow-container video,
.dark-theme .slide:not(.carousel) video {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Override any dark theme inheritance for slideshow elements */
.dark-theme .hero-slideshow *,
.dark-theme .slideshow-section *,
.dark-theme .slideshow-container *,
.dark-theme .slide:not(.carousel) * {
    color: inherit !important;
}

/* Ensure slideshow text remains visible */
.dark-theme .slideshow-caption,
.dark-theme .slide-caption,
.dark-theme .slideshow-text {
    color: #fff !important;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8) !important;
}

/* Override dark theme for slideshow navigation */
.dark-theme .slide-nav,
.dark-theme .slide-dot {
    background-color: rgba(255, 255, 255, 0.8) !important;
    color: #333 !important;
}

.dark-theme .slide-dot.active {
    background-color: #fff !important;
}

.dark-theme .slide-arrow {
    background-color: #DC143C !important;
    color: white !important;
}

.dark-theme .slide-arrow:hover {
    background-color: #B22222 !important;
    color: white !important;
}

/* Allow dynamic color inheritance in dark theme - only apply if no dynamic colors are set */
.dark-theme .card-header[class*="bg-"]:not([style*="background"]) {
    background-color: inherit !important;
}

.dark-theme .card-header.bg-primary:not([style*="background"]) {
    background-color: #007bff !important;
}

.dark-theme .card-header.bg-secondary:not([style*="background"]) {
    background-color: #6c757d !important;
}

.dark-theme .card-header.bg-success:not([style*="background"]) {
    background-color: #28a745 !important;
}

.dark-theme .card-header.bg-danger:not([style*="background"]) {
    background-color: #ed1c24 !important;
}

.dark-theme .card-header.bg-warning:not([style*="background"]) {
    background-color: #ffc107 !important;
}

.dark-theme .card-header.bg-info:not([style*="background"]) {
    background-color: #17a2b8 !important;
}

.dark-theme .card-header.bg-light:not([style*="background"]) {
    background-color: #f8f9fa !important;
}

.dark-theme .card-header.bg-dark:not([style*="background"]) {
    background-color: #343a40 !important;
}

/* Ensure text color is white for colored headers */
.dark-theme .card-header[class*="bg-"]:not(.bg-light) {
    color: #fff !important;
}

.dark-theme .card-header.bg-light {
    color: #333 !important;
}

/* Store Filter Theming */
.dark-theme .view-toggle-btn,
.dark-theme .attribute-toggle-btn,
.dark-theme .grouping-toggle-btn,
.dark-theme .filter-btn {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border-color: #444 !important;
}

.dark-theme .view-toggle-btn:hover,
.dark-theme .attribute-toggle-btn:hover,
.dark-theme .grouping-toggle-btn:hover,
.dark-theme .filter-btn:hover {
    background: #3a3f44 !important;
    color: #f1f1f1 !important;
}

.dark-theme .view-toggle-btn.active,
.dark-theme .attribute-toggle-btn.active,
.dark-theme .grouping-toggle-btn.active,
.dark-theme .filter-btn.active {
    background: #DC143C !important;
    color: #fff !important;
    border-color: #DC143C !important;
}

/* Attribute Filters Container - Ensure full width */
.attribute-filters {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}

/* Desktop wide screens: 2-column layout for filters */
@media (min-width: 1400px) {
    /* Category list - 2 columns */
    #category-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    #category-list .list-group-item {
        margin-bottom: 0;
    }
    
    /* Special/Featured buttons - 2 columns */
    .special-featured-buttons-container {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .special-items-toggle,
    .featured-items-toggle {
        width: 100% !important;
        margin: 0 !important;
    }
    
    /* Attribute filters - 2 columns */
    .attribute-filters-container {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    
    .attribute-filters-container .attribute-toggle-btn {
        width: 100% !important;
    }
    
    /* Product groups filter - keep original layout, don't force 2 columns */
    .filter-container {
        display: block;
    }
    
    /* Product group tiles - 2 columns like attribute filters */
    .product-groups-filter .product-group-tiles,
    .filter-container .product-group-tiles,
    .product-group-tiles {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 0.5rem !important;
        width: 100% !important;
    }
    
    .product-group-tile {
        width: 100% !important;
    }
}

.attribute-toggle-btn {
    width: 100%;
    text-align: center;
    padding: 0.5rem 0.75rem;
    white-space: normal;
    word-wrap: break-word;
    font-size: 0.875rem !important;
}

/* All filter buttons - consistent smaller font size */
.grouping-toggle-btn,
.view-toggle-btn,
#specialItemsToggle,
#featuredItemsToggle,
.filter-container .btn {
    font-size: 0.875rem !important;
}

.dark-theme .themed-list-group .list-group-item {
    background: #23272b !important;
    color: #f1f1f1 !important;
    border-color: #444 !important;
}

.dark-theme .themed-list-group .list-group-item:hover {
    background: #2c3136 !important;
}

.dark-theme .themed-list-group .list-group-item.active {
    background: #DC143C !important;
    color: #fff !important;
    border-color: #DC143C !important;
}

.dark-theme .themed-input,
.dark-theme .themed-btn {
    background: #2c3136 !important;
    color: #f1f1f1 !important;
    border-color: #444 !important;
}

.dark-theme .themed-input:focus,
.dark-theme .themed-btn:focus {
    background: #3a3f44 !important;
    border-color: #DC143C !important;
    color: #f1f1f1 !important;
}

/* Icon picker modal styling - make backgrounds match header colors */
.icon-option {
    background-color: transparent !important;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.icon-option:hover {
    background-color: rgba(0, 123, 255, 0.1) !important;
    border-color: #007bff;
}

.icon-option.selected {
    background-color: rgba(0, 123, 255, 0.2) !important;
    border-color: #007bff;
}

/* Color picker styling - make backgrounds match selected colors */
.color-option {
    background-color: transparent !important;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.color-option:hover {
    background-color: rgba(0, 123, 255, 0.1) !important;
    border-color: #ed1c24;
}

.color-option.selected {
    background-color: rgba(0, 123, 255, 0.2) !important;
    border-color: #ed1c24;
}

/* Extended text color utilities to match new options */
.text-primary { color: #ed1c24 !important; }
.text-secondary { color: #6c757d !important; }
.text-success { color: #0b9444 !important; }
.text-danger { color: #ed1c24 !important; }
.text-warning { color: #ffc107 !important; }
.text-info { color: #17a2b8 !important; }
.text-rose { color: #e11d48 !important; }
.text-orange { color: #f97316 !important; }
.text-amber { color: #f59e0b !important; }
.text-lime { color: #84cc16 !important; }
.text-emerald { color: #10b981 !important; }
.text-teal { color: #14b8a6 !important; }
.text-cyan2 { color: #06b6d4 !important; }
.text-sky { color: #0ea5e9 !important; }
.text-indigo { color: #6366f1 !important; }
.text-violet { color: #8b5cf6 !important; }
.text-fuchsia { color: #d946ef !important; }
.text-stone { color: #78716c !important; }
.text-eff-red { color: #ed1c24 !important; }
.text-eff-green { color: #0b9444 !important; }
.text-white { color: #ffffff !important; }
.text-gray { color: #6c757d !important; }
.text-black { color: #000000 !important; }
.text-muted { color: #6c757d !important; }
.text-light { color: #f8f9fa !important; }
.text-dark { color: #343a40 !important; }
.text-body { color: #212529 !important; }

/* Extended background color utilities to match new options */
.bg-primary { background-color: #007bff !important; }
.bg-secondary { background-color: #6c757d !important; }
.bg-success { background-color: #0b9444 !important; }
.bg-danger { background-color: #ed1c24 !important; }
.bg-warning { background-color: #ffc107 !important; }
.bg-info { background-color: #17a2b8 !important; }
.bg-rose { background-color: #e11d48 !important; }
.bg-orange { background-color: #f97316 !important; }
.bg-amber { background-color: #f59e0b !important; }
.bg-lime { background-color: #84cc16 !important; }
.bg-emerald { background-color: #10b981 !important; }
.bg-teal { background-color: #14b8a6 !important; }
.bg-cyan2 { background-color: #06b6d4 !important; }
.bg-sky { background-color: #0ea5e9 !important; }
.bg-indigo { background-color: #6366f1 !important; }
.bg-violet { background-color: #8b5cf6 !important; }
.bg-fuchsia { background-color: #d946ef !important; }
.bg-stone { background-color: #78716c !important; }
.bg-eff-red { background-color: #ed1c24 !important; }
.bg-eff-green { background-color: #0b9444 !important; }
.bg-white { background-color: #ffffff !important; }
.bg-gray { background-color: #6c757d !important; }
.bg-black { background-color: #000000 !important; }
.bg-muted { background-color: #6c757d !important; }
.bg-light { background-color: #f8f9fa !important; }
.bg-dark { background-color: #343a40 !important; }
.bg-body { background-color: #212529 !important; }

/* Apply header background color to icon options when available */
.icon-option[data-header-bg="bg-primary"] {
    background-color: #007bff !important;
}

.icon-option[data-header-bg="bg-secondary"] {
    background-color: #6c757d !important;
}

.icon-option[data-header-bg="bg-success"] {
    background-color: #28a745 !important;
}

.icon-option[data-header-bg="bg-danger"] {
    background-color: #ed1c24 !important;
}

.icon-option[data-header-bg="bg-warning"] {
    background-color: #ffc107 !important;
}

.icon-option[data-header-bg="bg-info"] {
    background-color: #17a2b8 !important;
}

.icon-option[data-header-bg="bg-light"] {
    background-color: #f8f9fa !important;
}

.icon-option[data-header-bg="bg-dark"] {
    background-color: #343a40 !important;
}

.icon-option[data-header-bg="bg-white"] {
    background-color: #ffffff !important;
}

/* Extended header background mappings for icon/color options */
.icon-option[data-header-bg="bg-rose"] { background-color: #e11d48 !important; }
.icon-option[data-header-bg="bg-orange"] { background-color: #f97316 !important; }
.icon-option[data-header-bg="bg-amber"] { background-color: #f59e0b !important; }
.icon-option[data-header-bg="bg-lime"] { background-color: #84cc16 !important; }
.icon-option[data-header-bg="bg-emerald"] { background-color: #10b981 !important; }
.icon-option[data-header-bg="bg-teal"] { background-color: #14b8a6 !important; }
.icon-option[data-header-bg="bg-cyan2"] { background-color: #06b6d4 !important; }
.icon-option[data-header-bg="bg-sky"] { background-color: #0ea5e9 !important; }
.icon-option[data-header-bg="bg-indigo"] { background-color: #6366f1 !important; }
.icon-option[data-header-bg="bg-violet"] { background-color: #8b5cf6 !important; }
.icon-option[data-header-bg="bg-fuchsia"] { background-color: #d946ef !important; }
.icon-option[data-header-bg="bg-stone"] { background-color: #78716c !important; }

/* Apply header background color to color options when available */
.color-option[data-header-bg="bg-primary"] {
    background-color: #007bff !important;
}

.color-option[data-header-bg="bg-secondary"] {
    background-color: #6c757d !important;
}

.color-option[data-header-bg="bg-success"] {
    background-color: #28a745 !important;
}

.color-option[data-header-bg="bg-danger"] {
    background-color: #ed1c24 !important;
}

.color-option[data-header-bg="bg-warning"] {
    background-color: #ffc107 !important;
}

.color-option[data-header-bg="bg-info"] {
    background-color: #17a2b8 !important;
}

.color-option[data-header-bg="bg-light"] {
    background-color: #f8f9fa !important;
}

.color-option[data-header-bg="bg-dark"] {
    background-color: #343a40 !important;
}

.color-option[data-header-bg="bg-white"] {
    background-color: #ffffff !important;
}

/* Extended mappings for color options */
.color-option[data-header-bg="bg-rose"] { background-color: #e11d48 !important; }
.color-option[data-header-bg="bg-orange"] { background-color: #f97316 !important; }
.color-option[data-header-bg="bg-amber"] { background-color: #f59e0b !important; }
.color-option[data-header-bg="bg-lime"] { background-color: #84cc16 !important; }
.color-option[data-header-bg="bg-emerald"] { background-color: #10b981 !important; }
.color-option[data-header-bg="bg-teal"] { background-color: #14b8a6 !important; }
.color-option[data-header-bg="bg-cyan2"] { background-color: #06b6d4 !important; }
.color-option[data-header-bg="bg-sky"] { background-color: #0ea5e9 !important; }
.color-option[data-header-bg="bg-indigo"] { background-color: #6366f1 !important; }
.color-option[data-header-bg="bg-violet"] { background-color: #8b5cf6 !important; }
.color-option[data-header-bg="bg-fuchsia"] { background-color: #d946ef !important; }
.color-option[data-header-bg="bg-stone"] { background-color: #78716c !important; }

/* Override hover and selected states when header background is set */
.icon-option[data-header-bg]:hover,
.color-option[data-header-bg]:hover {
    background-color: rgba(0, 123, 255, 0.3) !important;
}

.icon-option[data-header-bg].selected,
.color-option[data-header-bg].selected {
    background-color: rgba(0, 123, 255, 0.4) !important;
}

/* Apply selected color as background for color options */
.color-option.selected[data-color="text-primary"] {
    background-color: rgba(0, 123, 255, 0.2);
}

.color-option.selected[data-color="text-secondary"] {
    background-color: rgba(108, 117, 125, 0.2);
}

.color-option.selected[data-color="text-success"] {
    background-color: rgba(40, 167, 69, 0.2);
}

.color-option.selected[data-color="text-danger"] {
    background-color: rgba(220, 53, 69, 0.2);
}

.color-option.selected[data-color="text-warning"] {
    background-color: rgba(255, 193, 7, 0.2);
}

.color-option.selected[data-color="text-info"] {
    background-color: rgba(23, 162, 184, 0.2);
}

.color-option.selected[data-color="text-light"] {
    background-color: rgba(248, 249, 250, 0.2);
}

.color-option.selected[data-color="text-dark"] {
    background-color: rgba(52, 58, 64, 0.2);
}

.color-option.selected[data-color="text-muted"] {
    background-color: rgba(108, 117, 125, 0.2);
}

.color-option.selected[data-color="text-white"] {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Make all site text edit buttons match header icon colors */
.btn[onclick*="editIconColor"],
.btn[onclick*="editSiteText"],
.btn[onclick*="editSiteTextFromElement"],
.btn[onclick*="editHeaderBackground"],
.btn[onclick*="editTextColor"],
.edit-quick-info-btn,
.edit-quick-info-title-btn,
.edit-quick-info-icon-btn,
.edit-text-btn {
    color: inherit !important;
    border-color: inherit !important;
}

/* Apply icon colors to edit buttons based on their context */
.btn[onclick*="editIconColor"] i,
.btn[onclick*="editSiteText"] i,
.btn[onclick*="editSiteTextFromElement"] i,
.btn[onclick*="editHeaderBackground"] i,
.btn[onclick*="editTextColor"] i,
.edit-quick-info-btn i,
.edit-quick-info-title-btn i,
.edit-quick-info-icon-btn i,
.edit-text-btn i {
    color: inherit !important;
}

/* Apply border colors to edit buttons based on their context */
.btn[onclick*="editIconColor"],
.btn[onclick*="editSiteText"],
.btn[onclick*="editSiteTextFromElement"],
.btn[onclick*="editHeaderBackground"],
.btn[onclick*="editTextColor"] {
    border-color: inherit !important;
}

/* Ensure edit buttons inherit the color from their parent container */
.card-header .btn[onclick*="editIconColor"],
.card-header .btn[onclick*="editSiteText"],
.card-header .btn[onclick*="editSiteTextFromElement"],
.card-header .btn[onclick*="editHeaderBackground"],
.card-header .btn[onclick*="editTextColor"] {
    color: inherit !important;
    border-color: inherit !important;
}

/* Apply specific colors for different sections */
#homeFamilyHeader .btn[onclick*="editIconColor"] i { color: inherit !important; }
#homeReviewsHeader .btn[onclick*="editIconColor"] i { color: inherit !important; }
#homeOffersHeader .btn[onclick*="editIconColor"] i { color: inherit !important; }
#homeCategoriesHeader .btn[onclick*="editIconColor"] i { color: inherit !important; }
#homeFeaturedHeader .btn[onclick*="editIconColor"] i { color: inherit !important; }
#homeQuickInfoHeader .btn[onclick*="editIconColor"] i { color: inherit !important; }

#aboutFamilyHeader .btn[onclick*="editIconColor"] i { color: inherit !important; }
#aboutReviewsHeader .btn[onclick*="editIconColor"] i { color: inherit !important; }
#aboutOffersHeader .btn[onclick*="editIconColor"] i { color: inherit !important; }
#aboutCategoriesHeader .btn[onclick*="editIconColor"] i { color: inherit !important; }
#aboutValuesHeader .btn[onclick*="editIconColor"] i { color: inherit !important; }
#aboutBeginningHeader .btn[onclick*="editIconColor"] i { color: inherit !important; }

#contactFormHeader .btn[onclick*="editIconColor"] i { color: inherit !important; }
#contactInfoHeader .btn[onclick*="editIconColor"] i { color: inherit !important; }
#contactReviewsHeader .btn[onclick*="editIconColor"] i { color: inherit !important; }
#contactOffersHeader .btn[onclick*="editIconColor"] i { color: inherit !important; }
#contactCategoriesHeader .btn[onclick*="editIconColor"] i { color: inherit !important; }
#contactValuesHeader .btn[onclick*="editIconColor"] i { color: inherit !important; }

#communityReviewsHeader .btn[onclick*="editIconColor"] i { color: inherit !important; }
#communitySpecialsHeader .btn[onclick*="editIconColor"] i { color: inherit !important; }

#storeReviewsHeader .btn[onclick*="editIconColor"] i { color: inherit !important; }
#storeSpecialsHeader .btn[onclick*="editIconColor"] i { color: inherit !important; }
#storeProductsHeader .btn[onclick*="editIconColor"] i { color: inherit !important; }
#storeFilterHeader .btn[onclick*="editIconColor"] i { color: inherit !important; }

/* Specials headers: same yellow as special badges (#ffc107), not orange */
#homeOffersHeader,
#storeSpecialsHeader,
#communitySpecialsHeader {
    background: #ffc107 !important;
    color: #000 !important;
}
#homeOffersHeader .btn[onclick*="editIconColor"] i,
#homeOffersHeader .btn[onclick*="editHeaderBackground"] i,
#storeSpecialsHeader .btn[onclick*="editIconColor"] i,
#storeSpecialsHeader .btn[onclick*="editHeaderBackground"] i,
#communitySpecialsHeader .btn[onclick*="editIconColor"] i,
#communitySpecialsHeader .btn[onclick*="editHeaderBackground"] i {
    color: inherit !important;
}

/* ============================================================================
   LOADING MODAL STYLES
   ============================================================================ */

.loading-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.dark-theme .loading-modal {
    background: rgba(0, 0, 0, 0.9);
}

.loading-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 300px;
    width: 90%;
}

.dark-theme .loading-content {
    background: #181a1b;
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
    border: 1px solid #495057;
}

.loading-content .spinner-border {
    width: 3rem;
    height: 3rem;
}

.loading-content p {
    margin-top: 1rem;
    font-weight: 500;
    color: #dc3545;
}

.dark-theme .loading-content p {
    color: #dc3545;
}

/* ============================================================================
   PAGE LOADING STYLES - Hide all cards by default when loading
   ============================================================================ */


/* Modal cart buttons styling */
.modal-cart-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.modal-cart-buttons .btn {
    min-width: 200px;
    transition: all 0.3s ease;
}

.modal-cart-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Quantity controls styling */
.quantity-controls {
    margin-bottom: 2rem !important;
}

.quantity-controls .d-flex {
    justify-content: center;
}

.quantity-controls .form-control {
    width: 80px !important;
    text-align: center;
    margin: 0 1rem;
}

.quantity-controls .btn {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Hover state for featured items - will be overridden by header color when applied */
.featured-item-tile:hover .featured-item-info {
    /* Remove the black background - let the header color control the background */
    opacity: 0.9;
}

/* Hover state for featured items with header color applied */
.featured-item-tile.header-color-applied:hover .featured-item-info {
    background-color: var(--header-bg-color) !important;
    opacity: 0.8;
}

/* Hover state for featured popup with header color applied */
.featured-popup.header-color-applied:hover .card {
    background-color: var(--header-bg-color) !important;
    opacity: 0.9;
}

/* Ensure dropdown menu is always visible when shown */
.dropdown-menu {
  z-index: 3000 !important;
}

/* Ensure dropdown items are properly styled */
.dropdown-item {
  z-index: 3001 !important;
}

/* Cart Page Styles */
.cart-item {
    transition: all 0.2s ease;
    padding: 1rem 0;
}

.cart-item:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.cart-item-image {
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cart-item-placeholder {
    border: 1px solid #dee2e6;
    color: #6c757d;
}

.cart-item .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.cart-item .badge.bg-warning {
    color: #856404 !important;
    border: 1px solid #ffc107;
}

.cart-item .quantity-display {
    min-width: 40px;
    text-align: center;
    font-weight: 500;
    font-size: 1.1rem;
}

/* Special Pricing Display */
.cart-item .text-decoration-line-through {
    color: #6c757d !important;
    font-size: 0.9rem;
}

.cart-item .text-success.fw-bold {
    font-size: 1.1rem;
}

.cart-item .text-success.small {
    font-size: 0.8rem;
    font-weight: 500;
}

/* Applied Discounts Section */
#appliedDiscountsSection {
    border-top: 1px solid #dee2e6;
    padding-top: 1rem;
}

#appliedDiscountsList .bg-light {
    border: 1px solid #e9ecef;
}

/* Total Savings Section */
#totalSavingsSection .bg-success.bg-opacity-10 {
    border: 2px solid #198754;
}

/* Cart Summary Enhancements */
.cart-summary-card .card-body {
    padding: 1.5rem;
}

.cart-summary-card .py-1 {
    padding: 0.5rem 0;
}

.cart-summary-card hr {
    margin: 1rem 0;
    opacity: 0.3;
}

/* Clear Discounts Button */
#clearDiscountsSection .btn-outline-warning {
    border-color: #ffc107;
    color: #856404;
}

#clearDiscountsSection .btn-outline-warning:hover {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #000;
}

/* Action Buttons */
.btn-success.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

.btn-outline-primary {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cart-item .row {
        margin: 0;
    }
    
    .cart-item .col-md-2,
    .cart-item .col-md-4 {
        padding: 0.5rem;
        text-align: center;
    }
    
    .cart-item .col-md-2:first-child {
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .cart-item .col-md-4 {
        margin-bottom: 1rem;
    }
    
    .cart-item .quantity-display {
        min-width: 30px;
    }
}

/* Remove from cart button styling */
.remove-from-cart-btn {
    transition: all 0.2s ease;
    cursor: pointer;
}

.remove-from-cart-btn:hover {
    background-color: #ed1c24 !important;
    color: white !important;
    border-color: #ed1c24 !important;
}

.remove-from-cart-btn:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Ensure remove button doesn't interfere with modal */
.remove-from-cart-btn:active {
    transform: scale(0.95);
}

/* Cart Page Styles */

/* In Cart Display Transitions */
.in-cart-display {
    transition: all 0.3s ease;
    opacity: 1;
    transform: scale(1);
}

.in-cart-display[style*="display: none"] {
    opacity: 0;
    transform: scale(0.8);
}

/* Cart Update Visual Feedback */
.cart-badge, .floating-cart-button {
    transition: all 0.3s ease;
}

/* Floating Cart Button - Always visible when cart has items */
/* NOTE: This is the OLD styling - the new circular button styling is at line 14086 */
/* Keeping this for backward compatibility but the new circular style takes precedence */
#floatingCartButton.old-style,
.floating-cart-button.old-style {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    top: auto !important;
    left: auto !important;
    background-color: #dc3545 !important;
    color: white !important;
    border-radius: 12px !important;
    padding: 12px 16px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
    cursor: pointer !important;
    z-index: 1000 !important;
    display: none !important; /* Hidden by default, shown when cart has items */
    opacity: 0;
    transform: translateY(0) !important;
    transition: opacity 0.3s ease, transform 0.3s ease;
    min-width: 200px !important;
    margin: 0 !important;
}

#floatingCartButton.old-style.visible,
#floatingCartButton.old-style.has-items,
.floating-cart-button.old-style.visible,
.floating-cart-button.old-style.has-items {
    display: flex !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    top: auto !important;
    left: auto !important;
}

.floating-cart-button:hover {
    background-color: #c82333;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.floating-cart-content {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.floating-cart-icon {
    position: relative;
    font-size: 1.5rem;
}

.floating-cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ffc107;
    color: #000;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    border: 2px solid white;
}

.floating-cart-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.floating-cart-total {
    font-weight: bold;
    font-size: 1.1rem;
}

.floating-cart-savings {
    font-size: 0.85rem;
    color: #ffc107;
    font-weight: 600;
}

.dark-theme .floating-cart-button {
    background-color: #dc3545;
    color: white;
}

.dark-theme .floating-cart-button:hover {
    background-color: #c82333;
}

/* Show floating cart on mobile, positioned on left */
@media (max-width: 767.98px) {
    #floatingCartButton,
    .floating-cart-button {
        display: flex !important; /* Show on mobile */
        left: 20px !important; /* Position on left */
        right: auto !important;
        bottom: 20px !important;
    }
}

/* Product Card Hover Effects */
.product-card {
    transition: all 0.2s ease;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Remove from cart button styling */

/* Product attribute edit button styles */
.admin-edit-btn {
    opacity: 0.7;
    transition: opacity 0.3s ease;
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-edit-btn:hover {
    opacity: 1 !important;
    transform: scale(1.1);
    transition: all 0.2s ease;
}

/* Show admin buttons when admin is detected - same as slideshow edit button */
body.admin-user .admin-edit-btn,
.admin-edit-btn {
    opacity: 0.7 !important;
    display: flex !important;
}

body.admin-user .admin-edit-btn:hover,
.admin-edit-btn:hover {
    opacity: 1 !important;
}

/* Dark theme support for admin edit buttons */
.dark-theme .admin-edit-btn {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
}

.dark-theme .admin-edit-btn:hover {
    background-color: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

/* ============================================================================
   UNIFIED REVIEWS AND SPECIALS STYLES
   ============================================================================ */

/* Review slideshow styles */
.review-slideshow-container {
    min-height: 200px;
    position: relative;
}

.review-item {
    display: none;
    padding: 15px;
    text-align: center;
}

.review-item.active {
    display: block;
}

.review-content {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    border-left: 4px solid #dc3545;
}

.dark-theme .review-content {
    background: #343a40;
    border-left-color: #dc3545;
}

/* Review header with author info */
.review-header {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.dark-theme .review-header {
    border-bottom-color: #495057;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.review-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #dc3545;
    flex-shrink: 0;
}

.review-avatar-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dc3545, #c82333);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.review-author-info {
    flex: 1;
}

.review-author-name {
    font-weight: 600;
    color: #dc3545;
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.review-author-stats {
    font-size: 0.8rem;
    color: #6c757d;
    margin-bottom: 0;
}

.dark-theme .review-author-stats {
    color: #adb5bd;
}

.review-rating {
    color: #ffc107;
    font-weight: 600;
}

/* Review title and content */
.review-title {
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
    font-size: 1rem;
}

.dark-theme .review-title {
    color: #adb5bd;
}

.review-text {
    font-style: italic;
    margin-bottom: 15px;
    line-height: 1.5;
    color: #495057;
}

.dark-theme .review-text {
    color: #adb5bd;
}

.review-date {
    font-size: 0.8rem;
    color: #6c757d;
    text-align: right;
}

.dark-theme .review-date {
    color: #adb5bd;
}

.review-navigation {
    margin-top: 15px;
}

.review-counter {
    font-size: 0.9rem;
    color: #6c757d;
    margin: 0 10px;
}

.dark-theme .review-counter {
    color: #adb5bd;
}

/* Special offers styles */
.special-offers-container {
    min-height: 150px;
}

.special-offer-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    position: relative;
}

.dark-theme .special-offer-item {
    background: #343a40;
    border-color: #495057;
}

/* Special offers (yellow) hover effect */
.special-offer-item.border-warning:hover {
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2);
    transform: translateY(-1px);
}

/* Discounts (red) hover effect */
.special-offer-item.border-danger:hover {
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
    transform: translateY(-1px);
}

.special-offer-content {
    text-align: center;
}

.special-offer-title {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

/* Special offers title styling */
.special-offer-title.text-warning {
    color: #ffc107 !important;
}

/* Discounts title styling */
.special-offer-title.text-danger {
    color: #dc3545 !important;
}

.special-offer-description {
    margin-bottom: 8px;
    line-height: 1.4;
}

.special-offer-discount {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 5px;
}

/* Special offers discount styling */
.special-offer-discount.text-warning {
    color: #ffc107 !important;
}

/* Discounts discount styling */
.special-offer-discount.text-danger {
    color: #dc3545 !important;
}

.special-offer-validity {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Loading states */
.review-slideshow-container .spinner-border,
.special-offers-container .spinner-border {
    color: #dc3545;
}

/* ============================================================================
   SPINNING LOGO LOADER
   ============================================================================ */

@keyframes spinLikeTop {
    0% {
        transform: rotateY(0deg);
    }
    6.25% {
        transform: rotateY(22.5deg);
    }
    12.5% {
        transform: rotateY(45deg);
    }
    18.75% {
        transform: rotateY(67.5deg);
    }
    25% {
        transform: rotateY(90deg);
    }
    31.25% {
        transform: rotateY(112.5deg);
    }
    37.5% {
        transform: rotateY(135deg);
    }
    43.75% {
        transform: rotateY(157.5deg);
    }
    50% {
        transform: rotateY(180deg);
    }
    56.25% {
        transform: rotateY(202.5deg);
    }
    62.5% {
        transform: rotateY(225deg);
    }
    68.75% {
        transform: rotateY(247.5deg);
    }
    75% {
        transform: rotateY(270deg);
    }
    81.25% {
        transform: rotateY(292.5deg);
    }
    87.5% {
        transform: rotateY(315deg);
    }
    93.75% {
        transform: rotateY(337.5deg);
    }
    100% {
        transform: rotateY(360deg);
    }
}

.spinning-logo {
    width: 5rem;
    height: 5rem;
    animation: spinLikeTop 1.5s ease-in-out infinite;
    display: inline-block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border: 1px solid transparent; /* Debug border */
    min-width: 5rem;
    min-height: 5rem;
}

.spinning-logo-sm {
    width: 1.5rem;
    height: 1.5rem;
    animation: spinLikeTop 1.5s ease-in-out infinite;
    display: inline-block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.spinning-logo-lg {
    width: 4rem;
    height: 4rem;
    animation: spinLikeTop 1.5s ease-in-out infinite;
    display: inline-block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Light theme logo */
.spinning-logo-light {
    background-image: url('../images/Logo.png');
}

/* Dark theme logo */
.dark-theme .spinning-logo-light {
    background-image: url('../images/Logo.png');
}

/* Alternative logo for dark theme */
.spinning-logo-dark {
    background-image: url('../images/Logo.png');
}

/* Ensure logos are properly displayed */
.spinning-logo,
.spinning-logo-sm,
.spinning-logo-lg {
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}

/* Fallback for missing logos - show a simple spinning circle */
.spinning-logo:not([style*="background-image"]) {
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDgiIGhlaWdodD0iNDgiIHZpZXdCb3g9IjAgMCA0OCA0OCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGNpcmNsZSBjeD0iMjQiIGN5PSIyNCIgcj0iMjAiIHN0cm9rZT0iIzMzMzMzMyIgc3Ryb2tlLXdpZHRoPSI0IiBzdHJva2UtZGFzaGFycmF5PSI4IDgiLz4KPC9zdmc+');
}

/* IMG-based spinning logo (more reliable) */
.spinning-logo-container {
    width: 5rem;
    height: 5rem;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.spinning-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: spinLikeTop 1.5s ease-in-out infinite;
    transform-origin: center center;
    display: block;
}

/* Dark theme logo switching for img */
.dark-theme .spinning-logo-img[src="images/Logo.png"] {
    content: url('../images/Logo.png');
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .review-content {
        padding: 15px;
    }
    
    .special-offer-item {
        padding: 12px;
    }
    
    .review-navigation .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
}

/* Animation for review transitions */
.review-item {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Special offer animations */
.special-offer-item {
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Stagger animation for multiple special offers */
.special-offer-item:nth-child(1) { animation-delay: 0.1s; }
.special-offer-item:nth-child(2) { animation-delay: 0.2s; }
.special-offer-item:nth-child(3) { animation-delay: 0.3s; }
.special-offer-item:nth-child(4) { animation-delay: 0.4s; }

/* ============================================================================
   PRODUCT GROUP HEADER STYLES
   ============================================================================ */

.product-group-header {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.2);
    overflow: hidden;
    margin-bottom:  1rem;
}

.dark-theme .product-group-header {
    background: linear-gradient(135deg, #dc3545 0%, #a71e2a 100%);
}

.product-group-header-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 200px;
    position: relative;
    overflow: hidden;
}

.product-group-header-bg-img {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
    width: auto;
    min-width: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center center;
    pointer-events: none;
    z-index: 0;
}

/* Product group header content wrapper - styled like category headers with dark text background */
.product-group-header-content-full {
    flex: 0 0 60%;
    color: white;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 8px;
    margin-left: 20px;
}

.product-group-header-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-group-header-title i {
    font-size: 1.8rem;
}

.product-group-name {
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-group-header-details {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 10px;
    opacity: 0.95;
}

.product-group-banner-media {
    position: relative;
    overflow: hidden;
    min-height: 220px;
}

.product-group-banner-img {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
    width: auto;
    min-width: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center center;
    pointer-events: none;
    z-index: 0;
}

.product-group-banner-overlay {
    position: relative;
    z-index: 1;
}

/* Product Group Banner Content - Flex container for banners */
.product-group-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    gap: 20px;
    margin-bottom: 0;
}

.product-group-text-section {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Ensure product-group-text-section works with new content-full structure */
.product-group-header-content .product-group-text-section {
    width: 100%;
    justify-content: flex-start;
    position: relative;
    z-index: 1;
}

/* Only apply dark overlay when inside a hero banner with image */
.product-group-banner-hero .product-group-text-section {
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 8px;
    margin-right: 20px;
}

/* For simple banners (no image), no dark overlay */
.product-group-banner:not(.product-group-banner-hero) .product-group-text-section {
    background: transparent;
    padding: 0;
    margin-right: 0;
}

.product-group-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    color: inherit;
    text-shadow: none;
}

/* Text shadow only for hero banners with images */
.product-group-banner-hero .product-group-title {
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 8px;
}

.product-group-title i {
    color: #ffc107;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.product-group-description {
    font-size: 1.1rem;
    margin-bottom: 0;
    opacity: 0.95;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}


/* Active Filters Container Styles */
.filter-indicator-container {
    margin-bottom: 15px;
}

.active-filters-container {
    background: #f8f9fa !important;
    border: 2px solid #dc3545 !important;
    border-radius: 8px;
    padding: 20px;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.dark-theme .active-filters-container {
    background: #343a40 !important;
    border-color: #dc3545 !important;
}

.active-filters-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #dc3545;
    white-space: nowrap;
    flex-shrink: 0;
}

.dark-theme .active-filters-header {
    color: #ff6b6b;
}

.active-filters-header i {
    font-size: 18px;
}

.active-filters-items {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    flex: 1;
}

/* Product Group Banner Container - remove extra margins */
.product-group-banner-container {
    margin-bottom: 0;
}

.product-group-banner-container .product-group-banner {
    margin-bottom: 1.5rem;
}

.special-items-filter-header {
    margin-bottom: 1.5rem;
}

.special-items-filter-header .product-group-banner-content {
    margin-bottom: 0;
}

/* Hide category headers and containers when they're empty or all products are filtered */
.category-header-enhanced[style*="display: none"],
.category-products[style*="display: none"] {
    display: none !important;
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Default grid layout (4-column) - STACKED: image top, content bottom */
/* No special CSS needed - default card layout is already stacked */

/* Desktop: Single Item Wide Layout and List View (Desktop only) - Image left, text right with description */
@media (min-width: 769px) {
    /* Desktop: Active filters container sticky - only sticks when it reaches the top */
    .filter-indicator-container .active-filters-container {
        position: sticky;
        top: 0 !important;
        z-index: 100;
    }
    
    /* Desktop: List view - full width, image left, text right */
    #products-grid.list-view .category-products.list-view-active .product-item,
    #products-grid .category-products.list-view-active .product-item {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* Desktop: Single item category - full width, image left, text right */
    #products-grid .category-products.single-item-category .product-item {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* USE EXACT SAME CSS AS product-expanded - single-item-wide now uses same rules via selectors above */
    
    /* Content section - EXACT SAME AS product-expanded */
    .single-item-wide .single-item-info {
        flex: 1 1 auto !important;
        max-width: 67% !important;
        min-width: 0 !important;
        display: flex;
        flex-direction: column;
        flex-shrink: 1 !important;
        position: relative !important;
        min-height: 100% !important;
        height: 100% !important;
        box-sizing: border-box !important;
     }
    
    .single-item-wide .product-title {
        font-size: 1.5rem;
        font-weight: 600;
        margin-bottom: 1.25rem !important;
        line-height: 1.5 !important;
    }
    
    .single-item-wide .product-description {
        font-size: 0.95rem;
        line-height: 1.7 !important;
        color: #666;
        margin-bottom: 1.25rem !important;
        flex: 1;
    }
    
    .single-item-wide .product-price {
        margin-bottom: 1rem !important;
        line-height: 1.5 !important;
    }
    
    .single-item-wide .product-details {
        margin-bottom: 1rem !important;
        line-height: 1.5 !important;
    }
    
    .single-item-wide .special-info {
        margin-bottom: 1rem !important;
        line-height: 1.5 !important;
    }
    
    /* Match spacing for expanded cards */
    .product-item.product-expanded .product-title,
    .product-item.product-expanded .card-title {
        margin-bottom: 1.25rem !important;
        line-height: 1.5 !important;
    }
    
    .product-item.product-expanded .product-description,
    .product-item.product-expanded .product-expanded-description {
        margin-bottom: 1.25rem !important;
        line-height: 1.7 !important;
    }
    
    .product-item.product-expanded .product-price {
        margin-bottom: 1rem !important;
        line-height: 1.5 !important;
    }
    
    .product-item.product-expanded .product-details {
        margin-bottom: 1rem !important;
        line-height: 1.5 !important;
    }
    
    .product-item.product-expanded .special-info {
        margin-bottom: 1rem !important;
        line-height: 1.5 !important;
    }
    
    .dark-theme .single-item-wide .product-description {
        color: #ccc;
    }
    
    /* Two Item Layout (Desktop only) - 50/50, each with image left, text right */
    #products-grid .category-products.two-item-category {
        display: flex !important;
        flex-wrap: wrap !important; /* Allow wrapping when cards expand */
        gap: 20px !important;
    }
    
    #products-grid .category-products.two-item-category .product-item:not(.product-expanded):not(.single-item-wide):not(.featured-product) {
        flex: 0 0 calc(50% - 10px) !important;
        max-width: calc(50% - 10px) !important;
        width: calc(50% - 10px) !important;
    }
    
    /* Featured items in two-item categories should be full width on mobile too */
    #products-grid .category-products.two-item-category .product-item.single-item-wide,
    #products-grid .category-products.two-item-category .product-item.featured-product {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .two-item-layout .two-item-content {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 15px;
        padding: 15px;
    }
    
    .two-item-layout .two-item-image {
        flex: 0 0 50%;
        max-width: 50%;
        min-width: 50%;
        width: 50%;
    }
    
    .two-item-layout .two-item-image .product-image {
        width: 100%;
        height: 100%;
        min-height: 200px;
        border-radius: 8px;
        overflow: hidden;
    }
    
    .two-item-layout .two-item-info {
        flex: 0 0 50%;
        max-width: 50%;
        min-width: 50%;
        width: 50%;
        display: flex;
        flex-direction: column;
        position: relative !important; /* Needed for absolute positioning of product-actions */
        min-height: 100% !important; /* Ensure full height for button positioning */
        padding-bottom: 60px !important; /* Make room for absolutely positioned button */
    }
    
    .two-item-layout .product-title {
        font-size: 1.1rem;
        font-weight: 600;
        margin-bottom: 8px;
    }
    
    /* Position cart button at bottom right for two-item-layout cards (same as expanded 4-column layout) */
    .two-item-layout .product-actions {
        position: absolute !important;
        bottom: 15px !important;
        right: 15px !important;
        left: auto !important;
        top: auto !important;
        margin: 0 !important;
        width: auto !important;
        max-width: none !important;
        min-width: auto !important;
        display: inline-flex !important;
        justify-content: flex-end !important;
        z-index: 10 !important;
    }
    
    .two-item-layout .product-actions .unified-cart-btn-container {
        margin-top: 0 !important;
    }
}

/* Mobile: ALWAYS use list view style (image left, text right) for ALL items */
@media (max-width: 768px) {
    /* Mobile: All product items full width */
    #products-grid .category-products .product-item {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* Mobile: ALL items use list view style (image left, text right) */
    /* Structure: single-item-content > single-item-image (left) + single-item-info (right) */
    #products-grid .single-item-wide .single-item-content,
    #products-grid .category-products .single-item-wide .single-item-content {
        display: flex !important;
        flex-direction: row !important; /* Image left, text right */
        align-items: flex-start !important;
        gap: 15px !important;
        padding: 15px !important;
    }
    
    /* Left div: Image container */
    /* Mobile: Use 33% width like desktop, not fixed 150px */
    #products-grid .single-item-wide .single-item-image,
    #products-grid .category-products .single-item-wide .single-item-image {
        flex: 0 0 33% !important; /* Use 33% like desktop, not fixed 150px */
        max-width: 33% !important;
        min-width: 0 !important;
        width: 33% !important;
        flex-shrink: 0 !important;
    }
    
    /* Image inside the left div */
    /* Mobile image - EXACT SAME AS product-expanded */
    #products-grid .single-item-wide .single-item-image .product-image,
    #products-grid .category-products .single-item-wide .single-item-image .product-image,
    #products-grid .single-item-wide .product-image,
    #products-grid .single-item-wide img.product-image {
        max-height: 270px !important; /* EXACT SAME AS product-expanded mobile */
        width: 100% !important;
        object-fit: contain !important;
    }
    
    /* Right div: Info container (title, price, details, actions) */
    #products-grid .single-item-wide .single-item-info,
    #products-grid .category-products .single-item-wide .single-item-info {
        flex: 1 1 auto !important; /* Takes remaining space */
        min-width: 0 !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Hide description on mobile */
    #products-grid .single-item-wide .product-description,
    #products-grid .category-products .single-item-wide .product-description {
        display: none !important;
    }
    
    /* Mobile: Two-item layout also uses list view style */
    #products-grid .two-item-layout .two-item-content {
        display: flex !important;
        flex-direction: row !important; /* Image left, text right on mobile too */
        align-items: flex-start !important;
        gap: 15px !important;
        padding: 15px !important;
    }
    
    #products-grid .two-item-layout .two-item-image {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        min-width: 50% !important;
        width: 50% !important;
        flex-shrink: 0 !important;
    }
    
    #products-grid .two-item-layout .two-item-image .product-image {
        width: 100% !important;
        height: 100% !important;
        min-height: 200px !important;
        object-fit: cover !important;
    }
    
    #products-grid .two-item-layout .two-item-info {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        min-width: 50% !important;
        width: 50% !important;
        display: flex !important;
        flex-direction: column !important;
        position: relative !important; /* Needed for absolute positioning of cart button */
        min-height: 100% !important; /* Ensure full height for button positioning */
        padding-bottom: 60px !important; /* Make room for absolutely positioned button */
    }
    
    /* Mobile: Position cart button at bottom right for two-item-layout */
    #products-grid .two-item-layout .product-actions {
        position: absolute !important;
        bottom: 15px !important;
        right: 15px !important;
        left: auto !important;
        top: auto !important;
        margin: 0 !important;
        width: auto !important;
        display: inline-flex !important;
        justify-content: flex-end !important;
        z-index: 10 !important;
    }
}

/* Mobile responsive - stack vertically */
@media (max-width: 768px) {
    .product-group-header-content {
        flex-direction: column;
        text-align: center;
        justify-content: center;
        min-height: 150px;
    }
    
    .product-group-header-content-full {
        flex: none;
        width: calc(100% - 2rem);
        margin: 1rem;
        text-align: center;
    }
    
    .product-group-header-title {
        font-size: 1.6rem;
        justify-content: center;
    }
    
    .product-group-header-details {
        font-size: 0.9rem;
    }
    
    .product-group-banner-content {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        padding: 15px 20px;
    }
    
    .product-group-text-section {
        flex: none;
        margin-right: 0;
        margin-bottom: 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .product-group-banner-hero .product-group-text-section {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .product-group-title {
        font-size: 1.6rem;
    }
    
    .product-group-description {
        font-size: 1rem;
    }
    
    .active-filters-container {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
    }
    
    .active-filters-header {
        justify-content: center;
    }
    
    .active-filters-items {
        justify-content: center;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .product-group-header {
        padding: 0px;
    }
    
    .product-group-image-section {
        width: 80px;
        height: 80px;
    }
    
    .product-group-title {
        font-size: 1.4rem;
    }
}

/* Special Offers section in search dropdown */
.special-offers-section {
    margin: 0;
    padding: 0;
}

.special-offers-section h6 {
    color: #ffc107 !important;
    font-weight: 600 !important;
    margin: 15px 20px 10px !important;
    padding: 0 !important;
    border: none !important;
}

/* Yellow theme for special items in dropdown */
.special-item-theme {
    border-left: 3px solid #ffc107 !important;
}

.special-item-theme:hover {
    background: linear-gradient(to right, rgba(255, 193, 7, 0.1) 0%, transparent 100%) !important;
    border-left-color: #ff8c00 !important;
}

.special-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    padding: 0 20px 15px;
}

/* Better visual indicators for featured items on special */
.review-card.item-in-specials,
.featured-hero-slide.item-in-specials .featured-hero-card {
    border: 2px solid #ffc107 !important;
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.4) !important;
}

.review-card.item-in-specials:hover,
.featured-hero-slide.item-in-specials .featured-hero-card:hover {
    box-shadow: 0 0 25px rgba(255, 193, 7, 0.6) !important;
    transform: translateY(-5px) !important;
}


/* Search result item theming - red for regular, yellow for specials */
.search-result-item {
    border-left: 3px solid #dc3545;
    transition: border-color 0.2s ease;
    margin-left:1rem;    
}

.search-result-item:hover {
    border-left-color: #c82333;
}

.search-result-item.item-in-specials {
    border-left: 3px solid #ffc107 !important;
    background: linear-gradient(to right, rgba(255, 193, 7, 0.05) 0%, transparent 100%);
}

.search-result-item.item-in-specials:hover {
    border-left-color: #ff8c00 !important;
    background: linear-gradient(to right, rgba(255, 193, 7, 0.1) 0%, transparent 100%);
}

/* Trending items theming */
.trending-item-search {
    border-left: 3px solid #dc3545;
    transition: border-color 0.2s ease;
}

.trending-item-search:hover {
    border-left-color: #c82333;
}

.trending-item-search.item-in-specials {
    border-left: 3px solid #ffc107 !important;
    background: linear-gradient(to right, rgba(255, 193, 7, 0.05) 0%, transparent 100%);
}

.trending-item-search.item-in-specials:hover {
    border-left-color: #ff8c00 !important;
    background: linear-gradient(to right, rgba(255, 193, 7, 0.1) 0%, transparent 100%);
}

/* Cart Notification Styles (moved from store.css for consistency across all pages) */
.cart-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translate(-50%, 150%);
    background: white;
    border: 1px solid #DC143C;
    border-radius: 0;
    padding: 15px 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 999999;
    transition: transform 0.3s ease;
    max-width: 400px;
    min-width: 300px;
}

.cart-notification.show {
    transform: translate(-50%, 0);
}

/* Dark theme support */
.dark-theme .cart-notification {
    background: #212529;
    border-color: #DC143C;
    color: white;
}

.notification-content {
    display: flex;
    align-items: flex-start;
}

.notification-description {
    font-size: 0.85rem;
    color: #666;
    margin-top: 2px;
}

.dark-theme .notification-description {
    color: #ccc;
}

/* Mobile responsive cart notification */
@media (max-width: 768px) {
    .cart-notification {
        bottom: 10px;
        left: 50%;
        transform: translate(-50%, 150%);
        max-width: calc(100% - 20px);
        min-width: calc(100% - 20px);
        width: calc(100% - 20px);
    }
    
    .cart-notification.show {
        transform: translate(-50%, 0);
    }
}

/* ============================================================================
   UNIFIED AMAZON-STYLE CART BUTTON SYSTEM
   ============================================================================ */

/* Container for the unified cart button */
.unified-cart-btn-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 100%;
    flex-shrink: 0;
    margin-top: auto;
    min-height: 38px;
}

/* Not in cart state - simple add button */
.unified-cart-btn-add {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 14px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease, background 0.2s ease;
    font-size: 0.9rem;
    height: 38px;
    min-height: 38px;
    max-height: 38px;
    box-sizing: border-box;
}

.unified-cart-btn-add:hover:not(:disabled) {
    background: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.3);
}

.unified-cart-btn-add:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.unified-cart-btn-add i {
    font-size: 1.1em;
}

/* In cart state - tri-part control */
.unified-cart-btn-inCart {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #dc3545;
    background: white;
    height: 38px;
    min-height: 38px;
    max-height: 38px;
    box-sizing: border-box;
}

.dark-theme .unified-cart-btn-inCart {
    background: #212529;
    border-color: #dc3545;
}

/* Left button (trash or minus) */
.unified-cart-btn-left {
    flex: 0 0 auto;
    padding: 6px 12px;
    background: #dc3545;
    color: white;
    border: none;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 38px;
}

.unified-cart-btn-left:hover:not(:disabled) {
    background: #c82333;
}

.unified-cart-btn-left:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.unified-cart-btn-left i {
    font-size: 1em;
}

/* Center quantity display */
.unified-cart-btn-center {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    background: white;
    color: #333;
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 50px;
    height: 38px;
}

.dark-theme .unified-cart-btn-center {
    background: #212529;
    color: #f1f1f1;
}

/* Right button (plus) */
.unified-cart-btn-right {
    flex: 0 0 auto;
    padding: 6px 12px;
    background: #dc3545;
    color: white;
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 38px;
}

.unified-cart-btn-right:hover:not(:disabled) {
    background: #c82333;
}

.unified-cart-btn-right:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #6c757d;
}

.unified-cart-btn-right i {
    font-size: 1em;
}

/* Special items styling (yellow/warning theme) */
.unified-cart-btn-add.special-item {
    background: #ffc107;
    color: #333;
}

.unified-cart-btn-add.special-item:hover:not(:disabled) {
    background: #ffc107;
    box-shadow: 0 4px 8px rgba(255, 193, 7, 0.3);
}

.unified-cart-btn-inCart.special-item {
    border-color: #ffc107;
}

.unified-cart-btn-inCart.special-item .unified-cart-btn-left,
.unified-cart-btn-inCart.special-item .unified-cart-btn-right {
    background: #ffc107;
    color: #fff;
}
.unified-cart-btn-inCart.special-item .unified-cart-btn-left i,
.unified-cart-btn-inCart.special-item .unified-cart-btn-right i {
    color: #fff;
}

.unified-cart-btn-inCart.special-item .unified-cart-btn-left:hover:not(:disabled),
.unified-cart-btn-inCart.special-item .unified-cart-btn-right:hover:not(:disabled) {
    background: #ffc107;
}

/* Special items: quantity count in pill – white for visibility on yellow */
.unified-cart-btn-inCart.special-item .unified-cart-btn-center,
.unified-cart-btn-inCart.special-item .unified-cart-btn-center .cart-quantity {
    color: #fff;
}

/* Compact version for smaller cards/tiles */
.unified-cart-btn-container.compact .unified-cart-btn-add {
    padding: 5px 12px;
    font-size: 0.85rem;
    min-height: 34px;
    max-height: 34px;
}

.unified-cart-btn-container.compact .unified-cart-btn-inCart {
    min-height: 34px;
    max-height: 34px;
}

.unified-cart-btn-container.compact .unified-cart-btn-left,
.unified-cart-btn-container.compact .unified-cart-btn-center,
.unified-cart-btn-container.compact .unified-cart-btn-right {
    padding: 5px 10px;
    font-size: 0.85rem;
    min-width: 36px;
    height: 34px;
}

/* Extra compact for related products and small tiles */
.unified-cart-btn-container.mini .unified-cart-btn-add {
    padding: 4px 8px;
    font-size: 0.75rem;
    min-height: 30px;
    max-height: 30px;
}

.unified-cart-btn-container.mini .unified-cart-btn-inCart {
    min-height: 30px;
    max-height: 30px;
}

.unified-cart-btn-container.mini .unified-cart-btn-left,
.unified-cart-btn-container.mini .unified-cart-btn-center,
.unified-cart-btn-container.mini .unified-cart-btn-right {
    padding: 4px 8px;
    font-size: 0.75rem;
    min-width: 30px;
    height: 30px;
}

/* Mobile responsive adjustments */
@media (max-width: 576px) {
    .unified-cart-btn-add {
        padding: 6px 12px;
        font-size: 0.85rem;
        min-height: 36px;
        max-height: 36px;
    }
    
    .unified-cart-btn-left,
    .unified-cart-btn-center,
    .unified-cart-btn-right {
        padding: 6px 10px;
        min-width: 38px;
        height: 36px;
    }
}

/* Animation for state transitions */
@keyframes cartBtnPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.unified-cart-btn-container.updating {
    animation: cartBtnPulse 0.3s ease;
}

/* Mobile Filter Toggle Button - ensure it's visible on mobile */
#toggleCategoriesBtn {
    display: block !important;
}

@media (min-width: 768px) {
    #toggleCategoriesBtn {
        display: none !important;
    }
}

/* Mobile Sticky Filter Bar - appears below search on mobile */
.mobile-sticky-filter-bar {
    position: sticky;
    top: 0;
    z-index: 999;
    background: #fff;
    border-bottom: 2px solid #dc3545;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 0;
    max-height: 80px;
    overflow-y: auto;
    /* Will be updated by JavaScript to stick with search row */
    /* Use CSS variable for top position, calculated by JavaScript */
    top: calc(var(--navbar-height, 70px) + var(--search-row-height, 50px));
}


.dark-theme .mobile-sticky-filter-bar {
    background: #23272b;
    border-bottom-color: #dc3545;
}

.mobile-sticky-filter-bar #mobileActiveFilters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    min-width: 0;
    flex: 1;
}

.mobile-sticky-filter-bar .container-fluid {
    padding-left: 12px !important;
    padding-right: 12px !important;
}

.mobile-sticky-filter-bar .container-fluid > .d-flex {
    flex-wrap: nowrap !important;
    min-width: 0;
}

.mobile-sticky-filter-bar .badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 200px;
    overflow: hidden;
    flex-shrink: 1;
    min-width: 0;
}

.mobile-sticky-filter-bar .badge span {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

.mobile-sticky-filter-bar .filter-badge-with-image {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #dc3545;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    flex-shrink: 1;
    min-width: 0;
}

.mobile-sticky-filter-bar .filter-badge-image {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}

.mobile-sticky-filter-bar .filter-badge-content {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.mobile-sticky-filter-bar .filter-badge-content span {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
}

.mobile-sticky-filter-bar .btn-close {
    font-size: 0.7rem;
    opacity: 0.8;
    padding: 0;
    margin-left: 4px;
}

.mobile-sticky-filter-bar .btn-close:hover {
    opacity: 1;
}

.mobile-sticky-filter-bar #mobileClearAllFilters {
    flex-shrink: 0;
    font-size: 0.75rem;
    padding: 4px 10px;
}

/* Ensure filter bar appears below search row */
@media (max-width: 767.98px) {
    .mobile-sticky-filter-bar {
        position: sticky;
        /* Only stick when the container itself reaches the top */
        /* The top value should be 0 so it sticks at the viewport top */
        top: 0;
        z-index: 9998; /* Below loading modal (9999) */
    }
}

@media (min-width: 768px) {
    .mobile-sticky-filter-bar {
        display: none !important;
    }
}

/* Mobile Vertical Filter Tab */
.mobile-filter-tab {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    background: #dc3545;
    color: #fff;
    padding: 15px 6px;
    border-radius: 0 6px 6px 0;
    cursor: pointer;
    box-shadow: 2px 0 8px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    touch-action: pan-y;
    user-select: none;
}

.mobile-filter-tab:hover,
.mobile-filter-tab:active {
    background: #c82333;
    box-shadow: 2px 0 12px rgba(0,0,0,0.3);
    transform: translateY(-50%) scale(1.05);
}

/* Hide tab when panel is open */
body.mobile-filter-modal-open .mobile-filter-tab {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) translateX(-100%);
}

.mobile-filter-tab-text {
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 1.5px;
    user-select: none;
}

.dark-theme .mobile-filter-tab {
    background: #dc3545;
}

.dark-theme .mobile-filter-tab:hover,
.dark-theme .mobile-filter-tab:active {
    background: #c82333;
}

/* Mobile Filter Modal Styles */
.mobile-filter-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 13000; /* Above header (12000) */
    overflow: hidden;
    touch-action: pan-y;
}

.mobile-filter-modal.show {
    display: block !important;
}

/* Lower sticky filter bar z-index when modal is open */
body.mobile-filter-modal-open .mobile-sticky-filter-bar {
    z-index: 998 !important;
}

/* Overlay backdrop */
.mobile-filter-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-filter-modal.show .mobile-filter-overlay {
    opacity: 1;
}

/* Filter Panel (slides in from left) */
.mobile-filter-panel {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    background: #fff;
    box-shadow: 2px 0 12px rgba(0,0,0,0.3);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    touch-action: pan-y;
    will-change: transform;
}

.mobile-filter-modal.show .mobile-filter-panel {
    transform: translateX(0);
}

.dark-theme .mobile-filter-panel {
    background: #212529;
    color: #fff;
}

.mobile-filter-panel-header {
    position: sticky;
    top: 0;
    background: #dc3545;
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 13001; /* Above modal (13000) */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.mobile-filter-panel-header h5 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.mobile-filter-close {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
    line-height: 1;
    transition: opacity 0.2s;
    touch-action: manipulation;
}

.mobile-filter-close:hover,
.mobile-filter-close:active {
    opacity: 0.8;
}

.mobile-filter-panel-body {
    padding: 10px;
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
}

/* Reduce padding in nested containers within mobile filter panel */
.mobile-filter-panel-body .card,
.mobile-filter-panel-body .card-body,
.mobile-filter-panel-body .themed-card,
.mobile-filter-panel-body .themed-card-body {
    padding: 8px !important;
    margin-bottom: 0.5rem !important;
}

.mobile-filter-panel-body .mb-3,
.mobile-filter-panel-body .mb-4 {
    margin-bottom: 0.5rem !important;
}

.mobile-filter-panel-body .input-group {
    margin-bottom: 0.5rem !important;
}

.mobile-filter-panel-body .list-group {
    margin-bottom: 0 !important;
}

.mobile-filter-panel-body .list-group-item {
    padding: 0.4rem 0.5rem !important;
    margin-bottom: 0.15rem;
}

.mobile-filter-panel-body .filter-container,
.mobile-filter-panel-body .attribute-filters,
.mobile-filter-panel-body .grouping-toggle-container,
.mobile-filter-panel-body .view-toggle-container {
    padding: 0 !important;
    margin-bottom: 0.5rem !important;
}

.mobile-filter-panel-body h5,
.mobile-filter-panel-body h6 {
    margin-bottom: 0.4rem !important;
    padding: 0;
    font-size: 1rem !important;
}

.mobile-filter-panel-body .mt-4,
.mobile-filter-panel-body .mt-3 {
    margin-top: 0.5rem !important;
}

.mobile-filter-panel-body .pt-3,
.mobile-filter-panel-body .pt-4 {
    padding-top: 0.5rem !important;
}

.mobile-filter-panel-body .pb-3,
.mobile-filter-panel-body .pb-4 {
    padding-bottom: 0.5rem !important;
}

/* Hide the old mobile toggle button (replaced by vertical tab) */
#toggleCategoriesBtn {
    display: none !important;
}

@media (min-width: 768px) {
    .mobile-filter-tab {
        display: none !important;
    }
    
    .mobile-filter-modal {
        display: none !important;
    }
}

/* ============================================================================
   PRODUCT TILE STYLING - Used for featured items and carousels
   ============================================================================ */

.product-tile {
    background: #fff;
    border-radius: 8px;
    border: 2px solid #dee2e6;
    padding: 12px;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.product-tile:hover {
    border-color: #dc3545;
    box-shadow: 0 6px 16px rgba(220, 53, 69, 0.2);
}

/* Special item highlighting - Yellow theme from cart */
.product-tile.special-item {
    border-color: #ffc107 !important;
    background: linear-gradient(to bottom, #fff9e6 0%, #ffffff 30%);
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.3);
}

.product-tile.special-item:hover {
    border-color: #ffc107 !important;
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.5);
}

/* Image wrapper with special badge overlay */
.product-tile-image-container {
    position: relative;
    margin-bottom: 8px;
}

/* Content area that grows to push button to bottom */
.product-tile-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.product-tile-image {
    width: 100%;
    height: 120px;
    object-fit: contain;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: block;
    background: transparent;
}

div.product-tile-image-fallback {
    box-sizing: border-box;
    border-radius: 6px;
    background: linear-gradient(145deg, #2d2d2d 0%, #161616 50%, #222 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.product-tile.special-item .product-tile-image {
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.product-tile.special-item:hover .product-tile-image {
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}

/* Special badge - positioned over image (bottom left); clicks pass through so tile behaves like a normal card */
.product-tile-savings {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: #ffc107;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 3px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    z-index: 1;
    pointer-events: none;
}

.product-tile-savings i {
    font-size: 0.65rem;
}

.product-tile-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 36px;
}

/* Dark theme for product tiles */
.dark-theme .product-tile {
    background: #23272b !important;
    border-color: #444 !important;
    color: #f1f1f1 !important;
}

.dark-theme .product-tile-title {
    color: #f1f1f1 !important;
}

.dark-theme .product-tile-pack {
    color: #b0b0b0 !important;
}

.dark-theme .product-tile .product-tile-content {
    color: #f1f1f1 !important;
}

/* Light theme - ensure product tile content text is dark */
.product-tile .product-tile-content {
    color: #333 !important;
}

.product-tile .product-tile-content p,
.product-tile .product-tile-content div,
.product-tile .product-tile-content span {
    color: #333 !important;
}

.dark-theme .product-tile .product-tile-content p,
.dark-theme .product-tile .product-tile-content div,
.dark-theme .product-tile .product-tile-content span {
    color: #f1f1f1 !important;
}

.product-tile-pack {
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 8px;
    font-weight: 500;
    min-height: 1.25em;
}

.product-tile.special-item .product-tile-pack {
    color: #856404;
}

.product-tile-price-container {
    margin-bottom: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Price line with old price and current price together */
.product-tile-price-line {
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-tile-old-price {
    font-size: 0.8rem;
    color: #999;
    text-decoration: line-through;
}

.product-tile-price {
    font-size: 1rem;
    font-weight: 700;
    color: #dc3545;
}

.product-tile.special-item .product-tile-price {
    color: #f57c00;
}

.product-tile-savings-text {
    font-size: 0.75rem;
    color: #28a745;
    font-weight: 600;
}

.product-tile-special-message {
    font-size: 0.75rem;
    color: #ffc107;
    font-weight: 600;
    margin-top: 0.25rem;
}

.product-tile-requirements {
    font-size: 0.7rem;
    color: #6c757d;
    margin-top: 0.125rem;
    line-height: 1.2;
}

.product-tile.special-item .product-tile-savings-text {
    color: #ff6b00;
}

.product-tile-pricing {
    margin-bottom: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 0;
    overflow: visible;
}

/* Dark theme support for product tiles */
.dark-theme .product-tile {
    background: #2d2d2d;
    border-color: #444;
}

.dark-theme .product-tile:hover {
    border-color: #dc3545;
    box-shadow: 0 6px 16px rgba(220, 53, 69, 0.4);
}

.dark-theme .product-tile.special-item {
    background: linear-gradient(to bottom, #3d3416 0%, #2d2d2d 30%);
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.4);
}

.dark-theme .product-tile-title {
    color: #f1f1f1;
}

.dark-theme .product-tile-pack {
    color: #adb5bd;
}

.dark-theme .product-tile-image {
    background: transparent;
}

.dark-theme .product-tile-price {
    color: #ff6b7a;
}

/* Responsive adjustments for product tiles */
@media (max-width: 768px) {
    .product-tile {
        padding: 10px;
        height: 300px;
    }
    
    .product-tile-image {
        width: 100%;
        height: auto;
        min-height: 100px;
        object-fit: cover;
    }
    
    .product-tile-title {
        font-size: 0.85rem;
        min-height: 32px;
    }
    
    .product-tile-savings {
        font-size: 0.65rem;
        padding: 3px 6px;
        bottom: 6px;
        left: 6px;
    }
    
    .product-tile-savings i {
        font-size: 0.6rem;
    }
    
    .product-tile-price {
        font-size: 0.9rem;
    }
    
    .product-tile-old-price {
        font-size: 0.75rem;
    }
    
    .product-tile-savings-text {
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    .product-tile {
        height: 280px;
    }
    
    .product-tile-image {
        width: 100%;
        height: auto;
        min-height: 90px;
        object-fit: cover;
    }
    
    .product-tile-savings {
        font-size: 0.6rem;
        padding: 2px 5px;
        bottom: 5px;
        left: 5px;
    }
    
    .product-tile-savings i {
        font-size: 0.55rem;
    }
    
    .product-tile-old-price {
        font-size: 0.7rem;
    }
    
    .product-tile-price {
        font-size: 0.95rem;
    }
    
    .product-tile-savings-text {
        font-size: 0.65rem;
    }
}

/* Mobile: Hide view toggle and force list view */
@media (max-width: 768px) {
    .view-toggle-container {
        display: none !important;
    }
    
    /* Force list view on mobile - always use single-wide layout */
    #products-grid.list-view .category-products,
    #products-grid .category-products.list-view-active {
        display: flex !important;
        flex-direction: column !important;
    }
    
    #products-grid.list-view .category-products .product-item,
    #products-grid .category-products.list-view-active .product-item {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    /* On mobile, always force list view regardless of class */
    #products-grid .category-products .product-item {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* Fix order summary text wrapping */
#invoice-fee-breakdown .row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
}

#invoice-fee-breakdown .row .col-8 {
    white-space: nowrap;
    overflow: visible;
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 0.5rem;
}

#invoice-fee-breakdown .row .col-4 {
    flex: 0 0 auto;
    white-space: nowrap;
    min-width: fit-content;
    padding-left: 0.5rem;
}

/* Ensure Order Total and Subtotal After All Savings don't wrap */
#invoice-fee-breakdown .row.fw-bold .col-8,
#invoice-fee-breakdown .row .col-8 strong {
    white-space: nowrap !important;
    word-break: keep-all;
    overflow: visible;
}

/* For longer labels like "Subtotal After All Savings:", ensure they don't wrap */
#invoice-fee-breakdown .row .col-8 strong,
#invoice-fee-breakdown .row.fw-bold .col-8 {
    font-size: inherit;
    line-height: 1.2;
}

/* Back to Top Button */
.back-to-top-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-btn:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

.back-to-top-btn i {
    font-size: 20px;
}

/* Floating Cart Icon - Works same on mobile and desktop (store page only) */
/* Floating Cart Button (separate from header icon) */
#floatingCartButton {
    position: fixed !important;
    bottom: 20px !important;
    left: 20px !important;
    right: auto !important;
    top: auto !important;
    width: 50px !important;
    height: 50px !important;
    min-width: 50px !important;
    min-height: 50px !important;
    background: #dc3545 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50% !important; /* Circular on all devices */
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 9998 !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    cursor: pointer;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible; /* Allow badge to overflow */
}

#floatingCartButton.show {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

#floatingCartButton:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
    color: #fff;
    text-decoration: none;
}

#floatingCartButton i {
    font-size: 20px;
}

/* Floating cart badge */
#floatingCartButton #floatingCartBadge {
    position: absolute !important;
    top: -5px !important;
    right: -5px !important;
    left: auto !important;
    transform: translate(0, 0) !important;
    font-size: 0.7em !important;
    min-width: 18px !important;
    height: 18px !important;
    padding: 2px 5px !important;
    border-radius: 9px !important;
    line-height: 1.2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid #fff !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
    /* Inherit opacity and visibility from parent button so it fades with the button */
    opacity: inherit !important;
    visibility: inherit !important;
    transition: inherit !important;
}

/* Back to top and floating cart work the same on mobile and desktop */
@media (min-width: 768px) {
    .back-to-top-btn {
        bottom: 20px;
        right: 20px;
    }
    
    /* Floating cart button on desktop - rectangular styling, positioned on left */
    #floatingCartButton {
        position: fixed !important;
        bottom: 20px !important;
        left: 20px !important;
        right: auto !important;
        top: auto !important;
        width: auto !important;
        min-width: auto !important; /* Will be set dynamically based on content */
        height: auto !important;
        min-height: auto !important;
        border-radius: 12px !important;
        padding: 10px 14px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 10px !important;
    }
    
    /* Smaller when no detailed data (no savings) */
    #floatingCartButton:not(.has-savings) .floating-cart-content {
        display: none !important;
    }
    
    #floatingCartButton:not(.has-savings) {
        min-width: 120px !important; /* Smaller when just showing total */
        padding: 10px 12px !important;
    }
    
    /* Larger when showing savings */
    #floatingCartButton.has-savings {
        min-width: 160px !important; /* Larger when showing total + savings */
        padding: 12px 16px !important;
    }
    
    #floatingCartButton i {
        font-size: 1.5rem !important;
        flex-shrink: 0;
    }
    
    #floatingCartButton .floating-cart-content {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        flex: 1;
        min-width: 0;
    }
    
    #floatingCartButton .floating-cart-total {
        font-weight: 600;
        font-size: 0.95rem;
        line-height: 1.2;
        white-space: nowrap;
    }
    
    #floatingCartButton .floating-cart-savings {
        font-size: 0.8rem;
        line-height: 1.2;
        color: #ffc107;
        white-space: nowrap;
    }
}

/* Expanded Product Card Styles - All items expand to 4 columns (100% width) */
/* Override all other flex rules to ensure expanded items take full width and break to new line */
#products-grid .product-item.product-expanded,
#products-grid .category-products .product-item.product-expanded,
#products-grid .category-products.single-item-category .product-item.product-expanded,
#products-grid .category-products.two-item-category .product-item.product-expanded,
#products-grid .category-products.list-view-active .product-item.product-expanded {
    flex: 0 0 100% !important; /* Span all 4 columns (100% width) */
    max-width: 100% !important;
    width: 100% !important;
    order: -1 !important; /* Move to top of flex container */
    margin-bottom: 1.5rem !important; /* Add space below */
    transition: flex 0.4s ease, max-width 0.4s ease, width 0.4s ease !important;
    clear: both !important; /* Force new line */
}

/* Force parent to wrap when expanded item exists */
#products-grid .category-products {
    flex-wrap: wrap !important;
}

/* On mobile, still use full width */
@media (max-width: 767.98px) {
    #products-grid .product-item.product-expanded,
    #products-grid .category-products .product-item.product-expanded {
        flex: 0 0 100% !important; /* Full width on mobile */
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* On smaller desktop screens, still use full width */
@media (max-width: 1200px) {
    #products-grid .product-item.product-expanded,
    #products-grid .category-products .product-item.product-expanded {
        flex: 0 0 100% !important; /* Still span all 4 columns */
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* Position cart button at bottom right of expanded cards */
.product-item.product-expanded .unified-cart-btn-container,
.product-item.product-expanded .product-actions,
.single-item-wide .unified-cart-btn-container,
.single-item-wide .product-actions {
    bottom: 15px !important;
    right: 25px !important;
    left: auto !important;
    top: auto !important;
    margin: 0 !important;
    width: auto !important;
    max-width: none !important;
    min-width: auto !important;
    display: inline-flex !important;
    justify-content: flex-end !important;
    z-index: 10;
}

/* Position cart button at bottom right for default 4-column (stacked) layout cards */
/* Default 4-column (stacked) layout cards - CENTER the button (not bottom right) */
.product-item:not(.single-item-wide):not(.two-item-layout):not(.product-expanded) .product-card .card-body {
    position: relative;
}

.product-item:not(.single-item-wide):not(.two-item-layout):not(.product-expanded) .product-card .product-actions {
    margin-top: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Product group badge styling */
.product-group-badge-container {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
}

.product-group-badge {
    font-size: 0.75rem;
    padding: 4px 8px;
    font-weight: 600;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.product-expanded-content {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: none; /* Remove white line */
    animation: expandProduct 0.3s ease-out;
    width: 100% !important;
    max-width: 100% !important;
}

.product-expanded-additional-content {
    width: 100% !important;
    max-width: 100% !important;
}

/* Expanded product layout: Make it look like single-item-wide on desktop */
/* Use flexbox layout like single-item-wide cards */
.product-item.product-expanded .card,
.product-item.product-expanded .product-card,
.single-item-wide .card,
.single-item-wide .product-card {
    display: flex !important;
    flex-direction: row !important;
    gap: 1.5rem;
    align-items: stretch !important; /* Changed from flex-start to stretch so card matches content height */
    position: relative !important; /* Needed for absolute positioning of cart button */
    min-height: auto !important; /* Changed from 100% to auto so it grows with content */
    transition: all 0.4s ease !important;
    height: auto !important; /* Changed from 100% to auto so it grows with content */
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* Prevent content from overflowing */
}

/* Image section (left, 2 columns) - similar to single-item-image */
/* Prevent image from resizing when accordion expands */
.product-item.product-expanded .product-image-container,
/* Expanded cards: image should be about 1/3 smaller - use 33% instead of 50% to give more room to content */
/* Ensure the container doesn't overflow */
.product-item.product-expanded .single-item-content,
.single-item-wide .single-item-content {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    gap: 1.5rem !important;
    box-sizing: border-box !important;
    overflow: hidden !important; /* Prevent any overflow issues */
}

/* Clicked-expanded items - separate rules */
.product-item.product-expanded .single-item-image,
.product-item.product-expanded .two-item-image,
.product-item.product-expanded .card-img-top,
.product-item.product-expanded .product-image,
.product-item.product-expanded img.product-image {
    flex: 0 0 33% !important; /* Reduced from 50% to 33% (about 1/3 smaller) */
    max-width: 33% !important;
    min-width: 0 !important; /* Allow flexbox to shrink if needed */
    width: 33% !important;
    cursor: pointer;
    transition: flex 0.4s ease, max-width 0.4s ease, width 0.4s ease !important;
    flex-shrink: 0 !important;
    box-sizing: border-box !important;
}

/* Single-item-wide (default expanded) - separate rules, same result */
.single-item-wide .single-item-image {
    flex: 0 0 33.333% !important;
    max-width: 33.333% !important;
    min-width: 33.333% !important;
    width: 33.333% !important;
    cursor: pointer;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    box-sizing: border-box !important;
    position: relative !important;
}

/* Ensure the image container inside single-item-image is also 100% of its parent */
.single-item-wide .single-item-image .product-image {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    box-sizing: border-box !important;
}

/* Content section (right) - takes remaining space (67%) since image is now 33% */
.product-item.product-expanded .card-body,
.product-item.product-expanded .single-item-info,
.product-item.product-expanded .two-item-info,
.single-item-wide .single-item-info {
    flex: 1 1 auto !important; /* Use flex: 1 instead of fixed 67% to prevent overflow */
    max-width: 67% !important;
    transition: flex 0.4s ease, max-width 0.4s ease !important;
    min-width: 0 !important; /* Allow flexbox to shrink if needed */
    display: flex;
    flex-direction: column;
    flex-shrink: 1 !important; /* Allow shrinking */
    position: relative !important; /* Needed for absolute positioning of cart button */
    min-height: auto !important; /* Changed from 100% to auto - let it grow with content */
    height: auto !important; /* Changed from 100% to auto - let it grow with content */
    align-self: stretch !important; /* Stretch to match card height */
    box-sizing: border-box !important;
    
}

/* Two-item layout: when expanded, restructure to single-item-wide style (same as other expanded cards) */
.product-item.product-expanded .two-item-content {
    display: flex !important;
    flex-direction: row !important;
    gap: 1.5rem;
    align-items: flex-start;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Two-item layout expanded: image should be 33% like other expanded cards - EXACT SAME AS single-item-wide */
.product-item.product-expanded .two-item-image {
    flex: 0 0 33.333% !important;
    max-width: 33.333% !important;
    min-width: 33.333% !important;
    width: 33.333% !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    box-sizing: border-box !important;
    position: relative !important;
}

/* Two-item layout expanded: image sizing - EXACT SAME AS single-item-wide */
.product-item.product-expanded .two-item-image .product-image {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    box-sizing: border-box !important;
}

.product-item.product-expanded .two-item-image .product-image img,
.product-item.product-expanded .two-item-image img {
    max-height: 400px !important; /* EXACT SAME AS single-item-wide */
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important; /* EXACT SAME AS single-item-wide */
    display: block !important;
}

/* Two-item layout expanded: info should take remaining 67% - EXACT SAME AS single-item-wide */
.product-item.product-expanded .two-item-info {
    flex: 1 1 auto !important;
    max-width: 67% !important;
    min-width: 0 !important;
    display: flex;
    flex-direction: column;
    flex-shrink: 1 !important;
    position: relative !important;
    min-height: auto !important; /* Changed from 100% to auto - let it grow with content */
    height: auto !important; /* Changed from 100% to auto - let it grow with content */
    align-self: stretch !important; /* Stretch to match card height */
    box-sizing: border-box !important;
    padding-bottom: 70px !important; /* Add padding at bottom for absolute positioned button - increased for better spacing */
}

/* Ensure content inside card-body uses full width of its container */
.product-item.product-expanded .card-body > *,
.product-item.product-expanded .single-item-info > * {
    width: 100% !important;
    max-width: 100% !important;
}

/* Except for images which should be extracted */
.product-item.product-expanded .card-body > .product-image,
.product-item.product-expanded .card-body > img.product-image,
.product-item.product-expanded .card-body > .single-item-image {
    width: 33% !important; /* Reduced from 50% to 33% to match smaller image size */
    max-width: 33% !important;
}

/* If image is inside card-body, extract it */
.product-item.product-expanded .card-body .product-image,
.product-item.product-expanded .card-body img.product-image,
.product-item.product-expanded .card-body .single-item-image {
    flex: 0 0 33% !important; /* Reduced from 50% to 33% to match smaller image size */
    max-width: 33% !important;
    min-width: 33% !important;
    width: 33% !important;
    order: -1;
    margin-right: 1.5rem;
    flex-shrink: 0 !important;
}

/* Content inside card-body should use full width of the 67% column */
.product-item.product-expanded .card-body > *:not(.product-image):not(.single-item-image):not(img) {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
}

/* Make existing image bigger when expanded - move to image section */
/* Prevent zoom/resize when accordion expands - reduced by 1/3 to give more room to content */
/* Clicked-expanded items - image sizing */
.product-item.product-expanded .product-image,
.product-item.product-expanded img.product-image,
.product-item.product-expanded .single-item-image img,
.product-item.product-expanded .card-img-top {
    max-height: 400px !important; /* Reduced from 600px to 400px (about 1/3 smaller) */
    width: 100% !important;
    object-fit: contain !important;
    transition: transform 0.3s ease !important;
    cursor: pointer;
    flex-shrink: 0 !important;
}

/* Single-item-wide (default expanded) - img element sizing only (flex is on container) */
.single-item-wide .single-item-image .product-image img,
.single-item-wide .single-item-image img,
.single-item-wide .product-image img {
    max-height: 400px !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important; /* Override inline height: 100% */
    object-fit: contain !important; /* Override inline object-fit: cover */
    transition: transform 0.3s ease !important;
    cursor: pointer;
    display: block !important;
    box-sizing: border-box !important;
}

/* Only apply hover scale on actual hover, not on accordion expand */
.product-item.product-expanded .product-image:hover:not(:focus-within),
.product-item.product-expanded img.product-image:hover:not(:focus-within),
.product-item.product-expanded .single-item-image img:hover:not(:focus-within),
.product-item.product-expanded .card-img-top:hover:not(:focus-within) {
    transform: scale(1.02);
}

@keyframes expandProduct {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-expanded-wrapper {
    width: 100%;
}

.product-expanded-row {
    margin: 0;
}

.product-expanded-image-col {
    margin-bottom: 1rem;
}

.product-expanded-image-container {
    text-align: center;
}

.product-expanded-image-container {
    cursor: pointer;
    position: relative;
}

.product-expanded-image-container img {
    max-height: 600px;
    width: 100%;
    object-fit: contain;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.product-expanded-image-container:hover img {
    transform: scale(1.02);
}

.product-expanded-image-container::after {
    content: '\f065'; /* fa-expand icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px;
    border-radius: 50%;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.product-expanded-image-container:hover::after {
    opacity: 1;
}

.product-expanded-images-thumbnails {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.product-expanded-images-thumbnails img {
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.product-expanded-images-thumbnails img:hover {
    border-color: #dc3545;
}

.product-expanded-details-col {
    padding-left: 1rem;
}

.product-expanded-nutritional {
    margin-top: 1rem;
}

.product-expanded-admin-section {
    margin-top: 1.5rem;
    padding-top: 1rem;
}

.collapse-product-btn {
    width: 100%;
    margin-bottom: 1rem;
}

/* Mobile styles for expanded products */
@media (max-width: 767.98px) {
    .product-item.product-expanded {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .product-item.product-expanded .card-body,
    .product-item.product-expanded .single-item-info {
        flex-direction: column !important; /* Stack on mobile */
    }
    
    .product-expanded-image-section,
    .product-expanded-details-section {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    .product-item.product-expanded .product-image,
    .product-item.product-expanded img.product-image,
    .product-item.product-expanded .single-item-image img,
    .product-item.product-expanded .card-img-top {
        max-height: 270px !important; /* Reduced from 400px to 270px (about 1/3 smaller) */
    }
}

/* Desktop: 2 columns layout for expanded product - bigger image */
@media (min-width: 768px) {
    .product-expanded-row {
        display: flex;
    }
    
    .product-expanded-image-col {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .product-expanded-details-col {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Nutrition Info Icon and Tooltip */
.nutrition-info-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    min-width: 24px;
    max-width: 24px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px; /* Changed from 50% to 4px to match attribute icons (square) */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nutrition-info-icon:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.nutrition-info-icon i {
    color: #dc3545;
    font-size: 14px;
    flex-shrink: 0;
}

/* Ensure nutrition icon inside attribute icons container is compact */
.product-attribute-icons .nutrition-info-icon {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    padding: 0 !important;
    margin: 0 0.25rem !important;
    position: relative !important;
    top: auto !important;
    right: auto !important;
    display: inline-flex !important;
    flex-shrink: 0 !important;
}

/* Admin Edit Icon */
.admin-edit-icon {
    position: absolute;
    top: 10px;
    right: 40px;
    width: 24px;
    height: 24px;
    min-width: 24px;
    max-width: 24px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px; /* Changed from 50% to 4px to match attribute icons (square) */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 11;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.admin-edit-icon:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.admin-edit-icon i {
    color: #007bff;
    font-size: 12px;
    flex-shrink: 0;
}

/* Ensure admin edit icon is compact */
.admin-edit-icon {
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* Adjust nutrition info icon position when admin edit icon is present */
.product-card:has(.admin-edit-icon) .nutrition-info-icon {
    right: 10px;
}

/* If no admin edit icon, nutrition icon stays in default position */
.product-card:not(:has(.admin-edit-icon)) .nutrition-info-icon {
    right: 10px;
}

.dark-theme .admin-edit-icon {
    background: rgba(33, 37, 41, 0.9);
}

.dark-theme .admin-edit-icon:hover {
    background: rgba(33, 37, 41, 1);
}

.dark-theme .admin-edit-icon i {
    color: #007bff;
}

/* Product Attribute Icons */
.product-attribute-icons {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    z-index: 10;
    flex-wrap: nowrap; /* Keep icons inline, don't wrap */
    max-width: calc(100% - 20px);
}

/* Position attribute icons at bottom for single-wide cards (same as expanded items) - IN NORMAL FLOW */
.single-item-wide .single-item-info .product-attribute-icons,
.list-view-active .product-item .product-attribute-icons {
    position: relative !important; /* In normal flow, not absolutely positioned */
    bottom: auto !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    transform: none !important;
    z-index: 10;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Position nutrition icon inline with attribute icons for expanded cards - IN NORMAL FLOW */
.single-item-wide .single-item-info .nutrition-info-icon-inline,
.product-item.product-expanded .single-item-info .nutrition-info-icon-inline,
.product-item.product-expanded .two-item-info .nutrition-info-icon-inline,
.two-item-layout .two-item-info .nutrition-info-icon-inline {
    position: relative !important; /* In normal flow, not absolutely positioned */
    bottom: auto !important;
    left: auto !important;
    top: auto !important;
    right: auto !important;
    transform: none !important;
    z-index: 10;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    display: inline-block;
}

.single-item-wide .single-item-info .nutrition-info-icon-inline .nutrition-info-icon,
.product-item.product-expanded .single-item-info .nutrition-info-icon-inline .nutrition-info-icon,
.product-item.product-expanded .two-item-info .nutrition-info-icon-inline .nutrition-info-icon,
.two-item-layout .two-item-info .nutrition-info-icon-inline .nutrition-info-icon,
.single-item-wide .single-item-info .product-attribute-icons .nutrition-info-icon,
.product-item.product-expanded .single-item-info .product-attribute-icons .nutrition-info-icon,
.product-item.product-expanded .two-item-info .product-attribute-icons .nutrition-info-icon,
.product-item.product-expanded .card-body .product-attribute-icons .nutrition-info-icon,
.single-item-wide .product-attribute-icons .nutrition-info-icon {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    display: inline-flex !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    flex-shrink: 0 !important;
}

/* Position attribute badges in corner for 2/4 column cards - inline with edit/info icons */
.two-item-layout .product-attribute-icons,
.product-card:not(.single-item-wide):not(.list-view-active) .product-attribute-icons {
    top: 10px;
    right: 70px; /* Position to the left of admin-edit-icon (40px) and nutrition-info-icon (10px) - leave space for both */
    left: auto;
    bottom: auto;
    z-index: 11; /* Same z-index as other top icons */
}

/* Special badge positioning */
.special-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ffc107;
    color: #212529;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.special-badge i {
    color: #212529;
}

/* For single-wide cards, position special badge in corner */
.single-item-wide .special-badge,
.list-view-active .product-item .special-badge {
    top: 10px;
    right: 10px;
}

/* For 2/4 column cards, position special badge in corner (over image) */
.two-item-layout .special-badge,
.product-card:not(.single-item-wide):not(.list-view-active) .special-badge {
    top: 10px;
    right: 10px;
}

/* Fix container overflow on expanded cards */
.product-expanded-content,
.product-expanded-additional-content {
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

/* Attribute icons in expanded content should be in normal flow (not absolutely positioned) */
.product-expanded-content .product-attribute-icons,
.product-expanded-additional-content .product-attribute-icons {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    transform: none !important;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important; /* Keep icons inline in expanded content too */
}

.product-item.product-expanded .card,
.product-item.product-expanded .product-card {
    overflow: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

.product-attribute-icon {
    font-size: 16px;
    padding: 4px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
    display: inline-block; /* Ensure icons are inline */
    flex-shrink: 0; /* Prevent icons from shrinking */
    white-space: nowrap; /* Prevent text wrapping */
}

.product-attribute-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 1);
}

/* Make attribute icons clearly clickable */
.product-attribute-icon[data-attribute] {
    cursor: pointer;
}

.product-attribute-icon[data-attribute]:active {
    transform: scale(0.95);
}

.dark-theme .product-attribute-icon {
    background: rgba(33, 37, 41, 0.9);
}

.dark-theme .nutrition-info-icon {
    background: rgba(33, 37, 41, 0.9);
}

.dark-theme .nutrition-info-icon:hover {
    background: rgba(33, 37, 41, 1);
}

.dark-theme .nutrition-info-icon i {
    color: #dc3545;
}

/* Nutrition Tooltip */
.nutrition-tooltip {
    position: fixed;
    display: none;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    max-width: 300px;
    max-height: none;
    overflow: visible;
    padding: 0;
}

.dark-theme .nutrition-tooltip {
    background: #212529;
    border-color: #495057;
    color: #fff;
}

.nutrition-tooltip-content {
    padding: 12px;
    max-height: none;
    overflow: visible;
}

.nutrition-tooltip-content h6 {
    color: #dc3545;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.dark-theme .nutrition-tooltip-content h6 {
    color: #dc3545;
}

.nutrition-tooltip-content .nutritional-facts-table {
    font-size: 0.85rem;
}

.nutrition-tooltip-content .nutritional-fact-row {
    font-size: 0.8rem;
    padding: 4px 0;
}

.nutrition-tooltip-content .nutritional-fact-row span:first-child {
    font-weight: 600;
}

/* Ensure tooltip doesn't interfere with card clicks */
.nutrition-info-icon {
    pointer-events: auto;
}

.product-card {
    position: relative;
}

/* Ensure min-quantity-message is visible and not hidden behind icons */
.single-item-wide .min-quantity-message,
.product-card .min-quantity-message {
    position: relative;
    z-index: 1;
    margin-top: 0.5rem;
    display: block;
}

/* Hide view toggle buttons (grid/list) in filters */
.view-toggle-container {
    display: none !important;
}

/* Hide sort dropdown in filters */
#sortSelect,
.input-group:has(#sortSelect) {
    display: none !important;
}

/* Special Items Filter Button - Yellow icon, text, and border */
#specialItemsToggle.btn-outline-warning,
.special-items-toggle.btn-outline-warning {
    border-color: #ffc107 !important;
    color: #ffc107 !important;
}

#specialItemsToggle.btn-outline-warning i,
.special-items-toggle.btn-outline-warning i {
    color: #ffc107 !important;
}

#specialItemsToggle.btn-warning,
.special-items-toggle.btn-warning {
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #212529 !important;
}

#specialItemsToggle.btn-warning i,
.special-items-toggle.btn-warning i {
    color: #212529 !important;
}

/* Featured Items Filter Button - Red icon, text, and border */
#featuredItemsToggle.btn-outline-danger,
.featured-items-toggle.btn-outline-danger {
    border-color: #dc3545 !important;
    color: #dc3545 !important;
}

#featuredItemsToggle.btn-outline-danger i,
.featured-items-toggle.btn-outline-danger i {
    color: #dc3545 !important;
}

#featuredItemsToggle.btn-danger,
.featured-items-toggle.btn-danger {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: #fff !important;
}

#featuredItemsToggle.btn-danger i,
.featured-items-toggle.btn-danger i {
    color: #fff !important;
}

/* ========== CHECKOUT & CART PAGE – single source of truth for padding (mobile-first) ========== */
/* Prevents stacked/conflicting padding from multiple CSS layers. Use these only. */

/* Checkout: constrain width like the rest of the site (.container is 1200px globally). Never use max-width: none here — it full-bleeds the page. */
.page-checkout main.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    box-sizing: border-box;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}
.page-checkout .card {
    padding: 0;
}
.page-checkout .card-body {
    padding: 0.75rem !important;
}
.page-checkout .card-header {
    padding: 0.5rem 0.75rem;
}
.page-checkout .checkout-dates-card-body,
.page-checkout .checkout-dates-section .card-body {
    padding: 0.75rem !important;
}
.page-checkout .accordion-body,
.page-checkout .custom-accordion-body {
    padding: 0.75rem !important;
}

/* Cart: container, cards, cart content, items */
.page-cart main.container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}
.page-cart .cart-items-card.card,
.page-cart .cart-summary-card.card {
    padding: 0;
}
.page-cart .cart-items-card .card-body,
.page-cart .cart-summary-card .card-body {
    padding: 0.75rem !important;
}
.page-cart .cart-items-container {
    padding: 0 !important;
}
.page-cart #cart-content {
    padding: 0 !important;
}
.page-cart .cart-item,
.page-cart .cart-item-card {
    padding: 0.5rem 0 !important;
}
.page-cart .cart-item-card .card-body {
    padding: 0.5rem 0.75rem !important;
}
.page-cart .cart-summary-card .card-body {
    padding: 0.75rem !important;
}

@media (max-width: 768px) {
    .page-cart main.container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    .page-cart .cart-items-card .card-body {
        padding: 0.4rem !important;
    }
}

@media (max-width: 576px) {
    .page-checkout main.container {
        padding-right: 1rem;
    }
    .page-checkout .card-body {
        padding: 0.5rem !important;
    }
    .page-checkout .checkout-dates-card-body,
    .page-checkout .checkout-dates-section .card-body {
        padding: 0 !important;
    }
    .page-cart main.container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    .page-cart .cart-items-card .card-body,
    .page-cart .cart-summary-card .card-body {
        padding: 0.5rem !important;
    }
    .page-cart .cart-item {
        padding: 0.4rem 0 !important;
    }
    .page-cart .cart-item-card .card-body {
        padding: 0.4rem 0.5rem !important;
    }
}





/* ===== css/eff-hero-bootstrap-carousel.css ===== */
/**
 * Hero slideshow: Bootstrap 5 carousel (indicators + captions).
 * Loaded after common.css; overrides legacy .slide horizontal-scroller assumptions.
 *
 * Bootstrap’s carousel root is .carousel.slide — must not inherit legacy .slide { opacity:0 }
 * if any unscoped rule slips through; keep hero carousel visible.
 */
#heroSlideshowCarousel.carousel.slide.eff-hero-carousel,
#heroSlideshow .carousel.slide.eff-hero-carousel {
    opacity: 1 !important;
    position: relative !important;
    transform: none !important;
    overflow: hidden;
}

#heroSlideshow .eff-hero-carousel .carousel-item {
    min-height: 420px;
    background-color: #1a1a1a;
}

#heroSlideshow .eff-hero-carousel .carousel-item > img.d-block,
#heroSlideshow .eff-hero-carousel .carousel-item > video.d-block {
    width: 100%;
    min-height: 420px;
    max-height: 70vh;
    object-fit: cover;
}

#heroSlideshow .eff-hero-carousel .carousel-caption {
    text-align: center;
    padding-bottom: 3.25rem;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
}

#heroSlideshow .eff-hero-carousel .carousel-caption h2 {
    font-size: clamp(1.5rem, 4vw, 3.25rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
}

#heroSlideshow .eff-hero-carousel .carousel-caption p {
    font-size: clamp(0.95rem, 2vw, 1.25rem);
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.95);
}

/* Beat common.css `.dark-theme .slideshow-section * { color: inherit !important; }` so captions stay readable */
.dark-theme #heroSlideshow .eff-hero-carousel .carousel-caption,
.dark-theme #heroSlideshow .eff-hero-carousel .carousel-caption h2,
.dark-theme #heroSlideshow .eff-hero-carousel .carousel-caption p,
.dark-theme #heroSlideshow .eff-hero-carousel .carousel-caption .btn {
    color: #fff !important;
}

#heroSlideshow .eff-hero-carousel .carousel-caption .slide-btn,
#heroSlideshow .eff-hero-carousel .carousel-caption .btn {
    text-shadow: none;
}

#heroSlideshow .eff-hero-carousel .carousel-indicators {
    margin-bottom: 0.5rem;
}

#heroSlideshow .eff-hero-carousel .carousel-indicators [type="button"] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

@media (max-width: 768px) {
    #heroSlideshow .eff-hero-carousel .carousel-item,
    #heroSlideshow .eff-hero-carousel .carousel-item > img.d-block,
    #heroSlideshow .eff-hero-carousel .carousel-item > video.d-block {
        min-height: 360px;
        max-height: 55vh;
    }

    #heroSlideshow .eff-hero-carousel .carousel-caption {
        padding-bottom: 2.75rem;
    }
}

@media (max-width: 576px) {
    #heroSlideshow .eff-hero-carousel .carousel-item,
    #heroSlideshow .eff-hero-carousel .carousel-item > img.d-block,
    #heroSlideshow .eff-hero-carousel .carousel-item > video.d-block {
        min-height: 300px;
        max-height: 50vh;
    }
}

/* After common.css mobile rules: host must not use transform:scale or fixed height (layout vs paint mismatch). */
#heroSlideshow.eff-hero-bootstrap {
    transform: none !important;
    height: auto !important;
}


/* ===== home-index.css ===== */
/**
 * Homepage (index-legacy / index-beta) — layout and carousels.
 * Restored 2026-05-11: file had been truncated to 0 bytes, which dropped most index styling
 * and broke `.home-slider-placeholder` + scroller layout (flex row placed blocks side-by-side).
 * Run: php tools/build_storefront_css.php
 */

/*
 * Full-width stacked sections on desktop.
 * common.css sets `.home-section-grid` to `repeat(auto-fit, minmax(300px, 1fr))`, which puts
 * three `.home-tile` blocks (e.g. Quick Shop | Staff Picks | Recommended) on one row on wide
 * viewports. Media queries only collapse to one column below ~992px — hence “groups of 3 on 1 line.”
 */
.homepage .home-section-grid {
    grid-template-columns: minmax(0, 1fr);
}

/* Alternating tile backgrounds inside section grids */
.home-section-grid .home-tile:nth-child(odd) {
    background: #ffffff;
}

.home-section-grid .home-tile:nth-child(even) {
    background: #f8f9fa;
}

.home-section-grid .home-tile:nth-child(3n+1) {
    background: #ffffff;
}

.home-section-grid .home-tile:nth-child(3n+2) {
    background: #f8f9fa;
}

.home-section-grid .home-tile:nth-child(3n) {
    background: #ffffff;
}

/*
 * Index product lanes: fixed width so + vs in-cart does not resize cards.
 * Use ~148px lanes — matches .product-tile-image height (120px) + padding so cards are not
 * much wider than the image (220px looked like empty gutters with object-fit: contain).
 */
.homepage .home-section-grid .horizontal-scroller-item {
    flex: 0 0 148px;
    min-width: 148px;
    max-width: 148px;
    width: 148px;
    box-sizing: border-box;
}

.homepage .home-section-grid .horizontal-scroller-item > .product-tile {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    flex: 1 1 auto;
}

.homepage .home-section-grid .horizontal-scroller-item .unified-cart-btn-container.compact {
    width: 100%;
    max-width: 100%;
    align-self: stretch;
    box-sizing: border-box;
}

.homepage .home-section-grid .horizontal-scroller-item .unified-cart-btn-container.compact .unified-cart-btn-add {
    width: 100%;
    justify-content: center;
}

.homepage .home-section-grid .horizontal-scroller-item .unified-cart-btn-container.compact .unified-cart-btn-inCart {
    width: 100%;
    flex: 1 1 auto;
    min-width: 0;
    justify-content: space-between;
}

/* Match legacy stacked scroller: flush container padding (common.css uses 1rem) */
.homepage .home-section-grid .horizontal-scroller-container {
    padding-left: 0;
    padding-right: 0;
}

/* Product tiles in index horizontal scrollers — fixed card height */
.homepage .home-section-grid .product-tile {
    min-height: 280px;
}

/* Keep the visual image column narrow; tile is still full lane width for text + cart */
.homepage .home-section-grid .product-tile-image-container {
    max-width: 120px;
    margin-left: auto;
    margin-right: auto;
}


/* ===== beta.css ===== */
/* Beta Page Styles - Category Tabs Layout */

/* Category Headers - ensure they work properly on beta page */
.beta-category-products-container .category-header-enhanced {
    position: relative;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    min-height: 200px;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    margin-bottom: 2rem;
    width: 100%;
}

.beta-category-products-container .category-header-content-full {
    flex: 0 0 60%;
    color: white;
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 8px;
    margin: 1rem;
    text-align: left;
    z-index: 1;
}

.beta-category-products-container .category-header-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 10px;
}

.beta-category-products-container .category-header-title i {
    font-size: 1.8rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.beta-category-products-container .category-header-title .category-name {
    font-size: 2rem;
    font-weight: 700;
}

.beta-category-products-container .category-header-details {
    font-size: 1.1rem;
    margin-bottom: 0;
    opacity: 0.95;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
    .beta-category-products-container .category-header-enhanced {
        min-height: 150px;
    }
    
    .beta-category-products-container .category-header-content-full {
        flex: 0 0 80%;
        padding: 15px;
    }
    
    .beta-category-products-container .category-header-title {
        font-size: 1.5rem;
    }
    
    .beta-category-products-container .category-header-title .category-name {
        font-size: 1.5rem;
    }
}

/* Category Tabs Grid - 2 columns */
.beta-category-tabs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

/* Keep 2 columns on mobile */
/* @media (max-width: 768px) {
    .beta-category-tabs-grid {
        grid-template-columns: 1fr;
    }
} */

/* Category Tab */
.beta-category-tab {
    background: var(--bs-body-bg, #fff);
    border: 2px solid var(--bs-border-color, #e0e0e0);
    border-radius: 0;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 80px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    grid-row: auto;
}

.dark-theme .beta-category-tab {
    background: var(--bs-dark, #212529);
    border-color: var(--bs-border-color, #495057);
}

/* Category Tab with Image - no overlay when expanded */
.beta-category-tab[style*="background-image"]:not(.expanded) {
    background-color: rgba(0, 0, 0, 0.3);
}

.beta-category-tab[style*="background-image"]:not(.expanded)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.3));
    z-index: 0;
    pointer-events: none;
}

/* Remove overlay when expanded */
.beta-category-tab.expanded[style*="background-image"]::before {
    display: none;
}

.beta-category-tab:hover {
    border-color: #28a745;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.beta-category-tab.expanded {
    border-color: #28a745;
    background: #f8f9fa;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

.beta-category-tab-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 1;
    min-height: 100%;
}

.beta-category-tab-icon {
    font-size: 2rem;
    color: #28a745;
    flex-shrink: 0;
}

.beta-category-tab-info {
    flex: 1;
}

.beta-category-tab-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: #333;
}

.beta-category-tab-count {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.25rem;
}

.beta-category-tab-arrow {
    font-size: 1.5rem;
    color: #28a745;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.beta-category-tab.expanded .beta-category-tab-arrow {
    transform: rotate(180deg);
}

/* Product Group Tabs - same styling as category tabs but span full width */
.beta-product-group-tab {
    background: var(--bs-body-bg, #fff);
    border: 2px solid var(--bs-border-color, #e0e0e0);
    border-radius: 0;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 80px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    grid-row: auto;
    grid-column: 1 / -1; /* Span full width (both columns) */
}

.dark-theme .beta-product-group-tab {
    background: var(--bs-dark, #212529);
    border-color: var(--bs-border-color, #495057);
}

.beta-product-group-tab-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
    z-index: 0;
}

.beta-product-group-tab--has-image:not(.expanded) {
    background-color: rgba(0, 0, 0, 0.3);
}

.beta-product-group-tab--has-image:not(.expanded)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.3));
    z-index: 1;
    pointer-events: none;
}

.beta-product-group-tab--has-image.expanded::before {
    display: none;
}

.beta-product-group-tab--has-image.expanded .beta-product-group-tab-img {
    display: none;
}

.beta-product-group-tab:hover {
    border-color: #28a745;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.beta-product-group-tab.expanded {
    border-color: #28a745;
    background: #f8f9fa;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

.beta-product-group-tab-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
    min-height: 100%;
    text-align: center;
}

.beta-product-group-tab-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.beta-product-group-tab-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    color: #333;
}

.beta-product-group-tab-count {
    font-size: 0.875rem;
    color: #666;
    margin-top: 0.25rem;
}

.beta-product-group-tab-arrow {
    font-size: 1.5rem;
    color: #28a745;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.beta-product-group-tab.expanded .beta-product-group-tab-arrow {
    transform: rotate(180deg);
}

/* Product Group Products Container */
.beta-product-group-products-container {
    grid-column: 1 / -1;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    padding: 0.75rem;
    background: var(--bs-body-bg, #fff);
    border-radius: 0;
    border: 1px solid var(--bs-border-color, #e0e0e0);
    animation: slideDown 0.3s ease-out;
}

.dark-theme .beta-product-group-products-container {
    background: var(--bs-dark, #212529);
    border-color: var(--bs-border-color, #495057);
}

/* Product group products use same styling as category products */
.beta-product-group-products-container .category-products,
.beta-product-group-products-container .products-grid {
    width: 100% !important;
}

.beta-product-group-products-container .category-products {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
}

.beta-product-group-products-container .category-products .product-item {
    flex: 0 0 calc(25% - 15px) !important;
    max-width: calc(25% - 15px) !important;
    min-width: 0;
    transition: flex 0.4s ease, max-width 0.4s ease, width 0.4s ease !important;
    margin-bottom: 0;
}

/* Converted cards in product groups (listview style) - 100% width, same as featured/special */
.beta-product-group-products-container .category-products .product-item[data-converted-to-two-item="true"]:not(.product-expanded):not(.featured-product):not(.product-in-specials),
.beta-product-group-products-container .category-products .product-item.single-item-wide[data-converted-to-two-item="true"]:not(.product-expanded):not(.featured-product):not(.product-in-specials) {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    min-width: 100% !important;
}

/* Featured and single-item-wide products in groups should be full width */
.beta-product-group-products-container .category-products .product-item.single-item-wide:not([data-converted-to-two-item="true"]),
.beta-product-group-products-container .category-products .product-item.featured-product,
.beta-product-group-products-container .category-products .product-item.product-in-specials {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* Two-item category layout in groups */
.beta-product-group-products-container .category-products.two-item-category .product-item:not(.product-expanded):not(.single-item-wide):not(.featured-product):not(.product-in-specials),
.beta-product-group-products-container .category-products .product-item.two-item-layout-card:not(.product-expanded):not(.single-item-wide):not(.featured-product):not(.product-in-specials) {
    flex: 0 0 calc(50% - 10px) !important;
    max-width: calc(50% - 10px) !important;
    width: calc(50% - 10px) !important;
}

/* Expanded products in groups - must override base product-item rules */
.beta-product-group-products-container .category-products .product-item.product-expanded,
.beta-product-group-products-container .category-products.two-item-category .product-item.product-expanded,
.beta-product-group-products-container .category-products.single-item-category .product-item.product-expanded,
.beta-product-group-products-container .category-products .product-item.product-expanded:not(.single-item-wide):not(.two-item-layout) {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    min-width: 100% !important;
    margin-bottom: 15px !important; /* Same spacing as regular cards */
    margin-top: 0 !important; /* No extra top margin */
    height: auto !important; /* Allow expanded cards to grow */
    min-height: auto !important; /* Remove fixed height for expanded cards */
}

/* Responsive sizing for product groups - same as categories */
@media (max-width: 1200px) {
    .beta-product-group-products-container .category-products .product-item:not(.single-item-wide):not(.two-item-layout) {
        flex: 0 0 calc(33.333% - 14px) !important;
        max-width: calc(33.333% - 14px) !important;
    }
}

@media (max-width: 992px) {
    .beta-product-group-products-container .category-products .product-item:not(.single-item-wide):not(.two-item-layout) {
        flex: 0 0 calc(33.333% - 14px) !important;
        max-width: calc(33.333% - 14px) !important;
    }
}

/* Mobile styles consolidated in main mobile media query below */

/* Products Container for each category (appears under the tab) */
.beta-category-products-container {
    grid-column: 1 / -1; /* Span full width below both tabs */
    /* grid-row will be set dynamically via JavaScript */
    margin-top: 0.1rem;
    margin-bottom: 0.1rem;
    padding: 0.1rem;
    background: var(--bs-body-bg, #fff);
    border-radius: 8px;
    border: 1px solid var(--bs-border-color, #e0e0e0);
    animation: slideDown 0.3s ease-out;
}

.dark-theme .beta-category-products-container {
    background: var(--bs-dark, #212529);
    border-color: var(--bs-border-color, #495057);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Products grid container */
.beta-category-products-container .products-grid {
    width: 100% !important;
}

/* Category products container - this is where products are actually placed */
.beta-category-products-container .category-products {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
    width: 100% !important;
    justify-content: center !important; /* Center cards to align with tabs above */
}

@media (max-width: 576px) {
    .beta-category-products-container .category-products {
        gap: 10px !important;
    }
}

/* Product items - use same sizing as store page */
.beta-category-products-container .category-products .product-item {
    flex: 0 0 calc(25% - 15px) !important;
    max-width: calc(25% - 15px) !important;
    min-width: 0;
    transition: flex 0.4s ease, max-width 0.4s ease, width 0.4s ease !important;
    /* Ensure consistent card heights - account for 3-line titles and larger images */
    display: flex;
    flex-direction: column;
    margin-bottom: 5px; /* Consistent spacing between cards */
}

/* CRITICAL: Converted cards MUST override the base 25% width - put this IMMEDIATELY after base rule */
/* Converted cards (listview style) - 100% width, internal structure is two-item layout (image left, text right) */
/* MAXIMUM SPECIFICITY - must override ALL other rules */
.beta-category-products-container .category-products .product-item[data-converted-to-two-item="true"],
.beta-category-products-container .category-products .product-item.single-item-wide[data-converted-to-two-item="true"],
.beta-category-products-container .category-products .product-item[data-converted-to-two-item="true"].single-item-wide {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    min-width: 100% !important;
    display: flex !important;
}

/* Converted cards MUST override the base 25% width rule - put this RIGHT AFTER the base rule */
.beta-category-products-container .category-products .product-item[data-converted-to-two-item="true"],
.beta-category-products-container .category-products .product-item.two-item-layout-card[data-converted-to-two-item="true"] {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    min-width: 100% !important;
}

/* Converted single cards should be listview (100% width) - MAXIMUM SPECIFICITY */
/* This MUST override ALL other rules including expanded, featured, etc. */
/* Internal structure uses two-item layout (image left, text right) */
/* Converted cards (listview style) - 100% width, same as featured/special */
.beta-category-products-container .category-products .product-item[data-converted-to-two-item="true"]:not(.product-expanded):not(.featured-product):not(.product-in-specials),
.beta-category-products-container .category-products .product-item.single-item-wide[data-converted-to-two-item="true"]:not(.product-expanded):not(.featured-product):not(.product-in-specials) {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    min-width: 100% !important;
}

/* Ensure product cards have proper structure and styling */
.beta-category-products-container .category-products .product-item .card,
.beta-category-products-container .category-products .product-item .product-card {
    display: flex;
    flex-direction: column;
    height: 520px; /* Fixed height so all cards are the same size */
    min-height: 520px; /* Increased to accommodate larger images (320px) + content */
    width: 100%;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
    background: var(--bs-body-bg, #fff);
}

.dark-theme .beta-category-products-container .category-products .product-item .card,
.dark-theme .beta-category-products-container .category-products .product-item .product-card {
    background: var(--bs-dark, #212529) !important;
    border-color: var(--bs-border-color, #495057);
}

.beta-category-products-container .category-products .product-item .card:hover,
.beta-category-products-container .category-products .product-item .product-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Reduce product title font size by 1 level (h5 -> h6 size) and make smaller */
.beta-category-products-container .product-title,
.beta-category-products-container h5.product-title,
.beta-category-products-container .card-title,
.beta-category-products-container h5.card-title,
.beta-product-group-products-container .product-title,
.beta-product-group-products-container h5.product-title,
.beta-product-group-products-container .card-title,
.beta-product-group-products-container h5.card-title {
    font-size: 0.9rem !important; /* Smaller than h6 (1rem) */
    font-weight: 600;
    line-height: 1.3 !important;
    /* Allow up to 3 lines with ellipsis if needed */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3; /* Standard property for compatibility */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Fixed height to account for exactly 3 lines - ensures all cards same size */
    height: calc(0.9rem * 1.3 * 3); /* Exactly 3 lines height */
    min-height: calc(0.9rem * 1.3 * 3); /* 3 lines minimum */
    max-height: calc(0.9rem * 1.3 * 3); /* 3 lines maximum */
}

.beta-category-products-container .category-products .product-item .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    padding-bottom: 0.75rem; /* Reduce bottom padding */
    background: var(--bs-body-bg, #fff);
}

.dark-theme .beta-category-products-container .category-products .product-item .card-body {
    background: var(--bs-dark, #212529);
    color: var(--bs-body-color, #f1f1f1);
}

.beta-category-products-container .category-products .product-item .card-img-top,
.beta-category-products-container .category-products .product-item .product-image,
.beta-category-products-container .category-products .product-item img,
.beta-category-products-container .category-products .product-item .single-item-image img,
.beta-category-products-container .category-products .product-item .two-item-image img {
    width: 100%;
    height: auto; /* Let images use their natural aspect ratio */
    min-height: 200px; /* Minimum height to ensure images aren't too small */
    max-height: 350px; /* Increased max height to allow larger images */
    object-fit: contain;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    padding: 0; /* Remove padding from images themselves */
    display: block;
    flex-shrink: 0; /* Prevent image from shrinking */
    border-radius: 0 !important; /* Remove rounded corners to match regular cards */
}

/* Ensure image containers have consistent sizing */
.beta-category-products-container .category-products .product-item .single-item-image,
.beta-category-products-container .category-products .product-item .two-item-image {
    width: 100%; /* Fill container width */
    height: auto; /* Let container adapt to image */
    min-height: 200px; /* Minimum height for consistency */
    max-height: 350px; /* Increased max height to allow larger images */
    overflow: hidden;
    display: flex;
    align-items: stretch; /* Stretch to fill container height */
    justify-content: center;
    flex-shrink: 0;
    padding: 0; /* No padding at all */
    margin: 0; /* Remove any margins */
    border-radius: 0 !important; /* Remove rounded corners to match regular cards */
}

/* Override common.css rounded corners on two-item images */
.beta-category-products-container .category-products .product-item .two-item-image .product-image,
.beta-category-products-container .category-products .product-item.two-item-layout-card .two-item-image .product-image,
.beta-category-products-container .category-products.two-item-category .product-item .two-item-image .product-image {
    border-radius: 0 !important; /* Remove rounded corners to match regular cards */
}

.beta-product-group-products-container .category-products .product-item .two-item-image .product-image,
.beta-product-group-products-container .category-products .product-item.two-item-layout-card .two-item-image .product-image,
.beta-product-group-products-container .category-products.two-item-category .product-item .two-item-image .product-image {
    border-radius: 0 !important; /* Remove rounded corners to match regular cards */
}

/* Ensure two-item cards have same height as regular cards */
.beta-category-products-container .category-products .product-item.two-item-layout-card,
.beta-category-products-container .category-products.two-item-category .product-item,
.beta-product-group-products-container .category-products .product-item.two-item-layout-card,
.beta-product-group-products-container .category-products.two-item-category .product-item {
    height: 520px !important; /* Fixed height to match regular cards */
    min-height: 520px !important; /* Match regular cards */
}

.beta-category-products-container .category-products .product-item.two-item-layout-card .card,
.beta-category-products-container .category-products.two-item-category .product-item .card,
.beta-category-products-container .category-products .product-item.two-item-layout-card .product-card,
.beta-category-products-container .category-products.two-item-category .product-item .product-card,
.beta-product-group-products-container .category-products .product-item.two-item-layout-card .card,
.beta-product-group-products-container .category-products.two-item-category .product-item .card,
.beta-product-group-products-container .category-products .product-item.two-item-layout-card .product-card,
.beta-product-group-products-container .category-products.two-item-category .product-item .product-card {
    height: 520px !important; /* Fixed height to match regular cards */
    min-height: 520px !important; /* Match regular cards */
}

/* Ensure two-item cards have same attribute badge positioning as regular cards (bottom left) */
.beta-category-products-container .category-products .product-item.two-item-layout-card .product-attribute-icons,
.beta-category-products-container .category-products.two-item-category .product-item .product-attribute-icons,
.beta-product-group-products-container .category-products .product-item.two-item-layout-card .product-attribute-icons,
.beta-product-group-products-container .category-products.two-item-category .product-item .product-attribute-icons {
    position: absolute !important;
    bottom: 10px !important; /* Match regular cards - bottom left positioning */
    left: 10px !important; /* Match regular cards - bottom left positioning */
    top: auto !important;
    right: auto !important;
    z-index: 10 !important; /* Match regular cards z-index */
}

/* Reduce spacing for expanded cards - images should fill more space */
.beta-category-products-container .category-products .product-item.product-expanded .single-item-image,
.beta-category-products-container .category-products .product-item.product-expanded .two-item-image {
    padding: 0 !important; /* No padding for expanded cards */
    margin: 0 !important;
    align-items: stretch !important; /* Stretch to fill container */
}

.beta-category-products-container .category-products .product-item.product-expanded .single-item-image img,
.beta-category-products-container .category-products .product-item.product-expanded .two-item-image img,
.beta-category-products-container .category-products .product-item.product-expanded .product-image {
    padding: 0 !important;
    margin: 0 !important;
    max-height: 400px !important; /* Allow larger images in expanded cards */
}

/* Remove padding from parent content containers for expanded cards */
.beta-category-products-container .category-products .product-item.product-expanded .single-item-content,
.beta-category-products-container .category-products .product-item.product-expanded .two-item-content {
    padding-top: 0 !important; /* Remove top padding */
    padding-bottom: 0 !important; /* Remove bottom padding */
    margin-top: 0 !important; /* Remove top margin */
    margin-bottom: 0 !important; /* Remove bottom margin */
}

.beta-category-products-container .category-products .product-item.product-expanded .single-item-content .single-item-image,
.beta-category-products-container .category-products .product-item.product-expanded .two-item-content .two-item-image {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Remove all spacing above images and below cards - override common.css */
/* BUT converted cards need padding like featured/special items */
.beta-category-products-container .category-products .product-item:not([data-converted-to-two-item="true"]) .single-item-content,
.beta-category-products-container .category-products .product-item:not([data-converted-to-two-item="true"]) .two-item-content {
    padding: 0 !important; /* Override common.css padding: 15px - remove all padding */
    margin: 0 !important; /* Remove all margins */
    gap: 0 !important; /* Remove gap between image and content */
}

.beta-category-products-container .category-products .product-item .card,
.beta-category-products-container .category-products .product-item .product-card {
    padding: 0 !important; /* No padding on card */
    margin-bottom: 0 !important; /* No bottom margin on card */
}

.beta-category-products-container .category-products .product-item .single-item-info,
.beta-category-products-container .category-products .product-item .two-item-info,
.beta-category-products-container .category-products .product-item .card-body {
    padding: 0.5rem 0.75rem !important; /* Minimal padding inside info section */
    margin: 0 !important; /* No margins */
}

/* Force product details to display on separate lines - override any inline styles or other CSS */
.beta-category-products-container .category-products .product-item .product-details small.d-block,
.beta-category-products-container .category-products .product-item .product-details small {
    display: block !important;
    margin-bottom: 0.25rem !important;
    line-height: 1.4 !important;
    width: 100% !important;
}

.beta-category-products-container .category-products .product-item .product-details small:last-child {
    margin-bottom: 0 !important;
}

.beta-category-products-container .category-products .product-item .product-details small:last-child {
    margin-bottom: 0 !important;
}

/* Also apply to product groups */
.beta-product-group-products-container .category-products .product-item .product-details small.d-block,
.beta-product-group-products-container .category-products .product-item .product-details small {
    display: block !important;
    margin-bottom: 0.25rem !important;
    line-height: 1.4 !important;
    width: 100% !important;
}

.beta-product-group-products-container .category-products .product-item .product-details small:last-child {
    margin-bottom: 0 !important;
}

.beta-category-products-container .category-products .product-item .single-item-content .single-item-image,
.beta-category-products-container .category-products .product-item .two-item-content .two-item-image {
    margin: 0 !important;
    padding: 0 !important;
}

/* Product group cards - same consistent sizing */
.beta-product-group-products-container .category-products .product-item .card,
.beta-product-group-products-container .category-products .product-item .product-card {
    min-height: 520px; /* Increased to accommodate larger images (320px) + content */
    height: 520px; /* Fixed height so all cards are the same size */
    display: flex;
    flex-direction: column;
}

/* Expanded cards in product groups - ensure card is full width */
.beta-product-group-products-container .category-products .product-item.product-expanded .card,
.beta-product-group-products-container .category-products .product-item.product-expanded .product-card {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    height: auto !important;
    min-height: auto !important;
}

.beta-product-group-products-container .category-products .product-item .product-image,
.beta-product-group-products-container .category-products .product-item img,
.beta-product-group-products-container .category-products .product-item .single-item-image img,
.beta-product-group-products-container .category-products .product-item .two-item-image img {
    width: 100% !important; /* Fill container width */
    height: auto !important; /* Let images use their natural aspect ratio */
    max-height: 350px !important; /* Increased max height to allow larger images */
    object-fit: contain;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    padding: 0 !important; /* Remove padding from images themselves */
    display: block;
    flex-shrink: 0; /* Prevent image from shrinking */
    border-radius: 0 !important; /* Remove rounded corners to match regular cards */
}

.beta-product-group-products-container .category-products .product-item .single-item-image,
.beta-product-group-products-container .category-products .product-item .two-item-image {
    width: 100% !important; /* Fill container width */
    height: auto !important; /* Let container adapt to image */
    max-height: 350px !important; /* Increased max height to allow larger images */
    overflow: hidden !important;
    display: flex;
    align-items: stretch !important; /* Stretch to fill container height */
    justify-content: center;
    padding: 0 !important; /* No padding at all */
    margin: 0 !important; /* Remove any margins */
    flex-shrink: 0;
    border-radius: 0 !important; /* Remove rounded corners to match regular cards */
}

/* Reduce spacing for expanded cards in product groups */
.beta-product-group-products-container .category-products .product-item.product-expanded .single-item-image,
.beta-product-group-products-container .category-products .product-item.product-expanded .two-item-image {
    padding: 0 !important;
    margin: 0 !important;
    align-items: stretch !important; /* Stretch to fill container */
}

.beta-product-group-products-container .category-products .product-item.product-expanded .single-item-image img,
.beta-product-group-products-container .category-products .product-item.product-expanded .two-item-image img,
.beta-product-group-products-container .category-products .product-item.product-expanded .product-image {
    padding: 0 !important;
    margin: 0 !important;
    max-height: 400px !important; /* Allow larger images in expanded cards */
}

/* Remove padding from parent content containers for expanded cards in product groups */
.beta-product-group-products-container .category-products .product-item.product-expanded .single-item-content,
.beta-product-group-products-container .category-products .product-item.product-expanded .two-item-content {
    padding-top: 0 !important; /* Remove top padding */
    padding-bottom: 0 !important; /* Remove bottom padding */
}

.beta-product-group-products-container .category-products .product-item.product-expanded .single-item-content .single-item-image,
.beta-product-group-products-container .category-products .product-item.product-expanded .two-item-content .two-item-image {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Ensure product cards have proper styling */
.beta-category-products-container .products-grid .product-item .product-card,
.beta-category-products-container .products-grid .product-item .card {
    width: 100%;
    max-width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.beta-category-products-container .products-grid .product-item .product-image,
.beta-category-products-container .products-grid .product-item img.product-image {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Responsive sizing - same as store page */
@media (max-width: 1200px) {
    .beta-category-products-container .category-products .product-item:not(.single-item-wide):not(.two-item-layout) {
        flex: 0 0 calc(33.333% - 14px) !important;
        max-width: calc(33.333% - 14px) !important;
    }
}

@media (max-width: 992px) {
    .beta-category-products-container .category-products .product-item:not(.single-item-wide):not(.two-item-layout) {
        flex: 0 0 calc(33.333% - 14px) !important;
        max-width: calc(33.333% - 14px) !important;
    }
}

@media (max-width: 768px) {
    /* MOBILE: Force 2 columns for regular items - override ALL other rules including common.css */
    /* Even if items have single-item-wide class, force 2 columns if category is regular (not list-view-active, not single-item-category) */
    /* This specifically overrides common.css rules that force single-item-wide to be 100% width */
    /* EXCLUDE converted cards - they should be 100% width (listview) */
    .beta-category-products-container .category-products:not(.list-view-active):not(.single-item-category) .product-item:not(.featured-product):not(.product-in-specials):not(.product-expanded):not([data-converted-to-two-item="true"]),
    .beta-category-products-container .category-products:not(.list-view-active):not(.single-item-category) .product-item.single-item-wide:not(.featured-product):not(.product-in-specials):not(.product-expanded):not([data-converted-to-two-item="true"]) {
        flex: 0 0 calc(50% - 10px) !important;
        max-width: calc(50% - 10px) !important;
        width: calc(50% - 10px) !important;
        min-width: calc(50% - 10px) !important;
    }
    
    /* MOBILE: Converted cards MUST be 100% width (listview) - override the 50% rule above */
    .beta-category-products-container .category-products .product-item[data-converted-to-two-item="true"]:not(.product-expanded),
    .beta-category-products-container .category-products .product-item.single-item-wide[data-converted-to-two-item="true"]:not(.product-expanded) {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        min-width: 100% !important;
    }
    
    /* Hide descriptions on mobile for regular, featured, and special cards (not expanded) */
    .beta-category-products-container .category-products .product-item:not(.product-expanded) .product-description,
    .beta-category-products-container .category-products .product-item:not(.product-expanded) .card-body .product-description,
    .beta-category-products-container .category-products .product-item:not(.product-expanded) .single-item-info .product-description,
    .beta-category-products-container .category-products .product-item:not(.product-expanded) .two-item-info .product-description,
    .beta-category-products-container .category-products .product-item.featured-product:not(.product-expanded) .product-description,
    .beta-category-products-container .category-products .product-item.single-item-wide:not(.product-expanded) .product-description,
    .beta-category-products-container .category-products .product-item:not(.product-expanded) .card-text.product-description,
    .beta-category-products-container .category-products .product-item:not(.product-expanded) p.product-description {
        display: none !important;
    }
    
    /* Show descriptions when expanded on mobile */
    .beta-category-products-container .category-products .product-item.product-expanded .product-description,
    .beta-category-products-container .category-products .product-item.product-expanded .product-expanded-description,
    .beta-category-products-container .category-products .product-item.product-expanded .card-text.product-description,
    .beta-category-products-container .category-products .product-item.product-expanded p.product-description {
        display: block !important;
    }
    
    /* ALL cards on mobile: image full width, content below (stacked layout) */
    /* Force stacked layout for regular items (2 columns) even if they have single-item-wide structure */
    /* EXCLUDE converted cards (data-converted-to-two-item) - they should be two columns like featured/special */
    .beta-category-products-container .category-products:not(.list-view-active):not(.single-item-category) .product-item:not(.featured-product):not(.product-in-specials):not(.product-expanded):not([data-converted-to-two-item="true"]) .single-item-content,
    .beta-category-products-container .category-products:not(.list-view-active):not(.single-item-category) .product-item:not(.featured-product):not(.product-in-specials):not(.product-expanded):not([data-converted-to-two-item="true"]) .two-item-content,
    .beta-category-products-container .category-products:not(.list-view-active):not(.single-item-category) .product-item:not(.featured-product):not(.product-in-specials):not(.product-expanded):not([data-converted-to-two-item="true"]) .card {
        flex-direction: column !important;
        display: flex !important;
    }
    
    /* Converted cards (listview style) - two columns (image left, text right) on mobile, same as featured/special */
    /* MAXIMUM SPECIFICITY - MUST override ALL other rules including common.css */
    .beta-category-products-container .category-products .product-item.single-item-wide[data-converted-to-two-item="true"]:not(.product-expanded) .single-item-content,
    .beta-category-products-container .category-products .product-item[data-converted-to-two-item="true"].single-item-wide:not(.product-expanded) .single-item-content,
    .beta-category-products-container .category-products .product-item[data-converted-to-two-item="true"]:not(.product-expanded) .single-item-content {
        display: flex !important;
        flex-direction: row !important; /* Image left, text right - same as featured/special */
        align-items: flex-start !important;
        gap: 15px !important;
        padding: 15px !important; /* Add padding like featured/special items */
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Image container - must be 33% width, NOT full width - MAXIMUM SPECIFICITY */
    .beta-category-products-container .category-products .product-item.single-item-wide[data-converted-to-two-item="true"]:not(.product-expanded) .single-item-image,
    .beta-category-products-container .category-products .product-item[data-converted-to-two-item="true"].single-item-wide:not(.product-expanded) .single-item-image,
    .beta-category-products-container .category-products .product-item[data-converted-to-two-item="true"]:not(.product-expanded) .single-item-image {
        flex: 0 0 33% !important; /* Same as featured/special items */
        max-width: 33% !important;
        min-width: 33% !important;
        width: 33% !important;
        /* Override any full-width rules */
        flex-shrink: 0 !important;
        flex-grow: 0 !important;
        box-sizing: border-box !important;
    }
    
    /* Image inside - must NOT be full width - MAXIMUM SPECIFICITY */
    .beta-category-products-container .category-products .product-item.single-item-wide[data-converted-to-two-item="true"]:not(.product-expanded) .single-item-image .product-image,
    .beta-category-products-container .category-products .product-item.single-item-wide[data-converted-to-two-item="true"]:not(.product-expanded) .single-item-image img,
    .beta-category-products-container .category-products .product-item[data-converted-to-two-item="true"]:not(.product-expanded) .single-item-image .product-image,
    .beta-category-products-container .category-products .product-item[data-converted-to-two-item="true"]:not(.product-expanded) .single-item-image img {
        width: 100% !important; /* 100% of the 33% container */
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
        display: block !important;
        box-sizing: border-box !important;
    }
    
    /* Info container - must be flex: 1 to take remaining space - MAXIMUM SPECIFICITY */
    .beta-category-products-container .category-products .product-item.single-item-wide[data-converted-to-two-item="true"]:not(.product-expanded) .single-item-info,
    .beta-category-products-container .category-products .product-item[data-converted-to-two-item="true"].single-item-wide:not(.product-expanded) .single-item-info,
    .beta-category-products-container .category-products .product-item[data-converted-to-two-item="true"]:not(.product-expanded) .single-item-info {
        flex: 1 1 auto !important;
        width: auto !important; /* NOT full width */
        max-width: 67% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
    
    /* Expanded cards on mobile: image full width, content below (stacked) */
    .beta-category-products-container .category-products .product-item.product-expanded .single-item-content,
    .beta-category-products-container .category-products .product-item.product-expanded .two-item-content,
    .beta-category-products-container .category-products .product-item.product-expanded .card {
        flex-direction: column !important;
        display: flex !important;
    }
    
    /* Regular items (2 columns): image and content should stack */
    .beta-category-products-container .category-products:not(.list-view-active):not(.single-item-category) .product-item:not(.featured-product):not(.product-in-specials):not(.product-expanded) .single-item-image,
    .beta-category-products-container .category-products:not(.list-view-active):not(.single-item-category) .product-item:not(.featured-product):not(.product-in-specials):not(.product-expanded) .two-item-image,
    .beta-category-products-container .category-products:not(.list-view-active):not(.single-item-category) .product-item:not(.featured-product):not(.product-in-specials):not(.product-expanded) .product-image {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 auto !important;
    }
    
    .beta-category-products-container .category-products:not(.list-view-active):not(.single-item-category) .product-item:not(.featured-product):not(.product-in-specials):not(.product-expanded) .single-item-info,
    .beta-category-products-container .category-products:not(.list-view-active):not(.single-item-category) .product-item:not(.featured-product):not(.product-in-specials):not(.product-expanded) .two-item-info,
    .beta-category-products-container .category-products:not(.list-view-active):not(.single-item-category) .product-item:not(.featured-product):not(.product-in-specials):not(.product-expanded) .card-body {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 auto !important;
    }
    
    /* Expanded cards on mobile: image full width, content below */
    .beta-category-products-container .category-products .product-item.product-expanded .single-item-image,
    .beta-category-products-container .category-products .product-item.product-expanded .two-item-image,
    .beta-category-products-container .category-products .product-item.product-expanded .product-image,
    .beta-category-products-container .category-products .product-item.product-expanded img.product-image {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
    
    .beta-category-products-container .category-products .product-item.product-expanded .single-item-info,
    .beta-category-products-container .category-products .product-item.product-expanded .two-item-info,
    .beta-category-products-container .category-products .product-item.product-expanded .card-body {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 auto !important;
    }
    
    /* MOBILE: Product groups - Force 2 columns for regular items */
    .beta-product-group-products-container .category-products:not(.list-view-active):not(.single-item-category) .product-item:not(.featured-product):not(.product-in-specials):not(.product-expanded),
    .beta-product-group-products-container .category-products:not(.list-view-active):not(.single-item-category) .product-item.single-item-wide:not(.featured-product):not(.product-in-specials):not(.product-expanded) {
        flex: 0 0 calc(50% - 10px) !important;
        max-width: calc(50% - 10px) !important;
        width: calc(50% - 10px) !important;
        min-width: calc(50% - 10px) !important;
    }
    
    /* Only featured items or items in list-view-active categories should be full width for product groups */
    .beta-product-group-products-container .category-products.list-view-active .product-item,
    .beta-product-group-products-container .category-products.single-item-category .product-item,
    .beta-product-group-products-container .category-products .product-item.featured-product {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .beta-product-group-products-container .category-products .product-item:not(.product-expanded) .product-description,
    .beta-product-group-products-container .category-products .product-item:not(.product-expanded) .card-body .product-description,
    .beta-product-group-products-container .category-products .product-item:not(.product-expanded) .single-item-info .product-description,
    .beta-product-group-products-container .category-products .product-item:not(.product-expanded) .two-item-info .product-description,
    .beta-product-group-products-container .category-products .product-item.featured-product:not(.product-expanded) .product-description,
    .beta-product-group-products-container .category-products .product-item.single-item-wide:not(.product-expanded) .product-description,
    .beta-product-group-products-container .category-products .product-item:not(.product-expanded) .card-text.product-description,
    .beta-product-group-products-container .category-products .product-item:not(.product-expanded) p.product-description {
        display: none !important;
    }
    
    /* Show descriptions when expanded on mobile */
    .beta-product-group-products-container .category-products .product-item.product-expanded .product-description,
    .beta-product-group-products-container .category-products .product-item.product-expanded .product-expanded-description,
    .beta-product-group-products-container .category-products .product-item.product-expanded .card-text.product-description,
    .beta-product-group-products-container .category-products .product-item.product-expanded p.product-description {
        display: block !important;
    }
    
    /* ALL cards on mobile: image full width, content below (stacked layout) for product groups */
    /* EXCLUDE converted cards (data-converted-to-two-item) - they should be two columns like featured/special */
    .beta-product-group-products-container .category-products:not(.list-view-active):not(.single-item-category) .product-item:not(.featured-product):not(.product-in-specials):not(.product-expanded):not([data-converted-to-two-item="true"]) .single-item-content,
    .beta-product-group-products-container .category-products:not(.list-view-active):not(.single-item-category) .product-item:not(.featured-product):not(.product-in-specials):not(.product-expanded):not([data-converted-to-two-item="true"]) .two-item-content,
    .beta-product-group-products-container .category-products:not(.list-view-active):not(.single-item-category) .product-item:not(.featured-product):not(.product-in-specials):not(.product-expanded):not([data-converted-to-two-item="true"]) .card {
        flex-direction: column !important;
        display: flex !important;
    }
    
    /* Converted cards (listview style) in product groups - two columns (image left, text right) on mobile, same as featured/special */
    /* MUST override all stacking rules for converted cards */
    .beta-product-group-products-container .category-products .product-item[data-converted-to-two-item="true"]:not(.product-expanded) .single-item-content,
    .beta-product-group-products-container .category-products .product-item.single-item-wide[data-converted-to-two-item="true"]:not(.product-expanded) .single-item-content {
        display: flex !important;
        flex-direction: row !important; /* Image left, text right - same as featured/special */
        align-items: flex-start !important;
        gap: 15px !important;
        padding: 15px !important; /* Add padding like featured/special items */
    }
    
    /* Image container - must be 33% width, NOT full width */
    .beta-product-group-products-container .category-products .product-item[data-converted-to-two-item="true"]:not(.product-expanded) .single-item-image,
    .beta-product-group-products-container .category-products .product-item.single-item-wide[data-converted-to-two-item="true"]:not(.product-expanded) .single-item-image {
        flex: 0 0 33% !important; /* Same as featured/special items */
        max-width: 33% !important;
        min-width: 0 !important;
        width: 33% !important;
        /* Override any full-width rules */
        flex-shrink: 0 !important;
    }
    
    /* Image inside - must NOT be full width */
    .beta-product-group-products-container .category-products .product-item[data-converted-to-two-item="true"]:not(.product-expanded) .single-item-image .product-image,
    .beta-product-group-products-container .category-products .product-item[data-converted-to-two-item="true"]:not(.product-expanded) .single-item-image img,
    .beta-product-group-products-container .category-products .product-item.single-item-wide[data-converted-to-two-item="true"]:not(.product-expanded) .single-item-image .product-image,
    .beta-product-group-products-container .category-products .product-item.single-item-wide[data-converted-to-two-item="true"]:not(.product-expanded) .single-item-image img {
        width: 100% !important; /* 100% of the 33% container */
        max-width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
    }
    
    /* Info container - must be flex: 1 to take remaining space */
    .beta-product-group-products-container .category-products .product-item[data-converted-to-two-item="true"]:not(.product-expanded) .single-item-info,
    .beta-product-group-products-container .category-products .product-item.single-item-wide[data-converted-to-two-item="true"]:not(.product-expanded) .single-item-info {
        flex: 1 !important;
        width: auto !important; /* NOT full width */
        max-width: none !important;
    }
    
    /* Regular items (2 columns): image and content should stack for product groups */
    .beta-product-group-products-container .category-products:not(.list-view-active):not(.single-item-category) .product-item:not(.featured-product):not(.product-in-specials):not(.product-expanded) .single-item-image,
    .beta-product-group-products-container .category-products:not(.list-view-active):not(.single-item-category) .product-item:not(.featured-product):not(.product-in-specials):not(.product-expanded) .two-item-image,
    .beta-product-group-products-container .category-products:not(.list-view-active):not(.single-item-category) .product-item:not(.featured-product):not(.product-in-specials):not(.product-expanded) .product-image {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 auto !important;
    }
    
    .beta-product-group-products-container .category-products:not(.list-view-active):not(.single-item-category) .product-item:not(.featured-product):not(.product-in-specials):not(.product-expanded) .single-item-info,
    .beta-product-group-products-container .category-products:not(.list-view-active):not(.single-item-category) .product-item:not(.featured-product):not(.product-in-specials):not(.product-expanded) .two-item-info,
    .beta-product-group-products-container .category-products:not(.list-view-active):not(.single-item-category) .product-item:not(.featured-product):not(.product-in-specials):not(.product-expanded) .card-body {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 auto !important;
    }
    
    /* Expanded cards on mobile: image full width, content below (stacked) */
    .beta-product-group-products-container .category-products .product-item.product-expanded .single-item-content,
    .beta-product-group-products-container .category-products .product-item.product-expanded .two-item-content,
    .beta-product-group-products-container .category-products .product-item.product-expanded .card {
        flex-direction: column !important;
        display: flex !important;
    }
    
    .beta-product-group-products-container .category-products .product-item.product-expanded .single-item-image,
    .beta-product-group-products-container .category-products .product-item.product-expanded .two-item-image,
    .beta-product-group-products-container .category-products .product-item.product-expanded .product-image,
    .beta-product-group-products-container .category-products .product-item.product-expanded img.product-image {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }
    
    .beta-product-group-products-container .category-products .product-item.product-expanded .single-item-info,
    .beta-product-group-products-container .category-products .product-item.product-expanded .two-item-info,
    .beta-product-group-products-container .category-products .product-item.product-expanded .card-body {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 auto !important;
    }
}

@media (max-width: 576px) {
    /* MOBILE: Small screens - still 2 columns for regular items */
    .beta-category-products-container .category-products:not(.list-view-active) .product-item:not(.single-item-wide):not(.two-item-layout):not(.product-expanded):not(.featured-product):not(.product-in-specials),
    .beta-category-products-container .category-products:not(.list-view-active):not(.single-item-category) .product-item:not(.single-item-wide):not(.two-item-layout):not(.product-expanded):not(.featured-product):not(.product-in-specials) {
        flex: 0 0 calc(50% - 10px) !important;
        max-width: calc(50% - 10px) !important;
        width: calc(50% - 10px) !important;
        min-width: calc(50% - 10px) !important;
    }
    
    .beta-product-group-products-container .category-products:not(.list-view-active) .product-item:not(.single-item-wide):not(.two-item-layout):not(.product-expanded):not(.featured-product):not(.product-in-specials),
    .beta-product-group-products-container .category-products:not(.list-view-active):not(.single-item-category) .product-item:not(.single-item-wide):not(.two-item-layout):not(.product-expanded):not(.featured-product):not(.product-in-specials) {
        flex: 0 0 calc(50% - 10px) !important;
        max-width: calc(50% - 10px) !important;
        width: calc(50% - 10px) !important;
        min-width: calc(50% - 10px) !important;
    }
    
    /* Ensure single-item-wide, featured, and specials are full width */
    /* BUT converted cards with two-item-layout-card should be 50% width */
    .beta-category-products-container .category-products .product-item.single-item-wide:not(.two-item-layout-card),
    .beta-category-products-container .category-products .product-item.featured-product,
    .beta-category-products-container .category-products .product-item.product-in-specials,
    .beta-product-group-products-container .category-products .product-item.single-item-wide:not(.two-item-layout-card),
    .beta-product-group-products-container .category-products .product-item.featured-product,
    .beta-product-group-products-container .category-products .product-item.product-in-specials {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* Two-item category layout */
.beta-category-products-container .category-products.two-item-category .product-item:not(.product-expanded):not(.single-item-wide):not(.featured-product):not(.product-in-specials),
.beta-category-products-container .category-products .product-item.two-item-layout-card:not(.product-expanded):not(.single-item-wide):not(.featured-product):not(.product-in-specials) {
    flex: 0 0 calc(50% - 10px) !important;
    max-width: calc(50% - 10px) !important;
    width: calc(50% - 10px) !important;
}

/* Expanded products should span full width (4 columns) and move to top - Desktop default */
/* BUT converted cards should stay at 50% width even if expanded class is added */
.beta-category-products-container .category-products .product-item.product-expanded:not([data-converted-to-two-item="true"]),
.beta-category-products-container .category-products.two-item-category .product-item.product-expanded:not([data-converted-to-two-item="true"]),
.beta-category-products-container .category-products.single-item-category .product-item.product-expanded:not([data-converted-to-two-item="true"]),
.beta-category-products-container .category-products .product-item.single-item-wide.product-expanded:not([data-converted-to-two-item="true"]),
.beta-product-group-products-container .category-products .product-item.product-expanded:not([data-converted-to-two-item="true"]) {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
    min-width: 100% !important;
 /* Move to top of flex container */
    margin-bottom: 15px !important; /* Same spacing as regular cards */
    margin-top: 0 !important; /* No extra top margin */
    height: auto !important; /* Allow expanded cards to grow */
    min-height: auto !important; /* Remove fixed height for expanded cards */
    transition: flex 0.4s ease, max-width 0.4s ease, width 0.4s ease !important;
}

/* Desktop: Ensure expanded products work correctly and move to top */
@media (min-width: 769px) {
    .beta-category-products-container .category-products .product-item.product-expanded,
    .beta-category-products-container .category-products.two-item-category .product-item.product-expanded,
    .beta-category-products-container .category-products.single-item-category .product-item.product-expanded,
    .beta-category-products-container .category-products .product-item.product-expanded:not(.single-item-wide):not(.two-item-layout),
    .beta-category-products-container .category-products .product-item.single-item-wide.product-expanded,
    .beta-product-group-products-container .category-products .product-item.product-expanded,
    .beta-product-group-products-container .category-products.two-item-category .product-item.product-expanded,
    .beta-product-group-products-container .category-products.single-item-category .product-item.product-expanded,
    .beta-product-group-products-container .category-products .product-item.product-expanded:not(.single-item-wide):not(.two-item-layout),
    .beta-product-group-products-container .category-products .product-item.single-item-wide.product-expanded {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        min-width: 100% !important;
 /* Move to top */
        margin-bottom: 15px !important; /* Same spacing as regular cards */
        margin-top: 0 !important; /* No extra top margin */
        height: auto !important; /* Allow expanded cards to grow */
        min-height: auto !important; /* Remove fixed height for expanded cards */
    }
    
    /* Ensure the card itself is also full width for product groups */
    .beta-product-group-products-container .category-products .product-item.product-expanded .card,
    .beta-product-group-products-container .category-products .product-item.product-expanded .product-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
    }
    
    /* Ensure parent container allows wrapping */
    .beta-category-products-container .category-products,
    .beta-product-group-products-container .category-products {
        flex-wrap: wrap !important;
    }
}

/* Single item wide and featured items */
/* BUT converted cards with two-item-layout-card should be 50% width */
/* Featured and single-item-wide products should be full width (including converted cards) */
.beta-category-products-container .category-products .product-item.single-item-wide,
.beta-category-products-container .category-products .product-item.featured-product,
.beta-category-products-container .category-products .product-item.product-in-specials {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* List view active (mobile) */
.beta-category-products-container .category-products.list-view-active .product-item {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* Product group banners - span full width BETWEEN category tab rows */
.beta-category-tabs-grid .product-group-banner-container {
    grid-column: 1 / -1; /* Span full width of grid */
    margin: 0.25rem 0;
    width: 100%;
}

/* Product group banner hero styling - match store page */
.beta-category-tabs-grid .product-group-banner-hero {
    position: relative;
    width: 100%;
    min-height: 200px;
    margin-bottom: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.beta-category-tabs-grid .product-group-banner-media {
    width: 100%;
    min-height: 200px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.beta-category-tabs-grid .product-group-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.2) 50%,
        rgba(0, 0, 0, 0.6) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.beta-category-tabs-grid .product-group-banner-overlay .container {
    position: relative;
    z-index: 1;
}

.beta-category-tabs-grid .product-group-banner-overlay .row {
    align-items: center;
}

.beta-category-tabs-grid .product-group-banner-overlay .col-md-8 {
    text-align: left;
}

.beta-category-tabs-grid .product-group-banner-overlay .col-md-4 {
    text-align: right;
}

.beta-category-tabs-grid .product-group-banner-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.beta-category-tabs-grid .product-group-banner-description {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.95;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Also apply to product-group-banner-hero without beta-category-tabs-grid prefix for consistency */
.product-group-banner-hero {
    position: relative;
    width: 100%;
    min-height: 200px;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.product-group-banner-media {
    width: 100%;
    min-height: 200px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.product-group-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.2) 50%,
        rgba(0, 0, 0, 0.6) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.product-group-banner-overlay .container {
    position: relative;
    z-index: 1;
}

.product-group-banner-overlay .row {
    align-items: center;
}

.product-group-banner-overlay .col-md-8 {
    text-align: left;
}

.product-group-banner-overlay .col-md-4 {
    text-align: right;
}

.product-group-banner-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.product-group-banner-description {
    font-size: 1.1rem;
    margin: 0;
    opacity: 0.95;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.product-group-banner-subtitle {
    font-size: 0.95rem;
    margin-top: 0.5rem;
    opacity: 0.9;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

@media (max-width: 768px) {
    .beta-category-tabs-grid .product-group-banner-hero,
    .product-group-banner-hero {
        min-height: 150px;
    }
    
    .beta-category-tabs-grid .product-group-banner-media,
    .product-group-banner-media {
        min-height: 150px;
    }
    
    .beta-category-tabs-grid .product-group-banner-overlay,
    .product-group-banner-overlay {
        padding: 1.5rem;
    }
    
    .beta-category-tabs-grid .product-group-banner-title,
    .product-group-banner-title {
        font-size: 1.6rem;
    }
    
    .beta-category-tabs-grid .product-group-banner-description,
    .product-group-banner-description {
        font-size: 1rem;
    }
}

/* Products Container (old - for backward compatibility) */
.beta-products-container {
    margin-top: 2rem;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Products Grid - same as store page */
.beta-products-container #products-grid {
    width: 100%;
}

.beta-products-container #products-grid .category-products {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
    width: 100% !important;
}

.beta-products-container #products-grid .product-item {
    flex: 0 0 calc(25% - 15px) !important;
    max-width: calc(25% - 15px) !important;
    min-width: 0;
    transition: flex 0.4s ease, max-width 0.4s ease, width 0.4s ease !important;
}

/* Override for special layouts */
.beta-products-container #products-grid .category-products.single-item-category .product-item,
.beta-products-container #products-grid .category-products.list-view-active .product-item {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
}

.beta-products-container #products-grid .category-products.two-item-category .product-item {
    flex: 0 0 calc(50% - 10px) !important;
    max-width: calc(50% - 10px) !important;
    width: calc(50% - 10px) !important;
}

@media (max-width: 992px) {
    .beta-products-container #products-grid .product-item {
        flex: 0 0 calc(33.333% - 14px) !important;
        max-width: calc(33.333% - 14px) !important;
    }
}

@media (max-width: 768px) {
    .beta-products-container #products-grid .product-item {
        flex: 0 0 calc(50% - 10px) !important;
        max-width: calc(50% - 10px) !important;
    }
}

@media (max-width: 576px) {
    .beta-products-container #products-grid .product-item {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* Beta unified scrollers - one layout for all sections */
.beta-unified-scrollers {
    margin-bottom: 2rem;
}
.beta-unified-section {
    margin-bottom: 1.5rem;
}
.beta-unified-section-header {
    padding: 0.5rem 0 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
}
.beta-unified-section-header-visual {
    min-height: 2.75rem;
    padding: 0.5rem 0.75rem 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.beta-unified-section-header-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
    pointer-events: none;
}

.beta-unified-section-header-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.beta-unified-section-header-inner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
    padding: 0.35rem 0.85rem;
    border-radius: 8px; /* match container .beta-unified-section-header */
    background: rgba(0, 0, 0, 0.5);
    max-width: 90%;
}
.beta-unified-section-header:not(.beta-unified-section-header-visual) .beta-unified-section-header-inner {
    background: rgba(0, 0, 0, 0.06);
}
.beta-unified-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    color: inherit;
}
.beta-unified-section-header-visual .beta-unified-section-title {
    font-size: 1.15rem;
}
.beta-unified-scrollers .horizontal-scroller {
    margin: 0;
}
.beta-unified-scrollers .horizontal-scroller-container {
    position: relative;
}
.beta-unified-scrollers .horizontal-scroller-list {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding: 0.25rem 0;
    list-style: none;
    margin: 0;
    scrollbar-width: thin;
    scrollbar-color: #dc3545 #f0f0f0;
}

/* Match home / cart horizontal scroller — red thumb (was default grey WebKit scrollbar) */
.beta-unified-scrollers .horizontal-scroller-list::-webkit-scrollbar {
    height: 8px;
    display: block;
}
.beta-unified-scrollers .horizontal-scroller-list::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 0;
}
.beta-unified-scrollers .horizontal-scroller-list::-webkit-scrollbar-thumb {
    background: #dc3545;
    border-radius: 0;
}
.beta-unified-scrollers .horizontal-scroller-list::-webkit-scrollbar-thumb:hover {
    background: #c82333;
}

/* Fixed lane width: + only vs in-cart must not change tile width (narrow lanes ≈ image + padding) */
.beta-unified-scrollers .horizontal-scroller-list .horizontal-scroller-item {
    width: 148px;
    min-width: 148px;
    max-width: 148px;
    box-sizing: border-box;
}

.beta-unified-scrollers .horizontal-scroller-list .product-tile-image-container {
    max-width: 120px;
    margin-left: auto;
    margin-right: auto;
}

.beta-unified-scrollers .horizontal-scroller-list .horizontal-scroller-item > .product-tile {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.beta-unified-scrollers .horizontal-scroller-list .horizontal-scroller-item .unified-cart-btn-container.compact {
    width: 100%;
    max-width: 100%;
    align-self: stretch;
    box-sizing: border-box;
}

.beta-unified-scrollers .horizontal-scroller-list .horizontal-scroller-item .unified-cart-btn-container.compact .unified-cart-btn-add {
    width: 100%;
    justify-content: center;
}

.beta-unified-scrollers .horizontal-scroller-list .horizontal-scroller-item .unified-cart-btn-container.compact .unified-cart-btn-inCart {
    width: 100%;
    flex: 1 1 auto;
    min-width: 0;
    justify-content: space-between;
}

/* Single-item section: same horizontal padding as scroller list so tile width aligns */
.beta-unified-single-card {
    margin: 0.5rem 0;
    width: 100%;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    box-sizing: border-box;
}
.beta-unified-single-card-inner {
    padding: 0.25rem 0;
    width: 100%;
    box-sizing: border-box;
}
.beta-unified-single-card-inner .horizontal-scroller-list {
    width: 100%;
}
.beta-unified-section-single .beta-unified-single-card .horizontal-scroller-list {
    display: flex;
    overflow: visible;
    padding: 0;
    gap: 0;
    width: 100%;
}
.beta-unified-section-single .beta-unified-single-card .horizontal-scroller-item {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    list-style: none;
}
.beta-unified-section-single .beta-unified-single-card .product-tile {
    display: grid !important;
    grid-template-columns: minmax(140px, 42%) 1fr;
    width: 100% !important;
    max-width: 100% !important;
    gap: 0.75rem 1rem;
    align-items: center;
    min-height: 0;
    padding: 0.5rem;
    border-radius: 10px;
    background: var(--card-bg, #fff);
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.06);
}
.beta-unified-section-single .beta-unified-single-card .product-tile-image-container {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    min-height: 120px;
}
.beta-unified-section-single .beta-unified-single-card .product-tile-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.beta-unified-section-single .beta-unified-single-card .product-tile-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
    min-width: 0;
}
.beta-unified-section-single .beta-unified-single-card .product-tile-title {
    font-size: 1rem;
    line-height: 1.25;
    margin: 0;
    font-weight: 600;
}
.beta-unified-section-single .beta-unified-single-card .product-tile-pricing {
    margin: 0.25rem 0;
}

/* Beta scrollers: circle top-right of card (parent .product-tile), expands left; collapses on scroll/timer/trash/click-outside */
.beta-unified-scrollers .product-tile {
    position: relative;
}
/* Special items: yellow tile border and verbage (same as TikTok/store) */
.beta-unified-scrollers .product-tile.special-item {
    border: 2px solid #ffc107;
    border-radius: 10px;
    box-shadow: 0 0 12px rgba(255, 193, 7, 0.25);
}
.beta-unified-scrollers .product-tile.special-item .product-tile-price-line .product-tile-old-price {
    text-decoration: line-through;
    color: rgba(255, 193, 7, 0.6);
    font-size: 0.85em;
}
.beta-unified-scrollers .product-tile.special-item .product-tile-price-line .product-tile-price,
.beta-unified-scrollers .product-tile.special-item .product-tile-pricing .product-tile-savings-text {
    color: #ffc107 !important;
    font-weight: 600;
}
.beta-unified-scrollers .product-tile.special-item .product-tile-price-line .product-tile-price {
    font-size: 1rem;
}
.beta-unified-scrollers .product-tile.special-item .product-tile-pricing .product-tile-savings-text {
    font-size: 0.75rem;
}
.beta-unified-scrollers .product-tile.special-item .product-tile-pricing .product-tile-requirements {
    color: #ffc107 !important;
    font-size: 0.75rem;
}
.beta-unified-scrollers .unified-cart-btn-container.beta-cart-expandable {
    position: absolute;
    top: 4px;
    right: 4px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    min-height: 0;
    min-width: 28px;
    z-index: 2;
}
.beta-unified-scrollers .unified-cart-btn-container.beta-cart-expandable.expanded {
    min-height: 36px;
}
.beta-unified-scrollers .beta-cart-circle {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    border-radius: 50%;
    border: 2px solid #dc3545;
    background: #dc3545;
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s ease;
    padding: 0;
    line-height: 1;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.beta-unified-scrollers .beta-cart-circle:hover {
    background: #c82333;
}
.beta-unified-scrollers .beta-cart-circle.special-item {
    background: #ffc107;
    border-color: #ffc107;
}
.beta-unified-scrollers .beta-cart-circle.special-item:hover {
    background: #ffc107;
    border-color: #ffc107;
}
.beta-unified-scrollers .beta-cart-circle .beta-cart-circle-content {
    font-variant-numeric: tabular-nums;
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 4px; /* Slight nudge so + sits visually centered in circle on desktop */
}
@media (max-width: 768px) {
    .beta-unified-scrollers .beta-cart-circle .beta-cart-circle-content {
        padding-bottom: 0;
    }
}

/* No pulse/bounce when quantity updates (override common.css .unified-cart-btn-container.updating) */
.beta-unified-scrollers .unified-cart-btn-container.beta-cart-expandable.updating {
    animation: none !important;
}

/* Collapsed: show circle only; pill is present but shrunk and invisible so it can animate */
.beta-unified-scrollers .unified-cart-btn-container.beta-cart-expandable .beta-cart-expanded {
    position: absolute !important;
    top: 0;
    right: 0;
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    max-width: 0;
    min-width: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    padding: 4px 6px;
    border: 2px solid transparent;
    border-radius: 30px;
    /* One smooth collapse: max-width + opacity (no display toggles or circle pop) */
    transition: max-width 0.22s ease-out, opacity 0.18s ease-out;
}
.beta-unified-scrollers .unified-cart-btn-container.beta-cart-expandable .beta-cart-circle {
    display: flex !important;
}

/* Collapse: one motion – pill shrinks (max-width + opacity), circle already visible; no extra button fade */

/* Expanded: show pill only, hide circle */
.beta-unified-scrollers .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-circle {
    display: none !important;
}
/* Expanded: pill anchored top-right, grows left; overflow visible so + button is not clipped */
.beta-unified-scrollers .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded {
    position: absolute !important;
    top: 0;
    right: 0;
    max-width: 320px;
    min-width: 0;
    opacity: 1;
    overflow: visible !important;
    pointer-events: auto;
    background: #2d2d2d;
    border: 2px solid #dc3545;
    border-radius: 30px;
    box-shadow: none;
    outline: none;
    backdrop-filter: none;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transition: max-width 0.22s ease-out, opacity 0.18s ease-out;
}
.beta-unified-scrollers .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded:hover {
    background: #383838;
    border-color: #c82333;
}
/* Specials: yellow border (same yellow as special badges) */
.beta-unified-scrollers .unified-cart-btn-container.beta-cart-expandable.expanded:has(.special-item) .beta-cart-expanded {
    border-color: #ffc107;
}
.beta-unified-scrollers .unified-cart-btn-container.beta-cart-expandable.expanded:has(.special-item) .beta-cart-expanded:hover {
    border-color: #ffc107;
}
/* In-cart: minus / qty / plus – TikTok-style round buttons and pill qty */
/* No !important so JS can set display:none when item removed (trash) and show add button only */
.beta-unified-scrollers .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded .unified-cart-btn-inCart {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0;
    min-height: 0;
    height: auto;
    border: none;
    background: transparent;
    border-radius: 0;
}
.beta-unified-scrollers .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded .unified-cart-btn-left,
.beta-unified-scrollers .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded .unified-cart-btn-right {
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    padding: 0;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}
.beta-unified-scrollers .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded .unified-cart-btn-left i,
.beta-unified-scrollers .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded .unified-cart-btn-right i {
    font-size: 1.05rem;
    line-height: 1;
    vertical-align: middle;
}
.beta-unified-scrollers .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded .unified-cart-btn-left:hover,
.beta-unified-scrollers .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded .unified-cart-btn-right:hover {
    background: rgba(255, 255, 255, 0.2);
}
.beta-unified-scrollers .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded .unified-cart-btn-left:active,
.beta-unified-scrollers .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded .unified-cart-btn-right:active,
.beta-unified-scrollers .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded .unified-cart-btn-add:active {
    transform: none;
}
.beta-unified-scrollers .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded .unified-cart-btn-center {
    min-width: 26px;
    height: 26px;
    padding: 0 6px 2px 6px;
    margin: 0 2px;
    font-size: 0.8rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: rgba(220, 53, 69, 0.8);
    border-radius: 8px;
    border: none;
}
/* Special items: yellow/amber quantity pill to match the yellow circle – white text and icons */
.beta-unified-scrollers .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded .unified-cart-btn-inCart.special-item .unified-cart-btn-center {
    background: rgba(255, 193, 7, 0.85);
    color: #fff !important;
}
.beta-unified-scrollers .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded .unified-cart-btn-inCart.special-item .unified-cart-btn-center .cart-quantity {
    color: #fff !important;
}
.beta-unified-scrollers .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded .unified-cart-btn-inCart.special-item .unified-cart-btn-left i,
.beta-unified-scrollers .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded .unified-cart-btn-inCart.special-item .unified-cart-btn-right i {
    color: #fff !important;
}
/* Add button when expanded (not in cart yet) – same pill, single add; no !important so JS can hide it when in cart. No transform/box-shadow (override common.css). */
.beta-unified-scrollers .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded .unified-cart-btn-add {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 12px 6px 12px;
    min-height: 0;
    height: 28px;
    border: none;
    background: transparent;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 0;
    cursor: pointer;
    transition: background 0.2s ease;
    transform: none;
    box-shadow: none;
}
.beta-unified-scrollers .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded .unified-cart-btn-add:hover,
.beta-unified-scrollers .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded .unified-cart-btn-add:active,
.beta-unified-scrollers .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded .unified-cart-btn-add:focus {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    transform: none !important;
    box-shadow: none !important;
}
.beta-unified-scrollers .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded .unified-cart-btn-add i {
    font-size: 1.05rem;
    line-height: 1;
    vertical-align: middle;
}
.beta-unified-scrollers .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded .unified-cart-btn-add i:not(:first-of-type) {
    display: none;
}

@media (max-width: 768px) {
    .beta-unified-section-title {
        font-size: 1.1rem;
    }
    .beta-unified-section-single .beta-unified-single-card .product-tile {
        grid-template-columns: minmax(120px, 38%) 1fr;
        padding: 0.4rem;
        gap: 0.5rem 0.75rem;
    }
}



/* ===== tiktok-scroller.css ===== */
/**
 * TikTok-Style Scroller Styles
 * Mobile-first, fullscreen vertical scroller
 * Red = logo red from common.css --primary-color (#DC143C)
 */
:root {
    --primary-color: #DC143C;
}

.tiktok-scroller-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 15000 !important; /* Above header (12000) and modals (13000) */
    display: none;
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.35s ease-out;
}

.tiktok-scroller-modal.active {
    display: block;
}

/* Slide-up open: applied after .active so transition runs */
.tiktok-scroller-modal.active.open {
    transform: translateY(0);
}

/* Slide-down close: remove .open first, then .active after transition */
.tiktok-scroller-modal.active.closing {
    transform: translateY(100%);
}

.tiktok-scroller-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* ========== BETA PAGE EMBEDDED (beta.php) ==========
 * Sticky header + categories grid. Clicking an item tile swipes left to product details
 * (shop panel with same 3D slider as category section). No modal; close button when product open.
 */
/* App-like shell: no page-level horizontal pan (panels are 300% wide inside a clipping subtree) */
body.homepage {
    overflow-x: hidden;
    overscroll-behavior-x: none;
    width: 100%;
}
/* Do NOT use overflow-x: hidden here: it breaks position:sticky for descendants vs the viewport
   (Chrome treats it as a scrollport). Horizontal pan is already clipped on body.homepage + .tiktok-embedded-content. */
body.homepage main.beta-main-content {
    overflow-x: visible;
    max-width: 100%;
    box-sizing: border-box;
}
.tiktok-scroller-embedded {
    width: 100%;
    min-height: 60vh;
    background: #0a0a0a;
    overflow-x: visible;
}

/* Header + category filter bar: in document flow below hero; sticks to viewport when scrolled */
#tiktok-embedded-chrome-sticky.tiktok-embedded-chrome-sticky {
    position: sticky;
    top: 0;
    /* Below site header (search-row 11999, mobile collapse 12000, nav buttons 12001 in header.php).
       Was 12100 and covered navbar dropdowns (e.g. account / logout). */
    z-index: 11800;
    width: 100%;
    box-sizing: border-box;
    align-self: flex-start;
    /* Paint above categories grid if any stacking/parallax overlap */
    isolation: isolate;
}

/* Full-height shop overlay: chrome is flex-shrink 0, content fills remaining viewport */
body.embedded-shop-open #tiktok-scroller-embedded {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    box-sizing: border-box;
}

.tiktok-embedded-header {
    position: relative;
    left: auto;
    right: auto;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    padding-top: max(12px, env(safe-area-inset-top, 12px));
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}
/* Lighter blur on narrow viewports: less GPU work, smoother scrolling/taps on mid-tier phones */
@media (max-width: 768px) {
    .tiktok-embedded-header {
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
    #tiktok-scroller-embedded .tiktok-embedded-filter-bar {
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
    }
}

/* Android app WebView: optional class from MainActivity — backdrop-filter can blank fixed layers on some GPUs */
html.eff-webview-shell .tiktok-embedded-header {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(10, 10, 10, 0.97);
}
html.eff-webview-shell #tiktok-scroller-embedded .tiktok-embedded-filter-bar {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(10, 10, 10, 0.96);
}
/* Top row: close / tabs / profile */
.tiktok-embedded-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px 10px;
    gap: 8px;
}
/* Search row: only when Categories tab + header visible */
.tiktok-embedded-header-search {
    display: none;
    padding: 0 12px 10px;
    box-sizing: border-box;
}
/* Categories tab: show search row from store markup + --search-active (do not require .visible — cart-floating-bar can run late). */
.tiktok-embedded-header.tiktok-embedded-header--search-active .tiktok-embedded-header-search {
    display: block;
}
.tiktok-embedded-header-search-toolbar-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
    flex-wrap: nowrap;
}
.tiktok-embedded-header-search-toolbar-row .tiktok-embedded-cat-search {
    flex: 1 1 0;
    min-width: 0;
    align-self: stretch;
}
.tiktok-embedded-header-search-toolbar-row .tiktok-embedded-categories-browse-toolbar-row {
    flex: 0 0 auto;
    width: auto;
    max-width: 100%;
    flex-shrink: 0;
    display: flex;
    align-items: stretch;
    align-self: stretch;
}
/* Compact Cards/List next to search (no full-width toolbar chrome) */
#tiktok-embedded-header-search .tiktok-categories-browse-toolbar {
    width: auto;
    max-width: none;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    justify-content: flex-end;
    align-items: stretch;
    align-self: stretch;
    gap: 6px;
    min-height: 100%;
}
#tiktok-embedded-header-search .tiktok-shop-view-toolbar-label {
    display: none;
}
#tiktok-embedded-header-search .tiktok-shop-view-toggle {
    flex-shrink: 0;
    white-space: nowrap;
    display: flex;
    align-self: stretch;
    height: 100%;
    min-height: 100%;
    align-items: stretch;
    border-radius: 12px;
    overflow: hidden;
}
#tiktok-embedded-header-search .tiktok-shop-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    min-height: 100%;
    flex: 1 0 auto;
    font-size: 13px;
    font-weight: 600;
    box-sizing: border-box;
}
.tiktok-embedded-cat-search {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 10px 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.06) 100%);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 20px rgba(0, 0, 0, 0.25);
}
.tiktok-embedded-cat-search:focus-within {
    border-color: rgba(220, 20, 60, 0.55);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 0 0 2px rgba(220, 20, 60, 0.2);
}
.tiktok-embedded-cat-search-icon {
    flex: 0 0 auto;
    color: rgba(255, 255, 255, 0.45);
    font-size: 15px;
}
.tiktok-embedded-categories-search-input {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 15px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}
/* Hide native clear (blue X) on type="search"; custom .tiktok-embedded-search-clear is the only control */
.tiktok-embedded-categories-search-input::-webkit-search-cancel-button,
.tiktok-embedded-categories-search-input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}
.tiktok-embedded-categories-search-input::-ms-clear {
    display: none;
    width: 0;
    height: 0;
}
.tiktok-embedded-categories-search-input::placeholder {
    color: rgba(255, 255, 255, 0.38);
}
.tiktok-embedded-search-clear {
    flex: 0 0 auto;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    padding: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    border-radius: 8px;
}
.tiktok-embedded-search-clear:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}
/* Embedded filter bar: stacked under tabs/search inside sticky chrome (not fixed) */
#tiktok-scroller-embedded .tiktok-embedded-filter-bar {
    position: relative;
    top: auto;
    left: auto;
    right: auto;
    z-index: 1;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    min-height: 44px;
    box-sizing: border-box;
}
#tiktok-embedded-panels.show-shop .tiktok-embedded-panel-shop {
    padding-top: 0;
}
/* Close button (shown when product view is open); left side, square rounded like modal close */
.tiktok-embedded-close {
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
    order: 0;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.2s, color 0.2s;
    touch-action: manipulation;
}
.tiktok-embedded-close:hover {
    background: var(--primary-color, #DC143C);
    color: #fff;
}
/* When shop view is open, hide the spacer so the close button occupies left 50px */
.tiktok-embedded-header.shop-open .tiktok-embedded-header-top::before {
    display: none;
}
/* Left spacer when close is hidden so tab group stays centered */
.tiktok-embedded-header-top::before {
    content: '';
    flex: 0 0 50px;
    width: 50px;
    order: 0;
}
.tiktok-embedded-tabs {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    order: 1;
}
.tiktok-embedded-profile {
    order: 2;
}
.tiktok-embedded-tab {
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
    padding: 0;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    position: relative;
    touch-action: manipulation;
}
.tiktok-embedded-tab:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}
.tiktok-embedded-tab.active {
    background: var(--primary-color, #DC143C);
    color: #fff;
}
.tiktok-embedded-tab i {
    font-size: 18px;
}
.tiktok-embedded-tab-label {
    display: none;
}
/* Bar profile image: square with rounded corners (same as tiles), NOT circle */
.tiktok-embedded-profile {
    width: 50px;
    height: 50px;
    border-radius: 12px !important;
    overflow: hidden;
    flex-shrink: 0;
    display: block;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0.12);
}
.tiktok-embedded-profile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px !important;
    display: block;
}
/* Prevent any global .rounded-circle from making the bar profile image circular */
#tiktok-embedded-profile-img {
    border-radius: 12px !important;
}
/* Content: when categories visible, grows with page; when shop visible, fills space below sticky chrome */
.tiktok-embedded-content {
    width: 100%;
    overflow: hidden;
    min-height: 320px;
}
.tiktok-embedded-content:has(.tiktok-embedded-panels.show-shop) {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: none;
    overflow-x: hidden;
    overflow-y: hidden;
}
body.embedded-shop-open {
    overflow: hidden;
}
/* Full-window product view: hide footer so only header + product view is visible */
body.embedded-shop-open footer {
    display: none !important;
}
body.embedded-shop-open .beta-main-content {
    margin-top: 0;
    padding-top: 0;
    min-height: 100vh;
}

/* Storefront chat FAB: compositing + stacking vs transformed TikTok panels (always tappable) */
body.homepage #chat-bubble-widget.chat-enabled,
body.homepage #chat-bubble-widget[data-storefront-chat-on="1"] {
    z-index: 14000 !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}
.tiktok-embedded-panels {
    display: flex;
    width: 300%;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateX(-33.333%);
    touch-action: pan-y; /* vertical scroll + programmatic swipe; no pinch-zoom (app shell / viewport lock) */
}
.tiktok-embedded-panels.show-shop {
    transform: translateX(0);
}
.tiktok-embedded-panels.show-community {
    transform: translateX(-66.666%);
}
.tiktok-embedded-panel {
    width: 33.333%;
    flex-shrink: 0;
    box-sizing: border-box;
}
.tiktok-embedded-panel-community {
    position: relative;
    height: 100vh;
    min-height: 100vh;
    max-height: 100vh;
    display: grid;
    grid-template-rows: 1fr auto;
    background: #0a0a0a;
    overflow: hidden;
    box-sizing: border-box;
}
.tiktok-embedded-panel-community .tiktok-embedded-community-main {
    grid-row: 1;
    grid-column: 1;
    position: relative;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

#tiktok-embedded-community-items {
    height: 100%;
    min-height: 0;
}
.tiktok-embedded-panel-community .tiktok-scroller-actions {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 200;
}
.tiktok-embedded-panel-community .tiktok-scroller-info {
    grid-row: 2;
    grid-column: 1;
    flex-shrink: 0;
    position: relative;
    min-height: 0;
    max-height: 34vh;
    padding: 12px 132px 16px 16px;
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px) + 12px);
    overflow-y: auto;
}
.tiktok-embedded-panel-shop {
    position: relative;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    display: grid;
    grid-template-rows: 1fr auto;
    background: #0a0a0a;
    overflow-x: visible;
    overflow-y: hidden;
    box-sizing: border-box;
}
.tiktok-embedded-panel-shop .tiktok-embedded-shop-main {
    grid-row: 1;
    grid-column: 1;
    min-height: 0;
}
.tiktok-embedded-panel-shop .tiktok-scroller-actions {
    grid-row: 1;
    grid-column: 1;
}
.tiktok-embedded-panel-shop .tiktok-scroller-info {
    grid-row: 2;
    grid-column: 1;
}
.tiktok-embedded-panel-shop.tiktok-embedded-shop-special {
    border: none !important;
    box-shadow: none !important;
}
/* No border on slider cards in embedded */
.tiktok-embedded-panel-shop .shop-3d-slide-inner,
.tiktok-embedded-panel-shop .shop-3d-slide-inner.shop-3d-current-inner,
.tiktok-embedded-panel-shop .shop-3d-item-wrap.tiktok-item-special .shop-3d-slide-inner {
    border: none !important;
}
.tiktok-embedded-shop-main {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    overflow: visible;
    min-height: 0;
    flex: 1;
}
/* Beta embedded shop: container for 3D product slider; do not grow so content stays centered */
#tiktok-embedded-scroller-items {
    width: 100%;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: visible;
}
/* Embedded shop 3D slider: same structure as category section (cat-3d-slider) so full scroller is visible and centered */
#tiktok-embedded-scroller-items .shop-3d-item-wrap {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 0;
    overflow: visible;
}
#tiktok-embedded-scroller-items .shop-3d-slider,
#tiktok-embedded-scroller-items .shop-3d-slider__wrapper,
#tiktok-embedded-scroller-items .shop-3d-slider__slides {
    overflow: visible;
}
/* Match cat-3d-slider: no grid-template so wrapper sizes to content (slides); full scroller visible */
#tiktok-embedded-scroller-items .shop-3d-slider {
    flex: 1;
    min-height: 160px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
#tiktok-embedded-scroller-items .shop-3d-slider__wrapper {
    width: 100%;
    max-width: calc(3 * var(--shop-slide-width-current));
    display: grid;
    place-items: center;
    perspective: 1000px;
}
#tiktok-embedded-scroller-items .shop-3d-slider__wrapper > * {
    grid-area: 1 / -1;
}
#tiktok-embedded-scroller-items .shop-3d-slider__slides {
    width: 100%;
    display: grid;
    place-items: center;
}
#tiktok-embedded-scroller-items .shop-3d-slider__slides > * {
    grid-area: 1 / -1;
}
/* Center card and image area: fill slide width (same idea as cat-3d-slide-inner) */
#tiktok-embedded-scroller-items .shop-3d-current-inner .tiktok-shop-main-wrap.shop-3d-center-main,
#tiktok-embedded-scroller-items .shop-3d-current-inner .tiktok-shop-main-wrap .tiktok-shop-slides-wrap {
    width: 100%;
    min-width: 0;
}
#tiktok-embedded-scroller-items .shop-3d-slide-inner.shop-3d-current-inner {
    width: 100%;
}
.tiktok-embedded-panel-shop .tiktok-scroller-info {
    flex-shrink: 0;
    padding: 12px 16px 24px;
    padding-bottom: max(80px, env(safe-area-inset-bottom, 0px) + 60px);
    overflow: visible;
    position: relative;
    touch-action: pan-y;
    min-height: 52px;
}
/* Product description: in-flow expandable; swipe up opens sheet that slides up from bottom (same content as updateInfoOverlay: additional details / AI description) */
.tiktok-embedded-panel-shop .tiktok-shop-details-expandable {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 60vh;
    z-index: 400;
    background: rgba(18, 18, 18, 0.98);
    backdrop-filter: blur(12px);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.5);
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    touch-action: pan-y;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}
.tiktok-embedded-panel-shop .tiktok-shop-details-expandable.description-expanded {
    transform: translateY(0);
    pointer-events: auto;
}
.tiktok-embedded-panel-shop .tiktok-shop-details-expandable::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,0.4);
    margin: 10px auto 8px;
    flex-shrink: 0;
}
.tiktok-embedded-panel-shop .tiktok-shop-details-expandable .tiktok-info-description {
    padding: 0 20px 24px;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
    overflow-y: auto;
    flex: 1;
    -webkit-overflow-scrolling: touch;
    color: rgba(255,255,255,0.95);
    font-size: 15px;
    line-height: 1.5;
    word-break: break-word;
    min-height: 60px;
}
/* Keep the embedded swipe hint rendered so opening details does not shift the layout */
.tiktok-embedded-panel-shop #tiktok-embedded-scroller-info .tiktok-info-content::after {
    content: 'Swipe up for details and nutrition';
    display: block;
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    margin-top: 6px;
    padding: 8px 0;
    cursor: pointer;
}
.tiktok-embedded-scroller-actions {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex !important;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    z-index: 200;
    visibility: visible;
    pointer-events: auto;
}
/* Product pane only: + disappears and pill expands in the same location. No global pill rules changed. */
#tiktok-embedded-panel-shop .tiktok-embedded-scroller-actions .tiktok-cart-expandable {
    min-width: 44px;
    width: auto;
    flex-shrink: 0;
}
#tiktok-embedded-panel-shop .tiktok-embedded-scroller-actions .tiktok-cart-expandable.expanded .tiktok-cart-circle,
#tiktok-embedded-panel-shop .tiktok-embedded-scroller-actions .tiktok-cart-expandable.expanded #tiktok-embedded-cart-circle {
    display: none !important;
}
#tiktok-embedded-panel-shop .tiktok-embedded-scroller-actions .tiktok-cart-expandable.expanded #tiktok-embedded-add-cart-btn {
    display: none !important;
}
#tiktok-embedded-panel-shop .tiktok-embedded-scroller-actions .tiktok-cart-expandable .tiktok-cart-expanded {
    position: relative;
}
#tiktok-embedded-panel-shop .tiktok-embedded-scroller-actions #tiktok-embedded-cart-btn {
    display: none !important;
}
.tiktok-embedded-scroller-actions .tiktok-like-btn,
.tiktok-embedded-scroller-actions .tiktok-share-btn {
    z-index: 2;
    display: flex !important;
}
.tiktok-embedded-scroller-actions .tiktok-action-btn {
    position: relative;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.tiktok-embedded-scroller-actions .tiktok-cart-control-group {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,0,0,0.6);
    border-radius: 12px;
    padding: 4px 8px;
}
.tiktok-embedded-scroller-actions .tiktok-cart-quantity {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
}
.tiktok-embedded-cart-control-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 6px 10px;
}
.tiktok-embedded-cart-control-group button {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    background: var(--primary-color, #DC143C);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tiktok-embedded-cart-quantity {
    min-width: 24px;
    text-align: center;
    font-weight: 600;
    color: #fff;
}
/* Embedded shop: same 3D stack, slightly smaller so it fits */
.tiktok-embedded-shop-main .shop-3d-slider {
    --shop-slide-width: 200px;
    --shop-slide-width-current: 260px;
}
.tiktok-embedded-shop-main .shop-3d-slide-inner.shop-3d-current-inner {
    min-height: 180px;
    max-height: 50vh;
}
/* When showing categories, hide the shop info so it never overlays the tiles */
.tiktok-embedded-panels:not(.show-shop) #tiktok-embedded-scroller-info {
    display: none !important;
}
/* Shop tab: ensure action buttons and info badges are visible (override any broad resets) */
.tiktok-embedded-panel-shop .tiktok-scroller-info .tiktok-badges,
.tiktok-embedded-panel-shop #tiktok-embedded-item-badges {
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px;
    visibility: visible;
}
.tiktok-embedded-panel-shop .tiktok-scroller-info .tiktok-badge-featured,
.tiktok-embedded-panel-shop .tiktok-scroller-info .tiktok-badge-special,
.tiktok-embedded-panel-shop .tiktok-scroller-info .tiktok-badge-organic,
.tiktok-embedded-panel-shop .tiktok-scroller-info .tiktok-badge-tagged {
    display: inline-block !important;
    visibility: visible;
}
.tiktok-embedded-panel-categories {
    overflow-x: hidden;
    /* No overflow-y: so content flows and the page scrolls */
}
/* No gradient overlay on categories – last rows must not be covered */
.tiktok-embedded-content::after,
.tiktok-embedded-panel-categories::after,
.tiktok-embedded-panel-categories::before,
#tiktok-categories-grid-embedded::after,
#tiktok-categories-grid-embedded::before,
#tiktok-scroller-embedded::after,
#tiktok-scroller-embedded .tiktok-categories-grid-inner::after {
    display: none !important;
    content: none !important;
    background: none !important;
    background-image: none !important;
}
/* Override .tiktok-categories-grid (height:100%; overflow-y:auto) so the page scrolls, not this container */
#tiktok-categories-grid-embedded {
    padding: 0 16px 24px 16px;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: visible;
    height: auto;
    /* Reserve vertical space while "Loading…" is shown to reduce CLS when grid mounts */
    min-height: max(420px, 52vh);
    transition: padding-top 0.3s ease-out;
}
/* No top offset or transform on inner so categories start at top (avoids extra dead space).
   Add padding-bottom so scroll height includes parallax offset (translateY(120px) on rows) and the container doesn't need extra scroll before content begins. */
#tiktok-categories-grid-embedded .tiktok-categories-grid-inner {
    transform: none;
    margin-top: 0;
    padding-bottom: 120px;
    box-sizing: border-box;
}
.tiktok-cat-search-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.65);
    padding: 2rem 1rem 3rem;
    font-size: 15px;
}
.tiktok-cat-search-empty i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
    display: block;
}
/* Staggered tile entrance when grid updates */
#tiktok-categories-grid-embedded .tiktok-categories-grid-inner.tiktok-cat-grid-animating > .tiktok-cat-block-fullwidth-expandable,
#tiktok-categories-grid-embedded .tiktok-categories-grid-inner.tiktok-cat-grid-animating > .tiktok-cat-pair {
    animation: tiktokCatTileReveal 0.38s cubic-bezier(0.32, 0.72, 0, 1) backwards;
}
#tiktok-categories-grid-embedded .tiktok-categories-grid-inner.tiktok-cat-grid-animating > .tiktok-cat-block-fullwidth-expandable {
    animation-delay: 0.02s;
}
#tiktok-categories-grid-embedded .tiktok-categories-grid-inner.tiktok-cat-grid-animating > .tiktok-cat-pair:nth-child(2) { animation-delay: 0.06s; }
#tiktok-categories-grid-embedded .tiktok-categories-grid-inner.tiktok-cat-grid-animating > .tiktok-cat-pair:nth-child(3) { animation-delay: 0.1s; }
#tiktok-categories-grid-embedded .tiktok-categories-grid-inner.tiktok-cat-grid-animating > .tiktok-cat-pair:nth-child(4) { animation-delay: 0.14s; }
#tiktok-categories-grid-embedded .tiktok-categories-grid-inner.tiktok-cat-grid-animating > .tiktok-cat-pair:nth-child(5) { animation-delay: 0.18s; }
#tiktok-categories-grid-embedded .tiktok-categories-grid-inner.tiktok-cat-grid-animating > .tiktok-cat-pair:nth-child(n+6) { animation-delay: 0.22s; }
@keyframes tiktokCatTileReveal {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.98);
        filter: blur(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}
#tiktok-categories-grid-embedded.tiktok-categories-grid {
    scrollbar-width: none;
    -ms-overflow-style: none;
}
#tiktok-categories-grid-embedded::-webkit-scrollbar {
    display: none;
}

/* Top Bar: Streamlined Header – left/right same width so center tabs are visually centered */
.tiktok-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 14px 14px;
    padding-top: max(24px, env(safe-area-inset-top, 24px));
    z-index: 10005;
    background: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 70%, transparent 100%);
    backdrop-filter: blur(10px);
    gap: 8px;
    flex-wrap: nowrap;
    min-height: 64px;
    box-sizing: border-box;
}
.tiktok-top-bar .tiktok-scroller-close {
    flex: 0 0 50px;
    width: 50px;
}
.tiktok-top-bar .tiktok-user-profile {
    flex: 0 0 50px;
    width: 50px;
}

/* Close button - fixed size, no wrapping; logo red */
.tiktok-scroller-close {
    background: var(--primary-color, #DC143C);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    font-size: 16px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    z-index: 10007;
    position: relative;
}

.tiktok-scroller-close:hover {
    background: var(--primary-color, #DC143C);
    filter: brightness(1.1);
    border-color: rgba(255, 255, 255, 0.9);
    transform: scale(1.1);
}

/* Tabs - centered in the bar */
.tiktok-scroller-tabs {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    min-width: 0;
    overflow: hidden;
}

/* User Profile Picture - fixed size, no wrapping */
.tiktok-user-profile {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
    z-index: 10008;
    position: relative;
}

.tiktok-user-profile:hover {
    transform: scale(1.1);
    border-color: white;
}

.tiktok-user-profile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px !important;
}

/* Category Filter Bar – directly below header (align with grid top padding) */
.tiktok-category-filter-bar {
    position: absolute;
    top: 92px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    z-index: 10004;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    min-height: 44px;
    box-sizing: border-box;
}

.tiktok-category-filter-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 13px;
    font-weight: 500;
}

.tiktok-category-filter-info i {
    font-size: 14px;
    opacity: 0.8;
}

.tiktok-clear-filter-btn {
    background: var(--primary-color, #DC143C);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    transition: all 0.3s ease;
}

.tiktok-clear-filter-btn:hover {
    background: var(--primary-color, #DC143C);
    filter: brightness(1.1);
    transform: scale(1.05);
}

.tiktok-clear-filter-btn i {
    font-size: 10px;
}

.tiktok-scroller-close:hover {
    background: var(--primary-color, #DC143C);
    border-color: rgba(255, 255, 255, 0.9);
    transform: scale(1.1);
}

/* Small devices - ensure no wrapping; filter bar stays directly below header */
@media (max-width: 480px) {
    .tiktok-top-bar {
        padding: 20px 12px 14px;
        padding-top: max(20px, env(safe-area-inset-top, 20px));
        min-height: 58px;
        height: auto;
        gap: 4px;
    }
    
    .tiktok-scroller-close {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .tiktok-user-profile {
        width: 45px;
        height: 45px;
    }
    
    .tiktok-category-filter-bar {
        top: 88px;
        padding: 6px 10px;
        font-size: 12px;
        min-height: 40px;
    }
    
    .tiktok-tab-content.tiktok-filter-active .tiktok-scroller-main {
        padding-top: 40px;
    }
}

/* Landscape orientation - ensure buttons are visible */
@media (orientation: landscape) {
    .tiktok-top-bar {
        padding: 24px 15px 14px;
        padding-top: max(24px, env(safe-area-inset-top, 24px));
        min-height: 64px;
    }
    
    .tiktok-scroller-close {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .tiktok-user-profile {
        width: 50px;
        height: 50px;
    }
    
    .tiktok-category-filter-bar {
        top: 92px;
    }
}

/* Comments Panel (slides up from bottom like TikTok) */
.tiktok-comments-panel {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    height: 70%;
    max-height: 70vh;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10005;
    transition: bottom 0.3s ease;
    display: flex;
    flex-direction: column;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    overflow: hidden;
}

.tiktok-comments-panel.active {
    bottom: 0;
}

.tiktok-comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.8);
}

.tiktok-comments-header h5 {
    color: white;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.tiktok-comments-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.tiktok-comments-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.tiktok-comments-list {
    flex: 1;
    overflow-y: auto;
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.tiktok-comment-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.tiktok-comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.tiktok-comment-content {
    flex: 1;
    color: white;
}

.tiktok-comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 5px;
    position: relative;
}

.tiktok-comment-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.tiktok-comment-edit-btn,
.tiktok-comment-delete-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.8);
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    padding: 0;
}

.tiktok-comment-edit-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.tiktok-comment-delete-btn:hover {
    background: color-mix(in srgb, var(--primary-color, #DC143C) 30%, transparent);
    color: var(--primary-color, #DC143C);
}

.tiktok-comment-header strong {
    color: white;
    font-size: 14px;
}

.tiktok-comment-time {
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

.tiktok-comment-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.4;
}

.tiktok-comment-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    padding: 40px 20px;
    font-size: 14px;
}

.tiktok-comment-edit-form {
    margin-top: 10px;
}

.tiktok-comment-edit-input {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 8px;
}

.tiktok-comment-edit-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
}

.tiktok-comment-edit-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.tiktok-comment-save-btn,
.tiktok-comment-cancel-btn {
    padding: 6px 16px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tiktok-comment-save-btn {
    background: var(--primary-color, #DC143C);
    color: white;
}

.tiktok-comment-save-btn:hover {
    background: #c82333;
}

.tiktok-comment-cancel-btn {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.tiktok-comment-cancel-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.tiktok-comments-input {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.8);
}

.tiktok-comments-input input {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 10px 20px;
    color: white;
    font-size: 14px;
}

.tiktok-comments-input input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.tiktok-comments-input button {
    background: var(--primary-color, #DC143C);
    border: none;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.3s ease;
}

.tiktok-comments-input button:hover {
    background: #c82333;
}

.tiktok-category-item span:not(.tiktok-category-count) {
    flex: 1;
    font-size: 16px;
}

.tiktok-category-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

/* Main Scroller */
.tiktok-scroller-main {
    flex: 1;
    position: relative;
    overflow: hidden;
    overflow-anchor: none;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}
/* Shop tab: main image higher – less top padding so image + strip sit up under header */
#tiktok-tab-shop .tiktok-scroller-main {
    padding-top: 28px;
}

/* Shop tab: 3D item slider – prev | current | next product cards (like category scrollers) */
.shop-3d-item-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.shop-3d-slider {
    --shop-slide-width: 200px;
    --shop-slide-width-current: 280px;
    --shop-slide-aspect: 1;
    --shop-slide-transition-duration: 400ms;
    --shop-slide-transition-easing: ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
    padding: 0;
    overflow: visible;
}
.shop-3d-slider__wrapper {
    width: 100%;
    max-width: calc(3 * var(--shop-slide-width-current));
    display: grid;
    place-items: center;
    perspective: 1000px;
    overflow: visible;
    touch-action: pan-y;
    padding: 0;
    box-sizing: border-box;
}
.shop-3d-slider__wrapper > * { grid-area: 1 / -1; }
.shop-3d-slider__slides {
    width: 100%;
    display: grid;
    place-items: center;
    pointer-events: none;
}
.shop-3d-slider__slides > * { grid-area: 1 / -1; }

.shop-3d-slider-dragging .shop-3d-slide {
    transition: transform 0.18s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.shop-3d-slide {
    --slide-tx: 0px;
    --slide-tz: 0px;
    --slide-scale: 1;
    --slide-rotY: 0deg;
    width: var(--shop-slide-width);
    height: auto;
    aspect-ratio: var(--shop-slide-aspect);
    min-height: 0;
    user-select: none;
    pointer-events: none;
    transition: transform var(--shop-slide-transition-duration) var(--shop-slide-transition-easing);
    transform: perspective(800px) translate3d(var(--slide-tx), 0, var(--slide-tz)) rotateY(var(--slide-rotY)) scale(var(--slide-scale));
    display: flex;
    flex-direction: column;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}
/* Stack order like category slider: center on top, sides behind */
.shop-3d-slide[data-previous],
.shop-3d-slide[data-next] {
    z-index: 1;
}
.shop-3d-slide[data-current] {
    width: var(--shop-slide-width-current);
    --slide-scale: 1;
    --slide-tz: 0px;
    --slide-tx: 0px;
    --slide-rotY: 0deg;
    pointer-events: auto;
    z-index: 2;
}
.shop-3d-slide[data-next] {
    --slide-scale: 0.88;
    --slide-tx: calc(var(--shop-slide-width-current) * 0.5);
    --slide-rotY: -32deg;
}
.shop-3d-slide[data-previous] {
    --slide-scale: 0.88;
    --slide-tx: calc(var(--shop-slide-width-current) * -0.5);
    --slide-rotY: 32deg;
}
/* Single item: only center card visible, no side cards */
.shop-3d-item-wrap.shop-3d-single-item .shop-3d-slide[data-previous],
.shop-3d-item-wrap.shop-3d-single-item .shop-3d-slide[data-next] {
    visibility: hidden;
    pointer-events: none;
}
.shop-3d-slide-inner {
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--card-bg, #fff);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    border: none;
    box-shadow: none;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}
.shop-3d-slide-inner.shop-3d-current-inner {
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 200px;
}
.shop-3d-item-wrap.tiktok-item-special .shop-3d-slide-inner.shop-3d-current-inner {
    box-shadow: none;
}
.shop-3d-slide-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    padding: 10px;
    box-sizing: border-box;
}
/* Additional images strip above the product scroller (big 3D cards) */
.shop-3d-item-wrap .tiktok-shop-thumbs-above {
    flex-shrink: 0;
    margin: 0 0 8px 0;
    width: 100%;
    position: relative;
    z-index: 6;
}
#tiktok-embedded-scroller-items .tiktok-shop-thumbs-above {
    max-height: 56px;
    margin: 0 0 6px 0;
}
.shop-3d-current-inner .tiktok-shop-main-wrap.shop-3d-center-main {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
}
.shop-3d-current-inner .tiktok-shop-main-wrap .tiktok-shop-slides-wrap {
    flex: 1;
    min-height: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    z-index: 1;
}
.shop-3d-current-inner .tiktok-shop-main-wrap .tiktok-shop-slides {
    position: absolute;
    inset: 0;
    z-index: 1;
}
.shop-3d-item-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.shop-3d-item-wrap .shop-3d-slider {
    flex: 1;
    width: 100%;
    min-height: 0;
}

.tiktok-scroller-items {
    width: 100%;
    height: 100%;
    position: relative;
}

.tiktok-scroller-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, opacity 0.3s ease;
    overflow: hidden; /* Single-item view: clip image */
}
/* Shop 3D slider: must not clip prev/next cards – same 3D stack as category section */
.shop-3d-item-wrap.tiktok-scroller-item {
    overflow: visible;
}

/* Ensure images are 100% width and fill container */
.tiktok-scroller-item img.tiktok-item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.tiktok-scroller-item-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: rgba(255, 255, 255, 0.5);
}

.tiktok-item-image {
    width: 100%;
    height: auto; /* Auto height to maintain aspect ratio */
    max-height: 100vh; /* Don't exceed viewport height */
    object-fit: contain; /* Show full image without cropping */
    object-position: center;
    position: relative;
    z-index: 2;
}

/* (Redundant width/height/display already set above for .tiktok-scroller-item; kept for img overrides) */
.tiktok-scroller-item img.tiktok-item-image {
    width: 100%;
    height: auto;
    max-height: 100vh;
    object-fit: contain;
}

/* Blanking fill effect for ALL images - split halves above/below with blur and zoom */
/* This fills the vertical space for any image, not just square ones */
.tiktok-image-split-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: block; /* Always show for blanking fill effect */
    overflow: hidden;
}

.tiktok-image-split-top,
.tiktok-image-split-bottom {
    position: absolute;
    left: 0;
    width: 100%;
    height: 50%;
    overflow: hidden;
}

.tiktok-image-split-top {
    top: -50%;
    transform: scale(1.3);
    filter: blur(25px);
    opacity: 0.8;
}

.tiktok-image-split-bottom {
    bottom: -50%;
    transform: scale(1.3);
    filter: blur(25px);
    opacity: 0.8;
}

.tiktok-split-image {
    width: 100%;
    height: 200%;
    object-fit: cover;
    object-position: center;
}

.tiktok-image-split-top .tiktok-split-image {
    /* Top split (above image) should show the TOP part of the image */
    /* Since bottom is showing on top, swap: use bottom positioning for top split */
    object-position: center bottom;
    /* Shift down to show top part */
    transform: translateY(50%);
}

.tiktok-image-split-bottom .tiktok-split-image {
    /* Bottom split (below image) should show the BOTTOM part of the image */
    /* Since bottom is showing on top, swap: use top positioning for bottom split */
    object-position: center top;
    /* Shift up to show bottom part */
    transform: translateY(-50%);
}

.tiktok-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.3) 50%, rgba(0,0,0,0.8) 100%);
    pointer-events: none;
}

/* Right Side Actions - column aligned to the right so buttons don't shift when cart expands */
.tiktok-scroller-actions {
    position: absolute;
    right: 15px;
    bottom: clamp(190px, 24vh, 220px);
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 16px;
    z-index: 10002;
}

.tiktok-action-btn {
    position: relative;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.tiktok-action-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.tiktok-action-btn.active {
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--primary-color, #DC143C);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary-color, #DC143C) 30%, transparent);
}

.tiktok-action-btn.active i {
    color: var(--primary-color, #DC143C);
}

.tiktok-community-tagged-cart-btn,
.tiktok-community-tagged-checkout-btn {
    background: var(--primary-color, #DC143C) !important;
    border: 2px solid var(--primary-color, #DC143C) !important;
}

.tiktok-community-tagged-checkout-btn {
    background: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #111 !important;
}

.tiktok-author-profile {
    width: 46px;
    height: 46px;
    min-width: 46px;
    min-height: 46px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: transparent;
    backdrop-filter: none;
    flex-shrink: 0;
}

.tiktok-author-profile:hover {
    transform: scale(1.06);
}

.tiktok-item-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    position: absolute;
    top: 0;
    left: 0;
    background: #000;
}

.tiktok-item-video::-webkit-media-controls {
    display: flex !important;
}

/* Count bubbles: same position on every action button so they line up */
.tiktok-action-count,
.tiktok-like-bubble {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--primary-color, #DC143C);
    color: white;
    border-radius: 12px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: bold;
    min-width: 20px;
    height: 20px;
    line-height: 16px;
    text-align: center;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    z-index: 5;
}

.tiktok-like-btn,
.tiktok-comment-btn,
.tiktok-share-btn {
    position: relative;
}

/* Cart expandable: circle (always) + expanded controls; collapse on scroll/nav */
.tiktok-cart-expandable {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    position: relative;
}
/* Cart circle and pill: no transform/bounce; only background/opacity for open/close feel */
.tiktok-cart-expandable .tiktok-cart-circle,
.tiktok-cart-expandable .tiktok-cart-circle:hover,
.tiktok-cart-expandable .tiktok-cart-circle:active {
    transform: none;
}
.tiktok-cart-expandable .tiktok-cart-circle {
    transition: background 0.2s ease;
}
.tiktok-cart-circle {
    position: relative;
    flex-shrink: 0;
    border-radius: 8px !important;
    background: var(--primary-color, #DC143C) !important;
    border: 2px solid var(--primary-color, #DC143C) !important;
}
.tiktok-cart-circle:hover {
    filter: brightness(1.1);
}
.tiktok-cart-expanded {
    display: none;
    flex-direction: row;
    align-items: center;
    flex-shrink: 0;
}
/* When expanded: hide circle so only pill shows (override .tiktok-action-btn display) */
.tiktok-cart-expandable.expanded .tiktok-cart-circle {
    display: none !important;
}
.tiktok-cart-expandable.expanded .tiktok-cart-expanded {
    display: flex;
}

/* Cart Quantity Control Group - square with rounded corners (match badges/tiles) */
.tiktok-cart-control-group {
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 4px 6px;
    backdrop-filter: blur(10px);
    transition: background 0.2s ease, border-color 0.2s ease;
    width: auto;
    min-width: auto;
}

.tiktok-cart-control-group:hover {
    background: rgba(0, 0, 0, 0.85);
    border-color: rgba(255, 255, 255, 0.5);
}

.tiktok-cart-btn-minus,
.tiktok-cart-btn-plus {
    background: transparent;
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 22px;
    transition: background 0.2s ease;
    padding: 0;
}

.tiktok-cart-btn-minus:hover,
.tiktok-cart-btn-plus:hover {
    background: rgba(255, 255, 255, 0.2);
}

.tiktok-cart-btn-minus:active,
.tiktok-cart-btn-plus:active {
    transform: none;
}

/* No transform/animation on cart pill add button (override .tiktok-action-btn scale and transition: all) */
.tiktok-cart-expandable .tiktok-add-cart-btn,
.tiktok-cart-expandable .tiktok-add-cart-btn:hover,
.tiktok-cart-expandable .tiktok-add-cart-btn:active,
.tiktok-cart-expandable .tiktok-add-cart-btn:focus {
    transform: none !important;
    box-shadow: none !important;
}
.tiktok-cart-expandable .tiktok-add-cart-btn {
    transition: background 0.2s ease !important;
    border-radius: 8px !important;
}

.tiktok-cart-quantity {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    font-size: 12px;
    font-weight: bold;
    padding: 0 6px;
    background: var(--primary-color, #DC143C);
    border-radius: 8px;
    margin: 0 4px;
}

/* Cart Count Badge - square with rounded corners to match tiles */
.tiktok-cart-count-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--primary-color, #DC143C);
    color: white;
    border-radius: 8px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    padding: 0 5px;
    border: 2px solid #000;
}

.tiktok-like-btn.active i {
    color: var(--primary-color, #DC143C);
}

/* Bottom Info Overlay - taller panel so image sits higher and description has room */
.tiktok-scroller-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    min-height: 38vh;
    max-height: 55vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    background: linear-gradient(to top, rgba(0,0,0,0.96) 0%, rgba(0,0,0,0.85) 50%, rgba(0,0,0,0.4) 85%, transparent 100%);
    /* Extra bottom padding: WebView often reports env(safe-area-inset-bottom)=0; gesture nav still needs space */
    padding: 16px 20px max(28px, calc(12px + env(safe-area-inset-bottom, 0px)));
    padding-right: 140px; /* Clear of right-side actions + cart quantity group */
    z-index: 10001;
    color: white;
    overflow: visible;
}

.tiktok-info-content {
    max-width: 100%;
    position: relative;
}

.tiktok-info-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}

.tiktok-info-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    line-height: 1.25;
}
.tiktok-info-screen-name {
    font-size: 13px;
    margin-top: 2px;
    opacity: 0.9;
}

/* Description - more room, scrollable if very long */
.tiktok-info-description {
    font-size: 14px;
    opacity: 0.95;
    margin-bottom: 10px;
    line-height: 1.5;
    max-height: 120px;
    overflow-y: auto;
    overflow-wrap: break-word;
    word-wrap: break-word;
    -webkit-overflow-scrolling: touch;
    padding-right: 4px;
}
.tiktok-info-description::-webkit-scrollbar {
    width: 4px;
}
.tiktok-info-description::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.4);
    border-radius: 4px;
}

.tiktok-info-price {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color, #DC143C);
    margin-bottom: 8px;
}

/* Attribute/tag badges below price so they stay out of the way */
.tiktok-badges-below-price {
    margin-top: 0;
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.tiktok-info-price .tiktok-price-current {
    color: #28a745;
}
.tiktok-info-price .tiktok-price-old {
    text-decoration: line-through;
    color: rgba(255,255,255,0.6);
    font-size: 0.85em;
    margin-left: 6px;
}
.tiktok-info-price .tiktok-price-save {
    display: block;
    font-size: 0.75em;
    font-weight: 600;
    color: #28a745;
    margin-top: 2px;
}
.tiktok-info-price .tiktok-price-message {
    display: block;
    font-size: 0.7em;
    font-weight: normal;
    color: rgba(255,255,255,0.85);
    margin-top: 4px;
}

/* Special item: yellow price and yellow border around card */
.tiktok-info-price.tiktok-price-special {
    color: #ffc107;
}
.tiktok-info-price.tiktok-price-special .tiktok-price-current {
    color: #ffc107;
}
.tiktok-info-price.tiktok-price-special .tiktok-price-save {
    color: #ffdb4d;
}
.tiktok-scroller-item.tiktok-item-product {
    border: 3px solid #ffc107;
    border-radius: 12px;
    box-sizing: border-box;
    box-shadow: 0 0 0 1px rgba(255,193,7,0.3);
}
/* No yellow border on shop product view (single-item or 3D wrap) */
.shop-3d-item-wrap.tiktok-scroller-item.tiktok-item-product,
.shop-3d-item-wrap.tiktok-scroller-item.tiktok-item-product.tiktok-item-special,
.tiktok-shop-item.tiktok-scroller-item.tiktok-item-product,
.tiktok-shop-item.tiktok-scroller-item.tiktok-item-product.tiktok-item-special {
    border: none !important;
    box-shadow: none !important;
}

.tiktok-info-actions {
    display: flex;
    gap: 10px;
}

.tiktok-info-btn {
    background: var(--primary-color, #DC143C);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tiktok-info-btn:hover {
    background: #c82333;
    transform: scale(1.05);
}

/* Badges */
.tiktok-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    min-height: 24px;
    align-items: flex-start;
}

.tiktok-badge-featured,
.tiktok-badge-special,
.tiktok-badge-organic,
.tiktok-badge-local,
.tiktok-badge-seasonal,
.tiktok-badge-unread {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}
.tiktok-badges-left {
    justify-content: flex-start;
    margin-top: 6px;
    margin-bottom: 0;
}
.tiktok-badges:empty::before {
    content: '';
    display: block;
    height: 16px;
}

.tiktok-badge-featured {
    background: var(--primary-color, #DC143C); /* RED for featured */
    color: white;
}

.tiktok-badge-special {
    background: #ffc107; /* YELLOW for specials */
    color: #000;
}

.tiktok-badge-organic {
    background: #28a745;
    color: white;
}

.tiktok-badge-local {
    background: #17a2b8;
    color: white;
}

.tiktok-badge-seasonal {
    background: #6f42c1;
    color: white;
}

.tiktok-badge-unread {
    background: var(--primary-color, #DC143C);
    color: white;
}

/* Tagged product badges – square with rounded corners */
.tiktok-badge-tagged {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    background: #17a2b8;
    color: white;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}
.tiktok-badge-tagged:hover {
    background: #138496;
    transform: scale(1.05);
}

.tiktok-badge-post-link {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    text-decoration: none;
}

.tiktok-badge-post-link i {
    margin-right: 4px;
}

.tiktok-badge-tagged.sold-out {
    background: rgba(108, 117, 125, 0.9);
    color: rgba(255, 255, 255, 0.82);
    cursor: not-allowed;
    text-decoration: line-through;
}

.tiktok-badge-tagged.sold-out:hover {
    background: rgba(108, 117, 125, 0.9);
    transform: none;
}

.tiktok-badge-tagged.sold-out small {
    display: inline-block;
    margin-left: 4px;
    text-decoration: none;
    font-size: 10px;
    font-weight: 700;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .tiktok-scroller-sidebar {
        width: 85%;
    }
    
    .tiktok-scroller-actions {
        right: 10px;
        bottom: 100px;
        gap: 15px;
    }
    
    
    .tiktok-info-header h4 {
        font-size: 18px;
    }
    
    .tiktok-info-price {
        font-size: 22px;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .tiktok-scroller-sidebar {
        width: 70%;
        max-width: 400px;
    }
}

/* Desktop - Keep mobile feel but allow larger viewport */
@media (min-width: 1025px) {
    .tiktok-scroller-modal {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .tiktok-scroller-container {
        max-width: 500px;
        max-height: 90vh;
        border-radius: 20px;
        overflow: hidden;
        box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    }
}

/* Loading State */
.tiktok-scroller-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: white;
    font-size: 18px;
}

.tiktok-scroller-loading i {
    margin-right: 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Smooth Transitions */
.tiktok-scroller-item {
    will-change: transform, opacity;
}

/* Prevent text selection during swipe */
.tiktok-scroller-main {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Touch Action Optimization */
.tiktok-scroller-items {
    touch-action: pan-y;
}

/* Lazy Loading Styles */
.tiktok-lazy-image {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tiktok-lazy-image.loaded {
    opacity: 1;
}

/* Loading Indicator */
.tiktok-scroller-loading-more {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 10002;
    display: none;
}

.tiktok-scroller-loading-more.active {
    display: block;
}

.tiktok-scroller-loading-more i {
    margin-right: 8px;
    animation: spin 1s linear infinite;
}

/* Story Modal Styles */
.tiktok-story-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tiktok-story-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 100%;
    max-height: 90vh;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

.tiktok-story-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7), transparent);
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tiktok-story-author {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.tiktok-story-author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid white;
    object-fit: cover;
}
.tiktok-story-author-screen-name {
    font-size: 12px;
    opacity: 0.85;
    margin-top: 1px;
}
.tiktok-post-author-screen-name {
    font-size: 12px;
    margin-top: 2px;
    margin-bottom: 4px;
    text-align: center;
}

.tiktok-story-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tiktok-story-progress {
    position: absolute;
    top: 60px;
    left: 15px;
    right: 15px;
    display: flex;
    gap: 5px;
    z-index: 10;
}

.tiktok-story-progress-bar {
    flex: 1;
    height: 3px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    overflow: hidden;
}

.tiktok-story-progress-fill {
    height: 100%;
    background: white;
    width: 0%;
    transition: width 0.1s linear;
}

.tiktok-story-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.tiktok-story-slide {
    width: 100%;
    height: 100%;
    position: relative;
}

.tiktok-story-media {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tiktok-story-text {
    position: absolute;
    bottom: 80px;
    left: 20px;
    right: 20px;
    color: white;
    background: rgba(0,0,0,0.5);
    padding: 15px;
    border-radius: 10px;
    font-size: 16px;
}

/* Story modal: dots at bottom (same as in-scroller) */
.tiktok-story-container .tiktok-story-dots-bottom {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    z-index: 15;
}

.tiktok-story-container .tiktok-story-dots-bottom .tiktok-story-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.tiktok-story-container .tiktok-story-dots-bottom .tiktok-story-dot.active {
    background: #fff;
    width: 10px;
    height: 10px;
}

.tiktok-story-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    pointer-events: none;
}

.tiktok-story-nav-btn {
    flex: 1;
    background: transparent;
    border: none;
    cursor: pointer;
    pointer-events: all;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.5);
    font-size: 24px;
    transition: color 0.2s;
}

.tiktok-story-nav-btn:hover {
    color: white;
}

.tiktok-story-prev {
    justify-content: flex-start;
    padding-left: 20px;
}

.tiktok-story-next {
    justify-content: flex-end;
    padding-right: 20px;
}

.tiktok-story-tagged-items {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.tiktok-tagged-item {
    position: absolute;
    background: var(--primary-color, #DC143C);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    pointer-events: all;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transform: translate(-50%, -50%);
}

.tiktok-tagged-item:hover {
    background: var(--primary-color, #DC143C);
}

.tiktok-story-badge {
    background: rgba(255, 193, 7, 0.9);
    color: #000;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 5px;
}

.tiktok-pinned-badge {
    background: rgba(0, 123, 255, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    z-index: 10003; /* Below header (10005) but above content */
    position: relative;
}

.tiktok-unread-badge {
    background: rgba(108, 117, 125, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
}

/* Community post styles */
.tiktok-community-post {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.tiktok-post-media {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    background: #000;
    pointer-events: auto;
    z-index: 10;
    position: relative;
}

.tiktok-post-media video {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
}

/* Ensure video controls are clickable */
.tiktok-post-media:focus,
.tiktok-post-media video:focus {
    outline: none;
}

/* Story dots indicator */
.tiktok-story-dots-indicator {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
    padding: 8px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 20px;
    margin-top: 8px;
    pointer-events: auto;
    z-index: 20;
    position: relative;
}

.tiktok-story-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
    cursor: pointer;
    pointer-events: auto;
}

.tiktok-story-dot.active {
    background: rgba(255, 255, 255, 1);
    width: 10px;
    height: 10px;
}

/* Wrapper for story media so overlay and dots position correctly */
.tiktok-story-item-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
}

.tiktok-story-media-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0; /* allow flex child to shrink and center when content doesn't fill */
}

/* Center video in container when it doesn't fill width or height (letterbox/pillarbox) */
.tiktok-story-media-wrapper .tiktok-item-video,
.tiktok-story-media-wrapper .tiktok-item-image {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

/* When tap overlay is present, video must not capture taps - overlay handles left/center/right */
.tiktok-story-media-wrapper:has(.tiktok-story-tap-overlay) .tiktok-item-video {
    pointer-events: none;
}

/* Optional: subtle buffering state so user sees video is loading */
.tiktok-story-media-wrapper .tiktok-item-video.tiktok-video-buffering {
    opacity: 0.85;
}

/* Tap overlay: captures left/center/right tap for prev | pause/play | next - must be above video and below dots */
.tiktok-story-tap-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 10040;
    cursor: pointer;
    pointer-events: auto;
    touch-action: manipulation; /* allow tap without delay; don't let parent pan-y steal the touch */
}

/* Story dots at bottom of video - above bottom info overlay so they are visible */
.tiktok-story-dots-bottom {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    z-index: 10050;
    pointer-events: none;
}

.tiktok-story-dots-bottom .tiktok-story-dot {
    pointer-events: auto;
}

/* Tagged items container (like attributes) */
.tiktok-tagged-items-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.tiktok-tagged-item-btn {
    background: var(--primary-color, #DC143C);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: auto;
}

.tiktok-tagged-item-btn:hover {
    background: var(--primary-color, #DC143C);
    transform: scale(1.05);
}

/* Creator profile image: circular avatar only, no square action-button container */
.tiktok-author-profile img,
#tiktok-community-author-profile-img,
#tiktok-embedded-community-author-profile-img {
    border-radius: 50% !important;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Interactive Post Content Styles - no overlay; use full height */
.tiktok-post-interactive-content {
    width: 100%;
    height: 100%;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 12px 100px;
    background: linear-gradient(160deg, #2a2a2a 0%, #1a1a1a 100%);
    overflow-y: auto;
    box-sizing: border-box;
    position: relative;
}

/* Small badges (New/Pinned) on interactive cards - no full overlay */
.tiktok-interactive-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    pointer-events: none;
}

.tiktok-poll-container,
.tiktok-survey-container,
.tiktok-recipe-container {
    max-width: 700px;
    width: 100%;
    height: 100%;
    max-height: calc(100vh - 220px);
    background: rgba(0, 0, 0, 0.75);
    border-radius: 16px;
    padding: 20px 16px;
    color: white;
    overflow-y: auto;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.tiktok-poll-question,
.tiktok-survey-title,
.tiktok-recipe-title {
    font-size: 1.15rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: white;
    flex-shrink: 0;
}

.tiktok-poll-options-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.tiktok-poll-option-item {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    flex-shrink: 0;
}

.tiktok-poll-option-item:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: color-mix(in srgb, var(--primary-color, #DC143C) 50%, transparent);
    transform: translateX(5px);
}

.tiktok-poll-option-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: color-mix(in srgb, var(--primary-color, #DC143C) 40%, transparent);
    transition: width 0.5s ease;
    z-index: 0;
}

.tiktok-poll-option-content {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tiktok-poll-option-text {
    font-size: 14px;
    font-weight: 500;
}

.tiktok-poll-option-percent {
    font-size: 18px;
    font-weight: bold;
    color: var(--primary-color, #DC143C);
}

.tiktok-poll-footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.tiktok-survey-description {
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    font-size: 13px;
}

.tiktok-survey-button {
    width: 100%;
    padding: 15px 30px;
    background: var(--primary-color, #DC143C);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.tiktok-survey-button:hover {
    background: #c82333;
    transform: scale(1.05);
}

.tiktok-recipe-section {
    margin-bottom: 12px;
}

.tiktok-recipe-section h4 {
    font-size: 0.95rem;
    font-weight: bold;
    margin-bottom: 6px;
    color: var(--primary-color, #DC143C);
    display: flex;
    align-items: center;
    gap: 6px;
}

.tiktok-recipe-background {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.tiktok-recipe-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.tiktok-recipe-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.75) 50%, rgba(0, 0, 0, 0.85) 100%);
    z-index: 1;
}

.tiktok-recipe-content {
    position: relative;
    z-index: 2;
    width: 100%;
    flex: 1;
    padding: 12px 14px;
    color: white;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Two-column layout to fit ingredients + instructions in one view */
.tiktok-recipe-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
@media (max-width: 500px) {
    .tiktok-recipe-body {
        grid-template-columns: 1fr;
    }
}

.tiktok-recipe-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.tiktok-recipe-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 11px;
}

.tiktok-recipe-ingredients-list,
.tiktok-recipe-instructions-list {
    background: rgba(255, 255, 255, 0.06);
    padding: 8px 10px;
    border-radius: 8px;
    line-height: 1.45;
    margin: 0;
    list-style-position: inside;
    font-size: 12px;
    overflow-y: auto;
    min-height: 0;
}

.tiktok-recipe-ingredients-list li,
.tiktok-recipe-instructions-list li {
    margin-bottom: 4px;
    padding-left: 6px;
}

.tiktok-survey-form {
    width: 100%;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

.tiktok-survey-question {
    margin-bottom: 14px;
}

.tiktok-survey-question-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: white;
}

.tiktok-survey-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tiktok-survey-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tiktok-survey-option:hover {
    background: rgba(255, 255, 255, 0.15);
}

.tiktok-survey-option input[type="radio"],
.tiktok-survey-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.tiktok-survey-text-input {
    width: 100%;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 16px;
}

.tiktok-survey-text-input:focus {
    outline: none;
    border-color: var(--primary-color, #DC143C);
    background: rgba(255, 255, 255, 0.15);
}

.tiktok-poll-option-item.voted {
    cursor: default;
}

.tiktok-item-badges-only {
    position: absolute;
    top: 60px; /* Below header (50px height) */
    left: 15px;
    z-index: 10003; /* Below header (10005) but above content */
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tiktok-survey-thanks {
    text-align: center;
    padding: 40px 20px;
}

.tiktok-survey-thanks i {
    font-size: 64px;
    color: #28a745;
    margin-bottom: 20px;
}

.tiktok-survey-thanks p {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.tiktok-survey-thanks small {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

/* Tagged Items Overlay on Video/Image Posts */
.tiktok-tagged-items-overlay {
    position: absolute;
    bottom: 80px;
    left: 0;
    right: 0;
    z-index: 10003; /* Below header (10005) but above content, visible */
    padding: 0 20px;
    pointer-events: none;
}

.tiktok-tagged-items-overlay .tiktok-tagged-items-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    pointer-events: auto;
}

.tiktok-tagged-items-overlay .tiktok-tagged-item-btn {
    background: var(--primary-color, #DC143C);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.tiktok-tagged-items-overlay .tiktok-tagged-item-btn:hover {
    background: var(--primary-color, #DC143C);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Tab Content Visibility */
.tiktok-tab-content {
    display: none;
    width: 100%;
    height: 100%;
    position: relative;
}

.tiktok-tab-content.active {
    display: flex;
    flex-direction: column;
}

/* ========== Shop tab: expandable details, image thumbs, main image tap zones ========== */
.tiktok-shop-info .tiktok-info-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
}
.tiktok-shop-info .tiktok-info-header h4 {
    margin: 0;
    flex: 1 1 100%;
    min-height: calc(1.25em * 2);
    max-height: calc(1.25em * 2);
    overflow: hidden;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.tiktok-shop-info .tiktok-info-content {
    position: static;
    padding-bottom: 22px;
}
.tiktok-shop-info .tiktok-info-price {
    margin: 0;
}
.tiktok-shop-details-expandable {
    position: absolute;
    left: 20px;
    right: 140px;
    bottom: 24px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease-out, transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
    transform: translateY(100%);
    pointer-events: none;
    background: rgba(18, 18, 18, 0.98);
    backdrop-filter: blur(12px);
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.5);
    z-index: 3;
    touch-action: pan-y;
    contain: layout paint;
    will-change: transform;
    overflow-anchor: none;
}
.tiktok-shop-details-expandable.expanded,
.tiktok-shop-details-expandable.description-expanded {
    transform: translateY(0);
    pointer-events: auto;
}
.tiktok-shop-details-expandable::before {
    content: '';
    display: block;
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,0.4);
    margin: 10px auto 8px;
    flex-shrink: 0;
}
.tiktok-shop-details-expandable .tiktok-info-description {
    margin-top: 0;
    padding: 0 20px 24px;
    padding-bottom: max(24px, env(safe-area-inset-bottom));
    border-top: none;
    font-size: 0.95rem;
    line-height: 1.4;
    color: rgba(255,255,255,0.9);
    max-height: none;
    overflow-y: auto;
    white-space: normal;
}
.tiktok-shop-details-section + .tiktok-shop-details-section {
    margin-top: 14px;
}
.tiktok-shop-details-heading {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.68);
    margin-bottom: 6px;
}
.tiktok-shop-details-copy p {
    margin: 0;
}
.tiktok-shop-details-copy p + p {
    margin-top: 10px;
}
.tiktok-nutrition-panel {
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    overflow: hidden;
}
.tiktok-nutrition-list {
    display: grid;
    gap: 0;
}
.tiktok-nutrition-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    line-height: 1.4;
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.tiktok-nutrition-row:last-child {
    border-bottom: none;
}
.tiktok-nutrition-label {
    color: rgba(255,255,255,0.78);
}
.tiktok-nutrition-value {
    color: #fff;
    text-align: right;
}
.tiktok-nutrition-group-title {
    padding: 10px 12px 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.68);
}
.tiktok-nutrition-subgroup {
    padding-left: 10px;
}
.tiktok-nutrition-group + .tiktok-nutrition-group {
    border-top: 1px solid rgba(255,255,255,0.08);
}
.tiktok-nutrition-row-depth-1,
.tiktok-nutrition-row-depth-2,
.tiktok-nutrition-row-depth-3 {
    padding-left: 16px;
}
.tiktok-shop-details-swipe-hint {
    margin-top: 14px;
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    text-align: center;
}
#tiktok-scroller-info .tiktok-info-content:not(:has(.description-expanded))::after {
    content: 'Swipe up for details and nutrition';
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    padding: 8px 0 0;
    pointer-events: none;
}
.tiktok-shop-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 0;
    min-height: 100%;
    position: relative;
    width: 100%;
}
/* Blur fills entire card/screen background – one full-bleed layer, square corners, no clipping */
.tiktok-shop-bg-blur {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    overflow: visible;
    pointer-events: none;
    border-radius: 0 !important;
    margin: 0;
    padding: 0;
}
.tiktok-shop-bg-blur-img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    min-width: 100vw;
    min-height: 100vh;
    transform: translate(-50%, -50%) scale(1.5);
    filter: blur(28px);
    opacity: 0.85;
    object-fit: cover;
    object-position: center;
    border-radius: 0 !important;
}
/* Ensure no parent clips the blur */
.tiktok-embedded-panel-shop,
.tiktok-scroller-main,
#tiktok-embedded-panel-shop,
#tiktok-scroller-main {
    overflow: visible !important;
    border-radius: 0 !important;
}
.tiktok-embedded-panel-shop .tiktok-embedded-shop-main,
#tiktok-tab-shop .tiktok-scroller-main {
    overflow: visible !important;
}
.tiktok-shop-item .tiktok-shop-thumbs-above,
.tiktok-shop-item .tiktok-shop-main-wrap {
    position: relative;
    z-index: 1;
}
/* Ensure shop item and main image area fill and show the image */
#tiktok-embedded-scroller-items,
#tiktok-scroller-items {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
    width: 100%;
}
#tiktok-embedded-scroller-items .tiktok-shop-item,
#tiktok-scroller-items .tiktok-shop-item {
    flex: 1;
    min-height: 0;
    width: 100%;
}
.tiktok-shop-item .tiktok-shop-main-wrap.tiktok-shop-single-wrap {
    flex: 1;
    min-height: 200px;
    margin-top: 10px;
    position: relative;
    z-index: 1;
}
/* Current slide main image always visible (src set in HTML for first image) */
.tiktok-shop-single-wrap .tiktok-shop-slide.current .tiktok-shop-main-img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
.tiktok-scroller-item.tiktok-shop-item.shop-3d-item-wrap {
    justify-content: center;
    align-items: center;
}
.tiktok-scroller-item.tiktok-shop-item.shop-3d-item-wrap .shop-3d-slider {
    flex: 0 0 auto;
}
.tiktok-shop-images-wrap {
    width: 100%;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.tiktok-shop-thumbs {
    flex-shrink: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 6px 14px 10px;
    background: rgba(0,0,0,0.35);
    border-radius: 0;
}
/* Full-width thumbs bar just above main image (shop single-item view) */
.tiktok-shop-item .tiktok-shop-thumbs.tiktok-shop-thumbs-above {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    margin: 0;
    background: rgba(0,0,0,0.4);
    border-radius: 0;
    position: relative;
    z-index: 6;
}
.tiktok-shop-main-wrap {
    flex: 1;
    min-height: 0;
    position: relative;
    width: 100%;
    height: 100%;
}
.tiktok-shop-single-wrap {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tiktok-shop-single-wrap .tiktok-shop-slides {
    width: 100%;
    height: 100%;
    position: relative;
}
.tiktok-shop-single-wrap .tiktok-shop-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
}
.tiktok-shop-single-wrap .tiktok-shop-slide.current {
    display: flex;
}
/* Main image full width */
.tiktok-shop-single-wrap .tiktok-shop-main-img {
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    position: relative;
    z-index: 2;
    border: none;
    box-shadow: none;
    display: block;
}
.tiktok-shop-item .tiktok-shop-main-wrap.tiktok-shop-single-wrap {
    width: 100%;
    max-width: 100%;
}
.tiktok-shop-item .tiktok-shop-main-img,
.tiktok-shop-slide .tiktok-shop-main-img {
    border: none !important;
    box-shadow: none !important;
}
.tiktok-shop-single-wrap .tiktok-shop-main-tap {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 50%;
    z-index: 3;
    cursor: pointer;
}
.tiktok-shop-single-wrap .tiktok-shop-tap-prev {
    left: 0;
}
.tiktok-shop-single-wrap .tiktok-shop-tap-next {
    right: 0;
}
.tiktok-shop-thumb {
    aspect-ratio: 1;
    border-radius: 0;
    overflow: hidden;
    border: 2px solid transparent;
    background: #222;
    padding: 0;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.tiktok-shop-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}
.tiktok-shop-thumb-current {
    border-color: var(--primary-color, #DC143C);
    box-shadow: 0 0 0 1px var(--primary-color, #DC143C);
}
.tiktok-shop-thumb-current-special {
    border-color: var(--primary-color, #DC143C);
    box-shadow: 0 0 0 1px var(--primary-color, #DC143C);
}
.tiktok-shop-main-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.tiktok-shop-slides {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tiktok-shop-slide {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 10px;
    box-sizing: border-box;
}
.tiktok-shop-slide.current {
    display: flex;
}
.tiktok-shop-slide.current .tiktok-shop-main-img,
.tiktok-shop-slide .tiktok-shop-main-img {
    border: none !important;
    box-shadow: none !important;
    border-radius: 0;
    box-sizing: border-box;
}
/* Single-item shop: main image full width, no rounded corners */
.tiktok-shop-single-wrap .tiktok-shop-slide .tiktok-shop-main-img {
    border-radius: 0 !important;
}
.tiktok-shop-main-tap {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 40%;
    z-index: 5;
    cursor: pointer;
}
.tiktok-shop-tap-prev { left: 0; }
.tiktok-shop-tap-next { right: 0; }

/* When filter is applied, reserve space so filter bar doesn't overlap content */
.tiktok-tab-content.tiktok-filter-active .tiktok-scroller-main {
    padding-top: 44px;
    box-sizing: border-box;
}

@media (prefers-reduced-motion: reduce) {
    .tiktok-embedded-header,
    #tiktok-scroller-embedded .tiktok-embedded-filter-bar,
    .tiktok-embedded-tab,
    .tiktok-embedded-close {
        transition: none !important;
    }
}

/* ========== Shop: Cards vs List (People Also Bought row style) ========== */
.tiktok-shop-view-toolbar {
    display: none !important;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 6px 12px 8px;
    background: rgba(0, 0, 0, 0.55);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 5;
}
.tiktok-shop-view-toolbar.tiktok-shop-view-toolbar--visible {
    display: flex !important;
    position: relative;
    z-index: 220;
}
.tiktok-shop-view-toolbar.tiktok-categories-browse-toolbar--visible {
    display: flex !important;
    position: relative;
    z-index: 220;
}

/* Embedded: Cards/List on Categories tab (inline with search on beta) */
.tiktok-embedded-categories-browse-toolbar-row {
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
}
#tiktok-embedded-categories-browse-toolbar-wrap {
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
}
#tiktok-embedded-categories-browse-toolbar-wrap .tiktok-categories-browse-toolbar {
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin: 0;
}

/* Modal Categories tab: browse toolbar above grid */
.tiktok-modal-categories-browse-toolbar-wrap {
    width: 100%;
    flex-shrink: 0;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.tiktok-modal-categories-browse-toolbar-wrap .tiktok-categories-browse-toolbar {
    border-radius: 0;
    border: none;
    margin: 0;
}

#tiktok-tab-categories .tiktok-categories-grid {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.tiktok-shop-view-toolbar-label {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.tiktok-shop-view-toggle {
    display: flex;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.25);
}
.tiktok-shop-view-btn {
    appearance: none;
    border: none;
    margin: 0;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(40, 40, 40, 0.95);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.tiktok-shop-view-btn + .tiktok-shop-view-btn {
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}
.tiktok-shop-view-btn.active {
    background: var(--primary-color, #DC143C);
    color: #fff;
}

.tiktok-shop-list-view {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 10px 16px;
    text-align: left;
}
.tiktok-shop-list-inner .tiktok-shop-list-commodity-title {
    margin: 14px 0 8px;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.tiktok-shop-list-inner .tiktok-shop-list-commodity-title:first-child {
    margin-top: 4px;
}
.tiktok-shop-list-inner .related-product-item {
    margin-bottom: 10px;
}

/* Dark list chrome inside TikTok shop (matches embedded/modal #0a0a0a / #000) */
.tiktok-shop-list-view.related-products-column.themed-card {
    background: transparent;
    border: none;
    padding-left: 0;
    padding-right: 0;
}
.tiktok-shop-list-view .related-product-item {
    background: rgba(26, 26, 26, 0.96);
    border-color: rgba(255, 255, 255, 0.22);
}
.tiktok-shop-list-view .related-product-item.related-product-special {
    border-color: #ffc107;
    background: linear-gradient(to bottom, rgba(255, 193, 7, 0.12) 0%, rgba(26, 26, 26, 0.96) 22%);
}
.tiktok-shop-list-view .related-product-name,
.tiktok-shop-list-view .related-product-price {
    color: #f1f1f1 !important;
}
.tiktok-shop-list-view .related-product-image {
    background-color: #2d2d2d !important;
    border-color: #444 !important;
}

.tiktok-categories-browse-list .related-product-item {
    margin-bottom: 10px;
}

.tiktok-like-btn.tiktok-like-guest-disabled,
.tiktok-like-guest-disabled.tiktok-action-btn {
    cursor: not-allowed;
    filter: grayscale(0.35);
}


/* ===== tiktok-scroller-tabs.css ===== */
/**
 * TikTok Scroller Tabs Styles
 * Tab navigation at the top
 */

/* Top Tabs */
.tiktok-scroller-tabs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    flex: 1;
    z-index: 10004;
    position: relative;
}

.tiktok-tab {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.7);
    width: 50px;
    height: 50px;
    min-width: 50px;
    min-height: 50px;
    padding: 0;
    border-radius: 12px;
    margin: 0 2px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
}

.tiktok-community-unseen-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    background: var(--primary-color, #DC143C);
    color: #fff;
    border: 2px solid rgba(10, 10, 10, 0.95);
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.tiktok-tab i {
    font-size: 18px;
    flex-shrink: 0;
}

.tiktok-tab-label {
    display: none; /* Same size as close/profile: icons only */
}

@media (min-width: 480px) {
    .tiktok-tab {
        width: 50px;
        height: 50px;
        min-width: 50px;
        min-height: 50px;
        padding: 0;
    }
    .tiktok-tab-label {
        display: none;
    }
}

.tiktok-tab.active {
    background: var(--primary-color, #DC143C);
    color: white;
    transform: scale(1.05);
}

.tiktok-tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
}

/* Ensure tab container clips sliding panes */
.tiktok-scroller-container {
    overflow-x: hidden;
}

/* Tab Content */
.tiktok-tab-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    opacity: 1;
    transition: transform 0.28s ease-out;
    transform: translateX(0);
    flex-direction: column;
}

.tiktok-tab-content.active {
    display: flex;
    opacity: 1;
    transform: translateX(0);
}

.tiktok-tab-content.prev {
    transform: translateX(-100%);
}

/* Slide animation: outgoing pane */
.tiktok-tab-content.tiktok-tab-slide-out-left {
    display: flex !important;
    transform: translateX(-100%);
}

.tiktok-tab-content.tiktok-tab-slide-out-right {
    display: flex !important;
    transform: translateX(100%);
}

/* Slide animation: incoming pane starting position */
.tiktok-tab-content.tiktok-tab-slide-in-from-right {
    transform: translateX(100%);
}

.tiktok-tab-content.tiktok-tab-slide-in-from-left {
    transform: translateX(-100%);
}

/* Categories Grid – top padding so first row (Featured) starts below the header; scrollbar hidden */
.tiktok-categories-grid {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 92px 16px 20px 16px;
    background: #000;
    box-sizing: border-box;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.tiktok-categories-grid::-webkit-scrollbar {
    display: none;
}

.tiktok-categories-grid-inner {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 40px;
    max-width: 1600px;
    margin: 0 auto;
    align-items: start;
}

/* New layout: Featured → full-width scroller → pairs of (2 tiles + 2 scroller rows) */
.tiktok-categories-layout {
    display: block;
    max-width: 1600px;
    margin: 0 auto;
}
.tiktok-cat-block {
    margin-bottom: 0.5rem;
}
.tiktok-cat-block-featured .tiktok-category-fullwidth {
    width: 100%;
    height: 200px;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
}
.tiktok-cat-block-fullwidth-expandable .tiktok-cat-fullwidth-tile {
    position: relative;
    z-index: 2;
}
.tiktok-cat-fullwidth-tile {
    position: relative;
    width: 100%;
    height: 200px;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    display: block;
}
.tiktok-cat-fullwidth-tile .tiktok-category-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.tiktok-cat-fullwidth-tile .tiktok-category-bg-image:not(:has(.tiktok-category-tile-img)) {
    background-size: auto 100%;
    background-position: center center;
}
.tiktok-cat-fullwidth-tile.tiktok-cat-fullwidth-color .tiktok-category-bg-image {
    background-image: none !important;
}
.tiktok-cat-fullwidth-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    font-size: 48px;
    color: rgba(255,255,255,0.9);
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.tiktok-cat-block-fullwidth-expandable {
    margin: 3px 0;
}
.tiktok-cat-block-fullwidth-expandable.selected .tiktok-cat-fullwidth-tile {
    box-shadow: inset 0 0 0 3px var(--primary-color, #DC143C);
}
.tiktok-cat-block-fullwidth-expandable[data-section-id="specials"].selected .tiktok-cat-fullwidth-tile {
    box-shadow: inset 0 0 0 3px #ffc107;
}

/* Expand arrow: fixed-size box so rotation stays in place (down = collapsed, up = expanded) */
.tiktok-cat-expand-arrow {
    position: absolute;
    bottom: 12px;
    left: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(-50%);
    transform-origin: 50% 50%;
    z-index: 2;
    color: rgba(255, 255, 255, 0.95);
    font-size: 14px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    animation: tiktok-cat-arrow-bounce 2s ease-in-out 1 forwards;
    box-sizing: border-box;
}
.tiktok-cat-tile-wrap .tiktok-cat-expand-arrow {
    bottom: 2px;
    width: 24px;
    height: 24px;
    font-size: 12px;
}
@keyframes tiktok-cat-arrow-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    25% { transform: translateX(-50%) translateY(4px); }
    50% { transform: translateX(-50%) translateY(0); }
    75% { transform: translateX(-50%) translateY(3px); }
}
/* Selected = expanded: arrow rotates 180° in place (same position, no jump) */
.tiktok-cat-tile-wrap.selected .tiktok-cat-expand-arrow,
.tiktok-cat-block-fullwidth-expandable.selected .tiktok-cat-expand-arrow {
    animation: none;
    transform: translateX(-50%) rotate(180deg);
}
.tiktok-cat-fullwidth-scroller-row {
    position: relative;
    z-index: 1;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.22s ease-out;
    flex-shrink: 0;
}
.tiktok-cat-fullwidth-scroller-row.expanded {
    max-height: 480px;
}
.tiktok-cat-fullwidth-scroller-row.expanded .tiktok-cat-scroller-inner {
    margin-top: 0.5rem;
    overflow: hidden;
}
.tiktok-cat-block-fullscroller {
    width: 100%;
}
.tiktok-cat-block-fullscroller .beta-unified-section {
    margin-bottom: 0;
}
/* Each pair full width so tiles + scroller rows stack below (same as Featured section) */
.tiktok-categories-grid-inner .tiktok-cat-pair {
    grid-column: 1 / -1;
}
.tiktok-cat-pair {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow: hidden;
}
.tiktok-cat-row-tiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 0;
    padding: 3px;
    position: relative;
    z-index: 2;
    transition: transform 0.28s ease-out, opacity 0.22s ease-out;
    opacity: 1;
    transform: translateY(0);
}
.tiktok-cat-row-tiles.tiktok-cat-row-out {
    opacity: 0.92;
    transform: translateY(120px);
}
.tiktok-cat-row-tiles.tiktok-cat-row-in-view {
    opacity: 1;
    transform: translateY(0);
}
/* Parallax: each .tiktok-cat-pair (tiles + scroller rows) slides in/out as one unit */
.tiktok-cat-pair.tiktok-cat-pair-out {
    opacity: 0.92;
    transform: translateY(120px);
}
.tiktok-cat-pair.tiktok-cat-pair-in-view {
    opacity: 1;
    transform: translateY(0);
}
.tiktok-cat-pair {
    transition: transform 0.28s ease-out, opacity 0.22s ease-out;
}
.tiktok-cat-tile-wrap {
    position: relative;
    cursor: pointer;
    border-radius: 15px;
    overflow: visible;
    margin: 3px;
    transition: box-shadow 0.25s ease, transform 0.2s ease;
}
.tiktok-cat-tile-wrap .tiktok-category-card {
    border-radius: 15px;
    overflow: hidden;
}
.tiktok-cat-fullwidth-tile {
    transition: opacity 0.5s ease, box-shadow 0.25s ease, transform 0.2s ease, filter 0.4s ease;
}
.tiktok-cat-block-fullwidth-expandable {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow: hidden;
    transition: transform 0.28s ease-out, opacity 0.22s ease-out;
    opacity: 1;
    transform: translateY(0);
}
.tiktok-cat-block-fullwidth-expandable.tiktok-cat-block-out {
    opacity: 0.92;
    transform: translateY(120px);
}
.tiktok-cat-block-fullwidth-expandable.tiktok-cat-block-in-view {
    opacity: 1;
    transform: translateY(0);
}
/* Embedded grid: never dim rows; no vertical parallax so panel transition is horizontal only (no "up and left") */
#tiktok-categories-grid-embedded .tiktok-cat-row-out,
#tiktok-categories-grid-embedded .tiktok-cat-pair-out,
#tiktok-categories-grid-embedded .tiktok-cat-block-out {
    opacity: 1 !important;
    transform: translateY(0);
}
#tiktok-categories-grid-embedded .tiktok-cat-row-tiles.tiktok-cat-row-out,
#tiktok-categories-grid-embedded .tiktok-cat-pair.tiktok-cat-pair-out,
#tiktok-categories-grid-embedded .tiktok-cat-block-fullwidth-expandable.tiktok-cat-block-out {
    transform: translateY(0);
}
/* Lighter tile text gradient in embedded grid so bottom rows are not covered by dark overlay */
#tiktok-categories-grid-embedded .tiktok-category-text-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.15) 50%, transparent 100%);
}
#tiktok-categories-grid-embedded .tiktok-cat-fullwidth-tile .tiktok-category-text-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.2) 50%, transparent 100%);
}
.tiktok-cat-block-fullwidth-expandable .tiktok-cat-fullwidth-tile {
    flex-shrink: 0;
}
.tiktok-cat-fullwidth-scroller-row {
    flex-shrink: 0;
}
.tiktok-cat-block-fullwidth-expandable .tiktok-cat-fullwidth-tile {
    flex-shrink: 0;
    margin-bottom: 0.25rem;
    transition: opacity 0.5s ease, box-shadow 0.25s ease, transform 0.2s ease, filter 0.4s ease;
}
/* Category tile cart grid: stays inside tile (left+right), compact cells, doesn’t cover text */
/* Category tile cart bubble: count of items in cart for this category */
.tiktok-cat-tile-cart-bubble,
.tiktok-cat-tile-wrap .tiktok-cat-tile-cart-bubble,
.tiktok-cat-block-fullwidth-expandable .tiktok-cat-tile-cart-bubble {
    position: absolute;
    top: 8px;
    right: 8px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--primary-color, #DC143C);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    z-index: 3;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.tiktok-cat-tile-cart-bubble.visible,
.tiktok-cat-tile-wrap .tiktok-cat-tile-cart-bubble.visible,
.tiktok-cat-block-fullwidth-expandable .tiktok-cat-tile-cart-bubble.visible {
    opacity: 1;
}
.tiktok-cat-tile-wrap[data-section-id="specials"] .tiktok-cat-tile-cart-bubble,
.tiktok-cat-block-fullwidth-expandable[data-section-id="specials"] .tiktok-cat-tile-cart-bubble {
    background: #ffc107;
    color: #fff;
}

.tiktok-cat-tile-cart-grid,
.tiktok-cat-tile-wrap .tiktok-cat-tile-cart-grid,
.tiktok-cat-block-fullwidth-expandable .tiktok-cat-tile-cart-grid {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: auto;
    width: auto;
    height: auto;
    max-height: calc(100% - 44px);
    display: grid;
    grid-auto-flow: row;
    gap: 4px;
    z-index: 3;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    box-sizing: border-box;
    align-content: start;
    justify-content: end;
    overflow: hidden;
}
.tiktok-cat-tile-cart-grid.visible {
    opacity: 1;
    pointer-events: auto;
}
.tiktok-cat-cart-grid-item {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    border-radius: 8px;
    cursor: pointer;
    pointer-events: auto;
    border: 2px solid var(--primary-color, #DC143C);
    background-color: var(--primary-color, #DC143C);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    transform: scale(1);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.tiktok-cat-cart-grid-item--new {
    transform: scale(0);
}
.tiktok-cat-cart-grid-item--removing {
    transform: scale(0);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.2s ease;
}
.tiktok-cat-cart-grid-item--overflow {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color, #DC143C) !important;
    background-image: none !important;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    cursor: default;
    pointer-events: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}
.tiktok-cat-cart-grid-item__count {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--primary-color, #DC143C);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-sizing: border-box;
}
/* Specials tile: yellow border/badge to match specials styling */
.tiktok-cat-tile-wrap[data-section-id="specials"] .tiktok-cat-tile-cart-grid .tiktok-cat-cart-grid-item,
.tiktok-cat-block-fullwidth-expandable[data-section-id="specials"] .tiktok-cat-tile-cart-grid .tiktok-cat-cart-grid-item,
.tiktok-categories-grid .tiktok-cat-tile-wrap[data-section-id="specials"] .tiktok-cat-tile-cart-grid .tiktok-cat-cart-grid-item,
.tiktok-categories-grid .tiktok-cat-block-fullwidth-expandable[data-section-id="specials"] .tiktok-cat-tile-cart-grid .tiktok-cat-cart-grid-item {
    border-color: #ffc107;
}
.tiktok-cat-tile-wrap[data-section-id="specials"] .tiktok-cat-tile-cart-grid .tiktok-cat-cart-grid-item__count,
.tiktok-cat-block-fullwidth-expandable[data-section-id="specials"] .tiktok-cat-tile-cart-grid .tiktok-cat-cart-grid-item__count,
.tiktok-categories-grid .tiktok-cat-tile-wrap[data-section-id="specials"] .tiktok-cat-tile-cart-grid .tiktok-cat-cart-grid-item__count,
.tiktok-categories-grid .tiktok-cat-block-fullwidth-expandable[data-section-id="specials"] .tiktok-cat-tile-cart-grid .tiktok-cat-cart-grid-item__count {
    background: #ffc107;
    color: #000;
}
.tiktok-cat-tile-wrap[data-section-id="specials"] .tiktok-cat-tile-cart-grid .tiktok-cat-cart-grid-item--overflow,
.tiktok-cat-block-fullwidth-expandable[data-section-id="specials"] .tiktok-cat-tile-cart-grid .tiktok-cat-cart-grid-item--overflow,
.tiktok-categories-grid .tiktok-cat-tile-wrap[data-section-id="specials"] .tiktok-cat-tile-cart-grid .tiktok-cat-cart-grid-item--overflow,
.tiktok-categories-grid .tiktok-cat-block-fullwidth-expandable[data-section-id="specials"] .tiktok-cat-tile-cart-grid .tiktok-cat-cart-grid-item--overflow {
    background: #ffc107 !important;
    color: #000;
}

/* Categories 3D slider: + button at bottom-right (magnifier is top-right) */
.tiktok-categories-grid .unified-cart-btn-container.beta-cart-expandable {
    bottom: 6px;
    right: 6px;
    top: auto;
}
.tiktok-categories-grid .unified-cart-btn-container.beta-cart-expandable.expanded {
    min-height: 36px;
}
/* Categories 3D slider: cart bubble = square with rounded corners; simple expand/collapse (no circle flash) */
.tiktok-categories-grid .beta-cart-circle {
    background: var(--primary-color, #DC143C) !important;
    border: 2px solid var(--primary-color, #DC143C) !important;
    border-radius: 8px !important;
    color: #fff !important;
}
/* Only hide circle when expanded; during collapse show circle so pill just shrinks into it */
.tiktok-categories-grid .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-circle {
    display: none !important;
}
.tiktok-categories-grid .beta-cart-circle .beta-cart-circle-content {
    color: #fff !important;
}
.tiktok-categories-grid .beta-cart-circle:hover {
    filter: brightness(1.1);
}
.tiktok-categories-grid .unified-cart-btn-container.beta-cart-expandable .beta-cart-expanded {
    position: absolute !important;
    bottom: 0;
    right: 0;
    top: auto;
}
.tiktok-categories-grid .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded {
    overflow: visible !important;
    border: 2px solid var(--primary-color, #DC143C) !important;
    border-radius: 12px !important;
    transition: max-width 0.22s ease-out, opacity 0.18s ease-out;
}
.tiktok-categories-grid .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded .unified-cart-btn-inCart {
    display: flex !important;
}
.tiktok-categories-grid .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded .unified-cart-btn-right {
    display: flex !important;
}
.tiktok-categories-grid .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded:hover {
    border-color: var(--primary-color, #DC143C);
}

/* Cat-3D slide tiles: cart below price (overrides beta + tabs absolute on tile) */
.tiktok-categories-grid .cat-3d-slide-inner .unified-cart-btn-container.beta-cart-expandable {
    position: static !important;
    inset: auto !important;
    width: 100%;
    max-width: 100%;
    margin-top: auto;
    padding-top: 8px;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: auto;
    min-height: 0;
}
.tiktok-categories-grid .cat-3d-slide-inner .unified-cart-btn-container.beta-cart-expandable .beta-cart-expanded {
    position: relative !important;
    inset: auto !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    width: auto;
    max-width: 100% !important;
    margin-top: 4px;
    align-self: center;
}
.tiktok-categories-grid .cat-3d-slide-inner .unified-cart-btn-container.beta-cart-expandable:not(.expanded) .beta-cart-expanded {
    width: 0 !important;
    max-width: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    flex: 0 0 0 !important;
}
.tiktok-categories-grid .cat-3d-slide-inner .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded {
    opacity: 1 !important;
    pointer-events: auto !important;
    overflow: visible !important;
}
.tiktok-categories-grid .cat-3d-slide-inner .unified-cart-btn-container.beta-cart-expandable .beta-cart-circle {
    align-self: center;
}
.tiktok-categories-grid .cat-3d-slide-inner .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded .unified-cart-btn-inCart {
    justify-content: center !important;
    gap: 8px;
    width: auto;
    margin-left: auto;
    margin-right: auto;
}

.tiktok-categories-grid .beta-cart-expanded .unified-cart-btn-center {
    background: var(--primary-color, #DC143C) !important;
    color: #fff !important;
    border-radius: 8px !important;
}
.tiktok-categories-grid .beta-cart-expanded .unified-cart-btn-left,
.tiktok-categories-grid .beta-cart-expanded .unified-cart-btn-right {
    border-radius: 8px !important;
}
/* Special Offers section: yellow magnifier to match theme – white icon */
.cat-3d-slider[data-section-id="specials"] .cat-3d-slide-magnifier,
.tiktok-cat-block-fullwidth-expandable[data-section-id="specials"] .cat-3d-slide-magnifier,
.tiktok-cat-tile-wrap[data-section-id="specials"] .cat-3d-slide-magnifier {
    background: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #fff !important;
}
.cat-3d-slider[data-section-id="specials"] .cat-3d-slide-magnifier:hover,
.tiktok-cat-block-fullwidth-expandable[data-section-id="specials"] .cat-3d-slide-magnifier:hover,
.tiktok-cat-tile-wrap[data-section-id="specials"] .cat-3d-slide-magnifier:hover {
    filter: brightness(1.1);
}
.cat-3d-slider[data-section-id="specials"] .cat-3d-slide-magnifier:active,
.tiktok-cat-block-fullwidth-expandable[data-section-id="specials"] .cat-3d-slide-magnifier:active,
.tiktok-cat-tile-wrap[data-section-id="specials"] .cat-3d-slide-magnifier:active {
    filter: brightness(0.9);
}

/* Special Offers section: yellow cart (circle + pill) – all states so no red flash on update */
.cat-3d-slider[data-section-id="specials"] .beta-cart-circle,
.cat-3d-slider[data-section-id="specials"] .beta-cart-circle.special-item,
.cat-3d-slider[data-section-id="specials"] .unified-cart-btn-container.beta-cart-expandable .beta-cart-circle {
    background: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #333 !important;
}
.cat-3d-slider[data-section-id="specials"] .beta-cart-circle:hover,
.cat-3d-slider[data-section-id="specials"] .beta-cart-circle.special-item:hover {
    filter: brightness(1.1);
    background: #ffc107 !important;
    border-color: #ffc107 !important;
}
.cat-3d-slider[data-section-id="specials"] .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded,
.cat-3d-slider[data-section-id="specials"] .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded:hover,
.cat-3d-slider[data-section-id="specials"] .unified-cart-btn-container.beta-cart-expandable.updating .beta-cart-expanded {
    border-color: #ffc107 !important;
}
.cat-3d-slider[data-section-id="specials"] .beta-cart-expanded .unified-cart-btn-center,
.cat-3d-slider[data-section-id="specials"] .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded .unified-cart-btn-center {
    background: rgba(255, 193, 7, 0.9) !important;
    color: #fff !important;
}
.cat-3d-slider[data-section-id="specials"] .beta-cart-expanded .unified-cart-btn-left,
.cat-3d-slider[data-section-id="specials"] .beta-cart-expanded .unified-cart-btn-right,
.cat-3d-slider[data-section-id="specials"] .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded .unified-cart-btn-left,
.cat-3d-slider[data-section-id="specials"] .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded .unified-cart-btn-right {
    border-color: #ffc107 !important;
    color: #fff !important;
}
.cat-3d-slider[data-section-id="specials"] .beta-cart-expanded .unified-cart-btn-left i,
.cat-3d-slider[data-section-id="specials"] .beta-cart-expanded .unified-cart-btn-right i,
.cat-3d-slider[data-section-id="specials"] .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded .unified-cart-btn-left i,
.cat-3d-slider[data-section-id="specials"] .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded .unified-cart-btn-right i {
    color: #fff !important;
}
.cat-3d-slider[data-section-id="specials"] .beta-cart-expanded .unified-cart-btn-left:hover,
.cat-3d-slider[data-section-id="specials"] .beta-cart-expanded .unified-cart-btn-right:hover {
    background: #ffc107 !important;
    border-color: #ffc107 !important;
}
.cat-3d-slider[data-section-id="specials"] .unified-cart-btn-add,
.cat-3d-slider[data-section-id="specials"] .unified-cart-btn-container.beta-cart-expandable.expanded .beta-cart-expanded .unified-cart-btn-add {
    background: #ffc107 !important;
    border-color: #ffc107 !important;
}
.cat-3d-slider[data-section-id="specials"] .unified-cart-btn-add:hover,
.cat-3d-slider[data-section-id="specials"] .unified-cart-btn-add:active,
.cat-3d-slider[data-section-id="specials"] .unified-cart-btn-add:focus {
    background: #ffc107 !important;
    border-color: #ffc107 !important;
}
/* Per-tile special-item (product has special offer) – yellow when not in section-based rule */
.tiktok-categories-grid .unified-cart-btn-container.beta-cart-expandable:has(.special-item) .beta-cart-circle {
    background: #ffc107 !important;
    border-color: #ffc107 !important;
}
.tiktok-categories-grid .unified-cart-btn-container.beta-cart-expandable.expanded:has(.special-item) .beta-cart-expanded {
    border-color: #ffc107 !important;
}
.tiktok-categories-grid .unified-cart-btn-container.beta-cart-expandable.expanded:has(.special-item) .beta-cart-expanded .unified-cart-btn-center {
    background: #ffc107 !important;
    color: #fff !important;
}
.tiktok-categories-grid .unified-cart-btn-container.beta-cart-expandable.expanded:has(.special-item) .beta-cart-expanded .unified-cart-btn-center .cart-quantity {
    color: #fff !important;
}

.tiktok-cat-tile-wrap .tiktok-category-card {
    height: 150px;
    border-radius: 15px;
}
@media (hover: hover) {
    .tiktok-cat-row-tiles.tiktok-cat-row-in-view .tiktok-cat-tile-wrap:hover {
        transform: scale(1.02);
    }
}
.tiktok-cat-tile-wrap.selected {
    box-shadow: 0 0 0 3px var(--primary-color, #DC143C);
    transform: translateY(0) scale(1);
}
.tiktok-cat-tile-wrap[data-section-id="specials"].selected {
    box-shadow: 0 0 0 3px #ffc107;
}
.tiktok-cat-tile-wrap.selected:hover {
    transform: translateY(0) scale(1);
}
.tiktok-cat-scroller-row {
    position: relative;
    z-index: 1;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.22s ease-out;
    margin-top: 0;
}
.tiktok-cat-scroller-row.expanded {
    max-height: 480px;
}
/* Keep slider below tiles: gap so scrollers sit in flow below tiles, not behind */
.tiktok-cat-scroller-row.expanded .tiktok-cat-scroller-inner {
    margin-top: 0.25rem;
    overflow: hidden;
}
.tiktok-cat-scroller-inner {
    padding: 0.5rem 0 1rem;
}
.tiktok-cat-scroller-inner .horizontal-scroller,
.tiktok-cat-scroller-inner .horizontal-scroller-list {
    margin: 0;
}

/* Pair layout: make each scroller card the same width as a category tile so 2 columns line up */
.tiktok-cat-pair .tiktok-cat-scroller-inner .horizontal-scroller-container {
    padding-left: 0;
    padding-right: 0;
    max-width: none;
}
.tiktok-cat-pair .tiktok-cat-scroller-inner .horizontal-scroller-list {
    gap: 12px;
}
.tiktok-cat-pair .tiktok-cat-scroller-inner .horizontal-scroller-list .horizontal-scroller-item {
    width: calc((100% - 12px) / 2) !important;
    min-width: calc((100% - 12px) / 2) !important;
    max-width: calc((100% - 12px) / 2) !important;
    flex-shrink: 0;
    box-sizing: border-box;
}

/* Single-item groups: full-width card (same as main beta page), don't force 50% */
.tiktok-cat-pair .tiktok-cat-scroller-inner .beta-unified-section-single .horizontal-scroller-list .horizontal-scroller-item {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
}

.tiktok-categories-grid .product-tile {
    flex-shrink: 0;
}

/* Featured: Full width */
.tiktok-category-fullwidth {
    grid-column: 1 / -1;
    height: 200px;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* Category card with background image */
.tiktok-category-with-bg {
    position: relative;
    height: 150px;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
}

/* Background image */
.tiktok-category-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

/* Legacy CSS-only tile art: match <img> behavior — fill height, crop overflow on the sides */
.tiktok-category-bg-image:not(:has(.tiktok-category-tile-img)) {
    background-size: auto 100%;
    background-position: center center;
}

/* Real <img> tile art: fill tile height, crop left/right when the photo is wider than the frame */
.tiktok-category-bg-image .tiktok-category-tile-img {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
    width: auto;
    min-width: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center center;
    display: block;
    pointer-events: none;
    z-index: 1;
}

/* Text overlay with shadow container - only covers text area, not entire image */
.tiktok-category-text-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    z-index: 2;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    padding: 20px 15px 15px 15px;
    text-align: center;
    color: white;
    min-height: auto;
}
/* Full-width tiles (Featured, etc.): reserve space for arrow so it doesn't sit over the label */
.tiktok-cat-fullwidth-tile .tiktok-category-text-overlay {
    padding-bottom: 40px;
}

.tiktok-category-text-overlay h5 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.tiktok-category-text-overlay span {
    font-size: 12px;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    color: rgba(255, 255, 255, 0.95);
}

/* Attribute categories: Color background with icon - same size as other category tiles */
.tiktok-category-attribute {
    height: 150px;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.tiktok-category-icon-only {
    font-size: 32px;
    color: white;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.tiktok-category-card-content {
    padding: 8px;
    color: white;
    text-align: center;
}

.tiktok-category-card-content h5 {
    margin: 0 0 3px 0;
    font-size: 13px;
    font-weight: 600;
}

.tiktok-category-card-content span {
    font-size: 10px;
    opacity: 0.95;
    color: rgba(255, 255, 255, 0.95);
}

@media (hover: hover) {
    .tiktok-category-card:hover {
        transform: scale(1.05);
    }
    .tiktok-category-card:hover .tiktok-category-bg-image {
        transform: scale(1.1);
        transition: transform 0.3s ease;
    }
}
.tiktok-cat-tile-wrap.selected .tiktok-category-card,
.tiktok-cat-tile-wrap.selected .tiktok-category-card:hover {
    transform: none;
}
.tiktok-cat-tile-wrap.selected .tiktok-category-card .tiktok-category-bg-image {
    transform: none;
}

/* "Show All" button - special styling */
.tiktok-category-show-all {
    height: 150px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.8) 0%, rgba(220, 53, 69, 0.6) 100%);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.tiktok-category-show-all:hover {
    transform: scale(1.05);
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.9) 0%, rgba(220, 53, 69, 0.7) 100%);
    border-color: rgba(255, 255, 255, 0.5);
}

.tiktok-category-show-all .tiktok-category-card-content {
    text-align: center;
    color: white;
    padding: 15px;
}

.tiktok-category-show-all .tiktok-category-card-content i {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}

.tiktok-category-show-all .tiktok-category-card-content h5 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
}

.tiktok-category-show-all .tiktok-category-card-content span {
    font-size: 12px;
    opacity: 0.9;
}

/* Community Posts */
.tiktok-community-post {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Post Author Profile Picture */
.tiktok-post-author {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10003;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.3);
}

.tiktok-post-author:hover {
    transform: scale(1.1);
    border-color: white;
}

.tiktok-post-author img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tiktok-community-post img {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 15px;
    margin-bottom: 20px;
}

.tiktok-community-post-content {
    color: white;
    text-align: center;
    max-width: 600px;
}

.tiktok-community-post-content h5 {
    font-size: 24px;
    margin-bottom: 15px;
}

.tiktok-community-post-content p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.tiktok-community-post-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 14px;
    opacity: 0.8;
}

.tiktok-community-post-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}



/* ===== cat-3d-slider.css ===== */
/**
 * 3D card slider for Categories tab (Voyage-style from CodePen)
 * Center card + prev/next in perspective; "little" versions for category rows
 */
.tiktok-cat-scroller-inner {
    --cat-slide-width: 160px;
    --cat-slide-width-current: 200px;
    --cat-slide-transition-duration: 500ms;
    --cat-slide-transition-easing: ease;
}

.cat-3d-slider {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: relative;
    padding: 0;
    overflow: hidden;
}

.cat-3d-slider-btn {
    position: absolute;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s, background 0.2s;
}
.cat-3d-slider-btn:hover {
    background: var(--primary-color, #DC143C);
    opacity: 1;
}
.cat-3d-slider-btn__prev { left: 4px; }
.cat-3d-slider-btn__next { right: 4px; }
/* Hide prev/next buttons – use swipe/drag to scrub through cards */
.cat-3d-slider-btn {
    display: none !important;
}

.cat-3d-slider__wrapper {
    width: 100%;
    max-width: calc(3 * var(--cat-slide-width));
    display: grid;
    place-items: center;
    perspective: 1000px;
    overflow: visible;
    touch-action: pan-y;
    padding: 0;
    box-sizing: border-box;
}
.cat-3d-slider__wrapper > * { grid-area: 1 / -1; }

.cat-3d-slider__slides {
    width: 100%;
    display: grid;
    place-items: center;
    pointer-events: none;
}
.cat-3d-slider__slides > * { grid-area: 1 / -1; }

/* During scrub/drag: animate scale and position so cards visibly shrink/grow as you scrub */
.cat-3d-slider-dragging .cat-3d-slide {
    transition: transform 0.18s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.cat-3d-slide {
    --slide-tx: 0px;
    --slide-tz: 0px;
    --slide-scale: 1;
    --slide-rotY: 0deg;
    width: var(--cat-slide-width);
    height: auto;
    aspect-ratio: var(--cat-slide-aspect);
    min-height: 0;
    user-select: none;
    pointer-events: none;
    transition: transform var(--cat-slide-transition-duration) var(--cat-slide-transition-easing);
    transform: perspective(800px) translate3d(var(--slide-tx), 0, var(--slide-tz)) rotateY(var(--slide-rotY)) scale(var(--slide-scale));
    display: flex;
    flex-direction: column;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}
.cat-3d-slide[data-current] {
    width: var(--cat-slide-width-current, var(--cat-slide-width));
    --slide-scale: 1;
    --slide-tz: 0px;
    --slide-tx: 0px;
    --slide-rotY: 0deg;
    pointer-events: auto;
}
.cat-3d-slide[data-next] {
    --slide-scale: 0.88;
    --slide-tx: calc(var(--cat-slide-width) * 0.85);
    --slide-rotY: -38deg;
}
.cat-3d-slide[data-previous] {
    --slide-scale: 0.88;
    --slide-tx: calc(var(--cat-slide-width) * -0.85);
    --slide-rotY: 38deg;
}
.cat-3d-slide:not([data-current]):not([data-next]):not([data-previous]) {
    visibility: hidden;
    pointer-events: none;
}

.cat-3d-slide-inner {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: 12px;
    overflow: hidden;
    background: var(--card-bg, #fff);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    border: 2px solid var(--primary-color, #DC143C);
    outline: none;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}
.cat-3d-slide-magnifier {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--primary-color, #DC143C);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    cursor: pointer;
    z-index: 2;
    -webkit-tap-highlight-color: transparent;
    border: 2px solid var(--primary-color, #DC143C);
    box-sizing: border-box;
}
.cat-3d-slide-magnifier:active {
    filter: brightness(0.9);
}
/* Special Offers section: yellow magnifier to match cart/specials theme – white icon */
.cat-3d-slider[data-section-id="specials"] .cat-3d-slide-magnifier {
    background: #ffc107;
    border-color: #ffc107;
    color: #fff;
}
.cat-3d-slider[data-section-id="specials"] .cat-3d-slide-magnifier:active {
    filter: brightness(0.9);
}
.cat-3d-slide-inner:has(.product-tile.special-item) {
    border: 2px solid #ffc107;
}
/* Force content to match parent tile width; tile sizes to content so text sits under image */
.cat-3d-slide-inner .product-tile {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    height: auto;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    border-radius: 11px;
    box-sizing: border-box;
    border: none !important;
    box-shadow: none !important;
    overflow: hidden;
}
.cat-3d-slide-inner .product-tile-image-container {
    flex: 0 0 auto;
    aspect-ratio: 1;
    min-height: 0;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 11px 11px 0 0;
}
.cat-3d-slide-inner .product-tile-content {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    /* Symmetric padding: magnifier sits on .cat-3d-slide-inner, not in this band — 42px right was shifting cart/price right on angled slides */
    padding: 6px 10px 8px 10px;
    margin: 0;
    box-sizing: border-box;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100% !important;
    max-width: 100% !important;
    text-align: center;
    align-items: center;
}
.cat-3d-slide-inner .product-tile-image {
    width: 100% !important;
    max-width: 100% !important;
    height: 100%;
    object-fit: cover;
    margin: 0;
    padding: 0;
    display: block;
    border-radius: 11px 11px 0 0;
}
.cat-3d-slide-inner .product-tile-title {
    font-size: 0.85rem;
    line-height: 1.2;
    margin: 0 0 2px 0;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: center;
    width: 100%;
}
.cat-3d-slide-inner .product-tile-pack,
.cat-3d-slide-inner .product-tile-pricing,
.cat-3d-slide-inner .product-tile-price,
.cat-3d-slide-inner .product-tile-price-line { margin: 0; max-width: 100%; text-align: center; }
.cat-3d-slide-inner .product-tile-pack { font-size: 0.7rem; min-height: 1.25em; }
.cat-3d-slide-inner .product-tile-pricing { font-size: 0.8rem; flex-shrink: 0; }
.cat-3d-slide-inner .product-tile-price { font-size: 0.9rem; }
/* Keep cart in document flow under price (absolute bottom-right overlapped pricing) */
.cat-3d-slide-inner .unified-cart-btn-container {
    position: static;
    width: 100%;
    max-width: 100%;
    align-self: stretch;
    margin-top: auto;
    padding-top: 8px;
    transform: none;
    flex-shrink: 0;
    justify-content: center;
    align-items: center;
}
.cat-3d-slide-inner .unified-cart-btn-container.compact .unified-cart-btn-add {
    width: auto;
    min-width: 0;
    align-self: center;
    justify-content: center;
}
.cat-3d-slide-inner .unified-cart-btn-container.compact .unified-cart-btn-inCart {
    width: auto;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    flex: 0 0 auto;
    min-width: 0;
    justify-content: center;
    gap: 8px;
}

/* Full-width category row: slightly larger slides and center card */
.tiktok-cat-fullwidth-scroller-row .tiktok-cat-scroller-inner {
    --cat-slide-width: 180px;
    --cat-slide-width-current: 220px;
}

/* Hold-to-zoom overlay: image expands from card, shrinks back on release */
.tiktok-cat-zoom-overlay {
    position: fixed;
    inset: 0;
    z-index: 16000;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    visibility: hidden;
}
.tiktok-cat-zoom-overlay.active {
    pointer-events: auto;
    visibility: visible;
}
.tiktok-cat-zoom-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    opacity: 0;
    transition: opacity 0.25s ease-out;
}
.tiktok-cat-zoom-overlay.tiktok-cat-zoom-backdrop-visible .tiktok-cat-zoom-overlay-backdrop {
    opacity: 1;
}
.tiktok-cat-zoom-overlay-image-wrap {
    position: fixed;
    left: 0;
    top: 0;
    width: 100px;
    height: 100px;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 11px;
    box-sizing: border-box;
    transition: left 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                top 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                height 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.tiktok-cat-zoom-overlay-image-wrap.tiktok-cat-zoom-expanded {
    border-radius: 8px;
}
.tiktok-cat-zoom-overlay-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.tiktok-cat-zoom-overlay-image-wrap.tiktok-cat-zoom-expanded .tiktok-cat-zoom-overlay-img {
    object-fit: contain;
}


/* ===== beta-featured.css ===== */
/* Slide-up Community Featured Section */
.community-featured-slideup {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    height: 80vh;
    background: white;
    z-index: 10001;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    transition: bottom 0.5s ease-in-out;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.community-featured-slideup.active {
    bottom: 0;
}

.community-featured-header {
    background: linear-gradient(135deg, #dc3545 0%, #c41e3a 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.community-featured-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.community-featured-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.featured-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.featured-post-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s;
}

.featured-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.featured-post-card.unread {
    border: 2px solid #dc3545;
}

.featured-post-header {
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #e9ecef;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.featured-post-media {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
}

.featured-post-content {
    padding: 15px;
}

.featured-post-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* Featured post badge styles */
.featured-badge {
    background: #ffc107;
    color: #212529;
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    margin-right: 8px;
}

.featured-post {
    border-left: 4px solid #ffc107;
    background: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%);
}

/* TikTok scroller featured post styles */
.tiktok-featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 193, 7, 0.9);
    color: #212529;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 10;
}

.tiktok-unread-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 10;
}

.tiktok-community-post.featured {
    border: 2px solid #ffc107;
}

.tiktok-community-post.unread {
    border: 2px solid #dc3545;
}

.tiktok-post-badges {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 10px;
    z-index: 10;
}

.tiktok-post-media {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
}




