/* Little River Design System */
*, *::before, *::after { box-sizing: border-box; }

:root {
  --river: #2b4c6f; --river-dark: #1e3650; --river-light: #e8eff6;
  --sand: #c8a882; --sand-light: #f0e6d8;
  --earth: #5c3d2e; --earth-soft: rgba(92,61,46,0.72);
  --cream: #faf6f0; --moss: #4a7c59; --clay: #d4a373;
  --white: #ffffff; --error: #b44040;
  --content-max: 1280px; --content-pad: 20px;
  --radius: 12px; --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(92,61,46,0.08);
  --shadow-md: 0 4px 20px rgba(92,61,46,0.12);
  --h1-size: clamp(2.8rem, 4vw + 1rem, 4.5rem);
  --h2-size: clamp(2rem, 1.5vw + 1.4rem, 2.8rem);
  --h3-size: clamp(1.5rem, 1vw + 1.1rem, 2rem);
  --p-size: clamp(1.05rem, 0.4vw + 0.9rem, 1.25rem);
  --small: clamp(0.85rem, 0.3vw + 0.75rem, 1rem);
}

html { scroll-behavior: smooth; }
body { margin: 0; font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--cream); color: var(--earth); line-height: 1.6; }
h1, h2, h3, h4 { font-family: "DM Serif Display", Georgia, serif; color: var(--river); margin: 0 0 0.6rem; line-height: 1.2; }
h1 { font-size: var(--h1-size); } h2 { font-size: var(--h2-size); } h3 { font-size: var(--h3-size); }
p { margin: 0 0 1rem; font-size: var(--p-size); color: var(--earth-soft); }
a { color: var(--river); text-decoration: none; } a:hover { opacity: 0.85; }
img { max-width: 100%; height: auto; display: block; }

.container { width: min(var(--content-max), calc(100% - var(--content-pad) * 2)); margin: 0 auto; }
.text-center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.75rem 1.6rem; font-family: "DM Sans", sans-serif; font-size: 1rem; font-weight: 600; border: none; border-radius: var(--radius-sm); cursor: pointer; transition: transform 0.1s; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--river); color: var(--cream); } .btn-primary:hover { background: var(--river-dark); opacity: 1; }
.btn-secondary { background: transparent; color: var(--river); border: 2px solid var(--river); } .btn-secondary:hover { background: var(--river-light); opacity: 1; }
.btn-sand { background: var(--sand); color: var(--white); } .btn-sand:hover { background: #b89970; opacity: 1; }
.btn-lg { padding: 1rem 2.2rem; font-size: 1.15rem; border-radius: var(--radius); }

.site-header { position: sticky; top: 0; z-index: 100; background: var(--white); border-bottom: 1px solid rgba(92,61,46,0.1); padding: 0.8rem 0; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-logo { font-family: "DM Serif Display", Georgia, serif; font-size: 1.6rem; color: var(--river); text-decoration: none; white-space: nowrap; }
.site-nav { display: flex; align-items: center; gap: 0.3rem; }
.site-nav a { padding: 0.5rem 1rem; font-size: 0.95rem; font-weight: 500; color: var(--earth); border-radius: var(--radius-sm); transition: background 0.15s; }
.site-nav a:hover { background: var(--river-light); color: var(--river); opacity: 1; }
.site-nav a.active { background: var(--river-light); color: var(--river); font-weight: 600; }
.cart-link { position: relative; display: inline-flex; align-items: center; gap: 0.3rem; }
.cart-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; border-radius: 999px; background: var(--clay); color: var(--white); font-size: 0.75rem; font-weight: 700; padding: 0 5px; }
.cart-count.empty { display: none; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; color: var(--earth); }
.nav-toggle svg { width: 24px; height: 24px; }
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); flex-direction: column; padding: 0.5rem 1rem 1rem; border-bottom: 1px solid rgba(92,61,46,0.1); box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.8rem 1rem; width: 100%; }
}

.hero { background: var(--river); color: var(--white); padding: 5rem 0; text-align: center; position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 20% 80%, rgba(74,124,89,0.15) 0%, transparent 60%), radial-gradient(ellipse at 80% 20%, rgba(200,168,130,0.1) 0%, transparent 60%); }
.hero .container { position: relative; z-index: 1; }
.hero h1 { color: var(--white); margin-bottom: 1rem; font-size: clamp(2.6rem, 5vw + 0.8rem, 5rem); }
.hero .subtitle { font-size: clamp(1.1rem, 1vw + 0.8rem, 1.5rem); color: rgba(255,255,255,0.85); max-width: 600px; margin: 0 auto 2rem; line-height: 1.5; }

section { padding: 4rem 0; }
.section-alt { background: var(--river-light); }
.section-sand { background: var(--sand-light); }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-header p { max-width: 560px; margin: 0.5rem auto 0; }

.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; text-align: center; }
.step { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.step-number { width: 56px; height: 56px; border-radius: 50%; background: var(--river); color: var(--white); font-family: "DM Serif Display", Georgia, serif; font-size: 1.5rem; display: flex; align-items: center; justify-content: center; }
.step h3 { margin: 0; } .step p { margin: 0; }
@media (max-width: 640px) { .steps-grid { grid-template-columns: 1fr; gap: 2.5rem; } }

.product-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.product-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; transition: box-shadow 0.2s, transform 0.2s; }
.product-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.product-card-img { width: 100%; height: 200px; object-fit: cover; background: var(--river-light); }
.product-card-body { padding: 1rem 1.2rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.product-card-seller { font-size: var(--small); color: var(--sand); font-weight: 600; margin-bottom: 0.3rem; text-decoration: none; }
.product-card-seller:hover { color: var(--river); opacity: 1; }
.product-card-name { font-family: "DM Serif Display", Georgia, serif; font-size: 1.15rem; color: var(--earth); margin: 0 0 0.3rem; line-height: 1.3; }
.product-card-unit { font-size: var(--small); color: var(--earth-soft); margin-bottom: 0.8rem; }
.product-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 0.6rem; }
.product-card-price { font-size: 1.2rem; font-weight: 700; color: var(--river); }
.product-card-add { width: 38px; height: 38px; border-radius: 50%; border: none; background: var(--river); color: var(--white); font-size: 1.3rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.15s; }
.product-card-add:hover { background: var(--river-dark); }
.product-qty-controls { display: flex; align-items: center; gap: 0.4rem; }
.qty-btn { width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--river); background: var(--white); color: var(--river); font-size: 1.1rem; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.qty-btn:hover { background: var(--river-light); }
.qty-value { min-width: 28px; text-align: center; font-weight: 700; font-size: 1rem; color: var(--earth); }

.seller-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.seller-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; text-decoration: none; color: inherit; transition: box-shadow 0.2s, transform 0.2s; }
.seller-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); opacity: 1; }
.seller-card-img { width: 100%; height: 180px; object-fit: cover; background: var(--sand-light); }
.seller-card-body { padding: 1.2rem 1.4rem; }
.seller-card-name { font-family: "DM Serif Display", Georgia, serif; font-size: 1.3rem; color: var(--river); margin: 0 0 0.3rem; }
.seller-card-tagline { font-size: var(--small); color: var(--earth-soft); margin: 0; }

.seller-hero { position: relative; padding: 3rem 0; background: var(--river-light); }
.seller-hero-inner { display: flex; align-items: center; gap: 2rem; }
.seller-hero-img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 4px solid var(--white); box-shadow: var(--shadow); flex-shrink: 0; }
.seller-hero-text h1 { margin-bottom: 0.3rem; }
.seller-hero-text .tagline { font-size: 1.1rem; color: var(--earth-soft); margin: 0 0 0.8rem; }
@media (max-width: 640px) { .seller-hero-inner { flex-direction: column; text-align: center; } }

.filters-bar { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; align-items: center; }
.filter-btn { padding: 0.45rem 1rem; font-size: 0.9rem; font-weight: 500; border-radius: 999px; border: 1.5px solid rgba(92,61,46,0.2); background: var(--white); color: var(--earth); cursor: pointer; transition: all 0.15s; }
.filter-btn:hover { border-color: var(--river); color: var(--river); }
.filter-btn.active { background: var(--river); color: var(--white); border-color: var(--river); }
.search-bar { display: flex; align-items: center; gap: 0.5rem; max-width: 400px; }
.search-input { width: 100%; padding: 0.6rem 1rem; font-size: 1rem; border: 1.5px solid rgba(92,61,46,0.2); border-radius: 999px; background: var(--white); color: var(--earth); font-family: inherit; }
.search-input:focus { outline: none; border-color: var(--river); box-shadow: 0 0 0 3px rgba(43,76,111,0.1); }

.cart-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 200; opacity: 0; visibility: hidden; transition: opacity 0.25s; }
.cart-overlay.open { opacity: 1; visibility: visible; }
.cart-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 90vw); background: var(--white); z-index: 201; transform: translateX(100%); transition: transform 0.3s ease; display: flex; flex-direction: column; box-shadow: -4px 0 20px rgba(0,0,0,0.1); }
.cart-panel.open { transform: translateX(0); }
.cart-panel-header { display: flex; align-items: center; justify-content: space-between; padding: 1.2rem 1.4rem; border-bottom: 1px solid rgba(92,61,46,0.1); }
.cart-panel-header h3 { margin: 0; font-size: 1.3rem; }
.cart-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--earth); padding: 0.3rem; }
.cart-panel-body { flex: 1; overflow-y: auto; padding: 1rem 1.4rem; }
.cart-seller-group h4 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--sand); margin: 1.2rem 0 0.6rem; padding-bottom: 0.4rem; border-bottom: 1px solid rgba(200,168,130,0.3); }
.cart-seller-group:first-child h4 { margin-top: 0; }
.cart-item { display: flex; align-items: center; gap: 0.8rem; padding: 0.6rem 0; }
.cart-item-img { width: 48px; height: 48px; border-radius: var(--radius-sm); object-fit: cover; background: var(--river-light); }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-weight: 600; font-size: 0.95rem; color: var(--earth); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-price { font-size: 0.85rem; color: var(--earth-soft); }
.cart-panel-footer { padding: 1.2rem 1.4rem; border-top: 1px solid rgba(92,61,46,0.1); }
.cart-total { display: flex; justify-content: space-between; font-size: 1.2rem; font-weight: 700; color: var(--earth); margin-bottom: 1rem; }
.cart-empty-msg { text-align: center; color: var(--earth-soft); padding: 3rem 0; font-size: 1rem; }

.checkout-grid { display: grid; grid-template-columns: 1fr 380px; gap: 2rem; align-items: start; }
@media (max-width: 900px) { .checkout-grid { grid-template-columns: 1fr; } }
.checkout-form { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem 1.8rem; }
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-size: 0.9rem; font-weight: 600; color: var(--earth); margin-bottom: 0.4rem; }
.form-group input, .form-group select { width: 100%; padding: 0.7rem 0.9rem; font-size: 1rem; border: 1.5px solid rgba(92,61,46,0.2); border-radius: var(--radius-sm); background: var(--white); color: var(--earth); font-family: inherit; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--river); box-shadow: 0 0 0 3px rgba(43,76,111,0.1); }
.order-summary { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem 1.8rem; position: sticky; top: 5rem; }
.order-summary h3 { margin-bottom: 1rem; }

.pickup-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem 1.8rem; display: flex; gap: 1.5rem; align-items: flex-start; }
.pickup-icon { width: 48px; height: 48px; border-radius: 50%; background: var(--river-light); color: var(--river); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.pickup-details h3 { margin: 0 0 0.3rem; font-size: 1.15rem; }
.pickup-details p { margin: 0; font-size: var(--small); }

.cta-section { background: var(--river); color: var(--white); text-align: center; padding: 4rem 0; }
.cta-section h2 { color: var(--white); }
.cta-section p { color: rgba(255,255,255,0.8); max-width: 520px; margin: 0 auto 1.5rem; }

.site-footer { background: var(--earth); color: rgba(255,255,255,0.7); padding: 2.5rem 0; text-align: center; }
.site-footer p { color: rgba(255,255,255,0.6); font-size: var(--small); margin: 0.3rem 0; }
.site-footer a { color: rgba(255,255,255,0.8); } .site-footer a:hover { color: var(--white); opacity: 1; }
.footer-links { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1rem; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 300; display: none; align-items: center; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal-card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 2rem 2.4rem; max-width: 480px; width: 90%; text-align: center; }

.badge { display: inline-block; padding: 0.2rem 0.6rem; font-size: 0.75rem; font-weight: 600; border-radius: 999px; text-transform: uppercase; letter-spacing: 0.3px; }
.badge-moss { background: rgba(74,124,89,0.12); color: var(--moss); }
.badge-clay { background: rgba(212,163,115,0.15); color: #a07840; }
.divider { height: 1px; background: rgba(92,61,46,0.1); border: none; margin: 2rem 0; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--earth-soft); }
