/* ============================================
   MODERN E-COMMERCE STYLING - ORANGE THEME
   ============================================ */

/* ========== GLOBAL VARIABLES ========== */
:root {
    /* Color Palette - Orange Theme */
    --primary: #ff6b35;
    --primary-dark: #e55a2b;
    --primary-light: #ff8c5a;
    --primary-soft: #fff3ed;
    
    /* Neutral Colors */
    --dark: #1a2634;
    --gray-dark: #2c3e45;
    --gray: #6c7a89;
    --gray-light: #eef2f5;
    --gray-lighter: #f8fafc;
    --white: #ffffff;
    
    /* Functional Colors */
    --success: #2ecc71;
    --warning: #f39c12;
    --danger: #e74c3c;
    --info: #3498db;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 12px 40px rgba(0, 0, 0, 0.15);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Container */
    --container-max: 1400px;
}

/* ========== RESET & BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--gray-lighter);
    color: var(--dark);
    line-height: 1.5;
    overflow-x: hidden;
}

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

/* ========== LOADING OVERLAY ========== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--gray-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========== HEADER & NAVIGATION ========== */
.header-style-1 {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Top Header */
.top-header {
    background: var(--dark);
    color: var(--gray-light);
    font-size: 12px;
    padding: 6px 0;
}

.top-header a {
    color: var(--gray-light);
    transition: var(--transition-fast);
}

.top-header a:hover {
    color: var(--primary);
}

/* Main Header */
.main-header {
    padding: 15px 0;
    background: var(--white);
}

/* Menu Bar */
.menu-bar {
    background: var(--white);
    border-top: 1px solid var(--gray-light);
    border-bottom: 1px solid var(--gray-light);
}

/* ========== MAIN SLIDER ========== */
.main-slider {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: var(--shadow-md);
}

.slide {
    position: relative;
    height: 480px;
    background: linear-gradient(135deg, var(--dark) 0%, var(--gray-dark) 100%);
}

.slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--white);
    width: 80%;
    max-width: 700px;
}

.slide-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.slide-content p {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.slide-content .btn-primary {
    background: var(--primary);
    border: none;
    padding: 10px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition-normal);
}

.slide-content .btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Slider Controls */
.slider-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.control-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
    font-size: 14px;
}

.control-btn:hover {
    background: var(--primary);
    color: var(--white);
    transform: scale(1.1);
}

/* ========== CATEGORY SECTIONS ========== */
.category-products-section {
    margin-bottom: 48px;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gray-light);
}

.category-title {
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
    color: var(--dark);
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
}

.view-all-category {
    color: var(--gray);
    font-weight: 500;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
}

.view-all-category i {
    font-size: 12px;
}

.view-all-category:hover {
    color: var(--primary);
    gap: 10px;
}

/* ========== PRODUCT GRID ========== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* Product Card */
.product-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition-normal);
    position: relative;
    box-shadow: var(--shadow-sm);
}

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

/* Product Image */
.product-image {
    position: relative;
    overflow: hidden;
    background: var(--gray-lighter);
    aspect-ratio: 1 / 1;
}

.product-image-link {
    display: block;
    width: 100%;
    height: 100%;
}

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

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

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-normal);
}

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

.view-details {
    background: var(--primary);
    color: var(--white);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 500;
    transform: translateY(20px);
    transition: var(--transition-normal);
}

.product-card:hover .view-details {
    transform: translateY(0);
}

/* Discount Badge */
.discount-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--danger);
    color: var(--white);
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
}

/* Product Info */
.product-info {
    padding: 16px;
}

.product-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.product-name a {
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition-fast);
}

.product-name a:hover {
    color: var(--primary);
}

/* Product Pricing */
.product-pricing {
    margin-bottom: 10px;
}

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

.original-price {
    font-size: 0.75rem;
    color: var(--gray);
    text-decoration: line-through;
    margin-left: 6px;
}

/* Stock Status */
.product-availability {
    margin-bottom: 12px;
    font-size: 0.75rem;
}

.in-stock {
    color: var(--success);
}

.out-of-stock {
    color: var(--danger);
}

.in-stock i,
.out-of-stock i {
    margin-right: 4px;
    font-size: 10px;
}

/* Product Actions */
.product-actions {
    margin-top: 12px;
}

.add-to-cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 10px 12px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
}

.add-to-cart-btn i {
    font-size: 12px;
}

.add-to-cart-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.out-of-stock-btn {
    width: 100%;
    padding: 10px 12px;
    background: var(--gray-light);
    color: var(--gray);
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.75rem;
    cursor: not-allowed;
}

.out-of-stock-btn i {
    font-size: 10px;
    margin-right: 4px;
}

/* ========== ALERTS & MESSAGES ========== */
.alert {
    padding: 16px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.alert-danger {
    background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

.alert-warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fff3e0 100%);
    color: var(--warning);
    border-left: 4px solid var(--warning);
}

.alert i {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.alert h4 {
    font-size: 1.125rem;
    margin-bottom: 6px;
}

.alert p {
    margin-bottom: 0;
    font-size: 0.875rem;
}

.alert .small {
    font-size: 0.7rem;
    opacity: 0.8;
}

/* ========== NO PRODUCTS STATE ========== */
.no-products {
    text-align: center;
    padding: 48px 20px;
    background: var(--white);
    border-radius: var(--radius-md);
    color: var(--gray);
    font-size: 0.875rem;
}

/* ========== FOOTER ========== */
footer {
    background: var(--dark);
    color: var(--gray-light);
    padding: 40px 0 20px;
    margin-top: 48px;
}

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

footer a {
    color: var(--gray-light);
    transition: var(--transition-fast);
    font-size: 0.875rem;
}

footer a:hover {
    color: var(--primary);
    text-decoration: none;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 20px;
    }
    
    .slide-content h2 {
        font-size: 2rem;
    }
}

@media (max-width: 992px) {
    .slide {
        height: 380px;
    }
    
    .slide-content h2 {
        font-size: 1.75rem;
    }
    
    .slide-content p {
        font-size: 0.95rem;
    }
    
    .category-title {
        font-size: 1.35rem;
    }
}

@media (max-width: 768px) {
    /* Two columns on tablets and small screens */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .slide {
        height: 280px;
    }
    
    .slide-content h2 {
        font-size: 1.35rem;
    }
    
    .slide-content p {
        font-size: 0.8rem;
        margin-bottom: 1rem;
    }
    
    .slide-content .btn-primary {
        padding: 8px 20px;
        font-size: 0.8rem;
    }
    
    .control-btn {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        margin-bottom: 20px;
    }
    
    .category-title {
        font-size: 1.25rem;
    }
    
    .category-title::after {
        bottom: -8px;
        width: 40px;
    }
    
    /* Smaller icons and text on mobile */
    .product-info {
        padding: 12px;
    }
    
    .product-name {
        font-size: 0.8rem;
        margin-bottom: 6px;
    }
    
    .current-price {
        font-size: 0.95rem;
    }
    
    .original-price {
        font-size: 0.65rem;
    }
    
    .product-availability {
        font-size: 0.65rem;
        margin-bottom: 8px;
    }
    
    .add-to-cart-btn {
        padding: 8px 10px;
        font-size: 0.7rem;
    }
    
    .add-to-cart-btn i {
        font-size: 10px;
    }
    
    .out-of-stock-btn {
        padding: 8px 10px;
        font-size: 0.65rem;
    }
    
    .discount-badge {
        top: 8px;
        left: 8px;
        padding: 2px 8px;
        font-size: 9px;
    }
    
    .view-details {
        padding: 4px 12px;
        font-size: 10px;
    }
    
    .alert i {
        font-size: 1.25rem;
    }
    
    .alert h4 {
        font-size: 1rem;
    }
    
    .alert p {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    /* Two columns on very small screens */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .slide {
        height: 220px;
        border-radius: var(--radius-sm);
    }
    
    .slide-content h2 {
        font-size: 1rem;
    }
    
    .slide-content p {
        font-size: 0.7rem;
        margin-bottom: 0.75rem;
    }
    
    .slide-content .btn-primary {
        padding: 6px 16px;
        font-size: 0.7rem;
    }
    
    .control-btn {
        width: 28px;
        height: 28px;
        font-size: 10px;
    }
    
    .category-products-section {
        margin-bottom: 32px;
    }
    
    .category-title {
        font-size: 1.1rem;
    }
    
    .product-info {
        padding: 10px;
    }
    
    .product-name {
        font-size: 0.7rem;
        margin-bottom: 4px;
    }
    
    .current-price {
        font-size: 0.85rem;
    }
    
    .add-to-cart-btn {
        padding: 6px 8px;
        font-size: 0.6rem;
    }
    
    .add-to-cart-btn i {
        font-size: 8px;
    }
    
    .out-of-stock-btn {
        padding: 6px 8px;
        font-size: 0.6rem;
    }
}

/* ========== ANIMATIONS ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-products-section {
    animation: fadeInUp 0.6s ease forwards;
    animation-delay: calc(var(--section-index, 0) * 0.1s);
}

/* ========== CUSTOM SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--gray-light);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ========== HELPER CLASSES ========== */
.text-primary {
    color: var(--primary) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}