:root {
    /* Light Theme - Love Bird Spices */
    --primary-color: #3b82f6;      /* lighter blue */
    --secondary-color: #3b82f6;    /* bright blue */
    --accent-color: #fbbf24;       /* golden accent */
    --dark-color: #1e293b;         /* dark slate */
    --light-color: #0f172a;        /* very dark blue background */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --text-primary: #1e293b;       /* dark text for light backgrounds */
    --text-secondary: #475569;     /* secondary text */
    --text-muted: #64748b;         /* muted text */
    --bg-primary: #f8fafc;         /* primary background - light */
    --bg-secondary: #f1f5f9;       /* secondary background - light */
    --bg-card: #ffffff;            /* card background - white */
    --border-color: #334155;       /* border color */
    --shadow-color: rgba(0, 0, 0, 0.3); /* shadow color */
}

/* Force light theme */
body {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

/* Ensure all backgrounds are light */
.card,
.product-card,
.product-card-small,
.feature-card,
.form-modern,
.contact-form,
.checkout-form {
    background-color: var(--bg-card) !important;
}

/* Ensure text colors are dark for readability */
.card-body,
.product-card .card-body,
.product-card-small .card-body,
.feature-card,
.form-modern,
.contact-form,
.checkout-form {
    color: var(--text-primary) !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

/* Custom Background */
.bg-spice {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 70%);
    box-shadow: 0 2px 14px rgba(30, 64, 175, 0.4);
}

/* Navbar Container Fixes */
.navbar .container {
    padding-left: 1rem;
    padding-right: 1rem;
}

.navbar-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.navbar-nav::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Navbar Logo */
.navbar-logo {
    height: 35px;
    width: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.navbar-logo:hover {
    transform: scale(1.05);
}

/* Navbar Brand adjustments for larger logo */
.navbar-brand {
    padding: 0.2rem 0;
    display: flex;
    align-items: center;
}

/* Mobile responsive logo */
@media (max-width: 768px) {
    .navbar-logo {
        height: 30px;
    }
    
    .navbar-brand {
        padding: 0.15rem 0;
    }
}

@media (max-width: 576px) {
    .navbar-logo {
        height: 25px;
    }
    
    .navbar-brand {
        padding: 0.1rem 0;
    }
}

/* Hero Section */
.hero-section {
    background: url('/images/hero/hero1.jpg') center/cover;
    min-height: 500px;
    display: flex;
    align-items: center;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    perspective: 1000px;
}

/* Hero Section Background Animation */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(30, 64, 175, 0.4), rgba(59, 130, 246, 0.4));
    animation: heroPulse 6s ease-in-out infinite;
    z-index: 1;
}

/* Particle Effect Background */
.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.1) 1px, transparent 1px),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 50px 50px, 80px 80px, 120px 120px;
    animation: particleFloat 20s linear infinite;
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 3;
    transform-style: preserve-3d;
}

/* Hero Text Slider */
.hero-text-slider {
    position: relative;
    height: 4rem;
    overflow: hidden;
    margin-bottom: 1rem;
}

/* Mobile Hero Text Slider Fixes */
@media (max-width: 768px) {
    .hero-text-slider {
        height: 6rem !important;
        overflow: hidden !important;
        margin-bottom: 2rem;
        position: relative;
        z-index: 2;
    }
    
    .hero-text-slider h1 {
        position: absolute !important;
        opacity: 0 !important;
        transform: translateX(100%) !important;
        font-size: 1.8rem !important;
        line-height: 1.4 !important;
        margin-bottom: 1rem !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
        z-index: 2;
        transition: all 0.8s ease-in-out !important;
    }
    
    .hero-text-slider .hero-title,
    .hero-text-slider .hero-greeting {
        position: absolute !important;
        opacity: 0 !important;
        transform: translateX(100%) !important;
        font-size: 1.8rem !important;
        line-height: 1.4 !important;
        margin-bottom: 1rem !important;
        display: block !important;
        visibility: visible !important;
        z-index: 2;
        transition: all 0.8s ease-in-out !important;
    }
    
    /* Enable slider animations on mobile */
    .hero-text-slider h1.active {
        opacity: 1 !important;
        transform: translateX(0) !important;
    }
    
    .hero-text-slider h1.sliding-out {
        opacity: 0 !important;
        transform: translateX(-100%) !important;
    }
    
    .hero-text-slider h1.sliding-in {
        opacity: 1 !important;
        transform: translateX(0) !important;
    }
    
    /* Fix hero content spacing */
    .hero-content {
        position: relative;
        z-index: 3;
    }
    
    .hero-content .hero-subtitle {
        margin-top: 1rem;
        position: relative;
        z-index: 2;
    }
    
    .hero-content .sinhala-subtitle {
        margin-top: 1rem;
        position: relative;
        z-index: 2;
    }
    
    .hero-content .hero-buttons {
        margin-top: 1.5rem;
        position: relative;
        z-index: 2;
    }
}

.hero-text-slider h1 {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.8s ease-in-out;
    text-align: center;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    color: white;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.hero-text-slider h1.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 2;
}

.hero-text-slider h1.sliding-out {
    opacity: 0;
    transform: translateX(-100%);
    z-index: 1;
}

.hero-text-slider h1.sliding-in {
    opacity: 1;
    transform: translateX(0);
    z-index: 2;
}

/* Ensure Sinhala text has proper font and is visible */
.hero-text-slider .hero-greeting {
    font-family: 'Noto Sans Sinhala', Arial, sans-serif;
    color: white !important;
    opacity: 0;
    transform: translateX(100%);
    visibility: visible;
    display: block;
    font-size: 3.5rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    width: 100% !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

.hero-text-slider .hero-title {
    color: white !important;
    opacity: 1;
    transform: translateX(0);
    visibility: visible;
    display: block;
    font-size: 3.5rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-align: center !important;
    width: 100% !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
}

/* Enhanced Hero Content Animations */
.hero-subtitle {
    animation: slideInUp 1.2s ease-out 0.4s both;
    transform-origin: center;
}

.hero-content .sinhala-subtitle {
    animation: slideInUp 1.2s ease-out 0.6s both;
    transform-origin: center;
}

.hero-buttons {
    animation: fadeInUp 1.2s ease-out 0.8s both;
    transform-origin: center;
}

.hero-content .badge-custom {
    animation: bounceIn 1s ease-out 1s both, float 3s ease-in-out infinite 1.5s;
}

/* Floating Animation for Badges */
.hero-content .badge-custom:nth-child(2) {
    animation-delay: 0.5s, 1.8s;
}

/* Feature card carousels: responsive square with fluid width */
.feature-card-carousel {
    width: min(100%, 400px);
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    border-radius: 15px;
    overflow: hidden;
}

.feature-card-carousel-inner {
    width: 100%;
    height: 100%;
}

.feature-card-carousel .carousel-item {
    position: relative;
    width: 100%;
    height: 100%;
}

.feature-card-carousel-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    transition: transform 0.6s ease-in-out;
}

.feature-card-carousel .carousel-item:hover .feature-card-carousel-img {
    transform: scale(1.03);
}

@media (max-width: 768px) {
    .feature-card-carousel {
        width: 90%;
    }
}

/* Prevent global carousel image mobile rule from shrinking feature carousels */
@media (max-width: 768px) {
    .feature-card-carousel .carousel-inner img.feature-card-carousel-img {
        height: 100% !important;
        min-height: 0 !important;
        max-height: none !important;
    }
}

/* Tweak large product card image height on small screens */
@media (max-width: 576px) {
    .product-card img {
        height: 240px;
    }
    
    .product-card-small .image-container {
        height: 275px !important;
        overflow: hidden;
        border-radius: 8px;
        margin-bottom: 0.5rem;
        position: relative;
    }
    
    .product-card-small .image-container img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center;
        position: absolute;
        top: 0;
        left: 0;
    }
    
    /* Cart page - larger images on mobile */
    /* Cart item images - sizes managed by cart page styles */
    .cart-item-image {
        max-width: 100%;
        height: auto;
    }
    
    /* Cart page - quantity controls for mobile */
    .cart-item .quantity-control {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.3rem !important;
    }
    
    .cart-item .quantity-btn {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        font-size: 16px !important;
        border: 1px solid #dee2e6 !important;
        background-color: #ffffff !important;
        color: #495057 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-weight: 600 !important;
        border-radius: 6px !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
        cursor: pointer !important;
        pointer-events: auto !important;
        touch-action: manipulation !important;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        user-select: none !important;
        position: relative !important;
        z-index: 10 !important;
    }
    
    .cart-item .quantity-input {
        width: 50px !important;
        height: 40px !important;
        min-width: 50px !important;
        min-height: 40px !important;
        font-size: 16px !important;
        border: 1px solid #dee2e6 !important;
        background-color: #ffffff !important;
        color: #495057 !important;
        text-align: center !important;
        font-weight: 600 !important;
        border-radius: 6px !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
    }
}

.hero-content .badge-custom:nth-child(3) {
    animation-delay: 1s, 2.1s;
}

.hero-content .badge-custom:nth-child(4) {
    animation-delay: 1.5s, 2.4s;
}
/*.spice-text-section {
    background: linear-gradient(135deg, rgba(212, 50, 42, 0.9), rgba(255, 107, 53, 0.9));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}*/

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    position: relative;
    z-index: 2;
    color: white;
}

.hero-content h1:first-child {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    opacity: 1;
    color: white;
}

.hero-content h1:last-of-type {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    opacity: 1;
    font-weight: 400;
    line-height: 1.6;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.hero-content .sinhala-subtitle {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 1;
    font-weight: 300;
    letter-spacing: 0.5px;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Enhanced Modern Buttons */
.btn-modern {
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transform-style: preserve-3d;
}

    .btn-modern:before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
        transition: left 0.6s ease;
    }

    .btn-modern:hover:before {
        left: 100%;
    }



.btn-primary-modern {
    background: linear-gradient(90deg, #1e40af 0%, #3b82f6 70%);
    color: white;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.25);
}

    .btn-primary-modern:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(30, 64, 175, 0.35);
    }

    .btn-primary-modern:active {
        transform: translateY(-1px);
        transition: all 0.1s ease;
    }

/* Product Cards */
.product-card {
    background: var(--bg-card);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 25px var(--shadow-color);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
}

    .product-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 15px 35px var(--shadow-color);
        border-color: var(--primary-color);
    }

    .product-card img {
        width: 100%;
        height: 200px;
        object-fit: contain;
        transition: transform 0.3s ease;
        background-color: #f8f9fa;
    }

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

    .product-card .card-body {
        padding: 1.5rem;
    }

    .product-card .price {
        font-size: 1.5rem;
        font-weight: 700;
        color: var(--accent-color);
    }

    .product-card .btn-add-cart {
        background: linear-gradient(90deg, #1e40af 0%, #3b82f6 70%);
        border: none;
        border-radius: 25px;
        padding: 10px 25px;
        color: white;
        transition: all 0.3s ease;
    }

        .product-card .btn-add-cart:hover {
            background: linear-gradient(90deg, #1e3a8a 0%, #2563eb 70%);
            transform: scale(1.05);
        }

/* Section Styling */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

    .section-title h2 {
        font-size: 2.5rem;
        font-weight: 700;
        color: var(--text-primary);
        margin-bottom: 1rem;
    }

    .section-title::after {
        content: '';
        position: absolute;
        bottom: -10px;
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
        height: 4px;
        background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
        border-radius: 2px;
    }

/* Features Section */
.feature-card {
    text-align: center;
    padding: 2rem;
    background: var(--bg-card);
    border-radius: 15px;
    box-shadow: 0 5px 20px var(--shadow-color);
    transition: transform 0.3s ease;
    border: 1px solid var(--border-color);
    height: 100%;
}

    .feature-card:hover {
        transform: translateY(-5px);
        border-color: var(--primary-color);
    }

    .feature-card .icon {
        font-size: 3rem;
        color: var(--primary-color);
        margin-bottom: 1rem;
    }

/* Form Styling */
.form-modern {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.form-control {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 15px;
    transition: all 0.3s ease;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

    .form-control:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 0.2rem rgba(30, 64, 175, 0.3);
        background-color: white;
        color: var(--dark-color);
    }

/* Cart Styling */
.cart-item {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 3px 15px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.cart-summary {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 70%);
    color: var(--text-primary);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid #ced4da;
}

/* Shipping text color */
.shipping-free {
    color: #dc3545 !important;
    font-weight: 600;
}

.shipping-info {
    color: #dc3545 !important;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

/* Enhanced Hero Animations */
@keyframes heroPulse {
    0%, 100% {
        opacity: 0.15;
        transform: scale(1);
    }
    50% {
        opacity: 0.25;
        transform: scale(1.03);
    }
}

@keyframes particleFloat {
    0% {
        transform: translateY(0px) rotate(0deg);
    }
    100% {
        transform: translateY(-100px) rotate(360deg);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-80px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(80px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(80px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-180deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.05) rotate(0deg);
    }
    70% {
        transform: scale(0.9) rotate(0deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(1deg);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center;
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.2);
    }
    100% {
        background-position: 200% center;
        filter: brightness(1);
    }
}





@keyframes typewriter {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    0%, 50% {
        border-color: transparent;
    }
    51%, 100% {
        border-color: white;
    }
}

/* Plain white hero text */
.hero-content h1 {
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* Additional Dark Theme Styles */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.card-body {
    color: var(--text-primary);
}

.card-title {
    color: var(--text-primary);
}

.card-text {
    color: var(--text-secondary);
}

.table {
    color: var(--text-primary);
}

.table th,
.table td {
    border-color: var(--border-color);
}

.table thead th {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.table tbody tr {
    background-color: var(--bg-card);
}

.table tbody tr:hover {
    background-color: var(--bg-secondary);
}

/* Modal backdrop */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.6);
}

/* Dropdown menus */
.dropdown-menu {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 25px var(--shadow-color);
}

.dropdown-item {
    color: var(--text-primary);
}

.dropdown-item:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

/* Enhanced Responsive Design */
@media (max-width: 768px) {
    .hero-text-slider {
        height: 4.5rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-content h1:first-child {
        font-size: 1.8rem;
        line-height: 1.3;
        margin-bottom: 0.5rem;
    }
    
    .hero-content h1:last-of-type {
        font-size: 2.2rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }

    .hero-content p {
        font-size: 1rem;
        line-height: 1.4;
        margin-bottom: 0.8rem;
    }
    
    .hero-content .sinhala-subtitle {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 1.5rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .product-card {
        margin-bottom: 2rem;
    }
    
    /* Reduce animation intensity on mobile */
    .hero-content h1,
    .hero-content p,
    .hero-content .btn {
        animation-duration: 0.8s;
    }
    
    /* Disable parallax on mobile for better performance */
    .hero-section {
        transform: none !important;
    }
    
    /* Reduce particle count on mobile */
    .floating-particle {
        display: none;
    }
}

@media (max-width: 576px) {
    .hero-content h1:first-child {
        font-size: 1.8rem;
    }
    
    .hero-content h1:last-of-type {
        font-size: 2.4rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .btn-modern {
        padding: 12px 25px;
        font-size: 0.9rem;
    }
    
    .hero-section {
        min-height: 400px;
    }
}

/* Performance optimizations */
@media (prefers-reduced-motion: reduce) {
    .hero-section *,
    .btn-modern,
    .product-card,
    .feature-card {
        animation: none !important;
        transition: none !important;
    }
    
    .floating-particle {
        display: none !important;
    }
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Website Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    color: white;
}

.spinner-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
}

.spinner-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid transparent;
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spinnerRotate 1.5s linear infinite;
}

.spinner-ring:nth-child(1) {
    animation-delay: 0s;
}

.spinner-ring:nth-child(2) {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    animation-delay: 0.2s;
    animation-duration: 1.2s;
}

.spinner-ring:nth-child(3) {
    width: 60%;
    height: 60%;
    top: 20%;
    left: 20%;
    animation-delay: 0.4s;
    animation-duration: 0.9s;
}

.loading-text h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.loading-text p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

@keyframes spinnerRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Loading dots animation */
.loading-text p::after {
    content: '';
    animation: loadingDots 1.5s infinite;
}

@keyframes loadingDots {
    0%, 20% {
        content: '';
    }
    40% {
        content: '.';
    }
    60% {
        content: '..';
    }
    80%, 100% {
        content: '...';
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Success/Error Messages */
.alert-modern {
    border: none;
    border-radius: 15px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.alert-success-modern {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
}

.alert-danger-modern {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
}

/* Quantity Controls */
.quantity-control {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    background-color: var(--bg-secondary);
}

.quantity-btn {
    background: linear-gradient(90deg, #1e40af 0%, #3b82f6 70%);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
}

    .quantity-btn:hover {
        background: linear-gradient(90deg, #1e3a8a 0%, #2563eb 70%);
    }

.quantity-input {
    border: none;
    width: 50px;
    text-align: center;
    font-weight: 600;
    background: transparent;
    color: var(--text-primary);
}

/* Badge Styling */
.badge-custom {
    background: transparent;
    color: white;
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Search Bar */
.search-bar {
    position: relative;
    max-width: 400px;
    margin: 0 auto 2rem;
}

    .search-bar input {
        border-radius: 25px;
        padding: 12px 50px 12px 20px;
        border: 2px solid var(--border-color);
        width: 100%;
        background-color: white;
        color: var(--dark-color);
    }

    .search-bar .search-btn {
        position: absolute;
        right: 5px;
        top: 50%;
        transform: translateY(-50%);
        background: var(--primary-color);
        border: none;
        border-radius: 50%;
        width: 35px;
        height: 35px;
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
    }

/* Category Filters */
.category-filters {
    margin-bottom: 2rem;
}

.category-buttons-desktop {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.category-btn {
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    border-radius: 25px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

    .category-btn:hover,
    .category-btn.active {
        background: linear-gradient(90deg, #1e40af 0%, #3b82f6 70%);
        border-color: #1e40af;
        color: white;
    }

/* Checkout Form */
.checkout-form {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow-color);
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

    .checkout-form h3 {
        color: var(--primary-color);
        margin-bottom: 1.5rem;
        border-bottom: 2px solid var(--border-color);
        padding-bottom: 0.5rem;
    }

/* Contact Form */
.contact-form {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow-color);
    border: 1px solid var(--border-color);
}

/* Mobile Form Improvements */
@media (max-width: 768px) {
    .contact-form,
    .checkout-form,
    .form-modern {
        padding: 1.5rem;
        border-radius: 15px;
    }
    
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px 15px;
        border-radius: 8px;
    }
    
    .form-control:focus {
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
    }
    
    .form-label {
        font-weight: 600;
        margin-bottom: 0.5rem;
        color: var(--text-primary);
    }
    
    .btn-modern {
        width: 100%;
        margin-top: 1rem;
        height: 48px;
        font-size: 1rem;
        font-weight: 600;
    }
    
    /* Mobile form validation */
    .form-control.is-invalid {
        border-color: #dc3545;
        box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25);
    }
    
    .form-control.is-valid {
        border-color: #198754;
        box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.25);
    }
    
    .invalid-feedback {
        font-size: 0.875rem;
        margin-top: 0.25rem;
    }
    
    /* Mobile form spacing */
    .mb-3 {
        margin-bottom: 1rem !important;
    }
    
    .mb-4 {
        margin-bottom: 1.5rem !important;
    }
}

.contact-info {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 70%);
    color: white;
    padding: 2rem;
    border-radius: 20px;
    height: 100%;
}

    .contact-info h4 {
        margin-bottom: 1.5rem;
    }

    .contact-info .contact-item {
        margin-bottom: 1rem;
        display: flex;
        align-items: center;
    }

        .contact-info .contact-item i {
            margin-right: 1rem;
            width: 20px;
        }
/* Add this to your site.css file */

/* Custom grid for 5 items per row */
.products-grid-10 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Product card adjustments for 5 items per row */
.product-card-small {
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow-color);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    position: relative;
    min-height: 340px; /* Reduced card size while keeping image large */
    display: flex;
    flex-direction: column;
}

    .product-card-small:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 25px var(--shadow-color);
        border-color: var(--primary-color);
    }

    /* Image section - enlarged height for 5 items per row */
    .product-card-small .image-container {
        height: 240px;
        overflow: hidden;
        position: relative;
        padding: 0.1rem;
    }

    .product-card-small img {
        width: 100%;
        height: 240px;
        object-fit: contain;
        transition: transform 0.3s ease;
        background-color: #f8f9fa;
    }

    .product-card-small:hover img {
        transform: scale(1.05);
    }

    /* Card body - flexible layout */
    .product-card-small .card-body {
        padding: 0.5rem;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        flex-grow: 1;
    }

    /* Product name - flexible height to show full name */
    .product-card-small .card-title {
        font-size: 1.1rem;
        font-weight: 600;
        margin-bottom: 0;
        line-height: 1.1;
        min-height: 1.8rem; /* Further reduced minimum height */
        text-align: center;
        color: var(--text-primary);
        word-wrap: break-word;
        hyphens: auto;
    }

    /* Category badge - fixed positioning */
    .product-card-small .category-badge {
        position: absolute;
        top: 0.4rem;
        right: 0.4rem;
        font-size: 0.6rem;
        padding: 0.2rem 0.4rem;
        border-radius: 8px;
        background: var(--secondary-color);
        color: white;
        font-weight: 500;
        z-index: 2;
    }

    /* Description - hidden */
    .product-card-small .card-text {
        display: none;
    }

    /* Price section - fixed height and alignment */
    .product-card-small .price-section {
        height: 1.5rem;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 0.5rem;
        margin-top: -0.2rem;
        padding: 0.1rem 0.3rem 0 0.3rem;
        position: relative;
        min-height: 1.5rem;
    }

    .product-card-small .price {
        font-size: 1.3rem;
        font-weight: 700;
        color: var(--accent-color);
        text-align: center;
        margin: 0;
        line-height: 1;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .product-card-small .stock-info {
        font-size: 0.6rem;
        color: var(--text-muted);
        text-align: right;
        line-height: 1.2;
    }

    /* Quantity control - fixed size and alignment */
    .product-card-small .quantity-section {
        height: 1.9rem;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 0.5rem;
    }

    .product-card-small .quantity-control {
        transform: scale(0.9);
        border: 1px solid var(--border-color);
        background-color: var(--bg-secondary);
    }

        .product-card-small .quantity-control .quantity-btn {
            width: 28px;
            height: 28px;
            font-size: 0.8rem;
        }

        .product-card-small .quantity-control .quantity-input {
            width: 40px;
            font-size: 0.85rem;
            height: 28px;
            padding: 0;
            color: var(--text-primary);
        }

    /* Add to cart button - fixed size and alignment */
    .product-card-small .button-section {
        height: 2.2rem;
        display: flex;
        align-items: center;
    }

    .product-card-small .btn-add-cart {
        background: linear-gradient(90deg, #1e40af 0%, #3b82f6 70%);
        border: none;
        border-radius: 18px;
        padding: 0.5rem 0.8rem;
        color: white;
        font-size: 0.85rem;
        font-weight: 600;
        transition: all 0.3s ease;
        width: 100%;
        height: 2.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

        .product-card-small .btn-add-cart:hover {
            background: linear-gradient(90deg, #1e3a8a 0%, #2563eb 70%);
            transform: translateY(-1px);
        }

        .product-card-small .btn-add-cart:disabled {
            background: #ccc;
            cursor: not-allowed;
        }

        .product-card-small .btn-add-cart i {
            margin-right: 0.3rem;
            font-size: 0.65rem;
        }

    /* Stock badges for small cards */
    .product-card-small .stock-badge {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }

    /* Loading state */
    .product-card-small .btn-add-cart .loading-spinner {
        width: 12px;
        height: 12px;
        border: 2px solid #ffffff;
        border-top: 2px solid transparent;
        border-radius: 50%;
        animation: spin 1s linear infinite;
        margin-right: 0.3rem;
    }

/* Responsive adjustments for 5 items per row */
@media (max-width: 1600px) {
    .products-grid-10 {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 1400px) {
    .products-grid-10 {
        grid-template-columns: repeat(4, 1fr);
    }

    .product-card-small {
        min-height: 400px;
    }

        .product-card-small .card-title {
            font-size: 0.95rem;
        }

        .product-card-small .btn-add-cart {
            font-size: 0.8rem;
        }
}

@media (max-width: 1200px) {
    .products-grid-10 {
        grid-template-columns: repeat(3, 1fr);
    }

    .product-card-small {
        min-height: 420px;
    }

        .product-card-small .image-container {
            height: 160px;
        }

        .product-card-small img {
            height: 160px;
        }

        .product-card-small .card-title {
            font-size: 1rem;
        }

        .product-card-small .btn-add-cart {
            font-size: 0.85rem;
        }
}

@media (max-width: 992px) {
    .products-grid-10 {
        grid-template-columns: repeat(3, 1fr);
    }

    .product-card-small {
        min-height: 400px;
    }
}

@media (max-width: 768px) {
    .products-grid-10 {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .product-card-small {
        min-height: 320px;
    }

        .product-card-small .image-container {
            height: 120px;
        }

        .product-card-small img {
            height: 120px;
        }

        .product-card-small .card-body {
            padding: 0.75rem;
        }

        .product-card-small .card-title {
            font-size: 0.85rem;
            min-height: 2.2rem;
        }

        .product-card-small .card-text {
            font-size: 0.7rem;
            height: 1.8rem;
        }

        .product-card-small .price {
            font-size: 1rem;
        }

        .product-card-small .btn-add-cart {
            font-size: 0.75rem;
            padding: 0.4rem 0.5rem;
        }
}

@media (max-width: 576px) {
    .products-grid-10 {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-card-small {
        min-height: 320px;
    }

        .product-card-small .image-container {
            height: 100px;
        }

        .product-card-small img {
            height: 100px;
        }
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-nav .nav-link {
    color: #fff !important;
    position: relative;
    padding: 0.3rem 1.2rem;
    font-weight: 500;
    font-size: 1.1rem;
    transition: background 0.2s, color 0.2s, transform 0.15s;
    border-radius: 8px;
    white-space: nowrap;
    margin: 0 0.5rem;
}

.navbar-nav .nav-link:hover, .navbar-nav .nav-link:focus {
    background: rgba(255,255,255,0.18);
    color: #222 !important;
    transform: scale(1.08);
    text-shadow: 0 1px 6px rgba(0,0,0,0.08);
}

/* Responsive Navbar Menu Gap and Separator */
.navbar-nav .nav-link:not(:first-child) {
    border-left: 2.5px solid #fff;
    opacity: 0.7;
    border-radius: 2px;
    margin-left: 2rem;
}
@media (max-width: 992px) {
    .navbar-nav .nav-link:not(:first-child) {
        margin-left: 1rem;
        border-left: 1.5px solid #fff;
    }
    .navbar-nav .nav-link {
        padding: 0.25rem 1rem;
        font-size: 1rem;
    }
}
@media (max-width: 768px) {
    .navbar-nav .nav-link:not(:first-child) {
        margin-left: 0;
        border-left: none;
    }
    .navbar-nav .nav-link {
        padding: 0.4rem 1rem;
        font-size: 1rem;
        margin: 0.2rem 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
}

/* Product Modal Styles */
.product-modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 50px var(--shadow-color);
    max-width: 380px;
    margin: 0 auto;
    background: var(--bg-card);
}

.product-modal-header {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    border: none;
    padding: 0.8rem 1.2rem;
}

.product-modal-header .modal-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.product-modal-body {
    padding: 1rem;
    background: var(--bg-secondary);
}

.product-modal-image {
    margin-bottom: 0.8rem;
}

.product-modal-image img {
    width: 100%;
    height: 320px;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 8px 25px var(--shadow-color);
    background-color: #f8f9fa;
}

.product-modal-title {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.product-modal-description {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0.8rem;
}

.product-modal-price {
    background: linear-gradient(135deg, #1e40af, #3b82f6);
    color: white;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    margin-bottom: 0.8rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.4);
}

.price-value {
    font-size: 1.2rem;
    font-weight: 700;
    display: block;
}

.product-modal-actions {
    background: var(--bg-card);
    padding: 0.8rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.quantity-section-modal {
    margin-bottom: 0.6rem;
}

.quantity-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.4rem;
    display: block;
    font-size: 0.8rem;
}

.quantity-control-modal {
    display: inline-flex;
    align-items: center;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.quantity-btn-modal {
    background: var(--primary-color);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.quantity-btn-modal:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

.quantity-input-modal {
    border: none;
    width: 55px;
    text-align: center;
    font-weight: 600;
    background: transparent;
    font-size: 0.95rem;
    height: 32px;
    color: var(--text-primary);
}

.btn-modal-add-cart {
    width: 100%;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-modal-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.35);
}

.btn-modal-add-cart:disabled {
    background: #ccc !important;
    border-color: #ccc !important;
    transform: none !important;
    box-shadow: none !important;
    cursor: not-allowed;
}

/* Modal Animation */
.modal.fade .modal-dialog {
    transition: transform 0.4s ease-out, opacity 0.4s ease-out;
    transform: scale(0.8) translateY(-50px);
}

.modal.show .modal-dialog {
    transform: scale(1) translateY(0);
}

/* Mobile Modal Responsive */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .product-modal-content {
        max-width: 100%;
    }
    
    .product-modal-body {
        padding: 0.8rem;
    }
    
    .product-modal-image img {
        height: 220px;
    }
    
    .product-modal-title {
        font-size: 1.2rem;
    }
    
    .price-value {
        font-size: 1.4rem;
    }
    
    .product-modal-actions {
        padding: 0.8rem;
    }
}

/* Floating Cart: Full width and docked bottom on mobile */
@media (max-width: 992px) {
    .floating-cart-summary-box {
        right: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        top: auto !important;
        bottom: 0 !important;
        border-radius: 18px 18px 0 0 !important;
        padding: 1rem;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15) !important;
        z-index: 1050 !important;
    }
    
    .floating-cart-header {
        margin-bottom: 1rem !important;
    }
    
    .floating-cart-items {
        max-height: 35px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        position: relative;
    }
    
    .floating-cart-items::-webkit-scrollbar {
        width: 4px;
    }
    
    .floating-cart-items::-webkit-scrollbar-track {
        background: rgba(0,0,0,0.1);
        border-radius: 2px;
    }
    
    .floating-cart-items::-webkit-scrollbar-thumb {
        background: var(--primary-color);
        border-radius: 2px;
    }
    
    /* Scroll indicator for mobile cart */
    .floating-cart-items::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 10px;
        background: linear-gradient(transparent, rgba(255,255,255,0.1));
        pointer-events: none;
        opacity: 0.8;
    }
    
    /* Groceries page specific floating cart */
    .spices-page .floating-cart-items {
        max-height: 30px;
    }
    
    .spices-page .floating-cart-items .d-flex {
        min-height: 25px;
        padding: 0.15rem 0;
    }
    
    /* Groceries page category buttons - mobile optimized */
    .spices-page .category-filters {
        margin-bottom: 1.2rem;
    }
    
    /* Hide desktop category buttons on mobile */
    .spices-page .category-buttons-desktop {
        display: none !important;
    }
    
    /* Mobile Category Dropdown */
    .category-dropdown-mobile {
        margin-bottom: 1.5rem;
        text-align: center;
    }
    
    .category-dropdown-mobile .form-label {
        display: block;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
    }
    
    .category-select {
        background: var(--bg-card);
        border: 2px solid var(--border-color);
        border-radius: 15px;
        padding: 1rem 1.2rem;
        font-size: 1rem;
        font-weight: 500;
        color: var(--text-primary);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        transition: all 0.3s ease;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
        cursor: pointer;
        appearance: none;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m1 6 7 7 7-7'/%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 1rem center;
        background-size: 16px 12px;
    }
    
    .category-select:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 0.2rem rgba(30, 64, 175, 0.3);
        outline: none;
        transform: translateY(-1px);
    }
    
    .category-select:hover {
        border-color: var(--primary-color);
        box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    }
    
    .category-select option {
        padding: 0.75rem;
        font-size: 0.9rem;
        background: var(--bg-card);
        color: var(--text-primary);
    }
    
    /* Groceries page product cards - mobile optimized */
    .spices-page .products-grid-10 {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.4rem;
    }
    
    .spices-page .product-card-small {
        min-height: 260px;
    }
    
    .spices-page .product-card-small .image-container {
        height: 120px;
    }
    
    .spices-page .product-card-small img {
        height: 120px;
        object-fit: contain;
        background-color: #f8f9fa;
    }
    
    .spices-page .product-card-small .card-body {
        padding: 0.3rem;
    }
    
    .spices-page .product-card-small .card-title {
        font-size: 0.7rem;
        min-height: 1.6rem;
        line-height: 1.1;
    }
    
    .spices-page .product-card-small .card-text {
        font-size: 0.55rem;
        height: 1.2rem;
        line-height: 1.1;
    }
    
    .spices-page .product-card-small .price {
        font-size: 0.8rem;
    }
    
    .spices-page .product-card-small .btn-add-cart {
        font-size: 0.6rem;
        padding: 0.25rem 0.3rem;
        height: 1.8rem;
    }
    
    .spices-page .category-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.7rem;
        text-align: center;
        border-radius: 12px;
        font-weight: 500;
        box-shadow: 0 1px 4px rgba(0,0,0,0.1);
        transition: all 0.3s ease;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        min-height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .spices-page .category-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
    
    .spices-page .category-btn.active {
        background: linear-gradient(90deg, #1e40af 0%, #3b82f6 70%);
        border-color: #1e40af;
        color: white;
        box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
    }
    
    .floating-cart-total {
        padding: 0.75rem 0;
        border-top: 1px solid rgba(255,255,255,0.2);
        margin-bottom: 1rem !important;
    }
    
    .floating-cart-summary-box .btn-primary-modern {
        height: 48px;
        font-size: 1rem;
        font-weight: 600;
        border-radius: 12px;
    }
    
    /* Hide desktop category buttons on mobile */
    .category-buttons-desktop {
        display: none !important;
    }
    
    /* Mobile cart item improvements */
    .floating-cart-items .d-flex {
        padding: 0.2rem 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        min-height: 30px;
        margin-bottom: 0.05rem;
    }
    
    .floating-cart-items .d-flex:last-child {
        border-bottom: none;
    }
    
    .floating-cart-items img {
        width: 20px !important;
        height: 20px !important;
        border-radius: 2px !important;
    }
    
    .floating-cart-items .small {
        font-size: 0.6rem !important;
        line-height: 0.9;
    }
    
    .floating-cart-items .btn-sm {
        padding: 0.05rem 0.2rem;
        font-size: 0.55rem;
    }
    
    /* Mobile cart toggle button */
    .floating-cart-summary-box .btn-outline-secondary {
        border-color: rgba(255,255,255,0.3);
        color: white;
    }
    
    .floating-cart-summary-box .btn-outline-secondary:hover {
        background-color: rgba(255,255,255,0.1);
        border-color: rgba(255,255,255,0.5);
    }
    
    /* Mobile cart close button */
    .floating-cart-summary-box .btn-close {
        filter: invert(1);
        opacity: 0.8;
    }
    
    .floating-cart-summary-box .btn-close:hover {
        opacity: 1;
    }
}

/* Hide floating cart on mobile devices */
@media (max-width: 768px) {
    .floating-cart-summary-box {
        display: none !important;
    }
}

/* Carousel image height for mobile */
@media (max-width: 768px) {
    .carousel-inner img {
        height: 32vw !important;
        min-height: 120px;
        max-height: 180px;
    }
}

/* ===== COMPREHENSIVE MOBILE RESPONSIVENESS ===== */

/* Base Mobile Responsive Rules */
@media (max-width: 768px) {
    /* General Mobile Adjustments */
    body {
        font-size: 14px;
        line-height: 1.5;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Typography Adjustments */
    h1, .h1 { font-size: 1.8rem; }
    h2, .h2 { font-size: 1.5rem; }
    h3, .h3 { font-size: 1.3rem; }
    h4, .h4 { font-size: 1.1rem; }
    h5, .h5 { font-size: 1rem; }
    h6, .h6 { font-size: 0.9rem; }
    
    /* Hero Section Mobile Optimization */
    .hero-section {
        min-height: 350px;
        padding: 2rem 0;
    }
    
    .hero-content h1 {
        font-size: 2rem !important;
        line-height: 1.2;
        margin-bottom: 0.8rem;
    }
    
    .hero-content p {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .hero-content .sinhala-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-modern {
        padding: 12px 25px;
        font-size: 0.9rem;
        width: 100%;
        max-width: 250px;
        margin: 0 auto;
    }
    
    /* Navigation Mobile Optimization */
    .navbar-brand {
        font-size: 1.2rem !important;
    }
    
    .navbar-nav .nav-link {
        padding: 0.8rem 1rem;
        font-size: 1rem;
        border-left: none !important;
        margin-left: 0 !important;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    .navbar-collapse {
        background: rgba(30, 64, 175, 0.95);
        border-radius: 10px;
        margin-top: 1rem;
        padding: 1rem;
    }
    
    /* Cart Icon Mobile */
    .btn-outline-light {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Product Grid Mobile Optimization */
    .products-grid-10 {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .product-card-small {
        min-height: 280px;
    }
    
    .product-card-small .image-container {
        height: 80px;
    }
    
    .product-card-small img {
        height: 80px;
    }
    
    .product-card-small .card-body {
        padding: 0.5rem;
    }
    
    .product-card-small .card-title {
        font-size: 0.7rem;
        min-height: 1.8rem;
        line-height: 1.2;
    }
    
    .product-card-small .card-text {
        font-size: 0.6rem;
        height: 1.4rem;
    }
    
    .product-card-small .price {
        font-size: 0.8rem;
    }
    
    .product-card-small .btn-add-cart {
        font-size: 0.6rem;
        padding: 0.3rem 0.4rem;
        height: 2rem;
    }
    
    /* Search and Filter Mobile */
    .search-bar {
        max-width: 100%;
        margin-bottom: 1.5rem;
    }
    
    .search-bar input {
        padding: 10px 45px 10px 15px;
        font-size: 0.9rem;
    }
    
    .category-filters {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: flex-start;
        margin-bottom: 1.5rem;
    }
    
    .category-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        flex: 1;
        min-width: 100px;
        text-align: center;
        border-radius: 20px;
        font-weight: 500;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .category-btn.active {
        box-shadow: 0 4px 12px rgba(30, 64, 175, 0.3);
    }
}

/* ===== MOBILE QUANTITY CONTROL & IMAGE IMPROVEMENTS ===== */
/* Mobile quantity control improvements - all browsers including Safari */
@media (max-width: 768px) {
    .quantity-control {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 0.25rem !important;
        padding: 0.25rem !important;
        background: #fff !important;
        border-radius: 8px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    }
    
    .quantity-btn {
        min-width: 44px !important;
        min-height: 44px !important;
        width: 44px !important;
        height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 18px !important;
        padding: 0 !important;
        border: none !important;
        border-radius: 6px !important;
        cursor: pointer !important;
        touch-action: manipulation !important;
        -webkit-user-select: none !important;
        user-select: none !important;
    }
    
    .quantity-input {
        width: 50px !important;
        min-width: 50px !important;
        height: 44px !important;
        min-height: 44px !important;
        text-align: center !important;
        font-size: 18px !important;
        font-weight: 600 !important;
        border: none !important;
        background: transparent !important;
        touch-action: manipulation !important;
    }
    
    /* Product card images - mobile Safari fix */
    .product-card-small .image-container {
        height: auto !important;
        min-height: 200px;
        max-height: 280px;
        overflow: visible !important;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f8f9fa;
    }
    
    .product-card-small .image-container img,
    .product-card-small img,
    .product-image {
        width: 100% !important;
        height: auto !important;
        max-height: 250px !important;
        object-fit: contain !important;
        display: block !important;
    }
}

/* Mobile Tablet view - Medium screens */
@media (min-width: 481px) and (max-width: 768px) {
    
    /* Horizontal scroll for many categories on small screens */
    @media (max-width: 480px) {
        .category-filters {
            flex-wrap: nowrap;
            overflow-x: auto;
            scrollbar-width: none;
            -ms-overflow-style: none;
            padding-bottom: 0.5rem;
        }
        
        .category-filters::-webkit-scrollbar {
            display: none;
        }
        
        .category-btn {
            flex: 0 0 auto;
            min-width: 120px;
            white-space: nowrap;
        }
        
        /* Hide desktop category buttons on small mobile */
        .spices-page .category-buttons-desktop {
            display: none !important;
        }
        
        /* Spices page specific small mobile */
        .spices-page .category-filters {
            grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
            gap: 0.3rem;
        }
        
        .spices-page .category-btn {
            padding: 0.3rem 0.4rem;
            font-size: 0.65rem;
            border-radius: 10px;
            min-height: 28px;
        }
    }
    
    /* Cart Page Mobile */
    .cart-item {
        padding: 1rem;
    }
    
    .cart-item .row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .cart-item .col-md-2,
    .cart-item .col-md-4,
    .cart-item .col-md-2 {
        width: 100%;
        text-align: center;
    }
    
    /* Cart item images - allow page-specific styles to override */
    .cart-item img {
        margin: 0 auto;
        display: block;
    }
    
    .quantity-control {
        margin: 0 auto;
        max-width: 150px;
    }
    
    /* Checkout Form Mobile */
    .checkout-form {
        padding: 1.5rem;
    }
    
    .checkout-form h3 {
        font-size: 1.3rem;
    }
    
    /* Contact Form Mobile */
    .contact-form {
        padding: 1.5rem;
    }
    
    .contact-info {
        margin-top: 1.5rem;
        padding: 1.5rem;
    }
    
    /* Footer Mobile */
    footer {
        text-align: center;
    }
    
    footer .col-md-4 {
        margin-bottom: 2rem;
    }
    
    /* Modal Mobile */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .product-modal-content {
        max-width: 100%;
    }
    
    .product-modal-body {
        padding: 1rem;
    }
    
    .product-modal-image img {
        height: 120px;
    }
    
    .product-modal-title {
        font-size: 1.2rem;
    }
    
    .price-value {
        font-size: 1.3rem;
    }
    
    /* Feature Cards Mobile */
    .feature-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .feature-card .icon {
        font-size: 2.5rem;
    }
    
    /* Section Titles Mobile */
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    /* Badge Mobile */
    .badge-custom {
        font-size: 0.7rem;
        padding: 0.4rem 0.8rem;
        margin-bottom: 0.5rem;
        display: inline-block;
    }
    
    /* Loading Spinner Mobile */
    .loading-text h3 {
        font-size: 1.5rem;
    }
    
    .loading-text p {
        font-size: 1rem;
    }
    
    .spinner-container {
        width: 80px;
        height: 80px;
    }
}

/* Extra Small Mobile Devices */
@media (max-width: 576px) {
    /* Hero Section Extra Small */
    .hero-section {
        min-height: 350px;
        padding: 2rem 0;
    }
    
    .hero-text-slider {
        height: 5.5rem !important;
        overflow: hidden !important;
        margin-bottom: 0;
        position: relative;
        z-index: 2;
    }
    
    .hero-text-slider h1,
    .hero-text-slider .hero-title,
    .hero-text-slider .hero-greeting {
        position: absolute !important;
        opacity: 0 !important;
        transform: translateX(100%) !important;
        font-size: 1.6rem !important;
        line-height: 1.5 !important;
        margin-bottom: 1rem !important;
        display: block !important;
        visibility: visible !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
        z-index: 2;
        transition: all 0.8s ease-in-out !important;
    }
    
    /* Enable slider animations for small mobile */
    .hero-text-slider h1.active,
    .hero-text-slider .hero-title.active,
    .hero-text-slider .hero-greeting.active {
        opacity: 1 !important;
        transform: translateX(0) !important;
    }
    
    .hero-text-slider h1.sliding-out,
    .hero-text-slider .hero-title.sliding-out,
    .hero-text-slider .hero-greeting.sliding-out {
        opacity: 0 !important;
        transform: translateX(-100%) !important;
    }
    
    .hero-text-slider h1.sliding-in,
    .hero-text-slider .hero-title.sliding-in,
    .hero-text-slider .hero-greeting.sliding-in {
        opacity: 1 !important;
        transform: translateX(0) !important;
    }
    
    /* Additional spacing for small mobile */
    .hero-content .hero-subtitle {
        margin-top: -0.5rem;
        position: relative;
        z-index: 2;
    }
    
    .hero-content .sinhala-subtitle {
        margin-top: 0.8rem;
        position: relative;
        z-index: 2;
    }
    
    .hero-content .hero-buttons {
        margin-top: 1.2rem;
        position: relative;
        z-index: 2;
    }
    
    .hero-content .hero-buttons .btn-primary-modern {
        font-size: 0.75rem;
        padding: 0.35rem 0.8rem;
        border-radius: 18px;
        height: auto;
        min-height: 2rem;
    }
    
    .hero-content .hero-buttons .btn-modern {
        font-size: 0.75rem;
        padding: 0.35rem 0.8rem;
        border-radius: 18px;
        height: auto;
        min-height: 2rem;
    }
    
    .hero-content h1 {
        font-size: 1.5rem !important;
        line-height: 1.4;
        margin-bottom: 0.8rem;
    }
    
    .hero-content p {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 1rem;
    }
    
    .hero-content .sinhala-subtitle {
        font-size: 0.7rem;
        line-height: 1.3;
        margin-bottom: 0.8rem;
    }
    
        /* Product Grid Extra Small */
    .products-grid-10 {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .product-card-small {
        min-height: 280px;
    }

    .product-card-small .image-container {
        height: 90px;
    }

    .product-card-small img {
        height: 90px;
    }

    .product-card-small .card-title {
        font-size: 0.75rem;
        min-height: 1.8rem;
        line-height: 1.2;
    }

    .product-card-small .card-text {
        font-size: 0.6rem;
        height: 1.4rem;
        line-height: 1.2;
    }

    .product-card-small .price {
        font-size: 0.85rem;
    }

    .product-card-small .btn-add-cart {
        font-size: 0.65rem;
        padding: 0.3rem 0.4rem;
        height: 2rem;
    }
    
    .product-card-small .quantity-control {
        transform: scale(0.8);
    }
    
    .product-card-small .quantity-btn {
        width: 22px;
        height: 22px;
        font-size: 0.6rem;
    }
    
    .product-card-small .quantity-input {
        width: 30px;
        font-size: 0.65rem;
        height: 22px;
    }
    
    /* Navigation Extra Small */
    .navbar-brand {
        font-size: 1rem !important;
    }
    
    .navbar-nav .nav-link {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
    
    /* Search Extra Small */
    .search-bar input {
        padding: 8px 40px 8px 12px;
        font-size: 0.8rem;
    }
    
    .category-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        min-width: 90px;
        border-radius: 18px;
    }
    
    /* Cart Extra Small */
    .cart-item {
        padding: 0.8rem;
    }
    
    /* Cart item images - responsive sizing handled in page-specific styles */
    .cart-item img {
        display: block;
        margin: 0 auto;
    }
    
    .quantity-control {
        max-width: 120px;
        transform: scale(0.9);
    }
    
    /* Checkout Extra Small */
    .checkout-form {
        padding: 1rem;
    }
    
    .checkout-form h3 {
        font-size: 1.2rem;
    }
    
    /* Contact Extra Small */
    .contact-form {
        padding: 1rem;
    }
    
    .contact-info {
        padding: 1rem;
    }
    
    /* Modal Extra Small */
    .modal-dialog {
        margin: 0.25rem;
        max-width: calc(100% - 0.5rem);
    }
    
    .product-modal-body {
        padding: 0.8rem;
    }
    
    .product-modal-image img {
        height: 100px;
    }
    
    .product-modal-title {
        font-size: 1.1rem;
    }
    
    .price-value {
        font-size: 1.2rem;
    }
    
    /* Section Titles Extra Small */
    .section-title h2 {
        font-size: 1.5rem;
    }
    
    /* Badge Extra Small */
    .badge-custom {
        font-size: 0.65rem;
        padding: 0.3rem 0.6rem;
    }
    
    /* Loading Extra Small */
    .loading-text h3 {
        font-size: 1.3rem;
    }
    
    .loading-text p {
        font-size: 0.9rem;
    }
    
    .spinner-container {
        width: 60px;
        height: 60px;
    }
}

/* Landscape Mobile Optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        min-height: 280px;
        padding: 1.5rem 0;
    }
    
    .hero-text-slider {
        height: 3.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-content h1 {
        font-size: 1.6rem !important;
        line-height: 1.3;
    }
    
    .hero-content p {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 0.8rem;
    }
    
    .hero-content .sinhala-subtitle {
        font-size: 0.8rem;
        line-height: 1.4;
        margin-bottom: 1rem;
    }
    
    .hero-buttons {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .btn-modern {
        width: auto;
        max-width: none;
    }
}

/* Tablet Optimization */
@media (min-width: 769px) and (max-width: 1024px) {
    .products-grid-10 {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .product-card-small {
        min-height: 340px;
    }
    
    .product-card-small .image-container {
        height: 110px;
    }
    
    .product-card-small img {
        height: 110px;
    }
    
    .product-card-small .card-title {
        font-size: 0.85rem;
    }
    
    .product-card-small .btn-add-cart {
        font-size: 0.75rem;
    }
    
    .hero-content h1 {
        font-size: 2.5rem !important;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn-modern {
        min-height: 44px;
        padding: 12px 25px;
    }
    
    .product-card-small .btn-add-cart {
        min-height: 44px;
        padding: 0.5rem 0.8rem;
    }
    
    .quantity-btn {
        min-width: 44px;
        min-height: 44px;
    }
    
    .navbar-nav .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .category-btn {
        min-height: 44px;
        padding: 0.5rem 1rem;
    }
    
    /* Disable hover effects on touch devices */
    .product-card:hover,
    .feature-card:hover,
    .btn-modern:hover {
        transform: none;
    }
    
    .product-card:hover img,
    .product-card-small:hover img {
        transform: none;
    }
}

/* High DPI Display Optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-section {
        background-size: cover;
    }
    
    .product-card-small img,
    .product-card img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero-section,
    .btn-modern,
    .floating-cart-summary-box,
    .loading-overlay {
        display: none !important;
    }
    
    .product-card-small,
    .product-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-section::before,
    .hero-section::after {
        animation: none !important;
    }
    
    .floating-particle {
        display: none !important;
    }
}

/* Dark Mode Support - Disabled by default to maintain light theme */
/* Uncomment the following if you want to enable dark mode support */
/*
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1a1a1a;
        --bg-secondary: #2d2d2d;
        --bg-card: #333333;
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
        --text-muted: #999999;
        --border-color: #555555;
    }
}
*/

/* Focus States for Accessibility */
.btn-modern:focus,
.nav-link:focus,
.category-btn:focus,
.quantity-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

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

/* Prevent Horizontal Scroll */
body {
    overflow-x: hidden;
    width: 100%;
}

/* Ensure all images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Global Image Loading Enhancements */
img {
    /* Smooth image loading transition */
    transition: opacity 0.3s ease;
}

/* Lazy loading support */
img[loading="lazy"] {
    /* Better performance with lazy loading */
    content-visibility: auto;
}

/* Image error handling - provide fallback styling */
img:not([src]), img[src=""], img[src*="placeholder"] {
    background-color: #f0f0f0;
    border: 1px solid #e0e0e0;
}

/* Prevent layout shift during image loading */
.image-container,
.product-modal-image,
.cart-image-wrapper {
    position: relative;
    overflow: hidden;
}

/* Shimmer animation for loading placeholders */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

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

/* ===== OUT OF STOCK LABEL ===== */
.out-of-stock-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(239, 68, 68, 0.95);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
    z-index: 10;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.5);
    border: 3px solid white;
    letter-spacing: 0.5px;
    backdrop-filter: blur(4px);
    animation: pulseOutOfStock 2s ease-in-out infinite;
}

/* ===== OUT OF STOCK CARD STYLING ===== */
.out-of-stock-card {
    opacity: 0.7;
    filter: grayscale(0.3);
    transition: all 0.3s ease;
}

.out-of-stock-card:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

/* ===== DISABLED QUANTITY CONTROLS ===== */
.quantity-control.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.quantity-control.disabled .quantity-btn {
    background: #e5e7eb !important;
    color: #9ca3af !important;
    cursor: not-allowed !important;
    border: 1px solid #d1d5db !important;
}

.quantity-control.disabled .quantity-input {
    background: #f9fafb !important;
    color: #9ca3af !important;
    border: 1px solid #d1d5db !important;
    cursor: not-allowed !important;
}

/* ===== DISABLED BUTTONS ===== */
.btn:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.btn-secondary:disabled {
    background-color: #6b7280 !important;
    border-color: #6b7280 !important;
    color: #ffffff !important;
}

.out-of-stock-label i {
    font-size: 1.2rem;
}

@keyframes pulseOutOfStock {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 4px 20px rgba(239, 68, 68, 0.5);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
        box-shadow: 0 6px 25px rgba(239, 68, 68, 0.7);
    }
}

/* Mobile - Out of Stock Label */
@media (max-width: 768px) {
    .out-of-stock-label {
        padding: 10px 20px;
        font-size: 1rem;
        border-width: 2px;
    }
}

@media (max-width: 480px) {
    .out-of-stock-label {
        padding: 8px 16px;
        font-size: 0.9rem;
        border-width: 2px;
    }
    
    .out-of-stock-label i {
        font-size: 1rem;
    }
}

/* ===== iOS SAFARI SPECIFIC FIXES ===== */

/* Fix for iOS Safari viewport issues */
@supports (-webkit-touch-callout: none) {
    .hero-section {
        min-height: -webkit-fill-available;
    }
    
    /* iOS Safari specific font scaling fixes */
    body {
        -webkit-text-size-adjust: 100%;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* Prevent iOS Safari from making text too large */
    h1, h2, h3, h4, h5, h6 {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    
    /* iOS Safari button and input fixes */
    button, input, select, textarea {
        appearance: none;
        -webkit-appearance: none;
        border-radius: 0;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* iOS Safari form control fixes */
    .form-control {
        font-size: 16px !important; /* Prevents zoom on iOS */
        appearance: none;
        -webkit-appearance: none;
        border-radius: 8px;
    }
    
    /* iOS Safari button fixes */
    .btn-modern, .btn-primary-modern, .btn-add-cart {
        appearance: none;
        -webkit-appearance: none;
        border-radius: 25px;
        font-size: 16px;
        min-height: 44px; /* iOS recommended touch target */
    }
    
    /* iOS Safari navigation fixes */
    .navbar-nav .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* iOS Safari product card fixes */
    .product-card-small, .product-card {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    /* iOS Safari product image fixes - ensure full image visibility */
    .product-card-small .image-container {
        position: relative;
        overflow: visible !important; /* Safari sometimes clips overflow */
        height: auto !important;
        min-height: 240px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .product-card-small .image-container img,
    .product-card-small img {
        width: 100% !important;
        height: auto !important;
        max-height: 240px;
        object-fit: contain !important;
        display: block;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    .product-image {
        width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
    }
    
    /* iOS Safari modal fixes */
    .modal-dialog {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    /* iOS Safari carousel fixes */
    .carousel-inner {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    /* iOS Safari scroll fixes */
    .floating-cart-items {
        -webkit-overflow-scrolling: touch;
    }
    
    /* iOS Safari category button fixes */
    .category-btn {
        appearance: none;
        -webkit-appearance: none;
        min-height: 44px;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* iOS Safari quantity control fixes */
    .quantity-btn {
        appearance: none;
        -webkit-appearance: none;
        min-width: 44px !important;
        min-height: 44px !important;
        -webkit-tap-highlight-color: rgba(0,0,0,0.1);
        cursor: pointer;
        touch-action: manipulation;
        user-select: none;
        -webkit-user-select: none;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 18px !important;
        padding: 0 !important;
    }
    
    .quantity-input {
        appearance: none;
        -webkit-appearance: none;
        font-size: 16px !important;
        min-height: 44px !important;
        touch-action: manipulation;
    }
    
    .quantity-control {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        touch-action: manipulation;
    }
    
    /* iOS Safari disabled controls */
    .quantity-control.disabled {
        pointer-events: none !important;
        -webkit-user-select: none !important;
        user-select: none !important;
    }
    
    .quantity-control.disabled .quantity-btn {
        -webkit-tap-highlight-color: transparent !important;
        touch-action: none !important;
    }
    
    .btn:disabled {
        -webkit-tap-highlight-color: transparent !important;
        touch-action: none !important;
        -webkit-user-select: none !important;
        user-select: none !important;
    }
    
    /* iOS Safari search bar fixes */
    .search-bar input {
        font-size: 16px !important;
        appearance: none;
        -webkit-appearance: none;
    }
    
    /* iOS Safari dropdown fixes */
    .category-select, .weight-select {
        font-size: 16px !important;
        appearance: none;
        -webkit-appearance: none;
    }
    
    /* iOS Safari specific element size fixes */
    .product-card-small .quantity-control {
        transform: scale(0.85);
    }
    
    .product-card-small .quantity-btn {
        width: 32px;
        height: 32px;
        font-size: 0.7rem;
    }
    
    .product-card-small .quantity-input {
        width: 35px;
        font-size: 0.7rem;
        height: 32px;
    }
    
    /* iOS Safari hero section fixes */
    .hero-text-slider h1,
    .hero-text-slider .hero-title,
    .hero-text-slider .hero-greeting {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }
    
    /* iOS Safari navbar fixes */
    .navbar-logo {
        height: 28px !important;
    }
    
    /* iOS Safari badge fixes */
    .badge-custom {
        font-size: 0.65rem !important;
        padding: 0.3rem 0.6rem !important;
    }
    
    /* iOS Safari carousel fixes */
    .feature-card-carousel {
        height: 160px !important;
    }
    
    .feature-card-carousel-img {
        height: 160px !important;
    }
    
    /* iOS Safari table fixes */
    .table-modern {
        font-size: 0.7rem !important;
    }
    
    .table-modern th,
    .table-modern td {
        padding: 0.25rem 0.15rem !important;
    }
    
    /* iOS Safari modal fixes */
    .product-modal-content {
        max-width: 300px !important;
    }
    
    .product-modal-image img {
        height: 160px !important;
    }
    
    .product-modal-title {
        font-size: 1rem !important;
    }
    
    .price-value {
        font-size: 1.1rem !important;
    }
    
    /* iOS Safari form fixes */
    .contact-form,
    .checkout-form,
    .form-modern {
        padding: 1.2rem !important;
    }
    
    .form-control {
        font-size: 16px !important;
        min-height: 38px !important;
        padding: 0.4rem 0.6rem !important;
    }
    
    /* iOS Safari button fixes */
    .btn-modern {
        font-size: 0.75rem !important;
        min-height: 38px !important;
        padding: 0.35rem 0.7rem !important;
    }
    
    /* iOS Safari section spacing fixes */
    .py-5 {
        padding: 1.5rem 0 !important;
    }
    
    .py-4 {
        padding: 1.2rem 0 !important;
    }
    
    /* iOS Safari container fixes */
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* Fix for Android Chrome viewport issues */
@media screen and (max-width: 768px) {
    .hero-section {
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }
}

/* iOS Safari specific mobile optimizations */
@media screen and (max-width: 768px) and (-webkit-touch-callout: none) {
    /* Reduce font sizes specifically for iOS Safari */
    .hero-content h1 {
        font-size: 1.6rem !important;
        line-height: 1.3 !important;
    }
    
    .hero-content p {
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
    }
    
    .hero-content .sinhala-subtitle {
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
    }
    
    /* iOS Safari product card optimizations */
    .product-card-small {
        min-height: 260px !important;
    }
    
    .product-card-small .image-container {
        height: 80px !important;
    }
    
    .product-card-small img {
        height: 80px !important;
    }
    
    .product-card-small .card-title {
        font-size: 0.7rem !important;
        line-height: 1.2 !important;
    }
    
    .product-card-small .price {
        font-size: 0.8rem !important;
    }
    
    .product-card-small .btn-add-cart {
        font-size: 0.65rem !important;
        min-height: 36px !important;
        padding: 0.3rem 0.4rem !important;
    }
    
    /* iOS Safari navigation optimizations */
    .navbar-nav .nav-link {
        font-size: 0.9rem !important;
        padding: 0.6rem 0.8rem !important;
    }
    
    /* iOS Safari button optimizations */
    .btn-modern {
        font-size: 0.8rem !important;
        min-height: 40px !important;
        padding: 0.4rem 0.8rem !important;
    }
    
    /* iOS Safari form optimizations */
    .form-control {
        font-size: 16px !important;
        min-height: 40px !important;
        padding: 0.5rem 0.75rem !important;
    }
    
    /* iOS Safari category button optimizations */
    .category-btn {
        font-size: 0.75rem !important;
        min-height: 36px !important;
        padding: 0.4rem 0.6rem !important;
    }
    
    /* iOS Safari modal optimizations */
    .product-modal-content {
        max-width: 320px !important;
    }
    
    .product-modal-image img {
        height: 180px !important;
    }
    
    .product-modal-title {
        font-size: 1.1rem !important;
    }
    
    .price-value {
        font-size: 1.2rem !important;
    }
    
    /* iOS Safari table optimizations */
    .table-modern {
        font-size: 0.75rem !important;
    }
    
    .table-modern th,
    .table-modern td {
        padding: 0.3rem 0.2rem !important;
    }
    
    /* iOS Safari section title optimizations */
    .section-title h2 {
        font-size: 1.6rem !important;
    }
    
    /* iOS Safari feature card optimizations */
    .feature-card {
        padding: 1.2rem !important;
    }
    
    .feature-card .icon {
        font-size: 2.2rem !important;
    }
    
    .feature-card h5 {
        font-size: 1rem !important;
    }
    
    .feature-card p {
        font-size: 0.85rem !important;
    }
}

/* iOS Safari landscape optimizations */
@media screen and (max-width: 768px) and (orientation: landscape) and (-webkit-touch-callout: none) {
    .hero-section {
        min-height: 250px !important;
        padding: 1rem 0 !important;
    }
    
    .hero-content h1 {
        font-size: 1.4rem !important;
    }
    
    .hero-content p {
        font-size: 0.8rem !important;
    }
    
    .hero-content .sinhala-subtitle {
        font-size: 0.7rem !important;
    }
    
    .btn-modern {
        font-size: 0.75rem !important;
        padding: 0.3rem 0.6rem !important;
    }
}

/* iOS Safari specific touch optimizations */
@media (hover: none) and (pointer: coarse) and (-webkit-touch-callout: none) {
    /* Larger touch targets for iOS Safari */
    .btn-modern, .btn-primary-modern, .btn-add-cart {
        min-height: 44px !important;
        min-width: 44px !important;
    }
    
    .quantity-btn {
        min-width: 44px !important;
        min-height: 44px !important;
    }
    
    .navbar-nav .nav-link {
        min-height: 44px !important;
    }
    
    .category-btn {
        min-height: 44px !important;
    }
    
    /* Disable hover effects on iOS Safari */
    .product-card:hover,
    .feature-card:hover,
    .btn-modern:hover {
        transform: none !important;
    }
    
    .product-card:hover img,
    .product-card-small:hover img {
        transform: none !important;
    }
    
    /* iOS Safari tap highlight removal */
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    /* iOS Safari focus styles */
    .btn-modern:focus,
    .nav-link:focus,
    .category-btn:focus,
    .quantity-btn:focus,
    .form-control:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
}

/* Additional iOS Safari size reduction fixes */
@supports (-webkit-touch-callout: none) {
    /* Reduce overall element sizes for iOS Safari */
    .product-card-small {
        min-height: 240px !important;
    }
    
    .product-card-small .image-container {
        height: 70px !important;
    }
    
    .product-card-small img {
        height: 70px !important;
    }
    
    .product-card-small .card-body {
        padding: 0.4rem !important;
    }
    
    .product-card-small .card-title {
        font-size: 0.65rem !important;
        line-height: 1.1 !important;
        min-height: 1.6rem !important;
    }
    
    .product-card-small .price {
        font-size: 0.75rem !important;
    }
    
    .product-card-small .btn-add-cart {
        font-size: 0.6rem !important;
        min-height: 32px !important;
        padding: 0.25rem 0.35rem !important;
    }
    
    .product-card-small .quantity-control {
        transform: scale(0.8) !important;
    }
    
    .product-card-small .quantity-btn {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.6rem !important;
    }
    
    .product-card-small .quantity-input {
        width: 30px !important;
        font-size: 0.6rem !important;
        height: 28px !important;
    }
    
    /* iOS Safari hero section size reduction */
    .hero-content h1 {
        font-size: 1.4rem !important;
        line-height: 1.2 !important;
    }
    
    .hero-content p {
        font-size: 0.85rem !important;
        line-height: 1.3 !important;
    }
    
    .hero-content .sinhala-subtitle {
        font-size: 0.75rem !important;
        line-height: 1.2 !important;
    }
    
    .btn-modern {
        font-size: 0.7rem !important;
        min-height: 36px !important;
        padding: 0.3rem 0.6rem !important;
    }
    
    /* iOS Safari navigation size reduction */
    .navbar-logo {
        height: 25px !important;
    }
    
    .navbar-nav .nav-link {
        font-size: 0.85rem !important;
        padding: 0.5rem 0.7rem !important;
    }
    
    /* iOS Safari section title size reduction */
    .section-title h2 {
        font-size: 1.4rem !important;
    }
    
    /* iOS Safari feature card size reduction */
    .feature-card {
        padding: 1rem !important;
    }
    
    .feature-card .icon {
        font-size: 2rem !important;
    }
    
    .feature-card h5 {
        font-size: 0.9rem !important;
    }
    
    .feature-card p {
        font-size: 0.8rem !important;
    }
    
    /* iOS Safari modal size reduction */
    .product-modal-content {
        max-width: 280px !important;
    }
    
    .product-modal-image img {
        height: 140px !important;
    }
    
    .product-modal-title {
        font-size: 0.95rem !important;
    }
    
    .price-value {
        font-size: 1rem !important;
    }
    
    /* iOS Safari table size reduction */
    .table-modern {
        font-size: 0.65rem !important;
    }
    
    .table-modern th,
    .table-modern td {
        padding: 0.2rem 0.1rem !important;
    }
    
    /* iOS Safari form size reduction */
    .form-control {
        font-size: 16px !important;
        min-height: 36px !important;
        padding: 0.35rem 0.5rem !important;
    }
    
    .btn-modern {
        font-size: 0.7rem !important;
        min-height: 36px !important;
        padding: 0.3rem 0.6rem !important;
    }
    
    /* iOS Safari category button size reduction */
    .category-btn {
        font-size: 0.7rem !important;
        min-height: 32px !important;
        padding: 0.3rem 0.5rem !important;
    }
    
    /* iOS Safari badge size reduction */
    .badge-custom {
        font-size: 0.6rem !important;
        padding: 0.25rem 0.5rem !important;
    }
    
    /* iOS Safari carousel size reduction */
    .feature-card-carousel {
        height: 140px !important;
    }
    
    .feature-card-carousel-img {
        height: 140px !important;
    }
    
    /* iOS Safari spacing reduction */
    .py-5 {
        padding: 1.2rem 0 !important;
    }
    
    .py-4 {
        padding: 1rem 0 !important;
    }
    
    .mb-3 {
        margin-bottom: 0.8rem !important;
    }
    
    .mb-4 {
        margin-bottom: 1rem !important;
    }
    
    .mb-5 {
        margin-bottom: 1.2rem !important;
    }
}

/* Home Page Popular Products */
.popular-products .product-card img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.popular-products .product-card {
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    height: 100%;
    display: flex !important;
    flex-direction: column !important;
}

.popular-products .product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow-color);
}

.popular-products .badge {
    font-size: 0.75rem;
    padding: 0.4rem 0.6rem;
}

/* Popular Products - Reorganized Layout (Mobile & Web) */
.popular-products .product-card .card-body {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
    padding: 0.8rem !important;
}

.popular-products .product-card .card-title {
    order: 1 !important;
    margin-bottom: 0.5rem !important;
    text-align: center !important;
    font-size: 1.3rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.popular-products .product-card .card-text {
    order: 2 !important;
    margin-bottom: 0.8rem !important;
    text-align: center !important;
    flex-grow: 1 !important;
    font-size: 1rem !important;
    line-height: 1.3 !important;
    color: var(--text-secondary) !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.popular-products .product-card .mt-auto {
    order: 3 !important;
    margin-top: 0 !important;
}

/* Override flex layout for price and button */
.popular-products .product-card .d-flex.justify-content-between {
    display: block !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

.popular-products .product-card .d-flex.justify-content-between .price {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    margin-bottom: 0.8rem !important;
    order: 1 !important;
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: var(--primary-color) !important;
}

.popular-products .product-card .d-flex.justify-content-between .btn-add-cart {
    display: flex !important;
    width: 100% !important;
    max-width: 140px !important;
    margin: 0 auto !important;
    order: 2 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    padding: 8px 16px !important;
    text-align: center !important;
    justify-content: center !important;
    align-items: center !important;
    border-radius: 25px !important;
}

/* Ensure product name is visible */
.popular-products .product-card h5,
.popular-products .product-card .card-title {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1 !important;
    margin: 0.5rem 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
}

/* Mobile Popular Products - Compact */
@media (max-width: 768px) {
    .popular-products .product-card img {
        height: 200px;
        object-fit: contain;
        background-color: #f8f9fa;
    }
    
    .popular-products .product-card .card-body {
        padding: 0.8rem;
    }
    
    .popular-products .product-card .card-title {
        font-size: 1.2rem;
        min-height: 2.5rem;
        line-height: 1.3;
        font-weight: 600;
    }
    
    .popular-products .product-card .card-text {
        font-size: 0.9rem;
        height: 1.8rem;
        line-height: 1.3;
    }
    
    .popular-products .product-card .price {
        font-size: 1.4rem;
        font-weight: 700;
    }
    
    .popular-products .product-card .btn-add-cart {
        font-size: 0.7rem;
        padding: 0.4rem 0.8rem;
        height: 2.2rem;
    }
    
    .popular-products .badge {
        font-size: 0.65rem;
        padding: 0.3rem 0.5rem;
    }
    

    
    /* Mobile Advertisement Sliders - Compact */
    .py-5[style*="background-color: #1e40af"] {
        padding: 2rem 0 !important;
    }
    
    .py-5[style*="background-color: #1e40af"] .section-title p {
        font-size: 1rem !important;
        line-height: 1.4 !important;
        margin-bottom: 1rem !important;
    }
    
    .feature-card-carousel {
        height: 180px !important;
        border-radius: 12px !important;
        overflow: hidden !important;
    }
    
    .feature-card-carousel-img {
        height: 180px !important;
        object-fit: cover !important;
    }
    
    .feature-card-carousel .carousel-caption {
        padding: 0.5rem !important;
        border-bottom-left-radius: 8px !important;
        border-bottom-right-radius: 8px !important;
    }
    
    .feature-card-carousel .carousel-caption h5 {
        font-size: 0.9rem !important;
        margin-bottom: 0.2rem !important;
        line-height: 1.2 !important;
    }
    
    .feature-card-carousel .carousel-caption p {
        font-size: 0.75rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0 !important;
    }
    
    .feature-card-carousel .carousel-control-prev,
    .feature-card-carousel .carousel-control-next {
        width: 30px !important;
        height: 30px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        background: rgba(0, 0, 0, 0.3) !important;
        border-radius: 50% !important;
        margin: 0 0.5rem !important;
    }
    
    .feature-card-carousel .carousel-control-prev {
        left: 0.5rem !important;
    }
    
    .feature-card-carousel .carousel-control-next {
        right: 0.5rem !important;
    }
    
    .feature-card-carousel .carousel-control-prev-icon,
    .feature-card-carousel .carousel-control-next-icon {
        width: 15px !important;
        height: 15px !important;
    }
    
    /* Home page View All Groceries button - mobile compact */
    .popular-products .text-center .btn-primary-modern {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
        border-radius: 18px;
        height: auto;
        min-height: 2.2rem;
    }
    
    .popular-products .text-center .btn-modern {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
        border-radius: 18px;
        height: auto;
        min-height: 2.2rem;
    }
    
    .popular-products .text-center .btn i {
        font-size: 0.7rem;
        margin-right: 0.3rem;
    }
    
    /* Home page About section - mobile compact */
    .py-5[style*="background-color: #1e40af"] {
        padding: 2rem 0 !important;
    }
    
    .py-5[style*="background-color: #1e40af"] h2 {
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    .py-5[style*="background-color: #1e40af"] .lead {
        font-size: 1rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0.8rem !important;
    }
    
    .py-5[style*="background-color: #1e40af"] p {
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0.8rem !important;
    }
    
    .py-5[style*="background-color: #1e40af"] p[style*="font-weight: bold"] {
        font-size: 0.8rem !important;
        line-height: 1.3 !important;
        margin-top: 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .py-5[style*="background-color: #1e40af"] .btn-primary-modern {
        font-size: 0.75rem !important;
        padding: 0.4rem 0.8rem !important;
        border-radius: 18px !important;
        height: auto !important;
        min-height: 2.2rem !important;
        display: block !important;
        margin: 0 auto !important;
        width: fit-content !important;
    }
    
    .py-5[style*="background-color: #1e40af"] .btn i {
        font-size: 0.7rem !important;
        margin-right: 0.3rem !important;
    }
    
    .py-5[style*="background-color: #1e40af"] img {
        border-radius: 12px !important;
        margin-top: 1rem !important;
    }
    
    /* About Us page - mobile compact */
    .hero-section h1 {
        font-size: 1.8rem !important;
        margin-bottom: 0.8rem !important;
    }
    
    .hero-section .lead {
        font-size: 1rem !important;
        line-height: 1.4 !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-section .btn-primary-modern {
        font-size: 0.75rem !important;
        padding: 0.4rem 0.8rem !important;
        border-radius: 18px !important;
        height: auto !important;
        min-height: 2.2rem !important;
    }
    
    .hero-section .btn i {
        font-size: 0.7rem !important;
        margin-right: 0.3rem !important;
    }
    
    /* Mission & Values section */
    .bg-light .section-title h2 {
        font-size: 1.6rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .bg-light .feature-card {
        padding: 1.5rem !important;
    }
    
    .bg-light .feature-card .icon {
        font-size: 2.5rem !important;
        margin-bottom: 0.8rem !important;
    }
    
    .bg-light .feature-card h5 {
        font-size: 1.1rem !important;
        margin-bottom: 0.8rem !important;
    }
    
    .bg-light .feature-card p {
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
    }
    
    /* Owner section */
    .owner-card {
        padding: 1.5rem !important;
    }
    
    .owner-card .owner-photo img {
        width: 100px !important;
        height: 100px !important;
    }
    
    .owner-card h4 {
        font-size: 1.3rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .owner-card p {
        font-size: 0.9rem !important;
    }
    
    /* Our Promise section */
    .bg-spice h2 {
        font-size: 1.4rem !important;
        margin-bottom: 0.8rem !important;
    }
    
    .bg-spice .lead {
        font-size: 0.9rem !important;
        line-height: 1.3 !important;
        margin-bottom: 1rem !important;
    }
    
    .bg-spice h3 {
        font-size: 1.5rem !important;
        margin-bottom: 0.3rem !important;
    }
    
    .bg-spice p {
        font-size: 0.8rem !important;
        line-height: 1.2 !important;
    }
    
    .bg-spice .row.mt-5 {
        margin-top: 1rem !important;
    }
    
    .bg-spice .col-md-4 {
        margin-bottom: 0.5rem !important;
    }
    
    /* Call to Action section */
    .py-5 h2 {
        font-size: 1.6rem !important;
        margin-bottom: 1rem !important;
    }
    
    .py-5 .lead {
        font-size: 1rem !important;
        line-height: 1.4 !important;
        margin-bottom: 1.5rem !important;
    }
    
    .py-5 .btn-primary-modern,
    .py-5 .btn-outline-primary {
        font-size: 0.75rem !important;
        padding: 0.4rem 0.8rem !important;
        border-radius: 18px !important;
        height: auto !important;
        min-height: 2.2rem !important;
    }
    
    .py-5 .btn i {
        font-size: 0.7rem !important;
        margin-right: 0.3rem !important;
    }
    
    /* Reduce section padding */
    .py-5 {
        padding: 2rem 0 !important;
    }
    
    .py-4 {
        padding: 1.5rem 0 !important;
    }
    
    /* Contact Us page - mobile compact */
    .contact-form h3 {
        font-size: 1.4rem !important;
        margin-bottom: 1rem !important;
    }
    
    .contact-form .form-label {
        font-size: 0.9rem !important;
        margin-bottom: 0.4rem !important;
    }
    
    .contact-form .form-control {
        font-size: 0.9rem !important;
        padding: 0.5rem 0.75rem !important;
        border-radius: 8px !important;
        height: auto !important;
        min-height: 2.2rem !important;
    }
    
    .contact-form textarea.form-control {
        min-height: 4rem !important;
        resize: vertical !important;
    }
    
    .contact-form .mb-3 {
        margin-bottom: 0.8rem !important;
    }
    
    .contact-form .btn-primary-modern {
        font-size: 0.8rem !important;
        padding: 0.5rem 1rem !important;
        border-radius: 18px !important;
        height: auto !important;
        min-height: 2.5rem !important;
    }
    
    .contact-form .btn i {
        font-size: 0.75rem !important;
        margin-right: 0.4rem !important;
    }
    
    .contact-form .alert {
        font-size: 0.85rem !important;
        padding: 0.75rem !important;
        margin-bottom: 1rem !important;
    }
    
    .contact-form .alert h5 {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .contact-form .alert ul {
        margin-bottom: 0 !important;
        padding-left: 1.2rem !important;
    }
    
    .contact-form .alert li {
        font-size: 0.8rem !important;
        margin-bottom: 0.2rem !important;
    }
    
    /* Contact Info section - mobile compact */
    .contact-info h4 {
        font-size: 1.3rem !important;
        margin-bottom: 0.8rem !important;
    }
    
    .contact-info p {
        font-size: 0.9rem !important;
        margin-bottom: 1rem !important;
    }
    
    .contact-info .contact-item {
        margin-bottom: 0.8rem !important;
        padding: 0.5rem !important;
    }
    
    .contact-info .contact-item i {
        font-size: 1rem !important;
        margin-right: 0.5rem !important;
    }
    
    .contact-info .contact-item strong {
        font-size: 0.9rem !important;
    }
    
    .contact-info .contact-item div {
        font-size: 0.85rem !important;
        line-height: 1.3 !important;
    }
    
    .contact-info h5 {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .contact-info .map-container iframe {
        height: 120px !important;
    }
    
    .contact-info .btn-sm {
        font-size: 0.75rem !important;
        padding: 0.3rem 0.6rem !important;
    }
    
    .contact-info .social-links a {
        font-size: 1.2rem !important;
        margin-right: 0.8rem !important;
    }
    
    /* Mobile Checkout Page - Compact */
    .checkout-form h3 {
        font-size: 1.4rem !important;
        margin-bottom: 1rem !important;
    }
    
    .checkout-form .form-group {
        margin-bottom: 0.8rem !important;
    }
    
    .checkout-form .form-control {
        font-size: 0.9rem !important;
        padding: 0.5rem 0.75rem !important;
        border-radius: 8px !important;
    }
    
    .checkout-form textarea.form-control {
        min-height: 2.5rem !important;
    }
    
    .checkout-form .btn-primary-modern {
        font-size: 0.85rem !important;
        padding: 0.5rem 1rem !important;
        border-radius: 18px !important;
        height: auto !important;
        min-height: 2.5rem !important;
    }
    
    .checkout-form .btn-outline-secondary {
        font-size: 0.85rem !important;
        padding: 0.5rem 1rem !important;
        border-radius: 18px !important;
        height: auto !important;
        min-height: 2.5rem !important;
    }
    
    /* Mobile Order Summary Table - Compact */
    .table-modern {
        font-size: 0.85rem !important;
        border-radius: 8px !important;
    }
    
    .table-modern thead th {
        font-size: 0.9rem !important;
        padding: 0.5rem 0.3rem !important;
        font-weight: 600 !important;
    }
    
    .table-modern td,
    .table-modern th {
        padding: 0.4rem 0.3rem !important;
        font-size: 0.8rem !important;
        line-height: 1.2 !important;
    }
    
    .table-modern tfoot th {
        padding: 0.3rem 0.3rem !important;
        font-size: 0.85rem !important;
    }
    
    .table-modern tfoot th.fs-4 {
        font-size: 1rem !important;
        padding: 0.5rem 0.3rem !important;
    }
    
    .table-modern tfoot th.text-primary.fs-4 {
        font-size: 1.1rem !important;
        font-weight: 700 !important;
    }
    
    /* Mobile Product Modal - Compact */
    .product-modal-content {
        max-width: 350px !important;
        margin: 0 auto !important;
    }
    
    .product-modal-header {
        padding: 0.8rem 1rem !important;
    }
    
    .product-modal-header .modal-title {
        font-size: 1.1rem !important;
    }
    
    .product-modal-body {
        padding: 1rem !important;
    }
    
    .product-modal-image img {
        height: 200px !important;
        object-fit: contain !important;
        background-color: #f8f9fa !important;
        border-radius: 8px !important;
    }
    
    .product-modal-title {
        font-size: 1.2rem !important;
        margin-bottom: 0.5rem !important;
        line-height: 1.3 !important;
    }
    
    .product-modal-description {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0.8rem !important;
    }
    
    .product-modal-price {
        margin-bottom: 1rem !important;
    }
    
    .product-modal-price .price-value {
        font-size: 1.3rem !important;
        font-weight: 600 !important;
    }
    
    .product-modal-actions {
        gap: 0.8rem !important;
    }
    
    .quantity-section-modal {
        margin-bottom: 0.8rem !important;
    }
    
    .quantity-label {
        font-size: 0.9rem !important;
        margin-bottom: 0.3rem !important;
    }
    
    .quantity-control-modal {
        gap: 0.3rem !important;
    }
    
    .quantity-btn-modal {
        width: 28px !important;
        height: 28px !important;
        font-size: 0.7rem !important;
    }
    
    .quantity-input-modal {
        width: 40px !important;
        font-size: 0.8rem !important;
        height: 28px !important;
    }
    
    .btn-modal-add-cart {
        font-size: 0.85rem !important;
        padding: 0.5rem 1rem !important;
        height: auto !important;
        min-height: 2.5rem !important;
    }
    
    /* Mobile Navigation Cart Button */
    .navbar .d-lg-none .btn-outline-light {
        padding: 0.4rem 0.6rem !important;
        font-size: 0.9rem !important;
        border-radius: 8px !important;
        border-width: 1px !important;
    }
    
    .navbar .d-lg-none .btn-outline-light i {
        font-size: 1rem !important;
    }
    
    .navbar .d-lg-none .badge {
        font-size: 0.7rem !important;
        padding: 0.2rem 0.4rem !important;
        min-width: 18px !important;
        height: 18px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .navbar .d-lg-none .btn-outline-light:hover {
        background-color: rgba(255, 255, 255, 0.1) !important;
        border-color: rgba(255, 255, 255, 0.5) !important;
    }
}

/* Additional Mobile Optimizations */
@media (max-width: 768px) {
    /* About page mobile optimization */
    .about-section {
        padding: 2rem 0;
    }
    
    .about-section img {
        border-radius: 15px;
        margin-bottom: 1.5rem;
    }
    
    .about-section h2 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .about-section p {
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1rem;
    }
    
    /* Mobile table improvements */
    .table-responsive {
        border-radius: 10px;
        overflow: hidden;
    }
    
    .table {
        font-size: 0.9rem;
    }
    
    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
    }
    
    /* Mobile alert improvements */
    .alert {
        border-radius: 10px;
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .alert-modern {
        border-radius: 12px;
        padding: 1rem 1.25rem;
    }
    
    /* Mobile breadcrumb improvements */
    .breadcrumb {
        font-size: 0.9rem;
        padding: 0.75rem 0;
    }
    
    .breadcrumb-item + .breadcrumb-item::before {
        font-size: 0.8rem;
    }
    
    /* Mobile pagination improvements */
    .pagination {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .page-link {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.9rem;
    }
    
    /* Mobile tooltip improvements */
    .tooltip {
        font-size: 0.8rem;
    }
    
    /* Mobile dropdown improvements */
    .dropdown-menu {
        border-radius: 10px;
        box-shadow: 0 8px 25px rgba(0,0,0,0.15);
        border: none;
    }
    
    .dropdown-item {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Mobile card improvements */
    .card {
        border-radius: 12px;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    }
    
    .card-header {
        border-radius: 12px 12px 0 0;
        padding: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .card-footer {
        border-radius: 0 0 12px 12px;
        padding: 1rem;
    }
    
    /* Mobile list group improvements */
    .list-group-item {
        padding: 0.75rem 1rem;
        border-radius: 8px;
        margin-bottom: 0.5rem;
    }
    
    /* Mobile badge improvements */
    .badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
    }
    
    /* Mobile progress bar improvements */
    .progress {
        height: 8px;
        border-radius: 4px;
    }
    
    /* Mobile spinner improvements */
    .spinner-border {
        width: 1.5rem;
        height: 1.5rem;
    }
    
    .spinner-border-sm {
        width: 1rem;
        height: 1rem;
    }
    
    /* Mobile text utilities */
    .text-truncate {
        max-width: 100%;
    }
    
    /* Mobile spacing utilities */
    .p-1 { padding: 0.25rem !important; }
    .p-2 { padding: 0.5rem !important; }
    .p-3 { padding: 1rem !important; }
    .p-4 { padding: 1.5rem !important; }
    .p-5 { padding: 3rem !important; }
    
    .m-1 { margin: 0.25rem !important; }
    .m-2 { margin: 0.5rem !important; }
    .m-3 { margin: 1rem !important; }
    .m-4 { margin: 1.5rem !important; }
    .m-5 { margin: 3rem !important; }
    
    /* Mobile flex utilities */
    .d-flex {
        flex-wrap: wrap;
    }
    
    .flex-column {
        flex-direction: column !important;
    }
    
    /* Mobile text alignment */
    .text-center {
        text-align: center !important;
    }
    
    .text-left {
        text-align: left !important;
    }
    
    .text-right {
        text-align: right !important;
    }
    
    /* Mobile visibility */
    .d-none {
        display: none !important;
    }
    
    .d-block {
        display: block !important;
    }
    
    .d-flex {
        display: flex !important;
    }
    
    /* Mobile position utilities */
    .position-relative {
        position: relative !important;
    }
    
    .position-absolute {
        position: absolute !important;
    }
    
    .position-fixed {
        position: fixed !important;
    }
    
    .position-sticky {
        position: sticky !important;
    }
}

/* Web View - Popular Products Add to Cart Button Text */
@media (min-width: 769px) {
    .popular-products .product-card .btn-add-cart {
        white-space: nowrap !important;
        overflow: visible !important;
        text-overflow: clip !important;
        min-width: 140px !important;
        max-width: 160px !important;
        padding: 8px 16px !important;
        text-align: center !important;
        justify-content: center !important;
        align-items: center !important;
        display: flex !important;
    }
    
    .popular-products .product-card .btn-add-cart i {
        margin-right: 0.5rem !important;
    }
}

    /* Weight Selector Styles */
.weight-selector {
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
    width: 100%;
    height: 2.5rem;
    display: flex;
    align-items: center;
}

/* Weight Selector Placeholder for consistent spacing */
.weight-selector-placeholder {
    margin-bottom: 0.5rem;
    margin-top: 0.5rem;
    width: 100%;
    height: 2.5rem;
    display: flex;
    align-items: center;
}

.weight-select {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    height: 2.5rem;
}

.weight-select:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.weight-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.weight-select option {
    background-color: var(--bg-card);
    color: var(--text-primary);
    padding: 0.5rem;
}

/* Modal Weight Selector Styles */
.weight-section-modal {
    margin-bottom: 0.6rem;
}

.weight-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.4rem;
    display: block;
    font-size: 0.8rem;
}

.weight-select-modal {
    width: 100%;
    padding: 0.6rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background-color: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.6rem center;
    background-repeat: no-repeat;
    background-size: 1.3em 1.3em;
    padding-right: 2.2rem;
}

/* iOS Safari fixes for weight selectors */
@supports (-webkit-touch-callout: none) {
    /* Prevent iOS auto-zoom and ensure native rendering behaves */
    .weight-select,
    .weight-select-modal {
        font-size: 16px; /* >=16px prevents zoom on focus */
        -webkit-appearance: none;
        appearance: none;
        line-height: 1.4;
        min-height: 44px; /* comfortable tap target */
        background-clip: padding-box;
    }

    /* Adjust dropdown arrow position/size on iOS */
    .weight-select {
        background-position: right 0.75rem center;
        background-size: 1.2em 1.2em;
        padding-right: 2.5rem;
    }

    .weight-select-modal {
        background-position: right 0.75rem center;
        background-size: 1.1em 1.1em;
        padding-right: 2.5rem;
    }
}

.weight-select-modal:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.weight-select-modal:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.weight-select-modal option {
    background-color: var(--bg-card);
    color: var(--text-primary);
    padding: 0.5rem;
}

/* Mobile responsive weight selector */
@media (max-width: 768px) {
    .weight-selector {
        margin-bottom: 0.25rem;
    }
    
    .weight-select {
        padding: 0.4rem;
        font-size: 0.8rem;
        padding-right: 2rem;
        background-size: 1.2em 1.2em;
    }
}

/* Product card adjustments for weight selector */
.product-card-small .price-section {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.5rem;
    margin-top: -0.2rem;
    padding: 0.1rem 0.3rem 0 0.3rem;
    height: 1.5rem;
    position: relative;
    min-height: 1.5rem;
}

/* Quantity controls - base styles (already present elsewhere, reinforced here if needed) */
.quantity-control,
.quantity-control-modal {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.quantity-btn,
.quantity-btn-modal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.quantity-input,
.quantity-input-modal {
    width: 48px;
    text-align: center;
}

/* Mobile quantity controls - fix touch issues and styling */
@media (max-width: 768px) {
    .quantity-btn,
    .quantity-btn-modal {
        touch-action: manipulation;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
        cursor: pointer;
        pointer-events: auto;
        position: relative;
        z-index: 10;
        border: 1px solid #dee2e6;
        background-color: #ffffff;
        color: #495057;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        font-weight: 600;
        min-width: 44px;
        min-height: 44px;
        border-radius: 6px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        transition: all 0.2s ease;
    }

    .quantity-btn:hover,
    .quantity-btn-modal:hover {
        background-color: #f8f9fa;
        border-color: #adb5bd;
        transform: translateY(-1px);
        box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    }

    .quantity-btn:active,
    .quantity-btn-modal:active {
        transform: translateY(0);
        box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    }

    .quantity-control,
    .quantity-control-modal {
        touch-action: manipulation;
        pointer-events: auto;
        gap: 0.3rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .quantity-input,
    .quantity-input-modal {
        min-width: 50px;
        min-height: 44px;
        font-size: 16px;
        font-weight: 600;
        text-align: center;
        border: 1px solid #dee2e6;
        background-color: #ffffff;
        color: #495057;
        padding: 0.3rem;
        border-radius: 6px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }

    .quantity-input:focus,
    .quantity-input-modal:focus {
        outline: none;
        border-color: #007bff;
        box-shadow: 0 0 0 3px rgba(0,123,255,0.25);
    }

    /* Product card specific adjustments */
    .product-card-small .quantity-control {
        gap: 0.25rem;
        margin: 0.4rem 0;
        justify-content: center;
        display: flex !important;
        align-items: center !important;
    }

    .product-card-small .quantity-btn {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important;
        font-size: 14px !important;
        border-radius: 5px !important;
        border: 1px solid #dee2e6 !important;
        background-color: #ffffff !important;
        color: #495057 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-weight: 600 !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
        transition: all 0.2s ease !important;
        cursor: pointer !important;
        pointer-events: auto !important;
        position: relative !important;
        z-index: 10 !important;
    }

    .product-card-small .quantity-input {
        width: 48px !important;
        height: 36px !important;
        min-width: 48px !important;
        min-height: 36px !important;
        font-size: 14px !important;
        border-radius: 5px !important;
        border: 1px solid #dee2e6 !important;
        background-color: #ffffff !important;
        color: #495057 !important;
        text-align: center !important;
        font-weight: 600 !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important;
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    .quantity-btn,
    .quantity-btn-modal,
    .quantity-input,
    .quantity-input-modal {
        font-size: 16px; /* prevent zoom */
        appearance: none;
        -webkit-appearance: none;
        -webkit-tap-highlight-color: transparent;
    }
}

.product-card-small .price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    position: absolute;
    top: 95%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0;
    line-height: 1;
    order: 2;
}

@media (max-width: 768px) {
    .product-card-small .price {
        font-size: 1rem;
    }
}