/* 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 generic .card padding overrides on mobile to avoid double padding on tiles */
@media (max-width: 480px) {
  .card { padding: 0 !important; }
}
@media (max-width: 576px) {
  .card { padding: 0 !important; }
}
@media (max-width: 768px) {
  .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 page featured items - keep original sizing */
.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;
    }
}

.horizontal-scroller-item {
    flex: 0 0 180px !important;
    min-width: 180px !important;
    max-width: 180px !important;
}
/* 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 {
        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;
}

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

/* Additional Bootstrap Component Overrides */
.card-img-overlay,
.card-group,
.card-deck,
.card-columns,
.jumbotron,
.lead,
.display-1,
.display-2,
.display-3,
.display-4,
.display-5,
.display-6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
.small,
.mark,
.del,
.s,
.ins,
.u,
.text-decoration-underline,
.text-decoration-line-through,
.text-decoration-none,
.text-lowercase,
.text-uppercase,
.text-capitalize,
.fs-1,
.fs-2,
.fs-3,
.fs-4,
.fs-5,
.fs-6,
.fst-italic,
.fst-normal,
.fw-light,
.fw-lighter,
.fw-normal,
.fw-bold,
.fw-bolder,
.lh-1,
.lh-sm,
.lh-base,
.lh-lg,
.font-monospace,
.text-muted,
.text-primary,
.text-secondary,
.text-success,
.text-danger,
.text-warning,
.text-info,
.text-light,
.text-dark,
.text-body,
.text-white,
.text-black-50,
.text-white-50,
.text-reset,
.text-decoration-none,
.bg-primary,
.bg-secondary,
.bg-success,
.bg-danger,
.bg-warning,
.bg-info,
.bg-light,
.bg-dark,
.bg-body,
.bg-white,
.bg-transparent,
.bg-gradient,
.user-select-all,
.user-select-auto,
.user-select-none,
.pe-none,
.pe-auto,
.shadow,
.shadow-sm,
.shadow-lg,
.shadow-none,
.visible,
.invisible,
.opacity-0,
.opacity-25,
.opacity-50,
.opacity-75,
.opacity-100,
.overflow-auto,
.overflow-hidden,
.overflow-visible,
.overflow-scroll {
    border-radius: 0 !important;
}

/* Additional Bootstrap Utility Overrides */
.rounded,
.rounded-0,
.rounded-1,
.rounded-2,
.rounded-3,
.rounded-4,
.rounded-5,
.rounded-top,
.rounded-bottom,
.rounded-start,
.rounded-end,
.rounded-circle,
.rounded-pill {
    border-radius: 0 !important;
}

/* Bootstrap Form Overrides */
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-radius: 0 !important;
}

/* Bootstrap Button Overrides */
.btn:focus,
.btn:active,
.btn.active,
.btn.show {
    border-radius: 0 !important;
}

/* Bootstrap Modal Overrides */
.modal-dialog,
.modal-dialog-centered,
.modal-dialog-scrollable {
    border-radius: 0 !important;
}

/* Bootstrap Nav Overrides */
.nav-tabs .nav-link {
    border-radius: 0 !important;
}

.nav-pills .nav-link {
    border-radius: 0 !important;
}

/* Bootstrap Dropdown Overrides */
.dropdown-toggle::after {
    border-radius: 0 !important;
}

/* Bootstrap Pagination Overrides */
.page-item:first-child .page-link,
.page-item:last-child .page-link {
    border-radius: 0 !important;
}

/* Bootstrap Alert Overrides */
.alert-dismissible .btn-close {
    border-radius: 0 !important;
}

/* Bootstrap Progress Overrides */
.progress-bar-striped {
    border-radius: 0 !important;
}

/* Bootstrap Carousel Overrides */
.carousel-indicators [data-bs-target] {
    border-radius: 0 !important;
}

/* Bootstrap Accordion Overrides */
.accordion-button::after {
    border-radius: 0 !important;
}

/* Bootstrap Toast Overrides */
.toast-container {
    border-radius: 0 !important;
}

/* Bootstrap Offcanvas Overrides */
.offcanvas-header .btn-close {
    border-radius: 0 !important;
}

/* Bootstrap Popover Overrides */
.popover-arrow::before,
.popover-arrow::after {
    border-radius: 0 !important;
}

/* Bootstrap Tooltip Overrides */
.tooltip-arrow::before {
    border-radius: 0 !important;
}


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

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

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

.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%, #e0a800 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%, #e0a800 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: #e0a800 !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%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    transition: transform 0.3s ease;
}

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

.product-group-hero-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-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;
}

/* 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;
    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-media {
        background-size: contain !important;
        background-position: center !important;
    }
    
    .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;
}

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

.slide {
    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 {
    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 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 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) {
    .hero-slideshow {
        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 h2 {
        font-size: 2.2rem;
        margin-bottom: 0.8rem;
    }
    
    .slide 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 {
        height: 350px;
    }
    
    .slide h2 {
        font-size: 1.8rem;
    }
    
    .slide 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 {
        height: 300px;
    }
    
    .slide h2 {
        font-size: 1.5rem;
    }
    
    .slide 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 bubble unread indicator - Enhanced */
#chat-bubble-widget #open-chat-bubble {
  position: relative;
  transition: all 0.3s ease;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-5px);
  }
}

#chat-bubble-widget #open-chat-bubble:hover {
  transform: scale(1.1) rotate(5deg) translateY(-2px);
  box-shadow: 0 8px 24px rgba(220,20,60,0.5);
  animation: none;
}

#chat-bubble-widget #open-chat-bubble:active {
  transform: scale(0.95);
}

/* 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) {
  #chat-bubble-widget #chat-bubble-window {
    width: calc(100vw - 32px);
    right: -16px;
    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%, #e0a800 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: #e0a800;
}

.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: #e0a800;
}

.offer-nav-dot-yellow.active {
    background: #e0a800;
}

.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 */
@media (max-width: 768px) {
    /* Increase card padding on mobile */
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    
    /* 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 {
        padding: 0.75rem;
    }
    
    
    .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 {
        padding: 0.5rem;
    }
    
    
    .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 {
    width: 280px;
    min-width: 280px;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

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

/* 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 .slideshow-section img,
.dark-theme .slideshow-container img,
.dark-theme .slide 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 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 * {
    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; }

/* ============================================================================
   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;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

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

/* 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: #e0a800;
    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: #333;
}

.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: #e0a800;
}

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

.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 */
.product-tile-savings {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #ffc107;
    color: #212529;
    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;
}

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

.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;
    margin-bottom: 4px;
}

.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;
        top: 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;
        top: 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;
}



