/* =====================================================================
   Storefront light theme — overrides style.css variables for customer
   pages only. Admin panel is untouched (does not load this file).
   ===================================================================== */

:root {
    --bg-dark: #f6f8f6;
    --bg-card: #ffffff;
    --bg-card-hover: #fbfdfb;
    --border-color: #eaeceb;
    --text-main: #1b1f1c;
    --text-muted: #6b7280;
    --accent: #1f7a4d;
    --accent-hover: #16603a;
    --success: #16a34a;
    --danger: #e11d48;
    --warning: #d97706;
    --info: #0284c7;
}

body { background: var(--bg-dark); }

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

/* ---------- Pill buttons everywhere ---------- */
.btn-accent, .btn-outline-accent, .btn.btn-sm, .btn-accent.btn-lg {
    border-radius: 999px;
    font-weight: 600;
}
.btn-accent {
    background: #16211a;
    border: none;
}
.btn-accent:hover { background: var(--accent); }
.btn-outline-accent {
    border: 1.5px solid #16211a;
    color: #16211a;
}
.btn-outline-accent:hover {
    background: #16211a;
    border-color: #16211a;
    color: #fff;
}

/* ---------- Top navbar ---------- */
.top-navbar {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.top-navbar .navbar-brand {
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 700;
    font-style: italic;
    font-size: 1.6rem;
    color: #16211a;
}
.top-navbar .nav-link { color: #4b5563 !important; }
.top-navbar .nav-link:hover, .top-navbar .nav-link.active { color: #16211a !important; }
.top-navbar .dropdown-menu { background: #fff; border: 1px solid var(--border-color); box-shadow: 0 8px 24px rgba(0,0,0,0.08); }
.top-navbar .dropdown-item { color: #4b5563; }
.top-navbar .dropdown-item:hover { background: #f0f7f2; color: #16211a; }

/* ---------- Dropdown items site-wide (fixes default Bootstrap blue clashing with the theme) ---------- */
.dropdown-item:hover, .dropdown-item:focus { background: #f0f7f2; color: #16211a; }
.dropdown-item.active, .dropdown-item:active {
    background: #16211a !important;
    color: #fff !important;
}
.top-navbar .form-control { background: #f4f5f4; border: 1px solid var(--border-color); border-radius: 999px; }

/* ---------- Pill nav (green band + floating white pill bar) ---------- */
.pill-nav-outer {
    background: linear-gradient(160deg, #123524 0%, #1f7a4d 55%, #4fae7c 100%);
    padding: 14px 20px;
}
.pill-nav {
    background: #fff;
    border-radius: 999px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
    flex-wrap: nowrap;
}
.pill-nav-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    white-space: nowrap;
}
.pill-nav-brand-text {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    color: #1b3d1f !important;
    letter-spacing: 0.1px;
    line-height: 1.1;
}
.pill-nav-wordmark {
    height: 28px;
    width: auto;
    object-fit: contain;
}
.brand-font {
    font-family: 'Poppins', 'Segoe UI', sans-serif;
    font-weight: 800;
    letter-spacing: 0.1px;
}
.pill-nav-logo {
    background: #fff;
    border: 1px solid var(--border-color);
    width: 42px; height: 42px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    padding: 4px;
    box-sizing: border-box;
    overflow: hidden;
}
.pill-nav-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.pill-nav-search {
    flex: 1 1 auto;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}
.pill-cat-btn {
    background: #f4f6f4;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: #16211a;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    white-space: nowrap;
}
.pill-search-form {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    background: #f4f6f4;
    border-radius: 999px;
    padding: 0.15rem 0.15rem 0.15rem 1rem;
    min-width: 0;
}
.pill-search-form input {
    border: none;
    background: transparent;
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.9rem;
    outline: none;
}
.pill-search-form button {
    background: var(--accent);
    color: #fff;
    border: none;
    width: 38px; height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
}
.pill-nav-info {
    align-items: center;
    gap: 1.25rem;
    white-space: nowrap;
    font-size: 0.78rem;
    color: #4b5563;
}
.pill-info-item { display: flex; align-items: center; gap: 0.5rem; }
.pill-info-item i { color: #16211a; font-size: 1.1rem; }
.pill-info-item strong { display: block; color: #16211a; font-size: 0.82rem; }
.pill-nav-actions { display: flex; align-items: center; gap: 0.6rem; flex-shrink: 0; }
.pill-icon-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: #f4f6f4;
    border: none;
    display: flex; align-items: center; justify-content: center;
    color: #16211a;
    position: relative;
    flex-shrink: 0;
}
.pill-icon-btn:hover { background: #e8ebe8; color: #16211a; }
.pill-cart-btn { background: #f4f6f4; }
.pill-cart-badge {
    position: absolute;
    top: -4px; right: -4px;
    background: var(--accent);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px; height: 18px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    padding: 0 3px;
}
.pill-nav-mobile {
    background: #fff;
    border-radius: 16px;
    padding: 1rem;
    margin-top: 0.75rem;
}
.pill-admin-links {
    flex: 1 1 auto;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
    flex-wrap: wrap;
}
.pill-admin-link {
    background: transparent;
    border: none;
    color: #4b5563;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.55rem 0.85rem;
    border-radius: 999px;
    white-space: nowrap;
    text-decoration: none;
}
.pill-admin-link:hover { background: #f4f6f4; color: #16211a; }
.pill-admin-link.active { background: #16211a; color: #fff; }
.pill-nav-admin .pill-nav-brand { flex-shrink: 0; }
@media (max-width: 991px) {
    .pill-nav { flex-wrap: wrap; }
    .pill-nav-brand { flex: 1 1 auto; }
    .pill-nav-wordmark { height: 22px; }
}
@media (max-width: 400px) {
    .pill-nav-wordmark { height: 18px; }
}

/* ---------- Hero ---------- */
.hero-banner {
    background: linear-gradient(160deg, #123524 0%, #1f7a4d 55%, #4fae7c 100%);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.hero-banner .hero-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    font-weight: 700;
    font-size: clamp(1.8rem, 4.2vw, 3.4rem);
    line-height: 1.1;
    color: #baf7c9;
    opacity: 0.95;
}
.hero-banner .hero-tagline { max-width: 420px; color: #e7f3ec; }
.hero-badge {
    background: #d9ffb0;
    color: #1b3d1f;
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    display: inline-block;
    transform: rotate(6deg);
}
.hero-banner-wrap {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    line-height: 0;
}
.hero-full-image {
    width: 100%;
    height: auto;
    display: block;
}
.hero-shopnow-overlay {
    position: absolute;
    left: 2.7%;
    top: 80.8%;
    width: 11.5%;
    height: 6.3%;
    display: block;
}
@media (max-width: 767px) {
    /* On small screens the source image scales down but the button stays
       roughly proportional, so the overlay percentages still line up. */
    .hero-shopnow-overlay { left: 3%; width: 26%; height: 5.5%; top: 79%; }
}

/* ---------- Quantity stepper (shown once a product is already in the cart) ---------- */
.qty-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #16211a;
    border-radius: 999px;
    padding: 0.25rem 0.4rem;
    width: 100%;
}
.qty-stepper button {
    width: 26px; height: 26px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.15);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
    font-size: 0.9rem;
}
.qty-stepper button:hover { background: rgba(255,255,255,0.28); }
.qty-stepper .qty-value { color: #fff; font-weight: 600; font-size: 0.9rem; }
.qty-stepper form { display: contents; }

/* ---------- Promo cards ---------- */
.promo-card {
    border-radius: 16px;
    padding: 1.25rem;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #16211a;
}
.promo-card.promo-green { background: #dff3e6; }
.promo-card.promo-pink  { background: #fbe0e6; }
.promo-card.promo-yellow{ background: #fdf3cf; }
.promo-card .promo-title { font-weight: 700; font-size: 0.95rem; }
.promo-card .promo-arrow {
    width: 34px; height: 34px; border-radius: 50%;
    background: #16211a; color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- Category cards ---------- */
.category-pill-card {
    border-radius: 16px;
    padding: 1.25rem 1rem;
    text-align: center;
    display: block;
    text-decoration: none;
    color: #16211a !important;
    height: 100%;
}
.category-pill-card img { width: 64px; height: 64px; object-fit: contain; margin-bottom: 0.5rem; }
.category-pill-card .cat-count { color: #6b7280; font-size: 0.8rem; }
.cat-bg-0 { background: #e4e9fb; } .cat-bg-1 { background: #fdeaea; }
.cat-bg-2 { background: #eaf1fb; } .cat-bg-3 { background: #fbe4ea; }
.cat-bg-4 { background: #f3e6ea; } .cat-bg-5 { background: #fdf1df; }

/* ---------- Product cards ---------- */
.card { box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.card:hover { border-color: #dcdfdd; box-shadow: 0 6px 18px rgba(0,0,0,0.06); }
.product-card img {
    height: 220px;
    object-fit: contain;
    object-position: center;
    background: #f4f6f4;
    padding: 10px;
    box-sizing: border-box;
}
.product-card .card-body h6 { color: #16211a; font-weight: 600; }
.product-card .farmer-tag { color: var(--text-muted); font-size: 0.75rem; }
.product-card .price-final { color: #16211a; }
.product-card .price-final .per-unit { color: var(--text-muted); font-weight: 400; font-size: 0.8rem; }

/* ---------- Section titles ---------- */
.section-title {
    border-left: none;
    padding-left: 0;
    font-weight: 700;
    color: #16211a;
}
.section-tabs {
    background: #f4f6f4;
    border-radius: 999px;
    padding: 0.35rem;
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    border: 1px solid var(--border-color);
}
.section-tabs .nav-link {
    border: none;
    border-radius: 999px;
    color: #4b5563;
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    background: transparent;
}
.section-tabs .nav-link:hover { color: #16211a; }
.section-tabs .nav-link.active { background: #16211a; color: #fff; }

/* ---------- Pagination ---------- */
.pagination .page-link {
    border: 1px solid var(--border-color);
    color: #16211a;
    margin: 0 3px;
    border-radius: 8px;
    font-weight: 600;
}
.pagination .page-link:hover { background: #f4f6f4; color: #16211a; }
.pagination .page-item.active .page-link {
    background: #16211a;
    border-color: #16211a;
    color: #fff;
}

/* ---------- Footer ---------- */
.site-footer { background: #0f1b13; color: #b7c4bb; border-top: none; }
.site-footer h5, .site-footer h6 { color: #fff; }
.site-footer a { color: #b7c4bb; }
.site-footer a:hover { color: #fff; }

/* ---------- Forms on light bg ---------- */
.form-control, .form-select {
    background: #fff;
    border: 1px solid var(--border-color);
    color: var(--text-main);
}
.form-control:focus, .form-select:focus {
    background: #fff;
    box-shadow: 0 0 0 0.2rem rgba(31, 122, 77, 0.15);
}
.form-control::placeholder { color: #9aa1ac; }
