:root {
    --primary-color: #1b5e20;
    --primary-color-light: #43a047;
    --primary-color-dark: #1b5e20;
    --primary-color-rgb: 27, 94, 32;
    --secondary-color: #2e7d32;
    --success-color: #43a047;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f1f8e9;
    --dark-color: #1b5e20;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navbar */
.navbar {
    z-index: 1030;
}

.navbar-brand {
    font-size: 1.5rem;
}

.nav-link {
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* ===================================
   HERO SECTION
=================================== */
.hero-section {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #3b82f6 100%);
    position: relative;
    min-height: 500px;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(30, 64, 175, 0.3) 0%, transparent 50%);
    z-index: 1;
}

.min-vh-50 {
    min-height: 50vh;
}

/* Hero Content Animations */
.hero-content {
    animation: fadeInUp 1s ease-out;
}

.hero-title {
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-subtitle {
    animation: fadeInUp 1s ease-out 0.4s both;
    opacity: 0.95;
}

.hero-btn {
    animation: fadeInUp 1s ease-out 0.6s both;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Floating Background Icons */
.hero-bg-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.floating-icon {
    position: absolute;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

.floating-icon:nth-child(1) {
    animation-delay: 0s;
    animation-duration: 7s;
}

.floating-icon:nth-child(2) {
    animation-delay: 1s;
    animation-duration: 8s;
}

.floating-icon:nth-child(3) {
    animation-delay: 0.5s;
    animation-duration: 6s;
}

.floating-icon:nth-child(4) {
    animation-delay: 2s;
    animation-duration: 9s;
}

.floating-icon:nth-child(5) {
    animation-delay: 1.5s;
    animation-duration: 7.5s;
}

.floating-icon:nth-child(6) {
    animation-delay: 0.8s;
    animation-duration: 8.5s;
}

.floating-icon:nth-child(7) {
    animation-delay: 2.5s;
    animation-duration: 7s;
}

.floating-icon:nth-child(8) {
    animation-delay: 1.2s;
    animation-duration: 6.5s;
}

/* Shopping Cart Animation */
.hero-image-wrapper {
    position: relative;
    animation: fadeIn 1.5s ease-out;
}

.shopping-cart-animation {
    position: relative;
    display: inline-block;
    color: rgba(255, 255, 255, 0.3);
    animation: pulse 3s ease-in-out infinite;
}

.cart-items {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-cart-item {
    position: absolute;
    font-size: 2rem;
    color: rgba(255, 255, 255, 0.5);
    animation: cartItemFloat 4s ease-in-out infinite;
}

.hero-cart-item-1 {
    top: -20%;
    left: -10%;
    animation-delay: 0s;
}

.hero-cart-item-2 {
    top: -15%;
    right: -10%;
    animation-delay: 1.3s;
}

.hero-cart-item-3 {
    top: -25%;
    left: 40%;
    animation-delay: 2.6s;
}

/* Keyframe Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(5deg);
    }
    50% {
        transform: translateY(-10px) rotate(-5deg);
    }
    75% {
        transform: translateY(-15px) rotate(3deg);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes cartItemFloat {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0);
    }
    20% {
        opacity: 1;
        transform: translateY(-50px) scale(1);
    }
    80% {
        opacity: 1;
        transform: translateY(-100px) scale(0.8);
    }
    100% {
        opacity: 0;
        transform: translateY(-120px) scale(0.5);
    }
}

/* Responsive Hero Section */
@media (max-width: 991.98px) {
    .hero-section {
        min-height: 400px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .shopping-cart-animation {
        margin-top: 2rem;
    }
    
    .shopping-cart-animation i {
        font-size: 5rem !important;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        min-height: 350px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .floating-icon {
        font-size: 1.5rem;
    }
    
    .shopping-cart-animation i {
        font-size: 4rem !important;
    }
    
    .cart-item {
        font-size: 1.5rem;
    }
}

/* Product Card */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: none;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1) !important;
}

.product-image {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.card-img-top {
    border-radius: 0.375rem 0.375rem 0 0;
}

/* Buttons */
.btn {
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn:active {
    transform: translateY(0);
}

/* Forms */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
}

/* Loading Spinner */
.spinner-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Alert Animations */
.alert {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cart Items */
.cart-item {
    transition: background-color 0.3s ease;
    position: relative !important; /* Override any conflicting absolute positioning */
}

.cart-item:hover {
    background-color: var(--light-color);
}

.cart-item .col-md-4 h6 {
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.cart-item .col-md-4 h6 a {
    color: var(--dark-color) !important;
    font-weight: 600;
}

.cart-item .col-md-4 h6 a:hover {
    color: var(--primary-color) !important;
}

/* Footer */
footer {
    margin-top: auto;
}

footer a:hover {
    color: var(--primary-color) !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .product-image {
        height: 180px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
}

/* Touch-friendly buttons for mobile */
@media (max-width: 576px) {
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 1rem;
    }
    
    .btn-sm {
        padding: 0.5rem 1rem;
        font-size: 0.95rem;
    }
}

/* Product Detail Page */
.product-gallery {
    display: flex;
    flex-direction: column;
}

.main-image {
    width: 100%;
    height: 400px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 15px;
}

.thumbnail-images {
    display: flex;
    gap: 10px;
    overflow-x: auto;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: var(--primary-color);
}

/* Rating Stars */
.rating-stars {
    color: #ffc107;
}

.rating-stars i {
    font-size: 1.2rem;
}

/* Order Status */
.order-status {
    position: relative;
    padding: 20px 0;
}

.status-step {
    text-align: center;
    position: relative;
}

.status-step::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #e0e0e0;
    z-index: -1;
}

.status-step:last-child::before {
    display: none;
}

.status-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.status-step.completed .status-icon {
    background: var(--success-color);
    color: white;
}

.status-step.active .status-icon {
    background: var(--primary-color);
    color: white;
}

/* Dashboard Cards */
.dashboard-card {
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s ease;
}

.dashboard-card:hover {
    transform: translateX(5px);
}

/* Table Responsive */
.table-responsive {
    border-radius: 0.375rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .no-print {
        display: none !important;
    }
}

/* PWA - App-like experience */
@media (display-mode: standalone) {
    body {
        -webkit-user-select: none;
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
    }
}

/* Loading State */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 4rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

/* Success Animation */
@keyframes successPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.success-icon {
    animation: successPulse 0.6s ease;
}

/* Modern Price Range Slider */
.price-slider-container {
    padding: 0.5rem 0.875rem;
    height: 100%;
}

.price-slider-container.filter-input {
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #fff;
    transition: all 0.3s ease;
}

.price-slider-container.filter-input:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

.price-values {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.25rem;
}

.price-min, .price-max {
    background: linear-gradient(135deg, #1b5e20 0%, #43a047 100%);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 0.875rem;
    font-size: 0.7rem;
    box-shadow: 0 1px 4px rgba(27, 94, 32, 0.25);
    font-weight: 600;
}

.price-separator {
    color: #9ca3af;
    font-weight: 400;
    font-size: 0.75rem;
}

/* Range Slider Wrapper */
.range-slider-wrapper {
    position: relative;
    height: 20px;
    display: flex;
    align-items: center;
}

/* Slider Track */
.range-slider-track {
    position: absolute;
    width: 100%;
    height: 4px;
    background: #e5e7eb;
    border-radius: 10px;
    top: 50%;
    transform: translateY(-50%);
}

/* Slider Fill (Active Range) */
.range-slider-fill {
    position: absolute;
    height: 4px;
    background: #1e40af;
    border-radius: 10px;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.3s ease;
}

/* Range Input Base */
.range-slider-input {
    position: absolute;
    width: 100%;
    height: 4px;
    background: transparent;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
}

.range-slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: white;
    border: 2px solid #1e40af;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.range-slider-input::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: white;
    border: 2px solid #1e40af;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

/* Hover Effects */
.range-slider-input::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 10px rgba(30, 64, 175, 0.4);
    border-color: #1e3a8a;
}

.range-slider-input::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 10px rgba(30, 64, 175, 0.4);
    border-color: #1e3a8a;
}

/* Active State */
.range-slider-input:active::-webkit-slider-thumb {
    transform: scale(1.25);
    box-shadow: 0 0 0 6px rgba(30, 64, 175, 0.15);
}

.range-slider-input:active::-moz-range-thumb {
    transform: scale(1.25);
    box-shadow: 0 0 0 6px rgba(30, 64, 175, 0.15);
}

/* Remove default track styling */
.range-slider-input::-webkit-slider-runnable-track {
    background: transparent;
    border: none;
}

.range-slider-input::-moz-range-track {
    background: transparent;
    border: none;
}

/* Loading State Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.range-slider-input.loading::-webkit-slider-thumb {
    animation: pulse 1s ease-in-out infinite;
}

.range-slider-input.loading::-moz-range-thumb {
    animation: pulse 1s ease-in-out infinite;
}

/* Responsive Adjustments */
@media (max-width: 767px) {
    .price-slider-container {
        padding: 0;
    }
    
    .price-values {
        font-size: 0.75rem;
        margin-bottom: 0.375rem;
    }
    
    .price-min, .price-max {
        padding: 0.2rem 0.5rem;
        font-size: 0.7rem;
    }
    
    .range-slider-wrapper {
        height: 20px;
    }
    
    .range-slider-input::-webkit-slider-thumb {
        width: 16px;
        height: 16px;
    }
    
    .range-slider-input::-moz-range-thumb {
        width: 16px;
        height: 16px;
    }
}

/* Top Filter Bar - Modern Horizontal Design */
.top-filter-bar {
    border: 1px solid #e5e7eb;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.top-filter-bar:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* Search Input with Icon */
.search-input-wrapper {
    position: relative;
}

.search-input-wrapper .form-control {
    padding-left: 2.5rem;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

/* Filter Inputs - Modern Style */
.filter-input {
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
    background: #fff;
}

.filter-input:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

.filter-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(var(--primary-color-rgb), 0.1);
    background: #fff;
}

/* Category Dropdown Styling */
.filter-input option.fw-bold {
    font-weight: 700;
    color: #111827;
    background: #f3f4f6;
}

.filter-input option.ps-4 {
    padding-left: 1.5rem;
    color: #6b7280;
}

/* Active Filter Chips */
.active-filters-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: linear-gradient(135deg, #1b5e20 0%, #43a047 100%);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    animation: slideIn 0.3s ease;
}

.filter-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.filter-chip .remove-filter {
    color: white;
    text-decoration: none;
    font-size: 1.25rem;
    line-height: 1;
    font-weight: 700;
    margin-left: 0.25rem;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.filter-chip .remove-filter:hover {
    opacity: 1;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Form Labels */
.form-label.small {
    font-size: 0.8125rem;
    color: #374151;
    margin-bottom: 0.375rem;
}

/* Products Wrapper - Full Width */
.products-wrapper {
    width: 100%;
}

/* Product Grid - More Spacing */
.products-wrapper .row {
    row-gap: 2rem;
    column-gap: 1.5rem;
}

/* Responsive Filter Bar */
@media (max-width: 991px) {
    .filter-input {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }
    
    .top-filter-bar .col-lg-3,
    .top-filter-bar .col-lg-2 {
        width: 50%;
    }
}

@media (max-width: 767px) {
    .top-filter-bar {
        padding: 1rem !important;
    }
    
    .top-filter-bar .row {
        gap: 0.75rem !important;
    }
    
    .filter-input {
        font-size: 0.875rem;
    }
    
    .form-label.small {
        font-size: 0.75rem;
    }
    
    .filter-chip {
        font-size: 0.8125rem;
        padding: 0.3rem 0.625rem;
    }
}

/* Enhanced Button Styles */
.top-filter-bar .btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    border: none;
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    transition: all 0.3s ease;
}

.top-filter-bar .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(var(--primary-color-rgb), 0.4);
}

.top-filter-bar .btn-outline-danger {
    border: 2px solid #ef4444;
    color: #ef4444;
    font-weight: 600;
    padding: 0.5rem 0.875rem;
    transition: all 0.3s ease;
}

.top-filter-bar .btn-outline-danger:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.05);
}

/* Flipkart-style Filters Sidebar - Keep for legacy but hide */
.filters-sidebar {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

/* Modern Filter Card Styling */
.filter-header-card {
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.filter-card {
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.filter-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.filter-card-header {
    background: #f9fafb;
}

.filter-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Category Items */
.category-item {
    padding: 0.5rem 0;
    transition: all 0.2s ease;
    cursor: pointer;
}

.category-item:hover {
    background: #f3f4f6;
    padding-left: 0.5rem;
    border-radius: 0.375rem;
}

.category-item.parent-category {
    margin-bottom: 0.25rem;
}

.category-item.parent-category label {
    font-size: 0.95rem;
}

.category-item.sub-category {
    padding: 0.4rem 0;
}

.category-item.sub-category label {
    font-size: 0.85rem;
    color: #6b7280;
}

.category-item input[type="radio"]:checked + label {
    color: var(--primary-color);
    font-weight: 600;
}

.category-all {
    font-weight: 600;
    color: #111827;
}

.sub-categories {
    margin-top: 0.5rem;
    padding-left: 0.5rem;
    border-left: 2px solid #e5e7eb;
}

/* Active Filters */
.active-filters .badge {
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

.active-filters .badge a {
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
}

.active-filters .badge a:hover {
    opacity: 0.7;
}

/* Modern Product Cards */
.product-card {
    border: 1px solid #e5e7eb;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card .card-body {
    padding: 0.5rem !important;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--primary-color);
}

.product-image-wrapper {
    height: 150px;
    background: #f9fafb;
    position: relative;
    overflow: hidden;
}

.product-image {
    height: 100%;
    width: 100%;
    object-fit: cover;
    padding: 0;
    transition: transform 0.4s ease;
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

/* Quick View Overlay */
.quick-view-overlay {
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.product-card:hover .quick-view-overlay {
    opacity: 1;
    pointer-events: all;
}

.quick-view-overlay .btn {
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.product-card:hover .quick-view-overlay .btn {
    transform: translateY(0);
}

/* Wishlist Button */
.wishlist-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
    background: white;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    z-index: 10;
}

.product-card:hover .wishlist-btn {
    opacity: 1;
    transform: scale(1);
}

.wishlist-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.wishlist-btn i {
    font-size: 1rem;
}

/* Discount Badge */
.discount-badge {
    font-size: 0.65rem;
    z-index: 5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    padding: 0.2rem 0.4rem !important;
}

.stock-badge {
    font-size: 0.6rem;
    z-index: 5;
    padding: 0.2rem 0.4rem !important;
}

/* Product Info */
.product-category {
    font-size: 0.8125rem;
    margin-bottom: 0.625rem;
}

.product-category .badge {
    font-weight: 500;
    padding: 0.375rem 0.7rem;
    border: 1px solid #e5e7eb;
}

/* Category Badge on Image */
.product-category-badge {
    z-index: 5;
}

.product-category-badge .badge {
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border: 1px solid #e5e7eb;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    font-size: 0.7rem;
}

.product-category-badge .badge:hover {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color);
    transform: scale(1.05);
    transition: all 0.2s ease;
}

.product-category .badge:hover {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color);
}

.product-title {
    font-size: 0.85rem;
    line-height: 1.3;
    min-height: 2.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-title a {
    transition: color 0.2s ease;
}

.product-title a:hover {
    color: var(--primary-color) !important;
}

/* Stock Badge in Title Area */
.product-card .badge.bg-success,
.product-card .badge.bg-danger {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    font-size: 0.6rem;
    padding: 0.2rem 0.35rem;
}

/* ========================================
   NEW PRODUCT CARD DESIGN (Flipkart Style)
   ======================================== */

.product-card-new {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.product-card-new:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
    border-color: #d0d0d0;
}

/* Discount Badge */
.discount-badge-new {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    padding: 4px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 3px;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Product Image */
.product-image-new {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    overflow: hidden;
    position: relative;
}

.product-image-new img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card-new:hover .product-image-new img {
    transform: scale(1.05);
}

/* Product Info Container */
.product-info-new {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

/* Category Badge */
.category-badge-new {
    display: inline-block;
    background: #f0f0f0;
    color: #666;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: capitalize;
    align-self: flex-start;
    transition: all 0.2s ease;
}

.category-badge-new:hover {
    background: linear-gradient(135deg, #15803d 0%, #22c55e 100%);
    color: white;
}

/* Category Badge - Top Right Corner */
.category-badge-new-top {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #f0f0f0;
    color: #666;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: capitalize;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.category-badge-new-top:hover {
    background: linear-gradient(135deg, #15803d 0%, #22c55e 100%);
    color: white;
    transform: scale(1.05);
}

/* Product Title */
.product-title-new {
    font-size: 0.875rem;
    line-height: 1.3;
    margin: 0;
    min-height: 34px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-title-new a {
    color: #212121;
    font-weight: 500;
}

.product-title-new a:hover {
    color: #2874f0;
}

/* Stock Badge */
.stock-badge-new {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.stock-badge-new.in-stock {
    background: #e8f5e9;
    color: #388e3c;
}

.stock-badge-new.out-of-stock {
    background: #ffebee;
    color: #d32f2f;
}

/* Price Section */
.price-section-new {
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

.current-price-new {
    font-size: 1.25rem;
    font-weight: 700;
    color: #212121;
}

.original-price-new {
    font-size: 0.85rem;
    color: #878787;
    text-decoration: line-through;
}

.savings-new {
    font-size: 0.75rem;
    color: #388e3c;
    font-weight: 600;
}

/* Action Buttons */
.action-buttons-new {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.btn-cart-new,
.btn-view-new {
    flex: 1;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
}

.btn-cart-new {
    background: white;
    color: #15803d;
    border: 1px solid #15803d;
}

.btn-cart-new:hover:not(:disabled) {
    background: linear-gradient(135deg, #15803d 0%, #22c55e 100%);
    color: white;
    border-color: #15803d;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(21, 128, 61, 0.4);
}

.btn-cart-new:disabled {
    background: white;
    color: #cccccc;
    border-color: #cccccc;
    cursor: not-allowed;
}

.btn-view-new {
    background: white;
    color: #1e40af;
    border: 1px solid #1e40af;
}

.btn-view-new:hover {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    border-color: #1e40af;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(30, 64, 175, 0.4);
}

/* Force 4 columns on desktop */
@media (min-width: 992px) {
    .products-grid > [class*="col-"] {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .product-image-new {
        height: 200px;
    }
}

@media (max-width: 767px) {
    .product-image-new {
        height: 220px;
    }
    
    .current-price-new {
        font-size: 1.1rem;
    }
}

/* ========================================
   END NEW PRODUCT CARD DESIGN
   ======================================== */

/* Force 4-per-row on desktop for products grid */
@media (min-width: 992px) {
  .products-grid > [class*="col-"] {
    flex: 0 0 25% !important;
    max-width: 25% !important;
  }
}/* Product Rating */
.product-rating {
    font-size: 0.9rem;
    margin-bottom: 0.875rem;
    display: none; /* Hidden to reduce card height */
}

.rating-stars {
    letter-spacing: 1px;
}

/* Product Price */
.product-price-section {
    border-top: 1px solid #f3f4f6;
    padding-top: 0.4rem;
    margin-top: auto;
    margin-bottom: 0.4rem;
}

.product-price {
    color: #111827;
    font-size: 1.1rem;
    font-weight: 700;
}

.original-price {
    font-size: 0.75rem;
}

/* Add to Cart Button */
.add-to-cart-btn {
    font-weight: 600;
    padding: 0.35rem 0.5rem;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.7rem;
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    flex: 1;
}

.add-to-cart-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-color-rgb), 0.3);
}

.add-to-cart-btn:active:not(:disabled) {
    transform: translateY(0);
}

.add-to-cart-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* View Details Button */
.view-details-btn {
    font-weight: 600;
    padding: 0.35rem 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.7rem;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.view-details-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.view-details-btn:active {
    transform: translateY(0);
}

/* Pagination */
.pagination .page-link {
    color: #374151;
    border: 1px solid #e5e7eb;
    margin: 0;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.pagination .page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Responsive */
@media (max-width: 991px) {
    .filters-sidebar {
        position: static;
        max-height: none;
    }
    
    .product-image-wrapper {
        height: 220px;
    }
}

@media (max-width: 767px) {
    .product-image-wrapper {
        height: 200px;
    }
    
    .product-card:hover {
        transform: translateY(-4px);
    }
    
    .quick-view-overlay {
        display: none;
    }
}

/* Scrollbar Styling for Filters */
.filters-sidebar::-webkit-scrollbar {
    width: 6px;
}

.filters-sidebar::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 10px;
}

.filters-sidebar::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 10px;
}

.filters-sidebar::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Input Focus States */
.filter-card input[type="number"]:focus,
.filter-card input[type="text"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb), 0.1);
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeInUp 0.5s ease forwards;
}

.product-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4) { animation-delay: 0.2s; }

/* Mobile Filter Toggle */
.btn-filter-toggle {
    background: #fff;
    border: 1px solid #e0e0e0;
    color: #212121;
    font-weight: 500;
}

/* ========================================
   PRODUCTS PAGE - LEFT SIDEBAR FILTERS
   ======================================== */

/* Filter Sidebar Container */
.products-filter-sidebar {
    position: sticky;
    top: 80px;
    border: none;
    overflow: hidden;
    border-radius: 12px;
}

.products-filter-sidebar .card-header {
    background: #ffffff;
    border: none;
    padding: 1.25rem;
    border-bottom: 2px solid #e5e7eb;
}

.products-filter-sidebar .card-header h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: #1f2937;
}

.products-filter-sidebar .card-header h5 i {
    color: #1b5e20;
    margin-right: 8px;
}

/* Reset Filters Button in Header */
.reset-filters-btn {
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.reset-filters-btn.btn-secondary {
    background-color: #e5e7eb;
    border-color: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
}

.reset-filters-btn.btn-primary {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    border: none;
    color: white;
}

.reset-filters-btn.btn-primary:hover {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.4);
}

.products-filter-sidebar .card-body {
    padding: 1.5rem;
}

/* Filter Sections */
.filter-section {
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.filter-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.filter-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
}

.filter-label i {
    margin-right: 6px;
    color: #1b5e20;
    font-size: 0.85rem;
}

/* Form Controls in Sidebar */
.products-filter-sidebar .form-control,
.products-filter-sidebar .form-select {
    border-radius: 8px;
    border: 1px solid #d1d5db;
    padding: 0.625rem 0.875rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.products-filter-sidebar .form-control:focus,
.products-filter-sidebar .form-select:focus {
    border-color: #1b5e20;
    box-shadow: 0 0 0 3px rgba(27, 94, 32, 0.1);
    outline: none;
}

.products-filter-sidebar .form-control:hover,
.products-filter-sidebar .form-select:hover {
    border-color: #9ca3af;
}

/* Select dropdown options styling */
.products-filter-sidebar .form-select option {
    padding: 8px;
    background: white;
    color: #374151;
}

.products-filter-sidebar .form-select option:checked {
    background: white !important;
    color: #1e40af !important;
    font-weight: 600;
}

.products-filter-sidebar .form-select option:hover {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%) !important;
    color: white !important;
}

/* Price Slider in Sidebar */
.products-filter-sidebar .price-values {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.products-filter-sidebar .price-badge {
    background: #f3f4f6;
    color: #374151;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
}

.products-filter-sidebar .price-separator {
    color: #9ca3af;
    font-weight: 500;
}

/* Buttons */
.products-filter-sidebar .btn-primary {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    border: none;
    padding: 0.75rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.products-filter-sidebar .btn-primary:hover {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.4);
}

.products-filter-sidebar .btn-outline-secondary {
    border: 2px solid #d1d5db;
    color: #6b7280;
    padding: 0.75rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.products-filter-sidebar .btn-outline-secondary:hover {
    background: #f1f8e9;
    border-color: #1b5e20;
    color: #1b5e20;
    transform: translateY(-2px);
}

/* Active Filters Card */
.active-filters-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #dbeafe;
    color: #1e40af;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    background: #bfdbfe;
}

.filter-chip .remove-filter {
    color: #2563eb;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    margin-left: 0.5rem;
    transition: all 0.2s ease;
}

.filter-chip .remove-filter:hover {
    color: #1e40af;
    transform: scale(1.2);
}

/* Mobile Filter Toggle */
.products-filter-sidebar + .collapse.d-md-block {
    display: block !important;
}

@media (max-width: 767.98px) {
    .products-filter-sidebar {
        position: relative;
        top: 0;
    }
    
    #filterSidebar {
        margin-bottom: 1rem;
    }
    
    .products-filter-sidebar .card-body {
        padding: 1rem;
    }
    
    .filter-section {
        margin-bottom: 1rem;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .products-filter-sidebar {
        font-size: 0.9rem;
    }
    
    .products-filter-sidebar .card-body {
        padding: 1.25rem;
    }
}

/* Gradient Background */
.bg-gradient-primary {
    background: linear-gradient(135deg, #1b5e20 0%, #43a047 100%) !important;
}

/* ===================================
   CATEGORY CAROUSEL SECTION
=================================== */

.category-section-header h2 {
    font-size: 2.5rem;
    color: #1e293b;
    position: relative;
    display: inline-block;
}

.category-section-header p {
    text-align: left;
}

.category-carousel-wrapper {
    padding: 20px 60px;
    position: relative;
}

.category-carousel {
    overflow: hidden;
    position: relative;
}

.category-carousel-track {
    display: flex;
    gap: 24px;
    transition: transform 0.5s ease-in-out;
    padding: 10px 0;
}

.category-card-item {
    flex: 0 0 calc(16.666% - 20px);
    min-width: 180px;
    max-width: 220px;
}

/* Category Card */
.category-card {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    height: 100%;
}

.category-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 12px 30px rgba(27, 94, 32, 0.25);
}

.category-image-wrapper {
    position: relative;
    width: 100%;
    height: 140px;
    overflow: hidden;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}

.category-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.category-card:hover .category-image {
    transform: scale(1.15);
}

.category-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #66bb6a;
    text-align: center;
}

.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(27, 94, 32, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-overlay i {
    color: white;
    font-size: 2rem;
    transform: translateX(-20px);
    transition: transform 0.3s ease;
    display: none;
}

.category-card:hover .category-overlay {
    opacity: 1;
}

.category-card:hover .category-overlay i {
    transform: translateX(0);
}

.category-info {
    padding: 20px 15px;
    text-align: center;
    background: linear-gradient(to bottom, #fff 0%, #f1f8e9 100%);
}

.category-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.category-card:hover .category-name {
    color: #1b5e20;
}

.category-explore {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    display: none;
}

/* Navigation Buttons */
.category-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #1e40af;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-nav-btn:hover {
    transform: translateY(-50%) scale(1.2);
    color: #1e3a8a;
}

.category-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.category-nav-prev {
    left: 0;
}

.category-nav-next {
    right: 0;
}

.category-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.category-nav-btn:disabled:hover {
    transform: translateY(-50%);
}

/* Progress Indicators */
.category-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.category-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cbd5e1;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.category-indicator:hover {
    background: #94a3b8;
}

.category-indicator.active {
    width: 40px;
    border-radius: 6px;
    background: linear-gradient(90deg, #1e40af, #3b82f6);
}

/* Responsive Design */
@media (max-width: 1400px) {
    .category-card-item {
        flex: 0 0 calc(20% - 20px);
    }
}

@media (max-width: 1200px) {
    .category-card-item {
        flex: 0 0 calc(25% - 20px);
    }
    
    .category-section-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 992px) {
    .category-card-item {
        flex: 0 0 calc(33.333% - 20px);
    }
    
    .category-carousel-wrapper {
        padding: 20px 50px;
    }
    
    .category-nav-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .category-card-item {
        flex: 0 0 calc(50% - 15px);
        min-width: 140px;
    }
    
    .category-carousel-wrapper {
        padding: 15px 40px;
    }
    
    .category-carousel-track {
        gap: 15px;
    }
    
    .category-section-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }
    
    .category-section-header h2 {
        font-size: 1.75rem;
    }
    
    .category-image-wrapper {
        height: 120px;
    }
    
    .category-nav-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .category-card-item {
        flex: 0 0 calc(50% - 15px);
        min-width: 140px;
        max-width: none;
    }
    
    .category-carousel-wrapper {
        padding: 10px 40px;
    }
    
    .category-carousel-track {
        gap: 12px;
    }
    
    .category-section-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }
    
    .category-section-header h2 {
        font-size: 1.5rem;
    }
    
    .category-info {
        padding: 12px 8px;
    }
    
    .category-name {
        font-size: 0.85rem;
    }
    
    .category-explore {
        font-size: 0.75rem;
    }
    
    .category-image-wrapper {
        height: 100px;
    }
    
    .category-card {
        border-radius: 10px;
    }
    
    .category-nav-btn {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}

@media (max-width: 400px) {
    .category-card-item {
        flex: 0 0 calc(50% - 10px);
        min-width: 120px;
    }
    
    .category-carousel-wrapper {
        padding: 10px 35px;
    }
    
    .category-carousel-track {
        gap: 10px;
    }
    
    .category-image-wrapper {
        height: 85px;
    }
    
    .category-info {
        padding: 10px 6px;
    }
    
    .category-name {
        font-size: 0.8rem;
    }
    
    .category-explore {
        font-size: 0.7rem;
    }
    
    .category-nav-btn {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }
}

/* ===================================
   ENHANCED MOBILE RESPONSIVENESS
   For All Screen Sizes
=================================== */

/* Extra Small Devices (320px - 375px) - Small phones */
@media (max-width: 375px) {
    /* Global Resets */
    body {
        font-size: 14px;
    }
    
    .container,
    .container-fluid {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    
    /* Navbar */
    .navbar {
        padding: 0.5rem 0.5rem;
    }
    
    .navbar-brand {
        font-size: 1rem !important;
    }
    
    .navbar-brand img {
        height: 28px !important;
        max-width: 100px;
    }
    
    .navbar-toggler {
        padding: 0.25rem 0.5rem;
        font-size: 1rem;
    }
    
    .navbar-nav .nav-link {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }
    
    .nav-item .badge {
        font-size: 0.6rem;
        padding: 2px 4px;
    }
    
    /* Typography */
    h1 { font-size: 1.4rem !important; }
    h2 { font-size: 1.25rem !important; }
    h3 { font-size: 1.1rem !important; }
    h4 { font-size: 1rem !important; }
    h5 { font-size: 0.9rem !important; }
    h6 { font-size: 0.85rem !important; }
    
    /* Buttons */
    .btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.85rem;
    }
    
    .btn-lg {
        padding: 0.625rem 1rem;
        font-size: 0.95rem;
    }
    
    .btn-sm {
        padding: 0.35rem 0.625rem;
        font-size: 0.75rem;
    }
    
    /* Cards */
    .card {
        border-radius: 10px;
    }
    
    .card-body {
        padding: 0.875rem;
    }
    
    .card-title {
        font-size: 0.95rem;
    }
    
    /* Product Cards */
    .product-card {
        margin-bottom: 0.75rem;
    }
    
    .product-image {
        height: 140px;
    }
    
    .product-card .card-title {
        font-size: 0.85rem;
        line-height: 1.3;
        max-height: 2.6em;
        overflow: hidden;
    }
    
    .product-card .price {
        font-size: 1rem;
    }
    
    /* Footer */
    footer {
        padding: 1.5rem 0 !important;
        text-align: center;
    }
    
    footer .row > div {
        margin-bottom: 1.5rem;
    }
    
    footer h5 {
        font-size: 1rem;
    }
    
    footer ul li {
        font-size: 0.85rem;
    }
    
    /* Forms */
    .form-control {
        font-size: 0.9rem;
        padding: 0.5rem 0.75rem;
    }
    
    .form-label {
        font-size: 0.85rem;
    }
    
    /* Modals */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-content {
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 0.875rem 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 0.75rem 1rem;
    }
    
    /* Tables */
    .table th,
    .table td {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
    
    /* Breadcrumb */
    .breadcrumb {
        font-size: 0.75rem;
    }
    
    .breadcrumb-item + .breadcrumb-item::before {
        font-size: 0.7rem;
    }
}

/* Small Devices (376px - 575px) - Regular phones */
@media (min-width: 376px) and (max-width: 575.98px) {
    body {
        font-size: 15px;
    }
    
    .container,
    .container-fluid {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    
    /* Navbar */
    .navbar-brand {
        font-size: 1.1rem !important;
    }
    
    .navbar-brand img {
        height: 32px !important;
        max-width: 120px;
    }
    
    /* Typography */
    h1 { font-size: 1.6rem !important; }
    h2 { font-size: 1.4rem !important; }
    h3 { font-size: 1.2rem !important; }
    h4 { font-size: 1.05rem !important; }
    
    /* Buttons */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Product Cards */
    .product-image {
        height: 160px;
    }
    
    .product-card .card-title {
        font-size: 0.9rem;
    }
    
    /* Cards */
    .card-body {
        padding: 1rem;
    }
}

/* Medium Devices (576px - 767px) - Phablets & Small Tablets */
@media (min-width: 576px) and (max-width: 767.98px) {
    body {
        font-size: 15px;
    }
    
    /* Navbar */
    .navbar-brand img {
        height: 35px !important;
    }
    
    /* Typography */
    h1 { font-size: 1.75rem !important; }
    h2 { font-size: 1.5rem !important; }
    h3 { font-size: 1.3rem !important; }
    
    /* Product Grid */
    .product-image {
        height: 180px;
    }
    
    /* 2-column grid for products */
    .products-grid .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Tablets (768px - 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    /* Typography */
    h1 { font-size: 2rem !important; }
    h2 { font-size: 1.75rem !important; }
    
    /* Product Grid */
    .product-image {
        height: 200px;
    }
    
    /* Sidebar adjustments */
    .sidebar {
        margin-bottom: 2rem;
    }
}

/* Generic Mobile Fixes */
@media (max-width: 767.98px) {
    /* Hide desktop-only elements */
    .d-desktop-only {
        display: none !important;
    }
    
    /* Full-width buttons on mobile */
    .btn-mobile-full {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Stack columns on mobile */
    .row-mobile-stack > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    /* Horizontal scroll containers */
    .mobile-scroll-x {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .mobile-scroll-x::-webkit-scrollbar {
        display: none;
    }
    
    /* Sticky footer nav */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        z-index: 1000;
        padding: 0.5rem 0;
    }
    
    /* Add padding to body when bottom nav exists */
    body.has-bottom-nav {
        padding-bottom: 70px;
    }
    
    /* Dropdown fixes */
    .dropdown-menu {
        position: static !important;
        float: none;
        width: 100%;
        margin-top: 0.5rem;
        transform: none !important;
    }
    
    /* Table responsive */
    .table-responsive {
        font-size: 0.85rem;
    }
    
    /* Alert styles */
    .alert {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }
    
    /* Pagination */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination .page-link {
        padding: 0.4rem 0.65rem;
        font-size: 0.85rem;
    }
    
    /* Search Form */
    .search-form {
        width: 100%;
    }
    
    .search-form .form-control {
        font-size: 16px; /* Prevents iOS zoom */
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch target sizes */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .form-control,
    .form-select {
        min-height: 44px;
    }
    
    /* Remove hover effects */
    .product-card:hover {
        transform: none;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }
    
    .btn:hover {
        transform: none;
    }
    
    /* Add active states */
    .btn:active {
        transform: scale(0.98);
    }
    
    .product-card:active {
        transform: scale(0.98);
    }
}

/* Landscape Mode for Phones */
@media (max-width: 767.98px) and (orientation: landscape) {
    /* Reduce vertical spacing */
    .py-5 {
        padding-top: 1.5rem !important;
        padding-bottom: 1.5rem !important;
    }
    
    .my-5 {
        margin-top: 1.5rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    /* Adjust navbar */
    .navbar {
        padding-top: 0.25rem;
        padding-bottom: 0.25rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    /* This is placeholder for future dark mode implementation */
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .product-card,
    .btn,
    .nav-link {
        transition: none !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn {
        border-width: 2px;
    }
    
    .card {
        border-width: 2px;
    }
    
    .form-control {
        border-width: 2px;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .sidebar,
    .mobile-bottom-nav {
        display: none !important;
    }
    
    .container {
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}

/* Safe Area Insets for Notched Phones */
@supports (padding: max(0px)) {
    .navbar {
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
    }
    
    .mobile-bottom-nav {
        padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }
    
    footer {
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
    }
}



