/**
 * FezaMarket E-Commerce Platform Styles
 * Modern, responsive design matching provided layouts
 */

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

/* Prevent horizontal scroll globally */
html {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Force pure white background across all browsers */
html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #ffffff !important;
    color-scheme: light;
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
}

:root {
    --page-bg: #ffffff;
}

body, .site, .page, main {
    background: var(--page-bg) !important;
}

/* Prevent dark mode background inversions */
@media (prefers-color-scheme: dark) {
    html, body, .site, .page, main {
        background: #ffffff !important;
    }
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a:hover {
    color: #0654ba;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.container-wide {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    width: 100%;
}

/* Enhanced FezaMarket Header - Professional Layout */
.fezamarket-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* Top Navigation - Clean & Minimal */
.top-nav {
    background: #f9fafb;
    font-size: 13px;
    border-bottom: 1px solid #e5e7eb;
    padding: 0;
}

.top-nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 20px;
    width: 100%;
}

.top-nav-left, .top-nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.greeting {
    color: #6b7280;
    font-weight: 400;
    font-size: 13px;
}

.auth-link {
    color: #3b82f6;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 13px;
}

.auth-link:hover {
    color: #1d4ed8;
}

.top-nav-link {
    color: #6b7280;
    white-space: nowrap;
    padding: 4px 8px;
    text-decoration: none;
    transition: color 0.2s ease;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 400;
}

.top-nav-link:hover {
    color: #3b82f6;
}

.sell-link {
    background: #059669;
    color: white !important;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 12px;
    transition: all 0.2s ease;
}

.sell-link:hover {
    background: #047857;
    transform: translateY(-1px);
}

.notification-icon, .cart-icon-top {
    position: relative;
    padding: 6px;
    font-size: 14px;
    color: #6b7280;
    transition: color 0.2s ease;
    border-radius: 50%;
}

.notification-icon:hover, .cart-icon-top:hover {
    color: #3b82f6;
    background-color: #f3f4f6;
}

.cart-count {
    position: absolute;
    top: 0;
    right: 0;
    background: #dc2626;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border: 2px solid white;
}

/* Main Header - Professional Layout */
.main-header {
    padding: 16px 0;
    background: #ffffff;
}

.main-header-content {
    display: flex;
    align-items: center;
    gap: 32px;
    width: 100%;
    padding: 0 20px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Refined FezaMarket Logo */
.fezamarket-logo {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo-container {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -1px;
    text-transform: lowercase;
}

.logo-f { 
    color: #dc2626; 
}
.logo-e { 
    color: #f59e0b; 
}
.logo-z { 
    color: #3b82f6; 
}
.logo-a { 
    color: #dc2626; 
}
.logo-market { 
    color: #1f2937; 
    font-weight: 700;
}

.fezamarket-logo:hover .logo-container {
    transform: scale(1.02);
    transition: transform 0.2s ease;
}

/* Enhanced Search Section */
.search-section {
    flex: 1;
    max-width: 600px;
}

.search-form-container {
    position: relative;
}

.search-input-group {
    display: flex;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    transition: all 0.3s ease;
}

.search-input-group:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.category-select {
    background: #f9fafb;
    border: none;
    padding: 12px 16px;
    font-size: 14px;
    color: #374151;
    border-right: 1px solid #e5e7eb;
    outline: none;
    min-width: 140px;
    cursor: pointer;
    font-weight: 500;
}

.search-input {
    flex: 1;
    border: none;
    padding: 12px 16px;
    font-size: 15px;
    outline: none;
    color: #374151;
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-button {
    background: #3b82f6;
    border: none;
    padding: 12px 20px;
    color: white;
    cursor: pointer;
    font-size: 16px;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-button:hover {
    background: #2563eb;
}

.advanced-search {
    color: #6b7280;
    font-size: 12px;
    margin-top: 4px;
    display: inline-block;
    text-decoration: none;
    transition: color 0.2s ease;
}

.advanced-search:hover {
    color: #3b82f6;
}
    outline: none;
    min-height: 38px;
}

.search-button {
    background: #0654ba;
    color: white;
    border: none;
    padding: 8px 24px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-button:hover {
    background: #054494;
}

.advanced-search {
    color: #0654ba;
    font-size: 12px;
    margin-top: 4px;
    display: inline-block;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
}

/* Professional Category Navigation */
.category-nav {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 0;
}

.category-nav-content {
    display: flex;
    gap: 0;
    padding: 0 20px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
}

.category-nav-content::-webkit-scrollbar {
    display: none;
}

.category-nav-item {
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    padding: 16px 24px;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    position: relative;
}

.category-nav-item:hover {
    color: #3b82f6;
    background-color: #f8fafc;
    border-bottom-color: #3b82f6;
}

.category-nav-item:first-child {
    margin-left: 20px;
}

.category-nav-item:last-child {
    margin-right: 20px;
}

/* Modern FezaMarket Footer */
.fezamarket-footer {
    background: #1f2937;
    color: #f3f4f6;
    margin-top: 64px;
    font-size: 14px;
}

/* Newsletter Section - Refined */
.footer-newsletter {
    background: #3b82f6;
    padding: 32px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.newsletter-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    width: 100%;
    padding: 0 20px;
}

.newsletter-info h3 {
    color: white;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 6px;
}

.newsletter-info p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 15px;
    max-width: 360px;
    line-height: 1.5;
}

.signup-form {
    display: flex;
    gap: 8px;
    min-width: 320px;
}

.email-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.email-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.email-input:focus {
    border-color: white;
    background: rgba(255, 255, 255, 0.15);
}

.signup-btn {
    background: #dc2626;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-size: 14px;
}

.signup-btn:hover {
    background: #b91c1c;
}

/* Main Footer Content - Clean Layout */
.footer-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
    padding: 40px 20px;
    width: 100%;
}

.footer-section h3 {
    color: #3b82f6;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-section h3 i {
    font-size: 16px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 6px;
}

.footer-section ul li a {
    color: #d1d5db;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 14px;
}

.footer-section ul li a:hover {
    color: #3b82f6;
    padding-left: 4px;
}

.footer-section ul li a i {
    width: 14px;
    color: #9ca3af;
    transition: color 0.2s ease;
    font-size: 12px;
}

.footer-section ul li a:hover i {
    color: #3b82f6;
}

/* Social Links - Modern Design */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 14px;
}

.social-link:hover {
    transform: translateX(4px);
}

.social-link.facebook {
    color: #3b5998;
    background-color: rgba(59, 89, 152, 0.1);
}

.social-link.facebook:hover {
    background-color: rgba(59, 89, 152, 0.2);
}

.social-link.twitter {
    color: #1da1f2;
    background-color: rgba(29, 161, 242, 0.1);
}

.social-link.twitter:hover {
    background-color: rgba(29, 161, 242, 0.2);
}

.social-link.instagram {
    color: #e4405f;
    background-color: rgba(228, 64, 95, 0.1);
}

.social-link.instagram:hover {
    background-color: rgba(228, 64, 95, 0.2);
}

.social-link.youtube {
    color: #ff0000;
    background-color: rgba(255, 0, 0, 0.1);
}

.social-link.youtube:hover {
    background-color: rgba(255, 0, 0, 0.2);
}

.social-link i {
    font-size: 16px;
    width: 18px;
}

/* Mobile Apps - Compact Design */
.mobile-apps h4 {
    color: #3b82f6;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.app-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.app-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    color: #d1d5db;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 13px;
}

.app-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.app-link i {
    font-size: 20px;
    width: 24px;
}

.app-link div span {
    display: block;
    font-size: 11px;
    color: #9ca3af;
}

.app-link div strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
}

/* Footer Bottom - Clean & Professional */
.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px 20px;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    width: 100%;
    padding: 0 20px;
}

.footer-bottom-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-logo {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.footer-logo .logo-f { color: #dc2626; }
.footer-logo .logo-e { color: #f59e0b; }
.footer-logo .logo-z { color: #3b82f6; }
.footer-logo .logo-a { color: #dc2626; }
.footer-logo .logo-market { color: #f3f4f6; }

.copyright {
    color: #9ca3af;
    font-size: 13px;
    margin: 0;
}

.footer-bottom-right {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.legal-links {
    display: flex;
    gap: 16px;
}

.legal-links a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 12px;
    transition: color 0.2s ease;
}

.legal-links a:hover {
    color: #3b82f6;
}

.region-select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 12px;
    color: #f3f4f6;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.region-select:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.region-select option {
    background: #1f2937;
    color: #f3f4f6;
}
}

.copyright a {
    color: #0654ba;
}

.copyright a:hover {
    text-decoration: underline;
}

/* Grid Layouts */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    flex: 1;
    padding: 0 15px;
}

.col-2 { flex: 0 0 16.666667%; }
.col-3 { flex: 0 0 25%; }
.col-4 { flex: 0 0 33.333333%; }
.col-6 { flex: 0 0 50%; }
.col-8 { flex: 0 0 66.666667%; }
.col-9 { flex: 0 0 75%; }
.col-12 { flex: 0 0 100%; }

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 20px 0;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #0654ba;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn:hover {
    background: #054494;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-success {
    background: #28a745;
}

.btn-success:hover {
    background: #1e7e34;
}

.btn-danger {
    background: #dc3545;
}

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

.btn-outline {
    background: transparent;
    border: 2px solid #0654ba;
    color: #0654ba;
}

.btn-outline:hover {
    background: #0654ba;
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

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

/* Hero Banner Styles */
.hero-banners {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.banner-main {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    min-height: 300px;
}

.banner-side {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    min-height: 140px;
}

.banner-content {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    color: white;
    z-index: 2;
}

.banner-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.3), rgba(0,0,0,0.6));
    z-index: 1;
}

.banner-main:hover .banner-bg,
.banner-side:hover .banner-bg {
    transform: scale(1.05);
}

.banner-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
}

/* Hero Banner Section Styles - True full-width fix */
.hero-banner-section {
    margin: 0;
    padding: 0;
    width: 100vw;
    position: relative;
    left: 0;
    right: 0;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

.hero-banner-section .container-wide {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
}

.hero-banner {
    position: relative;
    width: 100%;
    height: 400px;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
}

.hero-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 40px;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-text {
    color: white;
    z-index: 2;
    max-width: 600px;
}

.hero-text h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    opacity: 0.95;
}

.hero-description {
    font-size: 1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-cta-btn {
    display: inline-block;
    background: #0071ce;
    color: white;
    padding: 12px 32px;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.3s ease;
}

.hero-cta-btn:hover {
    background: #004c87;
    color: white;
}

/* Admin Edit Overlay Styles */
.admin-edit-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: auto;
}

.admin-editable:hover .admin-edit-overlay {
    opacity: 1;
}

.admin-edit-btn {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.admin-edit-btn:hover {
    background: rgba(0, 0, 0, 0.9);
}

.admin-edit-btn svg {
    display: block;
}

.banner-subtitle {
    font-size: 16px;
    margin-bottom: 12px;
    opacity: 0.9;
}

.banner-btn {
    background: white;
    color: #333;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.3s ease;
}

.banner-btn:hover {
    transform: translateY(-2px);
    color: #333;
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-2px);
}

.product-image {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    max-width: 100%;
    max-height: 100%;
    transition: transform 0.3s ease;
}

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

/* Responsive product images */
@media (max-width: 768px) {
    .product-image {
        height: 180px;
    }
}

@media (max-width: 576px) {
    .product-image {
        height: 160px;
    }
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #dc3545;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
}

.product-badge.featured {
    background: #ffc107;
    color: #212529;
}

.product-info {
    padding: 1rem;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.product-vendor {
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.25rem;
    font-weight: bold;
    color: #0654ba;
    margin-bottom: 1rem;
}

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

.stars {
    color: #ffc107;
}

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

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.add-to-cart {
    flex: 1;
}

.add-to-wishlist {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-text {
    color: #666;
    margin-bottom: 1rem;
}

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #0654ba;
    box-shadow: 0 0 0 2px rgba(6,84,186,0.25);
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewbox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    appearance: none;
}

.form-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-success {
    color: #28a745;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-section {
        width: 100%;
        max-width: none;
    }
    
    .top-nav-content {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .category-nav-content {
        gap: 12px;
        padding: 8px 0;
    }
    
    .hero-banners {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .banner-main {
        grid-column: 1;
        grid-row: auto;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 20px;
    }
    
    .row {
        flex-direction: column;
    }
    
    .col-2, .col-3, .col-4, .col-6, .col-8, .col-9 {
        flex: 0 0 100%;
    }
    
    .container {
        padding: 0;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

.text-primary { color: #0654ba; }
.text-secondary { color: #6c757d; }
.text-success { color: #28a745; }
.text-danger { color: #dc3545; }
.text-warning { color: #ffc107; }
.text-info { color: #17a2b8; }
.text-muted { color: #6c757d; }

.bg-primary { background-color: #0654ba; }
.bg-secondary { background-color: #6c757d; }
.bg-success { background-color: #28a745; }
.bg-danger { background-color: #dc3545; }
.bg-warning { background-color: #ffc107; }
.bg-info { background-color: #17a2b8; }
.bg-light { background-color: #f8f9fa; }
.bg-dark { background-color: #343a40; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #545b62;
}

.btn-success {
    background: #28a745;
}

.btn-success:hover {
    background: #1e7e34;
}

.btn-danger {
    background: #dc3545;
}

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

.btn-outline {
    background: transparent;
    border: 2px solid #007bff;
    color: #007bff;
}

.btn-outline:hover {
    background: #007bff;
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

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

/* Cards */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-2px);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-text {
    color: #666;
    margin-bottom: 1rem;
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}


.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #dc3545;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
}

.product-badge.featured {
    background: #ffc107;
    color: #212529;
}

.product-info {
    padding: 1rem;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.product-vendor {
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.product-price {
    font-size: 1.25rem;
    font-weight: bold;
    color: #007bff;
    margin-bottom: 1rem;
}

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

.stars {
    color: #ffc107;
}

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

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

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewbox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    appearance: none;
}

.form-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-success {
    color: #28a745;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
}

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

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 2rem 0;
}

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

.pagination a:hover {
    background: #007bff;
    color: white;
}

.pagination .current {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

/* Sidebar */
.sidebar {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eee;
}

.sidebar-list {
    list-style: none;
}

.sidebar-list li {
    margin-bottom: 0.5rem;
}

.sidebar-list a {
    display: block;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.sidebar-list a:hover {
    background: #f8f9fa;
}

/* Footer */
footer {
    background: #333;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-section h3 {
    margin-bottom: 1rem;
    color: #007bff;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #ccc;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #555;
    color: #ccc;
}

/* Mobile-First Responsive Design - Modern E-commerce Mobile Experience */

/* Mobile Header Improvements */
@media (max-width: 768px) {
    /* Hide top header links on mobile */
    .top-header {
        display: none;
    }
    
    /* Sticky mobile header */
    .main-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1100;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        background: white;
    }
    
    /* Adjust body padding to account for fixed header */
    body {
        padding-top: 140px; /* Adjust based on header height */
    }
    
    /* Mobile header layout */
    .main-header-content {
        flex-direction: column;
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    /* Top row: Logo center, cart right, hamburger menu left */
    .mobile-header-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        order: -2;
    }
    
    .logo {
        font-size: 24px;
        margin: 0;
        flex: 1;
        text-align: center;
    }
    
    .header-icons {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }
    
    .mobile-menu-toggle {
        display: block !important;
    }
    
    /* Hide category dropdown on mobile */
    .category-dropdown {
        display: none;
    }
    
    /* Mobile Search Bar - Large, centered, rounded */
    .search-container {
        margin: 0;
        max-width: none;
        width: 100%;
        order: -1;
        position: relative;
    }
    
    .search-container form {
        position: relative;
    }
    
    .search-input {
        width: 100%;
        border-radius: 25px;
        padding: 14px 50px 14px 20px;
        font-size: 16px; /* Prevent zoom on iOS */
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        border: 2px solid #e2e8f0;
        background: #f8f9fa;
    }
    
    .search-input:focus {
        border-color: #3b82f6;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        outline: none;
        background: white;
    }
    
    /* Search icon inside input */
    .search-container::after {
        content: '🔍';
        position: absolute;
        right: 20px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 16px;
        color: #6b7280;
        pointer-events: none;
    }
    
    .search-btn {
        display: none; /* Hide button, use icon instead */
    }
    
    .search-category-dropdown {
        display: none; /* Hide category dropdown on mobile */
    }
    
    
    /* Mobile Slide-out Menu */
    .mobile-nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 2000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .mobile-nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .mobile-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 85%;
        max-width: 320px;
        height: 100%;
        background: white;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
    }
    
    .mobile-nav-overlay.active .mobile-nav {
        transform: translateX(0);
    }
    
    .mobile-nav-header {
        padding: 1rem;
        border-bottom: 1px solid #e5e7eb;
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: #f8f9fa;
    }
    
    .mobile-nav-header h3 {
        margin: 0;
        font-size: 1.2rem;
        color: #374151;
    }
    
    .mobile-nav-close {
        background: none;
        border: none;
        font-size: 1.5rem;
        color: #6b7280;
        cursor: pointer;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
    }
    
    .mobile-nav-close:hover {
        background: #e5e7eb;
        color: #374151;
    }
    
    .mobile-nav-content {
        padding: 0;
    }
    
    .mobile-nav-link {
        display: block;
        padding: 1rem;
        color: #374151;
        text-decoration: none;
        border-bottom: 1px solid #f3f4f6;
        font-weight: 500;
        transition: background-color 0.2s;
    }
    
    .mobile-nav-link:hover {
        background: #f8f9fa;
        color: #1f2937;
    }
    
    .mobile-nav-link:first-child {
        border-top: 1px solid #f3f4f6;
    }
}

/* Desktop-first styles (preserve original layout) */
.mobile-header-row {
    display: none; /* Hide on desktop */
}

.desktop-header-icons {
    display: flex;
    align-items: center;
    gap: 1rem;
}

@media (min-width: 769px) {
    .mobile-header-row {
        display: none;
    }
    
    .desktop-header-icons {
        display: flex;
    }
    
    .mobile-nav-overlay,
    .mobile-categories-section,
    .mobile-promos-section {
        display: none;
    }
    
    .main-header-content {
        flex-direction: row;
        align-items: center;
        padding: 1rem;
        gap: 1rem;
    }
    
    body {
        padding-top: 0;
        padding-bottom: 0;
    }
    
    .search-container::after {
        display: none; /* Hide mobile search icon */
    }
    
    .search-btn {
        display: block; /* Show desktop search button */
    }
    
    .search-category-dropdown {
        display: block; /* Show category dropdown */
    }
}
    .mobile-categories-section,
    .mobile-promos-section {
        display: block;
        padding: 1rem 0;
        background: white;
        margin: 1rem 0;
    }
    
    .category-cards,
    .promo-cards {
        display: flex;
        overflow-x: auto;
        gap: 1rem;
        padding: 1rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .category-cards::-webkit-scrollbar,
    .promo-cards::-webkit-scrollbar {
        display: none;
    }
    
    .category-card {
        flex: 0 0 120px;
        text-align: center;
        background: white;
        border-radius: 12px;
        padding: 1rem 0.5rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.08);
        border: 1px solid #f1f5f9;
    }
    
    .category-card img {
        width: 60px;
        height: 60px;
        object-fit: cover;
        border-radius: 8px;
        margin-bottom: 0.5rem;
    }
    
    .category-card h3 {
        font-size: 0.8rem;
        font-weight: 600;
        color: #374151;
        line-height: 1.2;
        margin: 0;
    }
    
    .promo-card {
        flex: 0 0 280px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        padding: 1.5rem;
        border-radius: 12px;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }
    
    .promo-card h3 {
        font-size: 1.1rem;
        margin: 0 0 0.5rem 0;
        font-weight: 700;
    }
    
    .promo-card p {
        font-size: 0.9rem;
        margin: 0;
        opacity: 0.9;
    }
}
/* Product Grid & Banner Mobile Improvements */
@media (max-width: 768px) {
    /* 2-column grid for mobile products */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 1rem;
    }
    
    /* Single column for very small screens */
    @media (max-width: 480px) {
        .products-grid {
            grid-template-columns: 1fr;
        }
    }
    
    /* Banner image improvements */
    .hero-banner,
    .category-image,
    .product-image {
        object-fit: cover;
        width: 100%;
        height: 100%;
    }
    
    /* Horizontal scrolling product sections */
    .products-horizontal-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        position: relative;
    }
    
    .products-horizontal-container::-webkit-scrollbar {
        display: none;
    }
    
    .products-track {
        display: flex;
        gap: 1rem;
        padding: 0 1rem 1rem 1rem;
    }
    
    .walmart-product-card {
        flex: 0 0 200px; /* Fixed width for horizontal scroll */
        min-height: 280px;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        background: white;
        border: 1px solid #f1f5f9;
    }
    
    .product-image-container {
        height: 140px;
        position: relative;
    }
    
    .product-image-container img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    
    .product-details {
        padding: 0.75rem;
    }
    
    .product-name {
        font-size: 0.9rem;
        line-height: 1.3;
        margin-bottom: 0.5rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        min-height: 2.6em;
    }
    
    .current-price-large {
        font-size: 1rem;
        font-weight: 700;
        color: #dc2626;
    }
    
    .action-buttons {
        display: flex;
        gap: 0.5rem;
        margin-top: 0.5rem;
    }
    
    .action-buttons button,
    .action-buttons a {
        flex: 1;
        font-size: 0.8rem;
        padding: 0.5rem;
        border-radius: 6px;
        text-align: center;
        min-height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Touch-friendly buttons */
    .btn,
    .add-to-cart-btn,
    .options-button {
        min-height: 44px; /* Apple's minimum touch target */
        padding: 12px 16px;
        font-size: 0.9rem;
        border-radius: 8px;
        touch-action: manipulation;
        transition: all 0.2s ease;
    }
    
    .add-to-cart-btn:active,
    .options-button:active {
        transform: scale(0.95);
    }
    
    /* Hide scroll buttons on mobile - use touch scrolling */
    .scroll-right-btn {
        display: none;
    }
}
        display: flex;
        overflow-x: auto;
        gap: 1rem;
        padding: 1rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .category-cards::-webkit-scrollbar {
        display: none;
    }
    
    .category-card {
        flex: 0 0 120px;
        text-align: center;
        background: white;
        border-radius: 12px;
        padding: 1rem 0.5rem;
        box-shadow: 0 2px 4px rgba(0,0,0,0.08);
        border: 1px solid #f1f5f9;
    }
    
    .category-card img {
        width: 60px;
        height: 60px;
        object-fit: cover;
        border-radius: 8px;
        margin-bottom: 0.5rem;
    }
    
    .category-card h3 {
        font-size: 0.8rem;
        font-weight: 600;
        color: #374151;
        line-height: 1.2;
    }
}

/* Mobile Bottom Navigation */
@media (max-width: 768px) {
    .mobile-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        border-top: 1px solid #e5e7eb;
        display: flex;
        justify-content: space-around;
        padding: 0.75rem 0.5rem;
        z-index: 1000;
        box-shadow: 0 -2px 8px rgba(0,0,0,0.1);
    }
    
    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-decoration: none;
        color: #6b7280;
        font-size: 0.75rem;
        min-width: 60px;
        transition: color 0.2s ease;
        touch-action: manipulation;
    }
    
    .mobile-nav-item:hover,
    .mobile-nav-item.active {
        color: #3b82f6;
    }
    
    .mobile-nav-icon {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }
    
    .mobile-nav-badge {
        position: absolute;
        top: -5px;
        right: -5px;
        background: #dc2626;
        color: white;
        border-radius: 10px;
        min-width: 18px;
        height: 18px;
        font-size: 0.7rem;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
    }
}

/* Promo Cards Mobile */
@media (max-width: 768px) {
    .promo-cards {
        display: flex;
        overflow-x: auto;
        gap: 1rem;
        padding: 1rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .promo-cards::-webkit-scrollbar {
        display: none;
    }
    
    .promo-card {
        flex: 0 0 280px;
        height: 140px;
        border-radius: 12px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        padding: 1.5rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        position: relative;
        overflow: hidden;
    }
    
    .promo-card h3 {
        font-size: 1.2rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
    }
    
    .promo-card p {
        font-size: 0.9rem;
        opacity: 0.9;
    }
}

/* Typography Mobile Improvements */
@media (max-width: 768px) {
    .row {
        flex-direction: column;
        margin: 0;
        padding: 0;
    }
    
    .col-2, .col-3, .col-4, .col-6, .col-8, .col-9 {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0.5rem;
    }
    
    .container {
        padding: 0;
        margin: 0;
    }
    
    /* Section headings */
    h1, h2, h3 {
        padding: 0 1rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.4rem;
        margin: 1.5rem 0 1rem 0;
    }
    
    h3 {
        font-size: 1.2rem;
    }
    
    /* Improved spacing */
    .mb-4 {
        margin-bottom: 1.5rem;
    }
    
    .mt-4 {
        margin-top: 1.5rem;
    }
}

/* Small Mobile Devices */
@media (max-width: 576px) {
    body {
        padding-top: 110px; /* Smaller header on tiny screens */
    }
    
    .products-grid {
        grid-template-columns: 1fr; /* Single column on very small screens */
        gap: 0.5rem;
        padding: 0.75rem;
    }
    
    .product-image {
        height: 200px; /* Larger images when single column */
    }
    
    .category-card {
        flex: 0 0 100px; /* Smaller category cards */
    }
    
    .category-card img {
        width: 50px;
        height: 50px;
    }
    
    .mobile-nav {
        padding: 0.5rem 0.25rem;
    }
    
    .mobile-nav-item {
        min-width: 50px;
        font-size: 0.7rem;
    }
    
    .mobile-nav-icon {
        font-size: 1.3rem;
    }
}

/* Performance optimizations for mobile */
@media (max-width: 768px) {
    /* Optimize animations for mobile */
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    .product-card:hover {
        transform: none; /* Disable hover effects on touch devices */
    }
    
    img {
        loading: lazy; /* Native lazy loading */
    }
}

/* Mobile Category and Promo Sections - Hidden on Desktop */
.mobile-categories-section,
.mobile-promos-section {
    display: none; /* Hidden on desktop */
}

@media (max-width: 768px) {
    .mobile-categories-section,
    .mobile-promos-section {
        display: block;
        padding: 1rem 0;
        background: white;
        margin: 0.5rem 0;
    }
    
    /* Homepage grid sections - stack on mobile */
    .walmart-grid {
        display: block !important;
    }
    
    .grid-card {
        margin-bottom: 1rem;
        border-radius: 12px;
        overflow: hidden;
    }
    
    /* Product sections with horizontal scrolling */
    .products-horizontal-container {
        position: relative;
        overflow: hidden;
    }
    
    .products-track {
        display: flex !important;
        overflow-x: auto;
        gap: 1rem;
        padding: 1rem;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .products-track::-webkit-scrollbar {
        display: none;
    }
    
    .walmart-product-card {
        flex: 0 0 200px; /* Fixed width for horizontal scroll */
        background: white;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    }
    
    /* Social trending - horizontal scroll */
    .social-images-grid {
        display: flex;
        overflow-x: auto;
        gap: 1rem;
        padding: 1rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .social-images-grid::-webkit-scrollbar {
        display: none;
    }
    
    .social-image-card {
        flex: 0 0 250px;
        height: 250px;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }

.text-primary { color: #007bff; }
.text-secondary { color: #6c757d; }
.text-success { color: #28a745; }
.text-danger { color: #dc3545; }
.text-warning { color: #ffc107; }
.text-info { color: #17a2b8; }
.text-muted { color: #6c757d; }

.bg-primary { background-color: #007bff; }
.bg-secondary { background-color: #6c757d; }
.bg-success { background-color: #28a745; }
.bg-danger { background-color: #dc3545; }
.bg-warning { background-color: #ffc107; }
.bg-info { background-color: #17a2b8; }
.bg-light { background-color: #f8f9fa; }
.bg-dark { background-color: #343a40; }

/* Enhanced Product Badge Styles */
.product-badge.sold-out {
    background: #dc3545 !important;
    color: white !important;
    z-index: 10;
}

.product-badge.low-stock {
    background: #fd7e14 !important;
    color: white !important;
    z-index: 9;
}

.product-sales-info {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
}

/* Mobile Responsiveness - Enhanced */
@media (max-width: 968px) {
    .newsletter-content {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }
    
    .signup-form {
        min-width: auto;
        width: 100%;
        max-width: 400px;
    }
    
    .footer-main {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 24px;
        padding: 32px 20px;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .footer-bottom-right {
        align-items: center;
    }
    
    .legal-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    
    .promo-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .cta-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 24px 20px;
    }
    
    .cta-actions {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 576px) {
    .hero-main-banner {
        height: 380px;
        margin: 16px 16px;
        border-radius: 8px;
    }
    
    .hero-content {
        left: 24px;
        right: 24px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .hero-actions .btn-hero {
        width: 100%;
        justify-content: center;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .category-card {
        min-height: 200px;
    }
    
    .category-card.featured {
        min-height: 280px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .promo-card {
        padding: 20px;
        min-height: 160px;
    }
    
    .promo-title {
        font-size: 18px;
    }
    
    .cta-title {
        font-size: 20px;
    }
    
    .cta-icon i {
        font-size: 40px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 16px;
    }
    
    .product-image {
        height: 200px;
    }
    
    .footer-newsletter {
        padding: 24px 0;
    }
    
    .newsletter-info h3 {
        font-size: 20px;
    }
    
    .newsletter-info p {
        font-size: 14px;
    }
    
    .signup-form {
        flex-direction: column;
        gap: 8px;
    }
    
    .footer-main {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px 20px;
    }
    
    .social-links {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .app-links {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .footer-bottom-left {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .legal-links {
        flex-direction: column;
        gap: 8px;
    }
    
    .main-header-content {
        gap: 16px;
    }
    
    .search-section {
        max-width: none;
    }
}


/* Refined Homepage Layout */
.homepage-container {
    max-width: 100%;
    margin: 0 auto;
    background: #ffffff;
}

/* Professional Hero Section */
.hero-section {
    margin-bottom: 48px;
}

.hero-main-banner {
    position: relative;
    height: 460px;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 24px 20px;
    width: calc(100% - 40px);
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

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

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.2) 100%);
}

.hero-content {
    position: absolute;
    top: 50%;
    left: 48px;
    transform: translateY(-50%);
    color: white;
    z-index: 2;
    max-width: 480px;
}

.hero-title {
    font-size: 42px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
}

.hero-title .highlight {
    color: #fbbf24;
}

.hero-subtitle {
    font-size: 16px;
    margin-bottom: 28px;
    opacity: 0.95;
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.btn-hero {
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.btn-hero.primary {
    background: #3b82f6;
    color: white;
}

.btn-hero.primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.btn-hero.secondary {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-hero.secondary:hover {
    background: rgba(255, 255, 255, 0.25);
}

.hero-badge {
    display: inline-block;
}

.badge-text {
    background: #dc2626;
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Clean Categories Section */
.featured-categories {
    margin-bottom: 64px;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
    width: 100%;
    padding: 0 20px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.section-subtitle {
    font-size: 16px;
    color: #6b7280;
}

.categories-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 20px;
    width: 100%;
    padding: 0 20px;
}

.category-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 220px;
    background: #f8fafc;
}

.category-card.featured {
    min-height: 320px;
}

.category-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-image.special-offer {
    background: linear-gradient(135deg, #10b981, #059669);
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.offer-content i {
    font-size: 48px;
    margin-bottom: 8px;
}

.offer-text {
    font-size: 20px;
    font-weight: 700;
}

.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.1) 100%);
}

/* Category card content overlay (for homepage category cards) */
.category-card .category-content {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    color: white;
    z-index: 2;
}

/* Category page main content area (for category.php page) */
.container > .category-content {
    position: relative;
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    z-index: 1;
}

.category-card .category-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.category-card .category-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 12px;
}

.category-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
}

.category-badge.sale {
    background: #dc2626;
    color: white;
}

.category-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: all 0.2s ease;
    z-index: 2;
}

.category-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

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

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

/* Clean Promotional Banners */
.promotional-banners {
    margin-bottom: 64px;
}

.promo-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 20px;
    width: 100%;
    padding: 0 20px;
}

.promo-card {
    position: relative;
    border-radius: 12px;
    padding: 28px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    min-height: 180px;
}

.promo-card.primary {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.promo-card.membership {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

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

.promo-icon {
    margin-bottom: 12px;
}

.promo-icon i {
    font-size: 28px;
}

.promo-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1.3;
}

.promo-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 16px;
}

.promo-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.promo-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.promo-note {
    font-size: 11px;
    opacity: 0.8;
    margin-top: 10px;
}

.promo-graphic {
    position: absolute;
    bottom: 16px;
    right: 16px;
    opacity: 0.2;
    z-index: 1;
}

.promo-graphic i {
    font-size: 48px;
}

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

/* Refined CTA Section */
.personalized-cta {
    margin-bottom: 64px;
}

.cta-content {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 12px;
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    width: calc(100% - 40px);
    margin: 0 20px;
}

.cta-icon i {
    font-size: 48px;
    color: #3b82f6;
}

.cta-text {
    flex: 1;
}

.cta-title {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 6px;
}

.cta-subtitle {
    font-size: 15px;
    color: #6b7280;
}

.cta-actions {
    display: flex;
    gap: 12px;
}

.btn-cta {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.btn-cta.primary {
    background: #3b82f6;
    color: white;
}

.btn-cta.secondary {
    background: transparent;
    color: #3b82f6;
    border: 2px solid #3b82f6;
}

.btn-cta:hover {
    transform: translateY(-1px);
}

.btn-cta.primary:hover {
    background: #2563eb;
}

.btn-cta.secondary:hover {
    background: #3b82f6;
    color: white;
}

.welcome-message {
    color: #059669;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Modern Product Section */
.products-section {
    margin-bottom: 64px;
}

.section-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.view-all-btn {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.view-all-btn:hover {
    color: #2563eb;
}

.products-carousel {
    position: relative;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 16px;
}

.product-card.modern {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    scroll-snap-align: start;
}

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

.product-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #f8fafc;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.product-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
}

.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: white;
}

.badge.trending {
    background: #dc2626;
}

.badge.new {
    background: #059669;
}

.badge.sale {
    background: #f59e0b;
}

.product-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card.modern:hover .product-actions {
    opacity: 1;
}

.action-btn {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.action-btn:hover {
    background: white;
    transform: scale(1.1);
}

.action-btn.wishlist.active {
    background: #dc2626;
    color: white;
}

.product-info {
    padding: 16px;
}

.product-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 6px;
    line-height: 1.4;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.stars {
    color: #f59e0b;
    font-size: 12px;
}

.rating-count {
    color: #6b7280;
    font-size: 12px;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
}

.current-price {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
}

.original-price {
    font-size: 12px;
    color: #9ca3af;
    text-decoration: line-through;
}

.discount {
    background: #dc2626;
    color: white;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
}

.add-to-cart-btn {
    width: 100%;
    background: #3b82f6;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.add-to-cart-btn:hover {
    background: #2563eb;
}

.add-to-cart-btn.loading {
    opacity: 0.7;
    pointer-events: none;
}

.add-to-cart-btn.success {
    background: #059669;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.carousel-btn {
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.carousel-btn:hover {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

/* Brand Spotlight */
.brand-spotlight {
    margin-bottom: 60px;
}

.spotlight-content {
    background: linear-gradient(135deg, #fef3c7, #fcd34d);
    border-radius: 20px;
    padding: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    width: calc(100% - 40px);
    margin: 0 20px;
}

.spotlight-label {
    background: #3b82f6;
    color: white;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 16px;
}

.spotlight-title {
    font-size: 36px;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 12px;
}

.brand-name {
    color: #3b82f6;
}

.spotlight-subtitle {
    font-size: 16px;
    color: #4b5563;
    margin-bottom: 24px;
}

.spotlight-btn {
    background: white;
    color: #1f2937;
    padding: 14px 28px;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.spotlight-btn:hover {
    background: #f3f4f6;
    transform: translateY(-2px);
}

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

.spotlight-image {
    border-radius: 16px;
    overflow: hidden;
}

.spotlight-image img {
    width: 100%;
    max-width: 300px;
    height: auto;
}

.spotlight-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    
    .promo-grid {
        grid-template-columns: 1fr;
    }
    
    .spotlight-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Mobile menu toggle - Clean design */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    flex-direction: column;
    gap: 3px;
    padding: 6px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.mobile-menu-toggle:hover {
    background-color: #f3f4f6;
}

.hamburger-line {
    width: 18px;
    height: 2px;
    background-color: #374151;
    transition: all 0.3s ease;
    border-radius: 1px;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .category-nav-content {
        padding: 0 16px;
    }
    
    .category-nav-item:first-child {
        margin-left: 0;
    }
    
    .category-nav-item:last-child {
        margin-right: 0;
    }
}

/* ========== Enhanced eBay-Style Homepage Sections ========== */

/* Section 3: Daily Deals */
.deals-section {
    background: #f8fafc;
    padding: 48px 0;
    margin: 0 -20px 48px -20px;
}

.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    width: 100%;
    padding: 0 20px;
}

.deal-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

.deal-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.deal-card.featured {
    grid-column: span 2;
}

.deal-timer {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #dc2626;
    color: white;
    padding: 6px 10px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 10;
}

.deal-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

.deal-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #16a34a;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
}

.deal-content {
    padding: 20px;
}

.deal-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
}

.deal-price {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.deal-price .current {
    font-size: 20px;
    font-weight: 700;
    color: #dc2626;
}

.deal-price .original {
    font-size: 16px;
    color: #6b7280;
    text-decoration: line-through;
}

.deal-btn {
    background: #0654ba;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.deal-btn:hover {
    background: #0540a1;
    color: white;
}

/* Section 5: Top Brands */
.brands-section {
    background: #f8fafc;
    padding: 48px 0;
    margin: 0 -20px 48px -20px;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
    width: 100%;
    padding: 0 20px;
}

.brand-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.brand-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.brand-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 50%;
    overflow: hidden;
}

.brand-logo img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.brand-name {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

/* Enhanced Product Shelf Styles */
.trending-badge, .new-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #dc2626;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
}

.new-badge {
    background: #16a34a;
}

/* Section 8: Personalized Recommendations */
.recommendations-section {
    background: #f8fafc;
    padding: 48px 0;
    margin: 0 -20px 48px -20px;
}

.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    width: 100%;
    padding: 0 20px;
}

.recommendation-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.recommendation-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.rec-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

.rec-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #8b5cf6;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
}

.rec-content {
    padding: 20px;
}

.rec-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.rec-reason {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 12px;
}

.rec-price {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 16px;
}

.rec-btn {
    width: 100%;
    background: #8b5cf6;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.rec-btn:hover {
    background: #7c3aed;
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 768px) {
    .deals-grid {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }
    
    .deal-card.featured {
        grid-column: span 1;
    }
    
    .brands-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        padding: 0 10px;
    }
    
    .recommendations-grid {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
    }
}

/* Focus states for accessibility */
.deal-btn:focus,
.rec-btn:focus {
    outline: 2px solid #0654ba;
    outline-offset: 2px;
}

.deal-card:focus,
.brand-card:focus,
.recommendation-card:focus {
    outline: 2px solid #0654ba;
    outline-offset: 2px;
}

/* Checkout Page Centered Layout */
body.checkout-page .container,
.checkout-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

body.checkout-page .row {
    display: flex;
    justify-content: center;
    gap: 20px;
}

@media (max-width: 768px) {
    body.checkout-page .row {
        flex-direction: column;
    }
}

/* ==========================================
   Z-INDEX MANAGEMENT & CLICKABILITY FIXES
   Ensures proper stacking and prevents
   non-clickable elements
   ========================================== */

/* Define z-index hierarchy */
:root {
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 500;
    --z-fixed: 1000;
    --z-modal-backdrop: 9999;
    --z-modal: 10000;
    --z-tooltip: 10001;
}

/* Ensure buttons are always clickable */
button,
.btn,
.btn-primary,
.btn-secondary,
[type="submit"],
[type="button"] {
    position: relative;
    z-index: var(--z-base);
    pointer-events: auto;
    touch-action: manipulation;
}

/* Prevent overlays from blocking buttons */
.checkout-section,
.order-summary,
.form-group {
    position: relative;
    z-index: auto;
}

/* Ensure form elements are clickable */
input,
select,
textarea {
    position: relative;
    z-index: var(--z-base);
    pointer-events: auto;
}

/* Modal proper stacking */
.modal-overlay,
.wallet-modal-overlay {
    z-index: var(--z-modal-backdrop) !important;
}

.modal-content,
.wallet-modal-content {
    z-index: var(--z-modal) !important;
    position: relative;
}

/* Ensure header doesn't block content */
.fezamarket-header,
.ebay-main-header {
    z-index: var(--z-sticky);
}

/* Dropdowns should be above content but below modals */
.dropdown-menu,
.select2-dropdown,
.iti__country-list {
    z-index: var(--z-dropdown);
}

/* Notifications should be on top */
.notification,
.alert {
    z-index: var(--z-tooltip);
}

/* ==========================================
   RESPONSIVE UNIT IMPROVEMENTS
   Replace remaining fixed widths with
   responsive units where appropriate
   ========================================== */

/* Ensure containers are fluid */
.container-fluid,
.content-wrapper {
    width: 100%;
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 768px) {
    .container-fluid,
    .content-wrapper {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

@media (min-width: 1200px) {
    .container-fluid,
    .content-wrapper {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

/* Better button sizing on mobile */
@media (max-width: 768px) {
    .btn,
    .btn-primary,
    .btn-secondary {
        min-height: 44px; /* Touch-friendly size */
        font-size: 1rem;
    }
}

/* Prevent horizontal scroll on all pages */
html,
body {
    overflow-x: hidden;
    max-width: 100vw;
}

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

/* ==========================================
   ACCESSIBILITY & FOCUS IMPROVEMENTS
   ========================================== */

/* Better focus indicators */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #0654ba;
    outline-offset: 2px;
}

/* High contrast focus for accessibility */
@media (prefers-contrast: high) {
    button:focus,
    a:focus,
    input:focus,
    select:focus,
    textarea:focus {
        outline: 3px solid currentColor;
        outline-offset: 3px;
    }
}

/* Ensure touch targets are large enough */
@media (hover: none) and (pointer: coarse) {
    button,
    a,
    input[type="checkbox"],
    input[type="radio"] {
        min-width: 44px;
        min-height: 44px;
    }
}

