/* ========================================
   PLANT SHOP - MAIN STYLESHEET
   CACHE BUST: 2025-01-27-001
   ======================================== */

/* CSS Variables */
:root {
    --green: #2e7d32;
    --green-dark: #1b5e20;
    --green-light: #4caf50;
    --dark: #1b1b1b;
    --light: #f7f7f7;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #eeeeee;
    --gray-300: #e0e0e0;
    --gray-400: #bdbdbd;
    --gray-500: #9e9e9e;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-800: #424242;
    --gray-900: #212121;
    --red: #dc3545;
    --blue: #2196f3;
    --orange: #ff9800;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 8px;
    --radius-lg: 12px;
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    color: var(--gray-900);
    line-height: 1.6;
    font-size: 16px;
    min-height: 100vh;
    display: block !important;
    visibility: visible !important;
}

/* Critical styles for immediate rendering */
.loading { 
    opacity: 1; 
    transition: opacity 0.3s ease; 
}
.loaded { 
    opacity: 1; 
}
.admin-layout { 
    display: flex !important; 
}
.admin-sidebar { 
    display: block !important; 
}
.admin-main { 
    display: block !important; 
}
.card { 
    display: block !important; 
    background: white; 
    padding: 1rem; 
    margin: 1rem 0; 
    border: 1px solid #e5e7eb; 
}
.btn { 
    display: inline-block; 
    padding: 0.5rem 1rem; 
    background: #3b82f6; 
    color: white; 
    text-decoration: none; 
    border-radius: 0.25rem; 
}
.table { 
    width: 100%; 
    border-collapse: collapse; 
}
.table th, .table td { 
    padding: 0.5rem; 
    border: 1px solid #e5e7eb; 
    text-align: left; 
}

/* Lazy loading styles */
.lazy-load { 
    opacity: 0.7; 
    transition: opacity 0.3s ease; 
    background: #f5f5f5; 
}
.lazy-load.loaded { 
    opacity: 1; 
}
img { 
    max-width: 100%; 
    height: auto; 
}

/* Header */
header {
    position: sticky;
    top: 0;
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    z-index: 100;
    backdrop-filter: blur(10px);
}

.container {
    max-width: 90%;
    margin: 0;
    padding: 0;
    background: #fff;
    min-height: calc(100vh - 140px);
    padding-bottom: 0;
    margin-bottom: 0;
}

/* Mobile container - 100% width */
@media (max-width: 768px) {
    .container {
        max-width: 100%;
        padding: 0;
    }
}

/* Responsive content alignment */
.content-container {
    text-align: left;
}

.content-container h1,
.content-container h2,
.content-container h3,
.content-container h4,
.content-container h5,
.content-container h6 {
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Product grid responsive */
.product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin: 0;
    width: 100%;
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

.product-name {
    margin: 0.1rem 0 !important;
    font-size: 0.9rem;
    text-align: center;
}

.product-content {
    padding: 0.5rem;
}

/* Global Image Styles - Equal Height and Width */
.product-image {
    width: 100% !important;
    height: 250px !important;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
    margin: 0 auto; /* Center the image container */
}

.product-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 8px;
}

.image-placeholder {
    font-size: 1.2rem;
    color: #666;
    text-align: center;
}

/* Product page specific images */
.main-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    border-radius: 8px;
    display: block;
    margin: 0 auto; /* Center the main image */
}

.thumb {
    width: 70px !important;
    height: 70px !important;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
}

/* Cart page images */
.cart-item {
    width: 100px !important;
    height: 100px !important;
    object-fit: cover;
    border-radius: 8px;
}

/* Checkout page images */
.checkout-item {
    width: 90px !important;
    height: 90px !important;
    object-fit: cover;
    border-radius: 8px;
}

/* Global Breadcrumb Styles */
.breadcrumb-nav {
    background: #f9fafb;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.breadcrumb-container a:hover {
    color: #047857 !important;
    text-decoration: underline !important;
}

.breadcrumb-container a:active {
    color: #065f46 !important;
}

/* Mobile breadcrumb styles */
@media (max-width: 768px) {
    .breadcrumb-nav {
        padding: 0.75rem 0;
        margin-bottom: 1rem;
    }
    
    .breadcrumb-container {
        font-size: 0.8rem !important;
        flex-wrap: wrap;
        gap: 0.25rem !important;
    }
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    min-height: 60px;
}

.brand {
    font-weight: 700;
    color: var(--green);
    font-size: 1.5rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Logo styles - only when logo exists */
.brand-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    transition: transform 0.2s ease;
}

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

/* Text styles - only when logo doesn't exist */
.brand h1 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--green);
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--green);
}

/* Cart Icon Styles */
.cart-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--gray-600);
    font-weight: 500;
}

.cart-link:hover {
    color: var(--green);
}

.cart-icon {
    font-size: 1.2rem;
}

.cart-count {
    background: var(--green);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 20px;
}

.cart-count:empty {
    display: none;
}

/* Cart Sidebar Styles */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.cart-sidebar.open {
    right: 0;
}

.cart-sidebar.open ~ .cart-toggle {
    display: none;
}

.cart-sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.cart-sidebar-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
}

.cart-sidebar-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0.25rem;
}

.cart-sidebar-close:hover {
    color: #374151;
}

.cart-sidebar-content {
    padding: 1rem;
}

.cart-sidebar-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.cart-sidebar-item:last-child {
    border-bottom: none;
}

.cart-sidebar-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.cart-sidebar-item-details {
    flex: 1;
}

.cart-sidebar-item-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

.cart-sidebar-item-price {
    font-size: 0.75rem;
    color: #6b7280;
}

.cart-sidebar-item-qty {
    font-size: 0.75rem;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-sidebar-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.cart-sidebar-qty-btn {
    width: 24px;
    height: 24px;
    border: 1px solid #d1d5db;
    background: white;
    color: #374151;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.2s ease;
}

.cart-sidebar-qty-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.cart-sidebar-qty-input {
    width: 40px;
    height: 24px;
    text-align: center;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 12px;
}

.cart-sidebar-remove-btn {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cart-sidebar-remove-btn:hover {
    background: #dc2626;
}

/* Cart Sidebar Progress Bar */
.cart-sidebar-progress {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    background: #f8f9fa;
}

.cart-progress-content {
    text-align: center;
}

.cart-progress-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #059669;
    margin-bottom: 0.75rem;
}

.cart-progress-message {
    font-size: 0.75rem;
    color: #374151;
    margin-bottom: 0.75rem;
    min-height: 1.25rem;
}

.cart-progress-bar {
    width: 100%;
    height: 0.5rem;
    background: #e5e7eb;
    border-radius: 0.25rem;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.cart-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    border-radius: 0.25rem;
    transition: width 0.5s ease;
    width: 0%;
}

.cart-progress-milestones {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.cart-progress-milestone {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.cart-progress-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: #d1d5db;
    margin-bottom: 0.25rem;
    transition: background 0.3s ease;
}

.cart-progress-dot.achieved {
    background: #10b981;
}

.cart-progress-label {
    font-size: 0.625rem;
    font-weight: 500;
    color: #6b7280;
    text-align: center;
    margin-bottom: 0.125rem;
}

.cart-progress-milestone.achieved .cart-progress-label {
    color: #059669;
    font-weight: 600;
}

.cart-progress-amount {
    font-size: 0.625rem;
    color: #9ca3af;
}

.cart-progress-status {
    padding: 0.5rem;
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    color: #065f46;
    font-weight: 500;
}

.cart-sidebar-footer {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    background: #f8f9fa;
}

.cart-sidebar-total {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
}

.cart-sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cart-sidebar-btn {
    padding: 0.75rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cart-sidebar-btn-primary {
    background: #10b981;
    color: white;
}

.cart-sidebar-btn-primary:hover {
    background: #059669;
}

.cart-sidebar-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.cart-sidebar-btn-secondary:hover {
    background: #e5e7eb;
}

.cart-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-sidebar-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Cart Toggle Button */
.cart-toggle {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: #10b981;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    z-index: 1001;
    transition: all 0.3s ease;
}

.cart-toggle:hover {
    background: #059669;
    transform: translateY(-50%) scale(1.1);
}

.cart-toggle-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.cart-toggle-count:empty {
    display: none;
}

@media (max-width: 768px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    .cart-toggle {
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    cursor: pointer;
}

.dropdown-toggle:hover {
    color: var(--green);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    min-width: 300px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--gray-700);
    text-decoration: none;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid var(--gray-100);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: var(--gray-50);
    color: var(--green);
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-600);
}

/* Grid System */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-1 { grid-template-columns: 1fr; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* Cards */
.card {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card img {
    aspect-ratio: 4/3;
    object-fit: cover;
    width: 100%;
}

.card .body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.card p {
    margin: 0 0 1rem 0;
    color: var(--gray-600);
    flex: 1;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--green);
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    min-height: 44px;
}

.btn:hover {
    background: var(--green-dark);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    min-height: 36px;
}

.btn-lg {
    padding: 1rem 1.5rem;
    font-size: 1rem;
    min-height: 52px;
}

.btn-danger {
    background: var(--red);
}

.btn-danger:hover {
    background: #c82333;
}

.btn-outline {
    background: transparent;
    color: var(--green);
    border: 1px solid var(--green);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    min-height: 44px;
}

.btn-outline:hover {
    background: var(--green);
    color: #fff;
    transform: translateY(-1px);
}

.btn-outline:active {
    transform: translateY(0);
}

/* Price */
.price {
    color: var(--green);
    font-weight: 700;
    font-size: 1.125rem;
}

.old-price {
    color: var(--gray-500);
    text-decoration: line-through;
    margin-left: 0.5rem;
    font-weight: 400;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.1);
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table th,
.table td {
    padding: 0.5rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
}

.table tbody tr:hover {
    background: var(--gray-50);
}

/* Description Lists */
.description-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-width: 640px;
    width: 100%;
}

/* Mobile: full width */
@media (max-width: 768px) {
    .description-list {
        max-width: 100%;
    }
}

.description-list li {
    padding: 0.1rem 0;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.description-label {
    font-weight: 600;
    color: var(--gray-700);
    flex: 0 0 120px;
    min-width: 120px;
}

.description-value {
    color: var(--gray-600);
    flex: 1;
    text-align: left;
}

.description-list li:last-child {
    border-bottom: none;
}

.description-label {
    font-weight: 600;
    color: var(--gray-700);
}

.description-value {
    color: var(--gray-600);
}

/* Rating Bars */
.rating-breakdown {
    flex: 1;
    max-width: 250px;
}

.rating-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.rating-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    width: 20px;
}

.rating-progress {
    flex: 1;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.rating-fill {
    height: 100%;
    background: #fbbf24;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.rating-percentage {
    font-size: 0.875rem;
    color: var(--gray-600);
    width: 30px;
    text-align: right;
}


/* Main container */
main.container {
    flex: 1;
    width: 100%;
    margin: 0 auto;
    padding: 0;
}

@media (min-width: 768px) {
    main.container {
        width: 90%;
    padding: 10px;
    }
.products-grid .product-image,
.home-products-grid .product-image,
.category-products-grid .category-product-image {
    display: block !important;
    position: relative !important;
    height: 300px !important;
    overflow: hidden !important;
    align-items: unset !important;
    justify-content: unset !important;
    flex-direction: unset !important;
    flex-wrap: unset !important;
}
}

/* Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.w-full { width: 100%; }
.w-20 { width: 5rem; }
.w-32 { width: 8rem; }
.h-32 { height: 8rem; }
.h-48 { height: 12rem; }
.h-64 { height: 16rem; }
.flex-1 { flex: 1; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.sticky { position: sticky; }
.top-24 { top: 6rem; }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: 9999px; }
.bg-gray-50 { background-color: var(--gray-50); }
.bg-green-100 { background-color: #dcfce7; }
.bg-red-100 { background-color: #fee2e2; }
.text-green-600 { color: #16a34a; }
.text-red-600 { color: #dc2626; }
.text-red-800 { color: #991b1b; }
.text-gray-500 { color: var(--gray-500); }
.text-gray-600 { color: var(--gray-600); }
.text-gray-700 { color: var(--gray-700); }
.text-blue-600 { color: #2563eb; }
.text-orange-600 { color: #ea580c; }
.text-purple-600 { color: #9333ea; }
.text-yellow-800 { color: #a16207; }
.bg-yellow-100 { background-color: #fef3c7; }
.border-green-400 { border-color: #4ade80; }
.overflow-x-auto { overflow-x: auto; }
.font-mono { font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.ml-2 { margin-left: 0.5rem; }
.leading-relaxed { line-height: 1.625; }
.aspect-square { aspect-ratio: 1/1; }
.object-cover { object-fit: cover; }
.disabled { opacity: 0.5; cursor: not-allowed; }
.hover\:shadow-lg:hover { box-shadow: var(--shadow-lg); }
.hover\:text-green-700:hover { color: #15803d; }
.transition-all { transition: all 0.3s ease; }
.duration-300 { transition-duration: 300ms; }
.sm\:flex-row { @media (min-width: 640px) { flex-direction: row; } }
.sm\:items-center { @media (min-width: 640px) { align-items: center; } }
.sm\:w-32 { @media (min-width: 640px) { width: 8rem; } }
.sm\:grid-2 { @media (min-width: 640px) { grid-template-columns: repeat(2, 1fr); } }
.md\:grid-2 { @media (min-width: 768px) { grid-template-columns: repeat(2, 1fr); } }
.md\:grid-4 { @media (min-width: 768px) { grid-template-columns: repeat(4, 1fr); } }
.lg\:grid-2 { @media (min-width: 1024px) { grid-template-columns: repeat(2, 1fr); } }
.max-w-4xl { max-width: 56rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.mr-2 { margin-right: 0.5rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.font-semibold { font-weight: 600; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-gray-600 { color: var(--gray-600); }
.text-gray-700 { color: var(--gray-700); }
.bg-gray-50 { background-color: var(--gray-50); }
.border-gray-200 { border-color: var(--gray-200); }
.rounded-lg { border-radius: var(--radius-lg); }
.w-full { width: 100%; }
.h-48 { height: 12rem; }
.object-cover { object-fit: cover; }
.placeholder { color: var(--gray-500); }
.placeholder\:text-gray-500::placeholder { color: var(--gray-500); }
.placeholder\:text-gray-500::-webkit-input-placeholder { color: var(--gray-500); }
.placeholder\:text-gray-500::-moz-placeholder { color: var(--gray-500); }
.placeholder\:text-gray-500:-ms-input-placeholder { color: var(--gray-500); }
.placeholder\:text-gray-500:-moz-placeholder { color: var(--gray-500); }

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 0 1rem;
    }
    .grid-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .nav {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        border-top: 1px solid var(--gray-200);
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        box-shadow: var(--shadow-md);
    }
    
    .nav-links.active {
        display: flex;
    }

    .cart-link {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.75rem 0;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: var(--gray-50);
        margin-top: 0.5rem;
        border-radius: var(--radius);
    }
    
    .dropdown-item {
        padding: 0.5rem 1rem;
        border-bottom: 1px solid var(--gray-200);
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-auto {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Mobile cart sidebar */
@media (max-width: 768px) {
    .cart-sidebar {
        width: 100vw;
        right: -100vw;
    }
    
    .cart-sidebar.open {
        right: 0;
    }
    
    .cart-sidebar-header {
        padding: 1.5rem 1rem;
    }
    
    .cart-sidebar-content {
        padding: 1rem;
    }
    
    .cart-sidebar-footer {
        padding: 1.5rem 1rem;
    }
    
    .cart-sidebar-progress {
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .grid-auto {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        padding: 0 1rem;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .card .body {
        padding: 1rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .brand-logo {
        height: 50px;
    }
    
    .brand h1 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .nav {
        padding: 0.75rem 0;
    }
    
    .brand-logo {
        height: 50px;
    }
    
    .brand h1 {
        font-size: 1.1rem;
    }
    
    .card .body {
        padding: 0.75rem;
    }
    
    .btn {
        padding: 0.625rem 0.875rem;
        font-size: 0.8rem;
    }
}

/* ========================================
   PRODUCT PAGE STYLES
   ======================================== */

/* Modern Product Page Styles */
.product-page {
    background: #f8f9fa;
    min-height: 100vh;
}

.product-container {
    width: 100%;
    padding: 6px;
}

.product-main {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.product-gallery {
    display: grid;
    grid-template-columns: 80px 1fr 1.5fr;
    gap: 0.5rem;
    padding: 6px;
    align-items: start;
    min-height: 400px;
}

.product-images {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image-container {
    width: 400px;
    height: 400px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: zoom-in;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    flex-shrink: 0;
}

.main-image-container.zoomed {
    cursor: zoom-out;
}

.main-image-container.zoomed .main-image {
    transform: scale(2);
    cursor: grab;
}

.main-image-container.zoomed .main-image:active {
    cursor: grabbing;
}

.image-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.3s ease;
    z-index: 10;
}

.image-navigation:hover {
    background: rgba(0, 0, 0, 0.7);
}

.image-navigation.prev {
    left: 10px;
}

.image-navigation.next {
    right: 10px;
}

.image-navigation.hidden {
    display: none;
}

.zoom-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    z-index: 10;
    display: none;
}

.zoom-indicator.show {
    display: block;
}

/* Full Page Zoom Modal */
.zoom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}

.zoom-modal.active {
    display: flex;
}

.zoom-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.zoom-modal-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    cursor: grab;
    user-select: none;
    -webkit-user-drag: none;
}

.zoom-modal-image:active {
    cursor: grabbing;
}

.zoom-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #333;
    transition: all 0.3s ease;
    z-index: 10000;
}

.zoom-modal-close:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.zoom-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #333;
    transition: all 0.3s ease;
    z-index: 10000;
}

.zoom-modal-nav:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
}

.zoom-modal-nav.prev {
    left: 20px;
}

.zoom-modal-nav.next {
    right: 20px;
}

.zoom-modal-nav.hidden {
    display: none;
}

.zoom-modal-info {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 10000;
}

.zoom-modal-zoom-controls {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
    z-index: 10000;
}

.zoom-modal-zoom-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #333;
    transition: all 0.3s ease;
}

.zoom-modal-zoom-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
}

.thumbnail-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    justify-content: flex-start;
}

.thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.thumbnail:hover,
.thumbnail.active {
    border-color: #10b981;
}

.main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
    user-select: none;
    -webkit-user-drag: none;
}

.product-info {
    padding: 0 5px;
    text-align: left;
}

.product-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    text-align: left !important;
}

/* Ensure product names in cards are centered */
.product-card .product-name,
.home-product-card .home-product-name,
.category-product-card .category-product-name {
    text-align: center !important;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    max-width: 250px;
    transition: opacity 0.2s ease;
}

.product-rating:hover {
    opacity: 0.8;
}

.stars {
    color: #fbbf24;
    font-size: 1.2rem;
}

.rating-text {
    color: #6b7280;
    font-size: 0.875rem;
}

.product-pricing {
    margin-bottom: 1.5rem;
}

.price-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.savings-row {
    margin-top: 0.25rem;
}

.current-price {
    font-size: 2rem;
    font-weight: 700;
    color: #10b981;
    margin-right: 0.5rem;
}

.original-price {
    font-size: 14px;
    color: #9ca3af;
    text-decoration: line-through;
    margin-right: 1rem;
}

.savings {
    background: #fef3c7;
    color: #92400e;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 600;
}

.quantity-section {
    margin-bottom: 1.5rem;
}

.quantity-label {
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    display: block;
}

.quantity-and-cart {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    transition: all 0.2s ease;
}

.quantity-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.quantity-input {
    width: 80px;
    height: 40px;
    text-align: center;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
}

.add-to-cart-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-to-cart-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

.stock-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: #10b981;
    font-weight: 600;
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 6px;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.share-dropdown {
    position: relative;
    cursor: pointer;
}

.dropdown-arrow {
    font-size: 0.7rem;
    transition: transform 0.2s ease;
}

.share-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.share-dropdown-menu {
    position: absolute;
    bottom: 100%;
    left: 0;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 50;
    min-width: 220px;
    display: none;
}

.share-dropdown-menu.show {
    display: block !important;
}

.share-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
}

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

.share-option:hover {
    background: #f9fafb;
}

.hidden {
    display: none !important;
}

.product-tabs {
    border-top: 1px solid #e5e7eb;
    margin-top: 2rem;
    width: 100%;
}

.tab-headers {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
}

.tab-header {
    padding: 1rem 2rem;
    background: none;
    border: none;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-header.active {
    color: #10b981;
    border-bottom-color: #10b981;
}

.tab-content {
    padding: 2rem;
    min-height: 400px;
}

.product-description {
    line-height: 1.6;
    color: #374151;
}

.description-section {
    margin-bottom: 2rem;
}

.description-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
    text-align: left !important;
}

.description-content {
    line-height: 1.6;
    color: #374151;
}

.description-content p {
    margin-bottom: 1rem;
}

.description-content p:last-child {
    margin-bottom: 0;
}

.related-products {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin-bottom: 2rem;
    width: 100%;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
    text-align: left !important;
}

/* Ensure all headers are left-aligned */
h1, h2, h3, h4, h5, h6 {
    text-align: left !important;
}

/* Override for product titles to be centered */
.product-name,
.home-product-name,
.category-product-name,
.products-grid .product-name {
    text-align: center !important;
}

/* Container styles */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Text utilities */
.text-center {
    text-align: center !important;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.py-12 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.p-12 {
    padding: 3rem;
}

.text-gray-600 {
    color: #4b5563;
}

.text-gray-500 {
    color: #6b7280;
}

.text-gray-400 {
    color: #9ca3af;
}

.text-6xl {
    font-size: 3.75rem;
    line-height: 1;
}

/* Card styles */
.card {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    padding: 1rem;
    margin: 1rem 0;
    border: 1px solid #e5e7eb;
}

/* Footer styles */
.site-footer {
    background: #374151;
    color: white;
    padding: 2rem 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
}

.footer-section-title {
    color: white;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: left;
    width: 100%;
    display: block;
}

.footer-section .footer-link {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    margin-bottom: 0.5rem;
    width: 100%;
    text-align: left;
    padding: 0;
    margin-left: 0;
    margin-right: 0;
}

.footer-link:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #4b5563;
}

.footer-copyright {
    color: #9ca3af;
    margin: 0;
}

@media (max-width: 768px) {
    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 9px;
    margin: 0;
    width: 100%;
}

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

.product-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    width: 100%;
}

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

.product-card-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.products-grid .product-image {
    position: relative !important;
    height: 300px !important;
    overflow: hidden !important;
    display: block !important;
}

.products-grid .product-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

/* Ensure discount badges work on all product listing pages */
.products-grid .product-image,
.home-products-grid .product-image,
.category-products-grid .category-product-image {
    position: relative !important;
    height: 300px !important;
    overflow: hidden !important;
    display: block !important;
    align-items: unset !important;
    justify-content: unset !important;
    flex-direction: unset !important;
}

/* Specific rule to ensure discount badges are positioned correctly */
.products-grid .product-image .discount-badge,
.home-products-grid .product-image .discount-badge,
.category-products-grid .category-product-image .discount-badge {
    position: absolute !important;
    top: 0.5rem !important;
    right: 0.5rem !important;
    background: #fbbf24 !important;
    color: #92400e !important;
    padding: 0.25rem 0.5rem !important;
    border-radius: 4px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    width: auto !important;
    height: auto !important;
    z-index: 10 !important;
    display: inline-block !important;
    max-width: none !important;
    min-width: auto !important;
    flex: none !important;
    align-self: auto !important;
    justify-self: auto !important;
}

.products-grid .product-image img,
.home-products-grid .product-image img,
.category-products-grid .category-product-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.product-card-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin: 0;
    transition: color 0.3s ease;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: #333;
    transition: color 0.3s ease;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-price {
    text-align: center;
    margin-bottom: 15px;
}

.original-price {
    font-size: 0.8rem;
    color: #999;
    margin-left: 4px;
}

.sale-price {
    font-size: 15px;
    font-weight: 700;
    color: #e74c3c;
}

.regular-price {
    font-size: 15px;
    font-weight: 700;
    color: #e74c3c;
}

.product-actions {
    display: flex;
    margin-top: auto;
}

.btn-primary {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    transition: background 0.3s ease;
    width: auto;
    text-decoration: none;
    display: block;
    text-align: center;
    margin: 0 auto;
}

.btn-primary:hover {
    background: #2980b9;
    color: white;
}

.product-card-rating {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
}

.product-card-stars {
    color: #fbbf24;
    font-size: 0.875rem;
}

.product-card-price {
    text-align: center;
    margin-bottom: 15px;
}

.product-card-current {
    font-size: 1.1rem;
    font-weight: 700;
    color: #10b981;
}

.product-card-original {
    font-size: 0.9rem;
    color: #9ca3af;
    text-decoration: line-through;
}

.product-card-btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    transition: background 0.3s ease;
    width: auto;
    text-decoration: none;
    display: block;
    text-align: center;
    margin: 0 auto;
}

.product-card-btn:hover {
    background: #2980b9;
    color: white;
}

.discount-badge {
    position: absolute !important;
    top: 0.5rem !important;
    right: 0.5rem !important;
    background: #fbbf24 !important;
    color: #92400e !important;
    padding: 0.25rem 0.5rem !important;
    border-radius: 4px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    width: auto !important;
    height: auto !important;
    z-index: 10 !important;
    display: inline-block !important;
    max-width: none !important;
    min-width: auto !important;
    flex: none !important;
    align-self: auto !important;
    justify-self: auto !important;
}

.reviews-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    width: 100%;
}

.reviews-summary {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.overall-rating {
    text-align: center;
}

.rating-number {
    font-size: 3rem;
    font-weight: 700;
    color: #1f2937;
}

.rating-stars {
    color: #fbbf24;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.rating-count {
    color: #6b7280;
    font-size: 0.875rem;
}

.review-item {
    padding: 1rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.review-item:last-child {
    border-bottom: none;
}

.review-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.reviewer-name {
    font-weight: 600;
    color: #1f2937;
}

.review-date {
    color: #6b7280;
    font-size: 0.875rem;
}

.review-stars {
    color: #fbbf24;
}

.review-text {
    color: #374151;
    line-height: 1.6;
}

/* Large Desktop Responsive for Product Page */
@media (min-width: 1400px) {
    .product-gallery {
        grid-template-columns: 80px 0.6fr 2fr;
        gap: 0.5rem;
    }
    
    .main-image-container {
        max-width: 400px;
        height: 400px;
    }
}

/* Tablet Responsive for Product Page */
@media (max-width: 1024px) {
    .product-gallery {
        grid-template-columns: 60px 1fr 1.3fr;
        gap: 0.5rem;
    }
    
    .main-image-container {
        width: 350px;
        height: 350px;
    }
    
    .thumbnail {
        width: 50px;
        height: 50px;
    }
}

/* Mobile Responsive for Product Page */
@media (max-width: 768px) {
    .product-gallery {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        min-height: auto;
    }
    
    .product-rating {
        max-width: 100%;
    }
    
    .thumbnail-list {
        order: 1;
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .main-image-container {
        order: 2;
        width: 300px;
        height: 300px;
        margin: 0 auto;
    }
    
    .product-info {
        order: 3;
        padding: 1rem;
        width: 100%;
    }
    
    .thumbnail {
        width: 60px;
        height: 60px;
        flex-shrink: 0;
    }
    
    .main-image {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    
    .product-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }
    
    .product-rating {
        margin-bottom: 0.5rem;
    }
    
    .product-pricing {
        margin-bottom: 1rem;
    }
    
    .product-actions {
        margin-top: 1rem;
    }
    
    .image-navigation {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .image-navigation.prev {
        left: 5px;
    }
    
    .image-navigation.next {
        right: 5px;
    }
    
    .zoom-indicator {
        font-size: 10px;
        padding: 3px 8px;
    }
    
    .zoom-modal-close {
        width: 40px;
        height: 40px;
        font-size: 20px;
        top: 10px;
        right: 10px;
    }
    
    .zoom-modal-nav {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .zoom-modal-nav.prev {
        left: 10px;
    }
    
    .zoom-modal-nav.next {
        right: 10px;
    }
    
    .zoom-modal-zoom-controls {
        top: 10px;
        left: 10px;
        gap: 5px;
    }
    
    .zoom-modal-zoom-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .zoom-modal-info {
        bottom: 10px;
        font-size: 12px;
        padding: 8px 16px;
    }
    
    .product-title {
        font-size: 1.25rem;
    }
    
    .current-price {
        font-size: 1.5rem;
    }
    
    .quantity-and-cart {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .add-to-cart-btn {
        width: 80%;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 2px;
    }
    
    .reviews-summary {
        flex-direction: column;
        gap: 1rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}

/* Small Mobile Responsive for Product Page */
@media (max-width: 480px) {
    .product-container {
        padding: 0.5rem;
    }
    
.products-grid .product-image img,
.home-products-grid .product-image img,
.category-products-grid .category-product-image img {
    width: 200px !important;
    height: 200px !important;
    object-fit: cover !important;
}

.products-grid .product-image,
.home-products-grid .product-image,
.category-products-grid .category-product-image {
    display: block !important;
    position: relative !important;
    height: 200px !important;
    overflow: hidden !important;
    align-items: unset !important;
    justify-content: unset !important;
    flex-direction: unset !important;
    flex-wrap: unset !important;
}
    .product-gallery {
        gap: 0.75rem;
    }
    
    .main-image-container {
        width: 250px;
        height: 250px;
        margin: 0 auto;
    }
    
    .thumbnail {
        width: 50px;
        height: 50px;
    }
    
    .product-title {
        font-size: 1.25rem;
    }
    
    .product-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .btn-add-cart {
        width: 100%;
    }
    
    .thumbnail-list {
        justify-content: flex-start;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* Print styles */
@media print {
    header, footer {
        display: none;
    }
    .card {
        break-inside: avoid;
    }
}

/* CRITICAL: Override global product-image flex behavior for product listing pages */

/* CRITICAL: Ensure discount badges are absolutely positioned */
.products-grid .product-image .discount-badge,
.home-products-grid .product-image .discount-badge,
.category-products-grid .category-product-image .discount-badge {
    position: absolute !important;
    top: 0.5rem !important;
    right: 0.5rem !important;
    background: #fbbf24 !important;
    color: #92400e !important;
    padding: 0.25rem 0.5rem !important;
    border-radius: 4px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    width: auto !important;
    height: auto !important;
    z-index: 10 !important;
    display: inline-block !important;
    max-width: none !important;
    min-width: auto !important;
    flex: none !important;
    align-self: auto !important;
    justify-self: auto !important;
    order: unset !important;
    flex-grow: unset !important;
    flex-shrink: unset !important;
    flex-basis: unset !important;
}

/* ULTRA SPECIFIC: Force discount badge positioning with maximum specificity */
div.products-grid div.product-image div.discount-badge,
div.home-products-grid div.product-image div.discount-badge,
div.category-products-grid div.category-product-image div.discount-badge {
    position: absolute !important;
    top: 0.5rem !important;
    right: 0.5rem !important;
    background: #fbbf24 !important;
    color: #92400e !important;
    padding: 0.25rem 0.5rem !important;
    border-radius: 4px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    width: auto !important;
    height: auto !important;
    z-index: 10 !important;
    display: inline-block !important;
    max-width: none !important;
    min-width: auto !important;
    flex: none !important;
    align-self: auto !important;
    justify-self: auto !important;
    order: unset !important;
    flex-grow: unset !important;
    flex-shrink: unset !important;
    flex-basis: unset !important;
    transform: none !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

/* NUCLEAR OPTION: Force all discount badges to be corner positioned */
.discount-badge {
    position: absolute !important;
    top: 0.5rem !important;
    right: 0.5rem !important;
    background: #fbbf24 !important;
    color: #92400e !important;
    padding: 0.25rem 0.5rem !important;
    border-radius: 4px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    width: auto !important;
    height: auto !important;
    z-index: 9999 !important;
    display: inline-block !important;
    max-width: none !important;
    min-width: auto !important;
    flex: none !important;
    align-self: auto !important;
    justify-self: auto !important;
    order: unset !important;
    flex-grow: unset !important;
    flex-shrink: unset !important;
    flex-basis: unset !important;
    transform: none !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    left: auto !important;
    bottom: auto !important;
}

/* ========================================
   HOME PAGE STYLES
   ======================================== */

/* Category Sections Styles */
.category-section {
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid #e5e7eb;
}

.category-section:first-of-type {
    border-top: none;
    margin-top: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--green);
    margin: 0;
}

.view-all-link {
    color: var(--green);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border: 2px solid var(--green);
    border-radius: 6px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.view-all-link:hover {
    background-color: var(--green);
    color: white;
    transform: translateY(-1px);
}

.section-description {
    color: var(--gray-600);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 800px;
}

/* Hero Header Styles */
.hero-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.hero-content {
    width: 100%;
    margin: 0;
}

.hero-title {
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.hero-icon {
    font-size: 2.5rem;
}

.hero-subtitle {
    font-size: 15px;
    margin-bottom: 40px;
    opacity: 0.9;
}

/* Main Container */
.main-container {
    width: 100%;
    padding: 8px;
    margin: 1px;
    padding-bottom: 0;
    margin-bottom: 0;
}

@media (min-width: 768px) {
    .main-container {
        width: 100%;
            padding: 8px;
    margin: 1px;
    padding-bottom: 0;
    margin-bottom: 0;

    }
}

/* Featured Products */
.featured-products {
    margin-bottom: 40px;
    margin-top: 0;
    padding-bottom: 0;
    width: 100%;
}

/* Trending Products */
.trending-products {
    margin-bottom: 60px;
    margin-top: 0;
    padding-bottom: 0;
    width: 100%;
}

/* Remove bottom gap from last section */
.trending-products:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Ensure no extra spacing at the end */
.main-container > *:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

.section-title {
    font-size: 25px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
    color: #333;
    padding: 1rem 0;
}

/* Home page specific product grid */
.home-products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-top: 10px;
    padding: 0;
    width: 100%;
}

/* Home page specific product card styles */
.home-product-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.home-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.home-product-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.home-product-image-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.home-product-image-link:hover {
    opacity: 0.9;
}

.home-product-name-link {
    text-decoration: none;
    color: inherit;
}

.home-product-name-link:hover .home-product-name {
    color: #667eea;
}

.home-product-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0.1rem 0 !important;
    color: #333;
    transition: color 0.3s ease;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-product-price {
    text-align: center;
    margin-bottom: 15px;
}

.home-product-actions {
    display: flex;
    margin-top: auto;
}

.home-btn-primary {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    transition: background 0.3s ease;
    width: auto;
    text-decoration: none;
    display: block;
    text-align: center;
    margin: 0 auto;
}

.home-btn-primary:hover {
    background: #2980b9;
    color: white;
}

/* Responsive Design for Home Page */
@media (max-width: 768px) {
    .hero-title {
        font-size: 20px;
    }
    
    .home-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0;
    }

    /* Category Sections Mobile Styles */
    .category-section {
        margin: 2rem 0;
        padding: 1.5rem 0;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .view-all-link {
        align-self: flex-end;
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    .section-description {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .section-title {
        font-size: 24px;
        padding: 0;
    }
    
}

@media (max-width: 480px) {
    .home-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        padding: 0;
    }
    
    .section-title {
        font-size: 24px;
        padding: 0;
    }
    
    .home-product-card {
        height: auto;
        min-height: 280px;
    }
    
    .home-product-content {
        padding: 4px;
    }
    
    .home-product-name {
        font-size: 0.875rem;
        margin: 0.1rem 0 !important;
        text-align: center;
    }
    
    .home-product-price {
        margin-bottom: 8px;
    }
    
    .home-btn-primary {
        padding: 8px 15px;
        font-size: 1rem;
    }
    
    .home-product-image img {
        width: 100%;
        height: 120px;
        object-fit: cover;
        border-radius: 8px 8px 0 0;
    }
}

/* ========================================
   CATEGORY PAGE STYLES
   ======================================== */

/* Subcategory cards hover effect */
.subcategories-section a:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15) !important;
    border-color: #28a745 !important;
}

/* Category grid for subcategories */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin: 0;
    width: 100%;
}

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

.category-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

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

.category-image {
    height: 150px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #eee;
}

.image-placeholder {
    font-size: 3rem;
    color: #666;
    text-align: center;
}

.category-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.category-image-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.category-image-link:hover {
    opacity: 0.9;
}

.category-name-link {
    text-decoration: none;
    color: inherit;
}

.category-name-link:hover .category-name {
    color: #667eea;
}

.category-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    color: #333;
    transition: color 0.3s ease;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-description {
    text-align: center;
    margin-bottom: 15px;
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.category-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

/* Category page specific product grid */
.category-products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin: 0;
    width: 100%;
}

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

/* Category page specific product card styles */
.category-product-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.category-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.category-product-image {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.category-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-product-content {
    padding: 8px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.category-product-image-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.category-product-image-link:hover {
    opacity: 0.9;
}

.category-product-name-link {
    text-decoration: none;
    color: inherit;
}

.category-product-name-link:hover .category-product-name {
    color: #667eea;
}

.category-product-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0.1rem 0 !important;
    color: #333;
    transition: color 0.3s ease;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-product-price {
    text-align: center;
    margin-bottom: 10px;
}

.category-product-actions {
    display: flex;
    margin-top: auto;
}

.category-btn-primary {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    transition: background 0.3s ease;
    width: auto;
    text-decoration: none;
    display: block;
    text-align: center;
    margin: 0 auto;
}

.category-btn-primary:hover {
    background: #2980b9;
    color: white;
}

/* Sorting Styles */
.sorting-container {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.sorting-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sorting-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-label {
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.sort-dropdown {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    color: #374151;
    font-size: 0.875rem;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.sort-dropdown:hover {
    border-color: #667eea;
}

.sort-dropdown:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.product-count {
    color: #6b7280;
    font-size: 0.875rem;
}

.main-content {
    margin-top: 2rem;
}

/* Breadcrumb Navigation */
.breadcrumb-nav {
    padding: 1rem 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.breadcrumb-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.breadcrumb-container a {
    color: #059669;
    text-decoration: none;
}

.breadcrumb-container span {
    color: #d1d5db;
}

.breadcrumb-container span:last-child {
    color: #374151;
    font-weight: 500;
}

/* Responsive Design for Category Page */
@media (max-width: 768px) {
    .sorting-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sorting-left,
    .sorting-right {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .category-products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .category-product-card {
        height: auto;
        min-height: 280px;
    }
    
    .category-product-content {
        padding: 8px;
    }
    
    .category-product-name {
        font-size: 0.875rem;
        margin: 0.1rem 0 !important;
        text-align: center;
    }
    
    .category-product-price {
        margin-bottom: 8px;
    }
    
    .category-btn-primary {
        padding: 8px 18px;
        font-size: 0.9rem;
    }
    
    .category-product-image img {
        width: 100%;
        height: 120px;
        object-fit: cover;
        border-radius: 8px 8px 0 0;
    }
}

/* ========================================
   PRODUCT LISTING PAGES STYLES
   ======================================== */

/* Product listing grid styles are now in the main .products-grid rule above */

/* Product listing specific product name */
.products-grid .product-name {
    margin: 0.1rem 0 !important;
    font-size: 0.9rem;
    text-align: center;
}

/* Product listing specific product content */
.products-grid .product-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Product listing specific product image link */
.products-grid .product-image-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.products-grid .product-image-link:hover {
    opacity: 0.9;
}

/* Product listing specific product name link */
.products-grid .product-name-link {
    text-decoration: none;
    color: inherit;
}

.products-grid .product-name-link:hover .product-name {
    color: #667eea;
}

/* Product listing specific product name */
.products-grid .product-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0.1rem 0 !important;
    color: #333;
    transition: color 0.3s ease;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Product listing specific product price */
.products-grid .product-price {
    text-align: center;
    margin-bottom: 15px;
}

/* Product listing specific product actions */
.products-grid .product-actions {
    display: flex;
    margin-top: auto;
}

/* Product listing specific button */
.products-grid .btn-primary {
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.875rem;
    transition: background 0.3s ease;
    width: auto;
    text-decoration: none;
    display: block;
    text-align: center;
    margin: 0 auto;
}

.products-grid .btn-primary:hover {
    background: #2980b9;
    color: white;
}

/* Responsive Design for Product Listing Pages */
@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .products-grid .product-card {
        height: auto;
        min-height: 280px;
    }
    
    .products-grid .product-content {
        padding: 6px;
    }
    
    .products-grid .product-name {
        font-size: 0.875rem;
        margin: 0.1rem 0 !important;
        text-align: center;
    }
    
    .products-grid .product-price {
        margin-bottom: 10px;
    }
    
    .products-grid .btn-primary {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .products-grid .product-image img {
        width: 100%;
        height: 120px;
        object-fit: cover;
        border-radius: 8px 8px 0 0;
    }
}

/* ========================================
   BEST SELLERS PAGE STYLES
   ======================================== */

/* Best sellers specific product card */
.bestseller-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.order-count-badge {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

.tab-navigation {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tab-button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

.tab-button.active {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    border-color: white;
}

.category-filter {
    display: block;
    width: 100%;
    padding: 10px 15px;
    margin-bottom: 5px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    text-align: left;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    color: #495057;
}

.category-filter:hover {
    background: #e9ecef;
    border-color: #667eea;
    text-decoration: none;
    color: #495057;
}

.category-filter.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
    text-decoration: none;
}

.stats-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    text-align: center;
}

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

.stat-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

.pagination a, .pagination span {
    padding: 0.5rem 1rem;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.pagination .current {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Responsive Design for Best Sellers Page */
@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column !important;
    }
    
    .category-sidebar {
        width: 100% !important;
        position: static !important;
        margin-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .bestseller-badge {
        font-size: 0.65rem;
        padding: 4px 8px;
    }
    
    .order-count-badge {
        font-size: 0.6rem;
        padding: 3px 6px;
    }
}
.hero-slider {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.hero-track {
    display: flex;
    transition: transform 0.6s ease-in-out;
}

.slide {
    min-width: 100%;
}

.slide img {
    width: 100%;
    height: auto;      /* IMPORTANT */
    display: block;
}

/* arrows */
.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    padding: 8px 14px;
    cursor: pointer;
    z-index: 10;
}

.arrow.left { left: 10px; }
.arrow.right { right: 10px; }

@media (max-width: 768px) {
    .arrow {
        font-size: 28px;
        padding: 6px 10px;
    }
}
.why-section {
    padding: 60px 20px;
}

.why-title {
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 40px;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.why-item {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.why-icon {
    width: 64px;
    height: 64px;
    border: 2px solid #b7e3b7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.why-icon i {
    font-size: 26px;
    color: #6ab04c;
}


.why-organic {
    width: 100%;
}

.why-row {
    display: flex;
    justify-content: space-between;
    text-align: center;
}

.why-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center !important;
    text-align: center !important;
}

.why-item h4,
.why-item p {
    text-align: center !important;
    width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
}

.why-item h4 {
    margin-top: 10px;
    margin-bottom: 6px;
    font-weight: 600;
}

.why-item p {
    max-width: 260px;
    font-size: 14px;
    line-height: 1.4;
}

/* MOBILE */
@media (max-width: 768px) {
    .why-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .why-grid {
        grid-template-columns: 1fr;
    }
}
