﻿/* ========================================
   MODERN INDEX PAGE STYLES
   Clean, Professional, Mobile-First Design
======================================== */

:root {
    --primary-green: #177e3f;
    --primary-green-dark: #125c2e;
    --primary-green-light: #1a9447;
    --text-dark: #2c3e50;
    --text-gray: #718096;
    --text-light: #a0aec0;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-dark);
    background: var(--bg-light);
    line-height: 1.6;
}

.main-wrapper {
    padding: 20px 0;
    background: var(--bg-light);
}

.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ========================================
   BANNER SECTION
======================================== */
.banner-section {
/*    margin-bottom: 40px;*/
}

.banner-swiper {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.banner-slide {
    position: relative;
    height: 450px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .banner-slide::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, rgba(0,0,0,0.3), rgba(0,0,0,0.1));
    }

.banner-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 600px;
    padding: 20px;
}

.banner-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
}

.banner-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 30px;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.banner-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary-green);
    color: white;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(23, 126, 63, 0.3);
}

    .banner-btn:hover {
        background: white;
        box-shadow: 0 6px 20px rgba(23, 126, 63, 0.4);
    }

.banner-section .swiper-button-next,
.banner-section .swiper-button-prev {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: white;
}

    .banner-section .swiper-button-next:after,
    .banner-section .swiper-button-prev:after {
        font-size: 18px;
    }

/* ========================================
   SECTION HEADER
======================================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.nav-buttons {
    display: flex;
    gap: 10px;
}

.nav-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--primary-green);
    background: white;
    color: var(--primary-green);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

    .nav-btn:hover {
        background: var(--primary-green);
        color: white;
        transform: translateY(-2px);
    }

/* ========================================
   CATEGORIES SECTION - Multiple Colors
======================================== */
.categories-section {
    margin-bottom: 40px;
}

.category-card {
    display: block;
    background: white;
    border-radius: var(--radius-md);
    padding: 15px 0px !important;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
/*    box-shadow: var(--shadow-sm);*/
    text-decoration: none;
    height: 100%;
    position: relative;
    overflow: hidden;
}

/* Multiple Background Colors with Gradients */
.categories-swiper .swiper-slide:nth-child(12n+1) .category-card {
    background: linear-gradient(135deg, #FFE5E5 0%, #FFD5D5 100%);
}

.categories-swiper .swiper-slide:nth-child(12n+2) .category-card {
    background: linear-gradient(135deg, #FFF4E5 0%, #FFE8CC 100%);
}

.categories-swiper .swiper-slide:nth-child(12n+3) .category-card {
    background: linear-gradient(135deg, #FFE5F5 0%, #FFD5ED 100%);
}

.categories-swiper .swiper-slide:nth-child(12n+4) .category-card {
    background: linear-gradient(135deg, #E5F5E5 0%, #D5EDD5 100%);
}

.categories-swiper .swiper-slide:nth-child(12n+5) .category-card {
    background: linear-gradient(135deg, #E5E5FF 0%, #D5D5FF 100%);
}

.categories-swiper .swiper-slide:nth-child(12n+6) .category-card {
    background: linear-gradient(135deg, #F5E5FF 0%, #EDD5FF 100%);
}

.categories-swiper .swiper-slide:nth-child(12n+7) .category-card {
    background: linear-gradient(135deg, #E5F5FF 0%, #D5EDFF 100%);
}

.categories-swiper .swiper-slide:nth-child(12n+8) .category-card {
    background: linear-gradient(135deg, #FFFFE5 0%, #FFFFD5 100%);
}

.categories-swiper .swiper-slide:nth-child(12n+9) .category-card {
    background: linear-gradient(135deg, #E5FFFF 0%, #D5F5F5 100%);
}

.categories-swiper .swiper-slide:nth-child(12n+10) .category-card {
    background: linear-gradient(135deg, #FFE5E5 0%, #FFDDD5 100%);
}

.categories-swiper .swiper-slide:nth-child(12n+11) .category-card {
    background: linear-gradient(135deg, #F0E5FF 0%, #E8D5FF 100%);
}

.categories-swiper .swiper-slide:nth-child(12n+12) .category-card {
    background: linear-gradient(135deg, #E5FFF0 0%, #D5FFE8 100%);
}

.category-card:hover {
/*    transform: translateY(-8px);*/
/*    box-shadow: 0 8px 20px rgba(23, 126, 63, 0.15);*/
}

    .category-img-wrapper img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

.category-card:hover .category-img-wrapper img {
    transform: scale(1.07);
}

.category-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 0px !important;
}

.category-count {
    font-size: 13px;
    color: var(--text-gray);
}

/* ========================================
   FEATURED & PRODUCTS SECTION
======================================== */
.product-card {
    position: relative;
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
/*    box-shadow: var(--shadow-sm);*/
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
}
/*
    .product-card:hover {
        transform: translateY(-5px);
        transition:all 2s ease;
    }*/

.discount-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #06d200, #0a5c02) !important;
    color: white;
    padding: 3px 5px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(229, 62, 62, 0.3);
}

.product-img-link {
    display: block;
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: var(--bg-light);
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/*.product-card:hover .product-img {
    transform: scale(1.05);
}
*/
.product-info {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 5px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.product-card:hover .product-name {
    color: var(--primary-green);
}

.product-price-row {
    margin-bottom: 12px;
}

.price-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.current-price {
    font-size: 22px;
    font-weight: 700;
    color: #e53e3e;
}

.original-price {
    font-size: 15px;
    color: var(--text-light);
    text-decoration: line-through;
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

/* ========================================
   CUSTOM DROPDOWN - Modern Design
======================================== */
.custom-dropdown {
    flex: 1;
    position: relative;
}

.dropdown-selected {
    width: 100%;
    padding: 11px 10px 11px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

    .dropdown-selected:hover {
        border-color: var(--primary-green);
    }

.custom-dropdown.open .dropdown-selected {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(23, 126, 63, 0.1);
}

.selected-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
}

.dropdown-arrow {
    font-size: 12px;
    color: var(--primary-green);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-options {
    position: absolute;
    bottom: calc(100% + 5px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--primary-green);
    border-radius: var(--radius-sm);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 1000;
}

.custom-dropdown.open .dropdown-options {
    display: block;
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 200px;
    overflow-y: auto;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-option {
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-color);
}

    .dropdown-option:last-child {
        border-bottom: none;
    }

    .dropdown-option:hover {
        background: #f0fdf4;
        color: var(--primary-green);
    }

    .dropdown-option.selected {
        background: #f0fdf4 !important;
        color: var(--text-dark);
        font-weight: 600;
    }

/* Custom scrollbar for dropdown */
.dropdown-options::-webkit-scrollbar {
    width: 6px;
}

.dropdown-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.dropdown-options::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 10px;
}

.add-cart-btn {
    width: 48px;
    height: 45px !important;
    border-radius: var(--radius-sm);
    border: none;
    background: var(--primary-green);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

    .add-cart-btn:hover {
        background: var(--primary-green-light);
/*        transform: translateY(-2px);*/
        box-shadow: 0 4px 12px rgba(23, 126, 63, 0.3);
    }

    .add-cart-btn i {
        font-size: 18px;
    }

/* ========================================
   CATEGORY-WISE PRODUCTS
======================================== */
.category-section {
    margin-bottom: 50px;
}

.category-section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--primary-green);
    display: inline-block;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

/* ========================================
   LOADER
======================================== */
#loader {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

/* Tablet */
@media (max-width: 1024px) {
    .banner-title {
        font-size: 38px;
    }

    .section-title {
        font-size: 24px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .main-wrapper {
        padding: 15px 0;
    }

    .banner-section {
        margin-bottom: 30px;
    }

    .banner-slide {
        height: 350px;
    }

    .banner-title {
        font-size: 28px;
        margin-bottom: 20px;
    }

    .banner-tag {
        font-size: 12px;
        padding: 6px 15px;
    }

    .banner-btn {
        padding: 12px 24px;
        font-size: 14px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        margin-bottom: 20px;
    }

    .section-title {
        font-size: 20px;
    }

    .nav-buttons {
        display: none;
    }

    .category-img-wrapper {
        height: 100px;
    }

    .category-name {
        font-size: 14px;
    }

    .category-count {
        font-size: 12px;
    }

    .product-img-link {
        height: 220px;
    }

    .product-name {
        font-size: 14px;
    }

    .current-price {
        font-size: 18px;
    }

    .original-price {
        font-size: 13px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .category-section-title {
        font-size: 20px;
    }

    .featured-section,
    .categories-section,
    .category-products-section {
        margin-bottom: 35px;
    }
}

@media (max-width: 480px) {
    .banner-slide {
        height: 280px;
    }

    .banner-title {
        font-size: 22px;
    }

    .product-actions {
        flex-direction: column;
        gap: 8px;
    }

    .add-cart-btn {
        width: 100%;
        height: 45px;
    }

    .dropdown-selected {
        padding: 10px 32px 10px 12px;
        font-size: 13px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   SMOOTH SCROLLING & ANIMATIONS
======================================== */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Link Styles */
a {
    text-decoration: none;
    color: inherit;
}

    a:hover {
        text-decoration: none;
    }

    /* Focus Styles for Accessibility */
    button:focus,
    select:focus,
    a:focus {
        outline: 2px solid var(--primary-green);
        outline-offset: 2px;
    }
