/* Enhanced CSS for KHAN Store - Ultra Modern & User Friendly */
:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #f59e0b;
    --accent: #ec4899;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --dark: #1e293b;
    --dark-2: #334155;
    --light: #f8fafc;
    --light-2: #f1f5f9;
    --gray: #64748b;
    --gray-light: #cbd5e1;
    --white: #ffffff;
    
    --gradient-primary: linear-gradient(135deg, var(--primary), var(--primary-light));
    --gradient-secondary: linear-gradient(135deg, var(--secondary), #f97316);
    --gradient-accent: linear-gradient(135deg, var(--accent), #d946ef);
    --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    --shadow-sm: 0 2px 20px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 40px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 35px 80px rgba(0, 0, 0, 0.2);
    --shadow-float: 0 25px 50px rgba(0, 0, 0, 0.25);
    
    --border-radius: 16px;
    --border-radius-lg: 24px;
    --border-radius-xl: 32px;
    
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-smooth: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 14px;
}

body {
    font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    overflow-x: hidden;
    text-align: right;
    font-weight: 400;
    font-size: 0.9rem;
}

/* ✅ Prevent mobile zoom on input fields */
input, select, textarea {
    font-size: 16px !important;
}

/* Enhanced Loading Screen */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: var(--transition-smooth);
}

.page-loader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    color: var(--white);
}

.loader-logo {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.loader-progress {
    width: 180px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #fff, #fbbf24);
    border-radius: 10px;
    animation: loading 2s ease-in-out infinite;
    transform-origin: left;
}

@keyframes loading {
    0% { transform: scaleX(0); }
    50% { transform: scaleX(0.7); }
    100% { transform: scaleX(1); }
}

/* Enhanced Floating Actions */
.floating-actions {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.fab {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    border: none;
    color: var(--white);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    position: relative;
    backdrop-filter: blur(10px);
}

.fab:hover {
    transform: translateY(-6px) scale(1.05);
    box-shadow: var(--shadow-float);
}

.fab::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: inherit;
    border-radius: inherit;
    z-index: -1;
    filter: blur(10px);
    opacity: 0.6;
}

.fab-whatsapp {
    background: linear-gradient(135deg, #25d366, #128c7e);
}

.fab-telegram {
    background: linear-gradient(135deg, #0088cc, #005c8a);
}

/* Enhanced Header */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.navbar {
    padding: 0.8rem 0;
    transition: var(--transition);
}

.navbar-brand {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    transition: var(--transition);
}

.brand-text {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    text-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
}

.brand-subtitle {
    font-size: 0.7rem;
    color: var(--gray);
    margin-top: -2px;
    font-weight: 500;
    letter-spacing: -0.5px;
}

/* Ultra Enhanced Search Bar */
.search-container {
    position: relative;
    flex: 1;
    max-width: 500px;
    margin: 0 1.5rem;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--white);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-md);
    border: 2px solid transparent;
    transition: var(--transition);
    overflow: hidden;
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1), var(--shadow-lg);
    transform: translateY(-2px);
}

.search-input {
    flex: 1;
    padding: 1rem 1rem 1rem 3.5rem;
    border: none;
    background: transparent;
    transition: var(--transition);
    font-size: 0.9rem;
    width: 100%;
    font-family: inherit;
    color: var(--dark);
}

.search-input::placeholder {
    color: var(--gray);
    text-align: right;
    transition: var(--transition);
    font-size: 0.85rem;
}

.search-input:focus {
    outline: none;
}

.search-input:focus::placeholder {
    opacity: 0.7;
}

.search-icon {
    position: absolute;
    left: 1.2rem;
    color: var(--gray);
    font-size: 1rem;
    transition: var(--transition);
}

.search-box:focus-within .search-icon {
    color: var(--primary);
    transform: scale(1.1);
}

.search-btn {
    position: absolute;
    left: 0.4rem;
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    padding: 0.7rem 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.search-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

/* Enhanced Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    margin-top: 0.5rem;
    max-height: 350px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    border: 1px solid var(--light-2);
    backdrop-filter: blur(20px);
}

.search-suggestions.show {
    display: block;
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.suggestion-header {
    padding: 0.8rem 1.2rem;
    background: var(--light);
    border-bottom: 1px solid var(--light-2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.85rem;
}

.suggestion-categories {
    padding: 0.8rem 1.2rem;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--light-2);
}

.suggestion-category {
    background: var(--light);
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.suggestion-category:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-2px);
}

.suggestion-items {
    padding: 0.4rem 0;
}

.suggestion-item {
    padding: 0.8rem 1.2rem;
    border-bottom: 1px solid var(--light-2);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.suggestion-item:hover {
    background: var(--light);
    transform: translateX(-4px);
}

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

.suggestion-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid var(--light-2);
}

.suggestion-info {
    flex: 1;
}

.suggestion-name {
    font-weight: 600;
    margin-bottom: 0.2rem;
    color: var(--dark);
    font-size: 0.85rem;
}

.suggestion-price {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.8rem;
}

.suggestion-item.no-results {
    cursor: default;
}

.suggestion-item.no-results:hover {
    background: transparent;
    transform: none;
}

/* Enhanced Navigation */
.navbar-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.nav-action-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--gray);
    transition: var(--transition);
    padding: 0.6rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-action-btn:hover {
    color: var(--primary);
    background: var(--light);
    transform: translateY(-2px);
}

/* 🎯 ULTRA ENHANCED CATEGORIES NAVIGATION - FIXED SMALL CIRCULAR IMAGES */
.categories-nav {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: 70px;
    z-index: 999;
    transition: var(--transition);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.categories-scroll {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    overflow-x: auto;
    scrollbar-width: none;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    direction: rtl;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    font-size: 0.8rem;
    min-width: 80px;
    transition: var(--transition);
    flex-shrink: 0;
    padding: 0.5rem;
    border-radius: 12px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.category-item img {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid var(--light-2) !important;
    margin-bottom: 0.5rem !important;
    transition: var(--transition) !important;
}

.category-item span {
    text-align: center;
    line-height: 1.2;
    font-size: 0.75rem;
}

.category-item:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.category-item:hover img {
    border-color: var(--white);
    transform: scale(1.1);
}

.category-item.active {
    background: var(--primary);
    color: var(--white);
}

.category-item.active img {
    border-color: var(--white);
}

/* Auto-scroll animation */
@keyframes autoScroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

.categories-scroll.auto-scroll {
    animation: autoScroll 30s linear infinite;
}

.categories-scroll:hover.auto-scroll {
    animation-play-state: paused;
}

/* Ultra Enhanced Hero Section */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, var(--light) 0%, #f0f4ff 50%, #e6f0ff 100%);
    overflow: hidden;
    padding: 3rem 0;
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="%233b82f6" fill-opacity="0.03" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.2rem;
    color: var(--dark);
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    margin-bottom: 0.3rem;
}

.hero-description {
    font-size: 1rem;
    color: var(--gray);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--dark);
    font-weight: 500;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition);
    font-size: 0.85rem;
}

.feature-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    background: var(--white);
}

.feature-item i {
    color: var(--primary);
    font-size: 1.3rem;
    background: var(--light);
    padding: 0.4rem;
    border-radius: 10px;
}

.hero-stats {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.2rem;
}

.stat-label {
    color: var(--gray);
    font-size: 0.8rem;
    font-weight: 500;
}

.hero-visual {
    position: relative;
    text-align: center;
}

.hero-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    color: var(--white);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: var(--shadow-lg);
    z-index: 2;
    white-space: nowrap;
}

.hero-main-image {
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-float);
    transition: var(--transition);
    border: 6px solid var(--white);
}

.hero-main-image:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-xl);
}

/* 🎯 ULTRA ENHANCED PRODUCTS SECTION */
.products-section {
    padding: 3rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    position: relative;
}

.products-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-light), transparent);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--dark);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 3px;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--gray);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.5;
}

/* 🎯 ULTRA ENHANCED PRODUCT CARDS - 4 PER ROW */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 products per row */
    gap: 1rem;
    position: relative;
}

.product-card {
    background: linear-gradient(135deg, var(--white) 0%, #fcfdff 100%);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid rgba(226, 232, 240, 0.8);
    height: 100%;
    position: relative;
    backdrop-filter: blur(10px);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.03) 0%, rgba(59, 130, 246, 0.01) 100%);
    opacity: 0;
    transition: var(--transition);
    z-index: 1;
}

.product-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-float);
    border-color: var(--primary-light);
}

.product-card:hover::before {
    opacity: 1;
}

.product-badge {
    position: absolute;
    top: 0.8rem;
    right: 0.8rem;
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 3;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.product-badge.new {
    background: linear-gradient(135deg, var(--success), #059669);
}

.product-badge.discount {
    background: linear-gradient(135deg, var(--error), #dc2626);
}

/* 🎯 ULTRA ENHANCED PRODUCT IMAGES */
.product-image {
    height: 150px; /* Reduced for 4 columns */
    overflow: hidden;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
}

.product-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(59, 130, 246, 0.02) 100%);
    opacity: 0;
    transition: var(--transition);
}

.product-card:hover .product-image::before {
    opacity: 1;
}

.product-image img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: var(--transition);
    filter: drop-shadow(0 8px 25px rgba(0, 0, 0, 0.15));
    position: relative;
    z-index: 2;
}

.product-card:hover .product-image img {
    transform: scale(1.15) rotate(1deg);
    filter: drop-shadow(0 15px 35px rgba(0, 0, 0, 0.25));
}

.product-content {
    padding: 1rem; /* Reduced for 4 columns */
    position: relative;
    z-index: 2;
    background: var(--white);
}

.product-title {
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.6rem;
    font-size: 0.9rem; /* Smaller for 4 columns */
    line-height: 1.3;
    height: 2.2rem; /* Reduced height */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-description {
    color: var(--gray);
    font-size: 0.8rem; /* Smaller for 4 columns */
    margin-bottom: 0.8rem;
    line-height: 1.4;
    height: 2.4rem; /* Reduced height */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Show only 2 lines */
    -webkit-box-orient: vertical;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem; /* Reduced */
    flex-wrap: wrap;
}

.current-price {
    color: var(--primary);
    font-weight: 800;
    font-size: 1rem; /* Smaller */
    position: relative;
}

.current-price::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.product-card:hover .current-price::after {
    transform: scaleX(1);
}

.old-price {
    text-decoration: line-through;
    color: var(--gray);
    font-size: 0.8rem; /* Smaller */
    opacity: 0.7;
}

.buy-button {
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    padding: 0.7rem 0.8rem; /* Reduced */
    font-weight: 700;
    width: 100%;
    transition: var(--transition);
    font-size: 0.85rem; /* Smaller */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem; /* Reduced */
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.3);
}

.buy-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: var(--transition);
}

.buy-button:hover::before {
    left: 100%;
}

.buy-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.5);
}

/* Enhanced Categories Section */
.categories-section {
    padding: 3rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 categories per row */
    gap: 1.5rem;
}

.category-card {
    display: block;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 2rem 1.5rem;
    text-decoration: none;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 2px solid transparent;
    height: 100%;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition);
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-float);
    border-color: var(--primary-light);
}

.category-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.2rem;
    font-size: 2rem;
    color: var(--white);
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.category-card:hover .category-icon {
    transform: scale(1.05) rotate(5deg);
}

.category-icon.solar {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.category-icon.electronics {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.category-icon.home {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.category-icon.food {
    background: linear-gradient(135deg, #10b981, #059669);
}

.category-icon.computer {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.category-icon.security {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.category-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--dark);
}

.category-content p {
    color: var(--gray);
    margin-bottom: 1.2rem;
    line-height: 1.5;
    font-size: 0.9rem;
}

.category-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-count {
    color: var(--gray);
    font-size: 0.85rem;
    font-weight: 500;
}

.category-meta i {
    color: var(--primary);
    transition: var(--transition);
    font-size: 1.1rem;
}

.category-card:hover .category-meta i {
    transform: translateX(-6px);
}

/* Enhanced CTA Section */
.cta-section {
    padding: 3rem 0;
    background: var(--gradient-primary);
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="%23ffffff" fill-opacity="0.05" points="0,0 1000,1000 0,1000"/></svg>');
    background-size: cover;
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-content h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.8rem;
}

.cta-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.btn {
    border-radius: var(--border-radius);
    padding: 0.8rem 1.5rem;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    cursor: pointer;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-outline-primary:hover {
    background: var(--white);
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.support-info {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.support-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.85rem;
}

/* Enhanced Footer */
.main-footer {
    background: var(--dark);
    color: var(--white);
    padding: 3rem 0 1rem;
    position: relative;
}

.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.footer-brand .brand-logo {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.8rem;
    display: inline-block;
}

.footer-description {
    color: var(--gray-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 0.8rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--dark-2);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.1rem;
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-md);
}

/* Footer Links */
.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-links h5 {
    font-size: 1rem;
    margin-bottom: 0.8rem;
    color: var(--white);
    font-weight: 600;
}

.footer-links a {
    color: var(--gray-light);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.85rem;
}

.footer-links a:hover {
    color: var(--primary-light);
    transform: translateX(-4px);
}

/* Footer Contact */
.footer-contact h5 {
    font-size: 1rem;
    margin-bottom: 0.8rem;
    color: var(--white);
    font-weight: 600;
}

.contact-info p {
    color: var(--gray-light);
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
}

.contact-info i {
    margin-left: 0.4rem;
}

/* Footer Bottom */
.footer-bottom {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--dark-2);
    color: var(--gray-light);
    font-size: 0.85rem;
}

.payment-methods {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.2rem;
}

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

.form-control {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 2px solid var(--gray-light);
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-family: inherit;
    font-size: 0.9rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Alert Styles */
.alert {
    padding: 0.8rem 1.2rem;
    border-radius: var(--border-radius);
    margin-bottom: 0.8rem;
    border: 1px solid transparent;
    font-size: 0.9rem;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
    color: var(--primary);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

/* Modal Styles */
.modal-content {
    border-radius: var(--border-radius-lg);
    border: none;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    border-bottom: 1px solid var(--light-2);
    padding: 1.2rem;
}

.modal-title {
    font-weight: 700;
    color: var(--dark);
    font-size: 1.1rem;
}

.modal-body {
    padding: 1.2rem;
}

.modal-footer {
    border-top: 1px solid var(--light-2);
    padding: 1.2rem;
}

/* Order Summary */
.order-summary {
    background: var(--light) !important;
    border: 1px solid var(--light-2);
    padding: 1rem !important;
}

.order-summary h6 {
    font-size: 0.9rem;
}

/* 🌟 Shopino24-Style Hero Banner */
#heroCarousel {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  width: 95%;
  margin: 1.5rem auto 3rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  background: linear-gradient(180deg, #f1f5f9 0%, #e0f2fe 100%);
}

#heroCarousel .carousel-item {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
}

#heroCarousel img {
  width: 100%;
  height: 380px;
  object-fit: contain;
  background: linear-gradient(180deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: 20px;
}

/* 🏷 Discount badge */
.discount-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 14px;
  border-radius: 50px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  z-index: 3;
}
.discount-badge.orange {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}
.discount-badge.blue {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

/* 🧊 Caption Box */
.carousel-caption {
  position: absolute;
  bottom: 1.8rem;
  right: 2rem;
  text-align: right;
  background: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  padding: 1rem 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #0f172a;
  max-width: 400px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

/* 💵 Price Style */
.price-line {
  margin: 0.5rem 0 1rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}
.old-price {
  text-decoration: line-through;
  color: #94a3b8;
  font-weight: 600;
  font-size: 0.95rem;
}
.new-price {
  color: #2563eb;
  font-weight: 800;
  font-size: 1.1rem;
}

/* 🛒 Button Style */
.carousel-caption .btn {
  border-radius: 50px;
  background: #fff;
  color: #0f172a;
  font-weight: 700;
  border: none;
  padding: 6px 18px;
  font-size: 0.9rem;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}
.carousel-caption .btn:hover {
  background: #2563eb;
  color: #fff;
  transform: translateY(-2px);
}

/* 🎛 Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  transition: all 0.3s ease;
}
.carousel-control-prev:hover,
.carousel-control-next:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.1);
}

/* 📱 Responsive */
@media (max-width: 768px) {
  #heroCarousel img { height: 270px; }
  .carousel-caption {
    right: 1rem;
    left: 1rem;
    bottom: 1rem;
    padding: 1rem;
    text-align: center;
  }
  .price-line {
    justify-content: center;
  }
}
/* 🎨 Header Gradient Bar */
.hero-gradient-bar {
    background: linear-gradient(90deg, #f97316, #ec4899);
    color: #fff;
    text-align: center;
    padding: 0.6rem 0;
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    letter-spacing: -0.3px;
}

/* Order Loading Overlay */
#orderLoadingOverlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
}

#orderLoadingOverlay.show {
    display: flex !important;
}

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

.bg-light { background: var(--light) !important; }
.bg-white { background: var(--white) !important; }

.rounded-3 { border-radius: var(--border-radius) !important; }

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

/* Row and Grid */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.5rem;
}

.col {
    flex: 1;
    padding: 0 0.5rem;
}

.col-6 { 
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 0.5rem;
}

.col-md-4 {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    padding: 0 0.5rem;
}

.col-lg-3 {
    flex: 0 0 25%;
    max-width: 25%;
    padding: 0 0.5rem;
}

.col-lg-4 {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    padding: 0 0.5rem;
}

.col-lg-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 0.5rem;
}

/* Spacing Utilities */
.g-4 { gap: 1rem; }
.mt-4 { margin-top: 1rem; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 0.4rem; }
.mb-3 { margin-bottom: 0.8rem; }
.mb-4 { margin-bottom: 1rem; }
.me-2 { margin-left: 0.4rem; }
.ms-2 { margin-right: 0.4rem; }

/* Text Utilities */
.text-center { text-align: center !important; }
.text-md-end { text-align: left !important; }

/* Responsive Design - 4 PRODUCTS ON ALL SCREENS */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr); /* Keep 4 products */
    }
}

@media (max-width: 992px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 categories on tablet */
    }
    
    .products-grid {
        grid-template-columns: repeat(4, 1fr); /* Keep 4 products */
        gap: 0.8rem;
    }
    
    .product-image {
        height: 130px;
    }
    
    .product-content {
        padding: 0.8rem;
    }
    
    .product-title {
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 13px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .search-container {
        margin: 0.8rem 0;
        max-width: 100%;
    }
    
    .floating-actions {
        bottom: 1rem;
        left: 1rem;
    }
    
    .fab {
        width: 50px;
        height: 50px;
        font-size: 1.1rem;
    }
    
    .categories-nav {
        top: 60px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
    }
    
    /* 4 PRODUCTS PER ROW ON MOBILE */
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.6rem;
    }
    
    .product-image {
        height: 100px;
        padding: 0.8rem;
    }
    
    .product-content {
        padding: 0.6rem;
    }
    
    .product-title {
        font-size: 0.75rem;
        height: 2rem;
    }
    
    .product-description {
        font-size: 0.7rem;
        height: 2rem;
        margin-bottom: 0.6rem;
    }
    
    .product-price {
        margin-bottom: 0.6rem;
    }
    
    .current-price {
        font-size: 0.85rem;
    }
    
    .buy-button {
        padding: 0.5rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .product-badge {
        padding: 0.3rem 0.6rem;
        font-size: 0.65rem;
    }
    
    /* Category items smaller on mobile */
    .category-item img {
        width: 45px !important;
        height: 45px !important;
    }
    
    .category-item {
        min-width: 70px;
        font-size: 0.7rem;
    }
    
    .category-item span {
        font-size: 0.7rem;
    }
    
    /* Responsive columns */
    .col-md-4,
    .col-lg-3,
    .col-lg-4,
    .col-lg-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .text-md-end {
        text-align: center !important;
    }
    
    /* Hero carousel mobile */
    #heroCarousel img {
        height: 250px;
    }
    
    .carousel-caption h5 {
        font-size: 1rem;
    }
    
    .carousel-caption p {
        font-size: 0.8rem;
    }
    
    .discount-badge {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    /* 4 products per row on small mobile */
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
    }
    
    .product-image {
        height: 90px;
        padding: 0.6rem;
    }
    
    .product-content {
        padding: 0.5rem;
    }
    
    .product-title {
        font-size: 0.7rem;
        height: 1.8rem;
    }
    
    .product-description {
        font-size: 0.65rem;
        height: 1.8rem;
    }
    
    .current-price {
        font-size: 0.8rem;
    }
    
    .buy-button {
        padding: 0.4rem 0.5rem;
        font-size: 0.7rem;
    }
    
    .hero-features {
        grid-template-columns: 1fr;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .support-info {
        flex-direction: column;
        gap: 0.8rem;
    }
    
    /* Even smaller category items on very small screens */
    .category-item img {
        width: 40px !important;
        height: 40px !important;
    }
    
    .category-item {
        min-width: 65px;
        padding: 0.4rem;
    }
}

/* Very small screens - Only go to 2 columns as last resort */
@media (max-width: 400px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 products only on very small screens */
        gap: 0.8rem;
    }
    
    .product-image {
        height: 120px;
        padding: 1rem;
    }
    
    .product-content {
        padding: 0.8rem;
    }
    
    .product-title {
        font-size: 0.8rem;
        height: 2.2rem;
    }
    
    .product-description {
        font-size: 0.75rem;
        height: 2.4rem;
    }
    
    .current-price {
        font-size: 0.9rem;
    }
    
    .buy-button {
        padding: 0.6rem 0.8rem;
        font-size: 0.8rem;
    }
    
    /* 1 category per row on very small screens */
    .categories-grid {
        grid-template-columns: 1fr;
    }
}

/* Small gap for mobile products */
@media (max-width: 768px) {
    .row.g-4 {
        gap: 0.8rem;
    }
}
