/* =============================================
   BestOfAllCarts — Unified Site Styles
   ============================================= */

:root {
    --primary: #00b14f;
    --primary-dark: #0a8f3d;
    --primary-light: #e8f8ef;
    --accent: #ff6b35;
    --dark: #1a1f2e;
    --dark-footer: #141820;
    --text: #2d3436;
    --text-muted: #636e72;
    --bg: #f8faf9;
    --white: #ffffff;
    --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 16px 48px rgba(0, 177, 79, 0.15);
    --radius: 16px;
    --radius-lg: 24px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg);
    color: var(--text);
    padding-top: 76px;
    overflow-x: hidden;
}

body.home-page {
    background: #f4f9f6;
}

body.inner-page {
    background: linear-gradient(180deg, #f0f7f2 0%, var(--bg) 220px);
}

/* ================= NAVBAR ================= */

.navbar {
    height: 76px;
    z-index: 1050;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 177, 79, 0.08);
    transition: var(--transition);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark) !important;
    letter-spacing: -0.5px;
}

.navbar-brand i {
    color: var(--primary);
}

.navbar-nav .nav-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--text) !important;
    margin-left: 8px;
    padding: 8px 16px !important;
    border-radius: 50px;
    transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-dark) !important;
    background: var(--primary-light);
}

.navbar-toggler {
    border-color: rgba(0, 177, 79, 0.25);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 177, 79, 0.25);
}

/* ================= COMPACT HERO (Home) ================= */

.hero-compact {
    background: linear-gradient(135deg, #087a35 0%, #00b14f 50%, #0a9f4a 100%);
    color: white;
    padding: 28px 0 32px;
    position: relative;
    overflow: hidden;
}

.hero-compact::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.hero-compact .hero-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.hero-compact .hero-text h1 {
    font-size: clamp(1.4rem, 3vw, 1.85rem);
    font-weight: 700;
    margin-bottom: 4px;
    line-height: 1.25;
}

.hero-compact .hero-text p {
    font-size: 13px;
    opacity: 0.88;
    margin: 0;
}

.hero-compact .hero-search {
    flex: 1;
    min-width: 260px;
    max-width: 480px;
    margin: 0;
    background: white;
    border-radius: 50px;
    padding: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
}

.hero-compact .hero-search input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 18px;
    font-size: 14px;
    outline: none;
    color: var(--text);
}

.hero-compact .hero-search .btn-search {
    background: var(--primary-dark);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 10px 22px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.hero-compact .hero-search .btn-search:hover {
    background: #087a35;
}

/* ================= CATEGORY ICONS (First Screen) ================= */

.category-icons-section {
    position: relative;
    padding: 36px 0 40px;
    background: linear-gradient(160deg, #f0faf4 0%, #e8f5ec 40%, #f5fbf7 100%);
    overflow: hidden;
}

.category-icons-section::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(0, 177, 79, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.category-icons-section::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: -40px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(0, 177, 79, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.category-icons-section .container {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 28px 24px 32px;
    border: 1px solid rgba(0, 177, 79, 0.12);
    box-shadow: 0 8px 32px rgba(0, 177, 79, 0.08);
}

.category-icons-section .section-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 24px;
    text-align: center;
}

.category-icons-section .section-label::before,
.category-icons-section .section-label::after {
    content: '—';
    margin: 0 10px;
    opacity: 0.4;
    font-weight: 400;
}

.category-icon-grid {
    display: flex;
    justify-content: center;
    gap: clamp(16px, 4vw, 40px);
    flex-wrap: wrap;
}

.category-icon-item {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
    min-width: 72px;
}

.category-icon-item:hover {
    color: inherit;
    transform: translateY(-4px);
}

.category-icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    border: 3px solid white;
    overflow: hidden;
    background: var(--white);
}

.category-icon-item:hover .category-icon-circle {
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.category-icon-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-icon-circle.icon-veg { background: linear-gradient(135deg, #e8f8ef, #d4f5e2); }
.category-icon-circle.icon-fruit { background: linear-gradient(135deg, #ffe8e8, #ffd4d4); }
.category-icon-circle.icon-dairy { background: linear-gradient(135deg, #fff8e1, #ffecb3); }
.category-icon-circle.icon-snacks { background: linear-gradient(135deg, #e3f2fd, #bbdefb); }

.category-icon-item span {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
}

/* ================= STATS BAR ================= */

.stats-section-wrap {
    padding: 8px 0 24px;
    background: linear-gradient(180deg, #f5fbf7 0%, var(--bg) 100%);
}

.stats-bar {
    background: linear-gradient(135deg, #ffffff 0%, #f8fdf9 100%);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 177, 79, 0.1);
    padding: 28px 16px;
    margin: 0;
    border: 1px solid rgba(0, 177, 79, 0.15);
    position: relative;
    overflow: hidden;
}

.stats-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), #00d96a, var(--primary-dark));
}

.stat-item {
    text-align: center;
    padding: 12px 8px;
    position: relative;
}

.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: rgba(0, 177, 79, 0.15);
}

.stat-item .stat-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    background: var(--primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
    font-size: 16px;
}

.stat-item .stat-number {
    font-size: 1.85rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-item .stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    font-weight: 500;
}

/* ================= SECTIONS ================= */

.section {
    padding: 48px 0;
}

.section-title {
    font-weight: 700;
    font-size: clamp(1.35rem, 3vw, 1.75rem);
    margin-bottom: 6px;
    color: var(--dark);
}

.section-subtitle {
    color: var(--text-muted);
    margin-bottom: 28px;
    font-size: 14px;
}

/* ================= CATEGORY CARDS (Browse page) ================= */

.category-card {
    position: relative;
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    color: inherit;
}

.category-card-img {
    height: 120px;
    overflow: hidden;
    position: relative;
}

.category-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.category-card:hover .category-card-img img {
    transform: scale(1.06);
}

.category-card-body {
    padding: 16px;
    text-align: center;
}

.category-card-body h5 {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 2px;
}

.category-card-body p {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

/* ================= HOME PAGE EXTRAS ================= */

.home-page .section.pt-2 {
    background: linear-gradient(180deg, var(--bg) 0%, #ffffff 50%, var(--bg) 100%);
}

.home-page .how-it-works {
    border-radius: var(--radius-lg);
    margin: 0 16px;
    box-shadow: var(--shadow-sm);
}

@media (min-width: 768px) {
    .home-page .how-it-works {
        margin: 0;
    }
}

/* ================= INNER PAGE HEADER ================= */

.page-header {
    padding: 24px 0 8px;
}

.page-header .breadcrumb-nav {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.page-header .breadcrumb-nav a {
    color: var(--primary-dark);
    text-decoration: none;
}

.page-header .breadcrumb-nav a:hover {
    text-decoration: underline;
}

.page-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.page-header h1 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    margin: 0;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-header h1 .cat-emoji {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: var(--primary-light);
    color: var(--primary-dark);
}

.page-header p {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0 0 24px;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 50px;
    background: var(--white);
    color: var(--primary-dark);
    border: 1px solid rgba(0, 177, 79, 0.25);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.btn-back:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ================= PRODUCT GRID (Inner pages) ================= */

.products-grid-section {
    padding-bottom: 48px;
}

.product-count-badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 20px;
}

/* ================= PRODUCT CARDS ================= */

.product-card {
    border: none;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(0, 177, 79, 0.12);
    border-color: rgba(0, 177, 79, 0.15);
}

.product-card .card-img-wrap {
    position: relative;
    background: linear-gradient(180deg, #fafbfc 0%, #f3f6f4 100%);
    padding: 20px 16px;
    height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-card .card-img-wrap img {
    max-height: 130px;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.4s ease;
}

.product-card:hover .card-img-wrap img {
    transform: scale(1.08);
}

.product-card .price-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 177, 79, 0.3);
}

.product-card .card-body {
    padding: 14px 16px 18px;
}

.product-card .card-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--dark);
}

.product-card .card-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.product-card .btn-compare {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px;
    font-weight: 600;
    font-size: 13px;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.product-card .btn-compare:hover {
    background: var(--primary-dark);
    color: white;
    transform: scale(1.02);
}

/* ================= HOW IT WORKS ================= */

.how-it-works {
    background: var(--white);
}

.step-card {
    text-align: center;
    padding: 28px 16px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.step-card:hover {
    background: var(--primary-light);
}

.step-number {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    margin: 0 auto 14px;
}

.step-card h5 {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 6px;
}

.step-card p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

/* ================= PLATFORMS ================= */

.platforms-section {
    background: var(--bg);
}

.platform-badge {
    background: var(--white);
    border-radius: var(--radius);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.platform-badge:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.platform-badge i { font-size: 24px; }
.platform-badge .platform-name { font-weight: 600; font-size: 13px; }
.platform-badge .platform-time { font-size: 11px; color: var(--text-muted); }

/* ================= FOOTER ================= */

.footer {
    background: var(--dark-footer);
    color: #dcdcdc;
    padding: 48px 0 20px;
    margin-top: 40px;
}

.footer h3 {
    color: var(--white);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.footer h5 {
    color: var(--white);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 14px;
}

.footer p {
    font-size: 13px;
    line-height: 1.7;
    color: #aaa;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li { margin-bottom: 8px; }

.footer-links a {
    color: #aaa;
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary);
}

.social-icons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.social-icons a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    color: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    text-decoration: none;
    transition: var(--transition);
}

.social-icons a:hover {
    background: var(--primary);
    color: white;
}

.footer hr {
    border-color: rgba(255,255,255,0.08);
    margin: 28px 0 16px;
}

.footer-copyright {
    text-align: center;
    color: #666;
    font-size: 12px;
}

.footer-copyright strong { color: #aaa; }

/* ================= MOBILE ================= */

@media (max-width: 767px) {
    body { padding-top: 70px; }
    .navbar { height: 70px; }

    .hero-compact { padding: 20px 0 24px; }

    .hero-compact .hero-row {
        flex-direction: column;
        text-align: center;
    }

    .hero-compact .hero-search {
        max-width: 100%;
        width: 100%;
    }

    .category-icons-section .container {
        padding: 20px 16px 24px;
        margin: 0 12px;
    }

    .category-icon-circle {
        width: 68px;
        height: 68px;
    }

    .category-icons-section {
        padding: 24px 0 28px;
    }

    .stat-item:not(:last-child)::after {
        display: none;
    }

    .section { padding: 36px 0; }

    .product-card .card-img-wrap { height: 140px; }

    .page-header-top {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 575px) {
    .navbar-brand { font-size: 1.15rem; }

    .category-icon-grid {
        gap: 12px 20px;
    }

    .category-icon-item span {
        font-size: 12px;
    }
}
