/* public/css/app.css */
:root {
  --primary:       #136f45;
  --primary-dark:  #093824;
  --primary-light: #eaf5ef;
  --secondary:     #188f56;
  --accent:        #18a85a;
  --success:       #148f45;
  --danger:        #bf2b2b;
  --warning:       #d38b12;
  --info:          #1f79bf;
  --dark:          #17221b;
  --gray-900:      #1f2f25;
  --gray-700:      #3a4c40;
  --gray-500:      #738477;
  --gray-300:      #dfe8e1;
  --gray-100:      #f3f7f4;
  --white:         #ffffff;
  --radius:        12px;
  --radius-lg:     18px;
  --shadow:        0 8px 20px rgba(13,32,21,.07);
  --shadow-lg:     0 14px 36px rgba(13,32,21,.14);
  --font-sans:     'Manrope', system-ui, sans-serif;
  --font-heading:  'Plus Jakarta Sans', 'Manrope', sans-serif;
  --navbar-h:      74px;
  --transition:    .2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-sans); color: var(--dark); background: radial-gradient(1200px 620px at 12% 0%, #e7f1ec 0%, #eef5f1 48%, #f5f9f7 100%); line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3,h4,h5 { font-family: var(--font-heading); line-height: 1.25; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container { max-width: 1260px; margin: 0 auto; padding: 0 1.25rem; }
.section { padding: 4rem 0; }
.bg-light { background: var(--gray-100); }
.centered { text-align: center; }
.page-header { background: var(--primary); color: var(--white); padding: 3rem 0; }
.page-header h1 { color: var(--white); font-size: 2.2rem; }
.page-header p  { color: rgba(255,255,255,.85); margin-top: .5rem; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar { position: sticky; top: 0; z-index: 1000; background: rgba(255,255,255,.86); backdrop-filter: blur(8px); border-bottom: 1px solid var(--gray-300); box-shadow: 0 6px 16px rgba(8,26,16,.05); height: var(--navbar-h); }
.navbar-inner { display: flex; align-items: center; gap: 1.5rem; height: var(--navbar-h); }
.navbar-brand { display: flex; align-items: center; gap: .5rem; font-family: var(--font-heading); font-size: 1.28rem; font-weight: 700; color: var(--primary-dark); }
.navbar-brand:hover { text-decoration: none; }
.brand-icon { font-size: 1.5rem; }
.navbar-burger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: .5rem; }
.navbar-burger span { display: block; width: 24px; height: 2px; background: var(--dark); border-radius: 2px; transition: var(--transition); }
.navbar-menu { display: flex; align-items: center; gap: 1.5rem; flex: 1; }
.navbar-links { display: flex; list-style: none; gap: .25rem; }
.navbar-links a { padding: .5rem .75rem; border-radius: var(--radius); color: var(--gray-700); font-weight: 500; transition: var(--transition); white-space: nowrap; }
.navbar-links a:hover { background: #eaf4ee; color: var(--primary-dark); text-decoration: none; }
.navbar-actions { display: flex; align-items: center; gap: .75rem; margin-left: auto; }

/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu { display: none; position: absolute; top: calc(100% + 8px); left: 0; background: var(--white); border-radius: 14px; box-shadow: var(--shadow-lg); min-width: 200px; padding: .5rem 0; z-index: 200; border: 1px solid var(--gray-300); }
.dropdown:hover .dropdown-menu { display: block; }
.dropdown-menu a { display: block; padding: .6rem 1rem; color: var(--gray-700); font-size: .9rem; }
.dropdown-menu a:hover { background: var(--primary-light); color: var(--primary); text-decoration: none; }

/* Navbar Search */
.navbar-search { position: relative; }
.navbar-search input { border: 1px solid var(--gray-300); border-radius: 999px; padding: .5rem .85rem; font-size: .86rem; width: 250px; outline: none; background: #f8fbf9; }
.navbar-search input:focus { border-color: var(--primary); }
.navbar-search button { position: absolute; right: 0; top: 0; height: 100%; padding: 0 .82rem; background: transparent; color: var(--gray-700); border: none; border-radius: 0 999px 999px 0; cursor: pointer; }
.search-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: var(--white); border: 1px solid var(--gray-300); border-radius: var(--radius); box-shadow: var(--shadow-lg); max-height: 300px; overflow-y: auto; z-index: 300; }
.search-dropdown a { display: flex; align-items: center; gap: .75rem; padding: .6rem 1rem; color: var(--gray-700); font-size: .88rem; }
.search-dropdown a:hover { background: var(--primary-light); text-decoration: none; }
.search-dropdown .sd-img { width: 32px; height: 32px; object-fit: cover; border-radius: 4px; }

/* Cart btn */
.cart-btn { position: relative; font-size: 1.1rem; padding: .46rem .7rem; border-radius: 999px; color: var(--primary-dark); border: 1px solid var(--gray-300); background: #fff; }
.cart-count { position: absolute; top: -5px; right: -6px; background: var(--accent); color: var(--white); font-size: .63rem; font-weight: 700; border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .58rem 1.22rem; border-radius: 11px; font-size: .86rem; font-weight: 600; border: 1px solid transparent; cursor: pointer; transition: var(--transition); text-align: center; white-space: nowrap; font-family: var(--font-sans); }
.btn:hover { text-decoration: none; }
.btn-primary { background: linear-gradient(180deg, #16a34a 0%, #0f8e40 100%); color: var(--white); border-color: transparent; box-shadow: 0 8px 18px rgba(15,142,64,.28); }
.btn-primary:hover { filter: brightness(.96); color: var(--white); }
.btn-outline { background: #fff; color: #1f4631; border-color: var(--gray-300); }
.btn-outline:hover { background: #f1f7f3; color: #173d2b; border-color: #c7dbcd; }
.btn-white { background: var(--white); color: var(--primary); border-color: var(--white); }
.btn-white:hover { background: var(--primary-light); }
.btn-danger { background: var(--danger); color: var(--white); border-color: var(--danger); }
.btn-danger:hover { background: #b71c1c; }
.btn-success { background: var(--success); color: var(--white); border-color: var(--success); }
.btn-warning { background: var(--warning); color: var(--dark); border-color: var(--warning); }
.btn-whatsapp { background: #25D366; color: var(--white); border-color: #25D366; }
.btn-sm { padding: .35rem .8rem; font-size: .82rem; }
.btn-lg { padding: .8rem 2rem; font-size: 1rem; }
.btn-full { width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .4rem; color: var(--gray-700); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: .68rem .9rem; border: 1px solid var(--gray-300);
    border-radius: var(--radius); font-size: .9rem; font-family: var(--font-sans);
    transition: var(--transition); background: #f9fcfa;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: #9dc8ac; box-shadow: 0 0 0 3px rgba(15,106,63,.12); background: #fff;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field-error { color: var(--danger); font-size: .82rem; margin-top: .25rem; }
.checkbox-label { display: flex; align-items: center; gap: .5rem; cursor: pointer; font-weight: 400; }
.checkbox-label input { width: auto; }
.delivery-method-picker { display: grid; gap: .75rem; }
.delivery-method-option {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 180px);
    gap: 1rem;
    align-items: end;
    width: 100%;
    padding: .9rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: #f9fcfa;
}
.delivery-method-toggle { align-items: flex-start; }
.delivery-method-fee { min-width: 0; }
.delivery-method-fee label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .4rem; color: var(--gray-700); }
.delivery-method-fee input:disabled { background: var(--gray-100); color: var(--gray-500); cursor: not-allowed; }
.delivery-method-fee-note {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: .68rem .9rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: .9rem;
}
.input-with-eye { position: relative; }
.input-with-eye input { padding-right: 2.5rem; }
.eye-btn { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; font-size: 1rem; color: var(--gray-500); }

/* ============================================================
   ALERTS
   ============================================================ */
.alert { padding: .8rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; font-size: .9rem; }
.alert-error   { background: #ffebee; color: var(--danger); border: 1px solid #ef9a9a; }
.alert-success { background: #e8f5e9; color: var(--success); border: 1px solid #a5d6a7; }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; background: linear-gradient(140deg, #062f1c 0%, #0d5e38 55%, #2f8b49 100%); color: var(--white); padding: 5rem 0; overflow: hidden; border-bottom: 1px solid #d8e5dc; }
.hero-bg { position: absolute; inset: 0; background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }
.hero-content { position: relative; max-width: 700px; }
.hero-text h1 { font-size: clamp(2rem, 5vw, 3.2rem); color: var(--white); margin-bottom: 1rem; }
.hero-accent { color: #88e2b0; }
.hero-text p  { font-size: 1.1rem; opacity: .9; margin-bottom: 2rem; }
.hero-search-box { background: rgba(255,255,255,.14); backdrop-filter: blur(8px); border-radius: var(--radius-lg); padding: 1.25rem; margin-bottom: 2rem; border: 1px solid rgba(255,255,255,.22); box-shadow: 0 18px 30px rgba(0,0,0,.15); }
.pill-tabs,
.settings-tab-nav,
.vendor-review-tabs,
.search-tabs,
.account-type-tabs,
.filter-tabs {
    display: flex;
    gap: .55rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.pill-tab,
.settings-tab-btn,
.vendor-review-tab,
.search-tab,
.type-tab,
.filter-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    min-height: 40px;
    padding: .52rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 999px;
    background: rgba(255,255,255,.92);
    color: var(--gray-700);
    font-size: .86rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    font-family: var(--font-sans);
}
.pill-tab:hover,
.settings-tab-btn:hover,
.vendor-review-tab:hover,
.search-tab:hover,
.type-tab:hover,
.filter-tabs a:hover {
    background: #f1f7f3;
    color: var(--primary-dark);
    border-color: #c7dbcd;
    text-decoration: none;
}
.pill-tab.active,
.settings-tab-btn.active,
.vendor-review-tab.active,
.search-tab.active,
.type-tab.active,
.filter-tabs a.active {
    background: linear-gradient(180deg, #16a34a 0%, #0f8e40 100%);
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(15,142,64,.22);
}
.search-input-group { display: flex; gap: .5rem; }
.search-input-hero { flex: 1; padding: .75rem 1rem; border-radius: var(--radius); border: none; font-size: 1rem; outline: none; }
.search-hero-btn { padding: .75rem 1.5rem; border-radius: var(--radius); border: none; background: var(--accent); color: var(--white); font-weight: 700; cursor: pointer; white-space: nowrap; }
.search-hero-btn:hover { background: #0f7b49; }
.hero-stats { display: flex; gap: 2rem; }
.hero-stat { display: flex; flex-direction: column; }
.hero-stat strong { font-size: 1.8rem; font-family: var(--font-heading); color: #a8f0ca; }
.hero-stat span   { font-size: .85rem; opacity: .85; }

/* ============================================================
   SECTION HEADER
   ============================================================ */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.section-header h2 { font-size: 1.6rem; color: #1f3328; }
.see-all { color: var(--primary); font-weight: 600; }

/* ============================================================
   CATEGORIES
   ============================================================ */
.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 1rem; }
.category-card { background: var(--white); border: 1px solid var(--gray-300); border-radius: var(--radius-lg); padding: 1.45rem 1rem; text-align: center; transition: var(--transition); cursor: pointer; box-shadow: 0 6px 16px rgba(13,32,21,.05); }
.category-card:hover { border-color: #c0d9c8; box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.category-icon  { font-size: 2.2rem; margin-bottom: .5rem; }
.category-ui-icon { font-size: inherit; line-height: 1; vertical-align: middle; }
.category-name  { font-weight: 700; font-size: .9rem; color: var(--dark); }
.category-count { font-size: .78rem; color: var(--gray-500); margin-top: .2rem; }

/* ============================================================
   PRODUCT CARDS
   ============================================================ */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.25rem; }
.section-products .products-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.product-card { background: var(--white); border: 1px solid var(--gray-300); border-radius: var(--radius-lg); overflow: hidden; transition: var(--transition); box-shadow: 0 8px 18px rgba(13,32,21,.06); }
.product-card:hover { box-shadow: var(--shadow-lg); border-color: #bdd8c6; transform: translateY(-3px); }
.product-card-img { position: relative; height: 200px; overflow: hidden; background: var(--gray-100); }
.product-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.product-card:hover .product-card-img img { transform: scale(1.05); }
.badge-sale, .badge-featured { position: absolute; border-radius: 4px; padding: .2rem .5rem; font-size: .75rem; font-weight: 700; }
.badge-sale { top: .5rem; left: .5rem; background: var(--danger); color: var(--white); }
.badge-featured { top: .5rem; right: .5rem; background: var(--warning); }
.product-card-body { padding: 1rem; }
.product-category { font-size: .75rem; font-weight: 600; color: var(--primary); text-transform: uppercase; letter-spacing: .5px; }
.product-name { margin: .35rem 0 .25rem; font-size: .95rem; line-height: 1.3; }
.product-name a { color: var(--dark); }
.product-name a:hover { color: var(--primary); text-decoration: none; }
.product-vendor { font-size: .8rem; color: var(--gray-500); margin-bottom: .75rem; }
.product-vendor a { color: var(--gray-500); }
.product-vendor a:hover { color: var(--primary); text-decoration: none; }
.product-card-footer { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.product-price { flex: 1; }
.price-current { font-weight: 700; color: var(--primary); font-size: .95rem; }
.price-old { font-size: .8rem; color: var(--gray-500); text-decoration: line-through; display: block; }
.out-of-stock { font-size: .78rem; color: var(--danger); font-weight: 600; }
.add-to-cart-btn { white-space: nowrap; }

/* ============================================================
   VENDOR CARDS
   ============================================================ */
.vendors-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.25rem; }
.vendor-card { background: var(--white); border: 1px solid var(--gray-300); border-radius: var(--radius-lg); overflow: hidden; transition: var(--transition); display: block; box-shadow: 0 8px 18px rgba(13,32,21,.06); }
.vendor-card:hover { box-shadow: var(--shadow-lg); border-color: #bdd8c6; transform: translateY(-3px); text-decoration: none; }
.vendor-card-hero { height: 120px; background: linear-gradient(135deg, var(--primary-light), #c8e6c9); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.vendor-card-hero img { width: 100%; height: 100%; object-fit: cover; }
.vendor-card-placeholder { width: 70px; height: 70px; border-radius: 50%; background: var(--primary); color: var(--white); font-size: 1.6rem; font-weight: 700; display: flex; align-items: center; justify-content: center; font-family: var(--font-heading); }
.vendor-card-body { padding: 1rem; }
.vendor-tier-badge { display: inline-block; font-size: .7rem; font-weight: 700; padding: .15rem .5rem; border-radius: 20px; margin-bottom: .4rem; }
.tier-tier1 { background: #e3f2fd; color: #1565c0; }
.tier-tier2 { background: #e6f6ed; color: #0f7b49; }
.tier-tier3 { background: #dff2e8; color: #0b5c37; }
.vendor-card-body h3 { font-size: 1rem; margin-bottom: .3rem; color: var(--dark); }
.vendor-owner { font-size: .82rem; color: var(--gray-500); margin-bottom: .3rem; }
.vendor-location, .vendor-farm-type { font-size: .82rem; color: var(--gray-500); }
.vendor-meta { display: flex; gap: 1rem; margin-top: .75rem; font-size: .8rem; color: var(--gray-500); border-top: 1px solid var(--gray-300); padding-top: .75rem; }

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar { margin-bottom: 1.5rem; }
.filter-form { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; }
.filter-input  { padding: .55rem .9rem; border: 1.5px solid var(--gray-300); border-radius: var(--radius); font-size: .9rem; flex: 1; min-width: 180px; outline: none; }
.filter-input:focus { border-color: var(--primary); }
.filter-select { padding: .55rem .9rem; border: 1.5px solid var(--gray-300); border-radius: var(--radius); font-size: .9rem; background: var(--white); cursor: pointer; outline: none; }
.results-count { font-size: .9rem; color: var(--gray-500); margin-bottom: 1rem; display: block; }

/* ============================================================
   STORE LAYOUT (vendor store + products listing)
   ============================================================ */
.store-layout { display: grid; grid-template-columns: 240px 1fr; gap: 2rem; align-items: start; }
.store-sidebar { background: var(--white); border: 1px solid var(--gray-300); border-radius: var(--radius-lg); padding: 1.25rem; position: sticky; top: calc(var(--navbar-h) + 1rem); box-shadow: var(--shadow); }
.store-products .products-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.store-sidebar h3 { font-size: 1rem; margin-bottom: 1rem; padding-bottom: .75rem; border-bottom: 1px solid var(--gray-300); }
.store-sidebar .filter-group { margin-bottom: 1rem; }
.store-sidebar label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: .35rem; color: var(--gray-700); }
.store-sidebar input, .store-sidebar select { width: 100%; padding: .5rem .75rem; border: 1.5px solid var(--gray-300); border-radius: var(--radius); font-size: .88rem; }
.store-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }

/* ============================================================
   VENDOR HERO (store page)
   ============================================================ */
.vendor-hero { background: var(--primary); color: var(--white); padding: 3rem 0; }
.vendor-profile-box { display: flex; gap: 2rem; align-items: flex-start; }
.vendor-profile-logo { width: 120px; height: 120px; border-radius: var(--radius-lg); overflow: hidden; background: var(--white); flex-shrink: 0; }
.vendor-profile-logo img { width: 100%; height: 100%; object-fit: cover; }
.vendor-logo-placeholder { width: 100%; height: 100%; background: rgba(255,255,255,.2); color: var(--white); font-size: 2.5rem; font-weight: 700; display: flex; align-items: center; justify-content: center; font-family: var(--font-heading); }
.vendor-profile-info h1 { color: var(--white); font-size: 2rem; margin: .25rem 0; }
.vendor-owner-name { opacity: .85; margin-bottom: .75rem; }
.vendor-meta-row { display: flex; gap: 1.5rem; flex-wrap: wrap; opacity: .9; font-size: .9rem; margin-bottom: 1rem; }
.vendor-description { opacity: .85; max-width: 600px; margin-bottom: 1rem; }
.vendor-contact-row { display: flex; gap: .75rem; flex-wrap: wrap; }

/* ============================================================
   PRODUCT DETAIL
   ============================================================ */
.breadcrumb { font-size: .85rem; color: var(--gray-500); margin-bottom: 2rem; }
.breadcrumb a { color: var(--gray-500); }
.product-detail-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; margin-bottom: 4rem; }
.gallery-main { background: var(--gray-100); border-radius: var(--radius-lg); overflow: hidden; height: 420px; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: .5rem; margin-top: .75rem; flex-wrap: wrap; }
.gallery-thumb { width: 70px; height: 70px; object-fit: cover; border-radius: var(--radius); cursor: pointer; border: 2px solid var(--gray-300); transition: var(--transition); }
.gallery-thumb.active, .gallery-thumb:hover { border-color: var(--primary); }
.product-category-tag { font-size: .78rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .5px; }
.product-info h1 { font-size: 1.9rem; margin: .4rem 0 1rem; }
.product-price-box { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.price-main { font-size: 1.8rem; font-weight: 700; color: var(--primary); }
.price-main small { font-size: 1rem; opacity: .7; }
.price-original { font-size: 1.1rem; color: var(--gray-500); text-decoration: line-through; }
.badge-discount { background: var(--danger); color: var(--white); border-radius: var(--radius); padding: .2rem .6rem; font-size: .82rem; font-weight: 700; }
.stock-in  { color: var(--success); font-weight: 600; font-size: .9rem; }
.stock-out { color: var(--danger); font-weight: 600; font-size: .9rem; }
.product-description { margin: 1.25rem 0; }
.product-description h3 { font-size: 1rem; margin-bottom: .5rem; }
.product-description p  { font-size: .9rem; color: var(--gray-700); line-height: 1.7; }
.product-meta { display: flex; gap: 1.5rem; flex-wrap: wrap; margin: 1rem 0; font-size: .9rem; }
.meta-item { color: var(--gray-700); }
.meta-item strong { color: var(--dark); }
.product-delivery-methods { margin: 1rem 0 1.25rem; }
.product-delivery-methods h3 { font-size: 1rem; margin-bottom: .6rem; }
.delivery-method-badges { display: flex; gap: .55rem; flex-wrap: wrap; }
.delivery-method-badge { display: inline-flex; align-items: center; gap: .35rem; padding: .38rem .7rem; border-radius: 999px; background: var(--primary-light); color: var(--primary-dark); font-size: .82rem; font-weight: 600; }
.delivery-method-badge strong { font-size: .78rem; }
.add-to-cart-section { display: flex; gap: 1rem; align-items: center; margin: 1.5rem 0; }
.quantity-selector { display: flex; align-items: center; border: 1.5px solid var(--gray-300); border-radius: var(--radius); overflow: hidden; }
.quantity-selector button { background: var(--gray-100); border: none; padding: .5rem .9rem; font-size: 1.2rem; cursor: pointer; }
.quantity-selector button:hover { background: var(--primary-light); }
.quantity-selector input { width: 50px; border: none; text-align: center; font-size: 1rem; font-weight: 600; padding: .5rem; }
.product-actions { display: flex; gap: .75rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.vendor-box { background: #f5f9f6; border: 1px solid var(--gray-300); border-radius: var(--radius-lg); padding: 1rem; }
.vendor-box h4 { font-size: .85rem; color: var(--gray-500); margin-bottom: .5rem; }
.vendor-box-link { display: flex; justify-content: space-between; align-items: center; color: var(--dark); }
.vendor-box-link:hover { text-decoration: none; color: var(--primary); }
.vendor-box-info { display: flex; flex-direction: column; gap: .2rem; }
.vendor-box-arrow { font-size: 1.3rem; color: var(--primary); }
.related-section { margin-top: 2rem; }
.related-section h2 { font-size: 1.5rem; margin-bottom: 1.5rem; }

/* ============================================================
   CART
   ============================================================ */
.cart-layout { display: grid; grid-template-columns: 1fr 340px; gap: 2rem; align-items: start; }
.cart-table-head, .cart-row { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: 1rem; align-items: center; padding: .75rem 0; border-bottom: 1px solid var(--gray-300); }
.cart-table-head { font-weight: 700; font-size: .85rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: .5px; }
.cart-product { display: flex; gap: 1rem; align-items: center; }
.cart-product-img { width: 60px; height: 60px; object-fit: cover; border-radius: var(--radius); flex-shrink: 0; }
.cart-product div a { color: var(--dark); font-weight: 600; font-size: .95rem; }
.cart-product small { display: block; color: var(--gray-500); font-size: .8rem; }
.cart-price, .cart-total { font-weight: 600; }
.qty-control { display: flex; align-items: center; gap: .5rem; }
.qty-control button { background: var(--gray-100); border: 1px solid var(--gray-300); width: 28px; height: 28px; border-radius: 50%; cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center; }
.qty-control button:hover { background: var(--primary-light); border-color: var(--primary); }
.btn-remove { background: none; border: none; color: var(--gray-500); cursor: pointer; font-size: 1.1rem; padding: .25rem; border-radius: 4px; }
.btn-remove:hover { color: var(--danger); background: #ffebee; }
.cart-summary { background: var(--white); border: 1px solid var(--gray-300); border-radius: var(--radius-lg); padding: 1.5rem; position: sticky; top: calc(var(--navbar-h) + 1rem); box-shadow: var(--shadow); }
.cart-summary h3 { font-size: 1.2rem; margin-bottom: 1rem; padding-bottom: .75rem; border-bottom: 1px solid var(--gray-300); }
.summary-row { display: flex; justify-content: space-between; margin-bottom: .75rem; font-size: .95rem; }
.summary-total { font-weight: 700; font-size: 1.1rem; border-top: 1px solid var(--gray-300); padding-top: .75rem; margin-top: .25rem; }
.summary-note { font-size: .8rem; color: var(--success); margin-bottom: .75rem; }
.summary-divider { border-top: 1px solid var(--gray-300); margin: 1rem 0; }

/* ============================================================
   CHECKOUT
   ============================================================ */
.checkout-layout { display: grid; grid-template-columns: 1fr 380px; gap: 2rem; align-items: start; }
.checkout-form-section h2 { font-size: 1.3rem; margin: 1.5rem 0 1rem; padding-bottom: .5rem; border-bottom: 1px solid var(--gray-300); }
.checkout-form-section h2:first-child { margin-top: 0; }
.payment-options { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1.5rem; }
.payment-option { border: 2px solid var(--gray-300); border-radius: var(--radius-lg); padding: 1rem; cursor: pointer; display: flex; align-items: flex-start; gap: .75rem; transition: var(--transition); }
.payment-option.selected, .payment-option:has(input:checked) { border-color: var(--primary); background: var(--primary-light); }
.payment-option input { margin-top: .2rem; }
.payment-option-content { display: flex; align-items: flex-start; gap: .75rem; }
.payment-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #eaf4ef;
    color: var(--primary-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.payment-icon .material-symbols-outlined { font-size: 22px; line-height: 1; }
.payment-option p { font-size: .82rem; color: var(--gray-500); margin: 0; }
.checkout-summary { background: var(--white); border: 1px solid var(--gray-300); border-radius: var(--radius-lg); padding: 1.5rem; position: sticky; top: calc(var(--navbar-h) + 1rem); box-shadow: var(--shadow); }
.checkout-summary h2 { font-size: 1.2rem; margin-bottom: 1rem; }
.checkout-delivery-groups { display: grid; gap: 1rem; margin-bottom: 1.5rem; }
.checkout-delivery-card { border: 1px solid var(--gray-300); border-radius: var(--radius-lg); padding: 1rem; background: var(--white); }
.checkout-delivery-product { display: flex; gap: .85rem; align-items: center; margin-bottom: .9rem; }
.checkout-delivery-product img { width: 60px; height: 60px; object-fit: cover; border-radius: var(--radius); flex-shrink: 0; }
.checkout-delivery-product div { display: flex; flex-direction: column; gap: .15rem; font-size: .88rem; }
.checkout-delivery-product strong { font-size: .95rem; color: var(--dark); }
.checkout-delivery-product span { color: var(--gray-500); }
.checkout-delivery-select { width: 100%; }
.checkout-group-summary-card { background: var(--gray-100); border: 1px solid var(--gray-300); border-radius: var(--radius); padding: .9rem 1rem; margin-bottom: .75rem; }
.checkout-group-item-row { font-size: .86rem; color: var(--gray-700); }
.order-line { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.order-line-img { position: relative; flex-shrink: 0; }
.order-line-img img { width: 48px; height: 48px; object-fit: cover; border-radius: var(--radius); }
.order-line-qty { position: absolute; top: -6px; right: -6px; background: var(--gray-700); color: var(--white); font-size: .7rem; font-weight: 700; border-radius: 50%; width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; }
.order-line-name { flex: 1; font-size: .88rem; }
.order-line-price { font-weight: 600; font-size: .88rem; }
.checkout-note { font-size: .78rem; color: var(--gray-500); text-align: center; margin-top: .75rem; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state { text-align: center; padding: 4rem 2rem; }
.empty-state.small { padding: 2rem; }
.empty-icon { font-size: 3.5rem; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.empty-state p { color: var(--gray-500); }

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination { display: flex; gap: .5rem; justify-content: center; margin-top: 2rem; flex-wrap: wrap; }
.page-link { padding: .45rem .9rem; border: 1.5px solid var(--gray-300); border-radius: var(--radius); font-size: .9rem; color: var(--dark); transition: var(--transition); }
.page-link:hover, .page-link.active { background: var(--primary); color: var(--white); border-color: var(--primary); text-decoration: none; }
.page-link.disabled { opacity: .45; pointer-events: none; }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-page { min-height: calc(100vh - var(--navbar-h)); display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, #f2f7f4 0%, #f7faf8 100%); padding: 2rem 1rem; }
.auth-box { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--gray-300); padding: 2.5rem; width: 100%; max-width: 460px; }
.auth-box-wide { max-width: 640px; }
.auth-header { text-align: center; margin-bottom: 2rem; }
.auth-logo { font-family: var(--font-heading); font-weight: 700; font-size: 1.3rem; color: var(--primary); display: inline-block; margin-bottom: 1.25rem; }
.auth-header h1 { font-size: 1.8rem; }
.auth-header p  { color: var(--gray-500); margin-top: .35rem; }
.auth-links { text-align: center; margin-top: 1.5rem; font-size: .9rem; color: var(--gray-500); }
.account-type-tabs { margin-bottom: 1.5rem; }
.type-tab { flex: 1; }

/* ============================================================
   ACCOUNT PAGE
   ============================================================ */
.account-layout { display: grid; grid-template-columns: 240px 1fr; gap: 2rem; }
.account-sidebar { position: sticky; top: calc(var(--navbar-h) + 1rem); }
.account-profile-card { background: linear-gradient(180deg, #083a24 0%, #0e5a36 100%); color: var(--white); border-radius: var(--radius-lg); padding: 1.5rem; text-align: center; margin-bottom: 1rem; box-shadow: 0 10px 26px rgba(6,47,28,.28); }
.account-avatar { width: 64px; height: 64px; background: rgba(255,255,255,.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; font-weight: 700; font-family: var(--font-heading); margin: 0 auto .75rem; color: var(--white); }
.account-profile-card h3 { color: var(--white); font-size: 1rem; }
.account-profile-card p  { color: rgba(255,255,255,.8); font-size: .85rem; }
.account-nav { background: #fff; border: 1px solid var(--gray-300); border-radius: var(--radius-lg); padding: .5rem; }
.account-nav a { display: flex; align-items: center; gap: .5rem; padding: .65rem 1rem; border-radius: var(--radius); color: var(--gray-700); font-weight: 500; transition: var(--transition); margin-bottom: .25rem; }
.account-nav a:hover, .account-nav a.active { background: #eaf5ee; color: #0f6a3f; text-decoration: none; }
.orders-table { background: #fff; border: 1px solid var(--gray-300); border-radius: var(--radius-lg); padding: .8rem 1rem; box-shadow: var(--shadow); }
.orders-table-head, .orders-table-row { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr auto; gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--gray-300); font-size: .9rem; align-items: center; }
.orders-table-head { font-weight: 700; font-size: .8rem; color: var(--gray-500); text-transform: uppercase; }

/* ============================================================
   BADGES / STATUS
   ============================================================ */
.badge-status { display: inline-block; padding: .2rem .65rem; border-radius: 20px; font-size: .75rem; font-weight: 700; text-transform: capitalize; }
.badge-status.pending    { background: #e8f6ee; color: #0f7b49; }
.badge-status.confirmed  { background: #e3f2fd; color: #1565c0; }
.badge-status.processing { background: #e8f5e9; color: #1b5e20; }
.badge-status.shipped    { background: #e0f7fa; color: #006064; }
.badge-status.delivered  { background: #e8f5e9; color: var(--success); }
.badge-status.cancelled  { background: #fce4ec; color: var(--danger); }
.badge-status.archived   { background: #f3f4f6; color: #4b5563; }
.badge-status.returned   { background: #ede7f6; color: #4527a0; }
.badge-status.approved   { background: #e8f5e9; color: var(--success); }
.badge-status.queried    { background: #fff4e5; color: #a66300; }
.badge-status.rejected   { background: #fce4ec; color: var(--danger); }
.badge-status.declined   { background: #fce4ec; color: var(--danger); }
.badge-status.suspended  { background: #fce4ec; color: var(--danger); }
.badge-status.paid   { background: #e8f5e9; color: var(--success); }
.badge-status.unpaid { background: #e8f6ee; color: #0f7b49; }
.badge-role { display: inline-block; padding: .2rem .65rem; border-radius: 20px; font-size: .75rem; font-weight: 700; background: var(--primary-light); color: var(--primary); }
.text-green { color: var(--success); }
.text-red   { color: var(--danger); }

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section { background: linear-gradient(135deg, var(--secondary) 0%, var(--accent) 100%); }
.cta-box { display: flex; justify-content: space-between; align-items: center; gap: 2rem; flex-wrap: wrap; padding: 1rem 0; }
.cta-text h2 { font-size: 2rem; color: var(--white); }
.cta-text p  { color: rgba(255,255,255,.9); margin-top: .35rem; font-size: 1.05rem; }

/* ============================================================
   SUCCESS BOX
   ============================================================ */
.success-box { max-width: 500px; margin: 0 auto; padding: 3rem 2rem; background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.success-icon { font-size: 4rem; margin-bottom: 1rem; }
.success-box h1 { font-size: 1.8rem; margin-bottom: .75rem; }
.order-number { font-size: 1.1rem; margin: .5rem 0 1rem; }
.order-summary-mini { background: var(--gray-100); border-radius: var(--radius); padding: 1rem; margin: 1rem 0; }
.success-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 1.5rem; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal { background: var(--white); border-radius: var(--radius-lg); padding: 2rem; width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto; position: relative; }
.modal-lg { max-width: 700px; }
.modal h2 { font-size: 1.4rem; margin-bottom: 1.5rem; }
.modal-close { position: absolute; top: 1rem; right: 1rem; background: var(--gray-100); border: none; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; display: flex; align-items: center; justify-content: center; }
.modal-close:hover { background: var(--gray-300); }
.platform-confirm-modal { max-width: 440px; text-align: center; }
.platform-confirm-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--primary-light); color: var(--primary-dark); display: inline-flex; align-items: center; justify-content: center; margin: 0 auto 1rem; }
.platform-confirm-icon .material-symbols-outlined { font-size: 2rem; }
.platform-confirm-modal p { color: var(--gray-700); margin-bottom: 1.5rem; }
.platform-confirm-actions { display: flex; justify-content: center; gap: .75rem; flex-wrap: wrap; }

/* ============================================================
   TOAST
   ============================================================ */
.toast { position: fixed; top: 5.5rem; right: 1.5rem; z-index: 3000; background: var(--dark); color: var(--white); padding: .9rem 1.5rem; border-radius: var(--radius); font-size: .9rem; font-weight: 500; box-shadow: var(--shadow-lg); max-width: 320px; }
.toast.success { background: var(--success); }
.toast.error   { background: var(--danger); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--gray-900); color: rgba(255,255,255,.8); padding: 3.5rem 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 2rem; margin-bottom: 2rem; }
.footer-logo { font-family: var(--font-heading); font-size: 1.4rem; color: var(--white); margin-bottom: .75rem; }
.footer-brand p { font-size: .9rem; line-height: 1.6; }
.footer-social { display: flex; gap: .75rem; margin-top: 1rem; font-size: 1.3rem; }
.footer-social a { opacity: .7; transition: var(--transition); }
.footer-social a:hover { opacity: 1; }
.footer-col h4 { font-size: .95rem; font-weight: 700; color: var(--white); margin-bottom: 1rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: .6rem; font-size: .88rem; }
.footer-col a { color: rgba(255,255,255,.7); transition: var(--transition); }
.footer-col a:hover { color: var(--white); text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 1.25rem 0; display: flex; justify-content: space-between; align-items: center; font-size: .82rem; opacity: .6; flex-wrap: wrap; gap: .5rem; }

/* ============================================================
   LOADING
   ============================================================ */
.loading-spinner { text-align: center; padding: 3rem; color: var(--gray-500); }

/* ============================================================
   FILTER TABS
   ============================================================ */
.filter-tabs { margin-bottom: 1.5rem; }
.page-title { font-size: 1.8rem; margin-bottom: 1.5rem; }
.back-link { display: inline-block; margin-bottom: 1.5rem; color: var(--primary); font-weight: 600; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .store-layout, .product-detail-layout, .cart-layout, .checkout-layout { grid-template-columns: 1fr; }
    .store-sidebar { position: static; }
    .section-products .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .store-products .products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .account-layout { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
    .navbar-burger { display: flex; }
    .navbar-menu { display: none; position: absolute; top: var(--navbar-h); left: 0; right: 0; background: var(--white); flex-direction: column; align-items: stretch; padding: 1rem; box-shadow: var(--shadow-lg); gap: .5rem; }
    .navbar-menu.open { display: flex; }
    .navbar-links { flex-direction: column; }
    .navbar-actions { flex-wrap: wrap; justify-content: flex-start; }
    .navbar-search input { width: 100%; }
    .hero { padding: 3rem 0; }
    .search-input-group { flex-direction: column; }
    .hero-stats { gap: 1.25rem; }
    .categories-grid { grid-template-columns: repeat(auto-fill, minmax(100px,1fr)); }
    .products-grid { grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); }
    .section-products .products-grid { grid-template-columns: 1fr; }
    .store-products .products-grid { grid-template-columns: 1fr; }
    .vendors-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .cart-table-head { display: none; }
    .cart-row { grid-template-columns: 1fr; gap: .5rem; }
    .cta-box { flex-direction: column; text-align: center; }
    .form-row { grid-template-columns: 1fr; }
    .delivery-method-option { grid-template-columns: 1fr; }
}
