* { box-sizing: border-box; }
:root {
  --navy: #15344b;
  --green: #15966a;
  --green-dark: #087b56;
  --ink: #182b3b;
  --muted: #64748b;
  --line: #e4ecee;
  --surface: #f6f9fa;
  --danger: #c0392b;
  --warn: #d97706;
}
body {
  margin: 0;
  color: var(--ink);
  font-family: "DM Sans", "Noto Sans Ethiopic", system-ui, sans-serif;
  background: #fff;
  font-size: 14px;
  line-height: 1.5;
}
body.amharic { font-family: "Noto Sans Ethiopic", "DM Sans", sans-serif; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; display: block; }
.container { width: min(1200px, calc(100% - 36px)); margin: auto; }
.inline-form { display: inline; margin: 0; }

/* Header */
.topline { background: #102b40; color: #dce8ee; font-size: 12px; }
.top-inner { min-height: 36px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 0; }
.top-inner > div { display: flex; gap: 10px; align-items: center; }
.language-toggle { border: 1px solid rgba(255,255,255,.28); background: rgba(255,255,255,.08); color: #fff; cursor: pointer; font-weight: 700; padding: 3px 10px; border-radius: 6px; font-size: 12px; }
.language-toggle:hover { background: var(--green); border-color: var(--green); }

.header-main { min-height: 84px; display: flex; align-items: center; gap: 26px; padding: 12px 0; }
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-mark { width: 42px; height: 42px; border-radius: 12px; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 25px; font-weight: 800; }
.brand-copy { display: grid; line-height: 1.05; }
.brand-copy strong { font-size: 20px; letter-spacing: -.5px; color: var(--navy); }
.brand-copy small { font-size: 9px; letter-spacing: 2.2px; color: var(--muted); font-weight: 800; margin-top: 4px; }

.search-form { height: 45px; border: 1px solid #d4e0e5; border-radius: 10px; display: flex; flex: 1; overflow: hidden; background: #fff; }
.search-form input { border: 0; outline: 0; padding: 0 14px; min-width: 100px; flex: 1; }
.search-form select { border: 0; border-left: 1px solid var(--line); padding: 0 10px; color: #526372; background: #fff; max-width: 160px; }
.search-form button { width: 52px; border: 0; background: var(--green); color: #fff; font-size: 24px; cursor: pointer; }
.search-form button:hover { background: var(--green-dark); }

.header-actions { display: flex; gap: 18px; align-items: center; }
.header-actions a { display: flex; align-items: center; gap: 7px; }
.header-actions small, .header-actions strong { display: block; white-space: nowrap; }
.header-actions small { font-size: 10px; color: var(--muted); }
.header-actions strong { font-size: 12px; }
.action-icon { font-size: 19px; color: var(--navy); }

.nav-wrap { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.nav-inner { min-height: 46px; display: flex; align-items: center; gap: 24px; }
.category-menu { border: 0; background: none; font-weight: 700; color: var(--navy); padding: 0; cursor: pointer; white-space: nowrap; }
.main-nav { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.main-nav a { font-size: 13px; color: #475569; font-weight: 500; }
.main-nav a:hover, .text-link:hover { color: var(--green); }
.nav-admin-link { color: var(--green-dark) !important; font-weight: 700 !important; }
.nav-logout-btn { border: 0; background: none; color: #b91c1c; font-size: 13px; cursor: pointer; padding: 0; font-weight: 600; }
.nav-note { margin-left: auto; color: var(--green-dark); font-size: 12px; font-weight: 700; }

.mobile-cat-drawer { background: #f8fbfa; border-bottom: 1px solid var(--line); padding: 12px 0; }
.mobile-cat-list { display: flex; flex-wrap: wrap; gap: 8px; }
.mobile-cat-list a { background: #fff; border: 1px solid var(--line); padding: 7px 12px; border-radius: 20px; font-size: 12px; }

/* Notices & Buttons */
.flash-wrap { padding-top: 16px; }
.notice { padding: 13px 16px; border-radius: 10px; font-weight: 500; font-size: 13px; }
.notice.success { background: #e6f7ef; color: #0f5132; border: 1px solid #bce8d2; }
.notice.error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.primary-button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 11px 18px; border-radius: 9px; background: var(--green); color: #fff;
  font-weight: 700; font-size: 13px; border: 0; cursor: pointer; transition: background .15s;
}
.primary-button:hover, .btn:hover { background: var(--green-dark); }
.btn-outline { background: #fff; color: var(--navy); border: 1px solid #cbd5e1; }
.btn-outline:hover { background: #f1f5f9; color: var(--navy); }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 7px 12px; font-size: 12px; border-radius: 7px; }
.light-button { display: inline-flex; align-items: center; gap: 12px; padding: 12px 20px; border-radius: 9px; background: #fff; color: var(--navy); font-weight: 700; font-size: 13px; margin-top: 8px; }

/* Hero */
.hero-section { padding: 24px 0 20px; background: #f7faf9; }
.hero-grid { display: grid; grid-template-columns: 245px 1fr; gap: 18px; }
.category-panel { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.category-panel h3 { font-size: 14px; margin: 0 0 10px; color: var(--navy); }
.category-panel a { display: flex; align-items: center; gap: 10px; padding: 9px 0; color: #475569; font-size: 13px; border-bottom: 1px solid #f1f5f6; }
.category-panel a:last-child { border: 0; }
.category-panel a:hover { color: var(--green-dark); }
.category-panel a .cat-label { flex: 1; }
.category-panel a .cat-arrow { font-size: 17px; color: #94a3b8; }

.hero-banner {
  min-height: 325px; border-radius: 14px; overflow: hidden;
  background: linear-gradient(110deg, #dff3ea 0%, #edf8f4 58%, #c6e9da 100%);
  position: relative; display: flex; align-items: center; padding: 40px 6%;
}
.hero-content { position: relative; z-index: 2; max-width: 520px; }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 1.6px; color: var(--green-dark); text-transform: uppercase; }
.hero-content h1 { font-size: clamp(30px, 4vw, 46px); line-height: 1.12; letter-spacing: -1.4px; margin: 12px 0; color: #123731; }
.hero-content p { font-size: 14px; line-height: 1.65; color: #4b6861; max-width: 430px; margin: 0 0 22px; }
.hero-trust { display: flex; gap: 18px; margin-top: 20px; color: #3f6258; font-size: 12px; font-weight: 600; flex-wrap: wrap; }
.hero-art { position: absolute; right: 7%; top: 0; width: 35%; height: 100%; display: grid; place-items: center; }
.art-circle { width: 250px; height: 250px; border-radius: 50%; background: #b4dfcc; position: absolute; }
.shopping-bag { position: relative; width: 145px; height: 160px; background: #fff; border-radius: 16px 16px 24px 24px; box-shadow: 0 20px 35px rgba(76,142,115,.22); display: grid; place-items: center; font-size: 80px; font-weight: 800; color: var(--green); transform: rotate(-7deg); }
.shopping-bag:before { content: ""; position: absolute; width: 62px; height: 42px; border: 9px solid #fff; border-bottom: 0; border-radius: 40px 40px 0 0; top: -34px; }
.float-card { position: absolute; background: #fff; padding: 10px 14px; border-radius: 9px; box-shadow: 0 8px 24px rgba(41,78,60,.12); font-size: 12px; font-weight: 700; }
.card-one { top: 20%; right: 0; }
.card-two { bottom: 18%; left: 0; }

/* Benefits */
.benefits { border-bottom: 1px solid var(--line); background: #fff; }
.benefit-grid { display: grid; grid-template-columns: repeat(4, 1fr); padding: 18px 0; gap: 18px; }
.benefit-grid > div { display: flex; align-items: center; gap: 12px; }
.benefit-icon { width: 38px; height: 38px; border-radius: 50%; background: #eaf6f0; color: var(--green); display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.benefit-grid strong { display: block; font-size: 13px; }
.benefit-grid small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }

/* Sections & Grids */
.section { padding: 42px 0; }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.section-heading h2 { font-size: 24px; letter-spacing: -.5px; margin: 4px 0 0; color: var(--navy); }
.text-link { font-size: 13px; font-weight: 700; color: var(--green-dark); }

.category-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.category-card { border-radius: 12px; min-height: 138px; padding: 18px; display: flex; flex-direction: column; justify-content: center; gap: 6px; transition: transform .18s; border: 1px solid rgba(0,0,0,.04); }
.category-card:hover { transform: translateY(-3px); }
.category-emoji { font-size: 30px; }
.category-card strong { font-size: 14px; color: var(--navy); }
.category-card small { font-size: 11px; color: #64748b; }
.cat-tint-0 { background: #f9f0e8; }
.cat-tint-1 { background: #eaf2fa; }
.cat-tint-2 { background: #f0f2e9; }
.cat-tint-3 { background: #f8edf2; }

.products-section { background: #f8fafb; }
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-bar select { padding: 8px 12px; border: 1px solid #d4e0e5; border-radius: 8px; background: #fff; font-size: 13px; }
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.product-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.product-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(23,46,60,.08); }
.product-image { height: 195px; position: relative; display: grid; place-items: center; background: #eef4f2; overflow: hidden; }
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-visual { font-size: 56px; opacity: .75; }
.product-tag { position: absolute; top: 10px; left: 10px; background: var(--green); color: #fff; font-size: 10px; padding: 4px 8px; border-radius: 5px; font-weight: 700; z-index: 2; }
.wish-form { position: absolute; top: 8px; right: 8px; z-index: 2; }
.wish-button { border: 0; background: rgba(255,255,255,.94); width: 32px; height: 32px; border-radius: 50%; font-size: 18px; color: #64748b; cursor: pointer; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.wish-button.active { color: #e11d48; }
.product-info { padding: 14px; display: flex; flex-direction: column; flex: 1; gap: 6px; }
.seller-label { font-size: 11px; color: var(--muted); }
.product-info h3 { font-size: 14px; margin: 0; line-height: 1.35; }
.product-info h3 a:hover { color: var(--green-dark); }
.price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-row strong { font-size: 15px; color: var(--green-dark); }
.compare-price { font-size: 12px; color: #94a3b8; text-decoration: line-through; }
.product-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 8px; gap: 8px; }
.add-cart { width: 34px; height: 34px; border: 0; border-radius: 8px; background: #e8f5ef; color: var(--green-dark); font-size: 20px; font-weight: 700; cursor: pointer; }
.add-cart:hover { background: var(--green); color: #fff; }
.add-cart:disabled { opacity: .45; cursor: not-allowed; }

.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.pagination a { padding: 8px 13px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 600; }
.pagination a.active { background: var(--green); color: #fff; border-color: var(--green); }

/* Seller CTA */
.seller-cta { background: var(--navy); color: #fff; padding: 38px 0; }
.seller-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.seller-inner .eyebrow { color: #7ed6b0; }
.seller-inner h2 { font-size: 26px; margin: 6px 0; color: #fff; }
.seller-inner p { color: #c5d3db; font-size: 14px; max-width: 520px; }
.seller-illustration { font-size: 86px; }

/* Page containers, forms, cards */
.page-section { padding: 32px 0 56px; background: var(--surface); min-height: 62vh; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.form-wrap { max-width: 500px; margin: 18px auto; background: #fff; padding: 28px; border: 1px solid var(--line); border-radius: 14px; }
.form-wrap h1 { margin: 0 0 18px; font-size: 24px; color: var(--navy); }
.form-grid { display: grid; gap: 14px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--navy); }
label.field input, label.field select, label.field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; font-weight: 400;
}
label.field input:focus, label.field select:focus, label.field textarea:focus { outline: 2px solid rgba(21,150,106,.22); border-color: var(--green); }
.checkbox-field { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--navy); cursor: pointer; }
.muted { color: var(--muted); font-size: 13px; }

/* Product Detail */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px; }
.detail-image { min-height: 340px; background: #eef4f2; border-radius: 12px; display: grid; place-items: center; overflow: hidden; }
.detail-image img { width: 100%; max-height: 460px; object-fit: contain; }
.detail-meta h1 { margin: 8px 0; font-size: 28px; color: var(--navy); }
.detail-price { font-size: 26px; font-weight: 800; color: var(--green-dark); margin: 12px 0; }
.detail-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 20px; }
.qty-input { width: 78px; padding: 10px; border: 1px solid #cbd5e1; border-radius: 8px; text-align: center; }

/* Cart & Checkout */
.two-col { display: grid; grid-template-columns: 1.65fr 1fr; gap: 22px; align-items: start; }
.summary-row { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.summary-row.total { font-size: 17px; font-weight: 800; color: var(--navy); border-bottom: 0; padding-top: 12px; }
.pay-option { display: flex; gap: 12px; align-items: flex-start; border: 1px solid #cbd5e1; border-radius: 10px; padding: 14px; cursor: pointer; background: #fff; }
.pay-option:has(input:checked) { border-color: var(--green); background: #f0faf5; }
.pay-option strong { display: block; font-size: 14px; color: var(--navy); }
.pay-option small { color: var(--muted); font-size: 12px; }

/* Dashboards (Seller & Admin) */
.dash-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.dash-header h1 { margin: 0; font-size: 26px; color: var(--navy); }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.kpi-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; }
.kpi-card small { color: var(--muted); font-size: 12px; font-weight: 600; }
.kpi-card strong { display: block; font-size: 24px; color: var(--navy); margin-top: 4px; }

.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.tabs a { padding: 9px 15px; border-radius: 9px; background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: #475569; }
.tabs a.active { background: var(--navy); color: #fff; border-color: var(--navy); }

.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data-table th, table.data-table td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data-table th { background: #f8fafb; color: var(--navy); font-weight: 700; white-space: nowrap; }
.thumb { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: #eef4f2; display: grid; place-items: center; font-size: 20px; }

.badge { display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: 11px; font-weight: 700; text-transform: capitalize; }
.badge-green { background: #dcfce7; color: #166534; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-gray { background: #f1f5f9; color: #475569; }

.empty-state { text-align: center; padding: 40px 20px; background: #fff; border: 1px solid var(--line); border-radius: 14px; color: var(--muted); }

/* Footer & Toast */
.site-footer { background: #f4f7f8; padding: 38px 0 0; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 30px; padding-bottom: 28px; }
.footer-grid h4 { font-size: 13px; margin: 0 0 12px; color: var(--navy); }
.footer-grid > div > a:not(.brand) { display: block; color: #64748b; font-size: 12px; margin: 9px 0; }
.footer-grid > div > a:hover { color: var(--green-dark); }
.footer-grid p { color: #64748b; font-size: 12px; line-height: 1.6; margin: 6px 0; }
.copyright { border-top: 1px solid #e2e9ec; padding: 16px 0; text-align: center; color: #7c8b95; font-size: 11px; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translate(-50%, 20px); background: #143731; color: #fff; padding: 11px 18px; border-radius: 9px; font-size: 13px; opacity: 0; pointer-events: none; transition: .25s; z-index: 40; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1000px) {
  .header-actions a span:last-child { display: none; }
  .nav-note { display: none; }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 780px) {
  .header-main { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
  .search-form { grid-column: 1 / -1; grid-row: 2; }
  .hero-grid { grid-template-columns: 1fr; }
  .category-panel { display: none; }
  .hero-art { right: -8%; width: 42%; opacity: .35; }
  .float-card { display: none; }
  .benefit-grid { grid-template-columns: repeat(2, 1fr); }
  .category-cards { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .detail-grid, .two-col, .form-row-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
  .seller-illustration { display: none; }
}

/* Chat & Delivery Tracker */
.chat-layout { display: grid; grid-template-columns: 300px 1fr; gap: 18px; align-items: start; }
.chat-sidebar { padding: 16px; }
.chat-thread-list { display: grid; gap: 8px; }
.chat-thread-item { display: block; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; transition: .15s; }
.chat-thread-item:hover { border-color: var(--green); }
.chat-thread-item.active { background: #eef9f4; border-color: var(--green); }
.chat-main { display: flex; flex-direction: column; min-height: 460px; padding: 18px; }
.chat-header { display: flex; justify-content: space-between; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); gap: 10px; }
.chat-messages { flex: 1; max-height: 380px; overflow-y: auto; padding: 16px 4px; display: flex; flex-direction: column; gap: 10px; }
.chat-bubble { max-width: 78%; padding: 10px 14px; border-radius: 12px; font-size: 13px; line-height: 1.5; }
.chat-bubble.mine { align-self: flex-end; background: var(--green); color: #fff; border-bottom-right-radius: 3px; }
.chat-bubble.theirs { align-self: flex-start; background: #f1f5f9; color: var(--ink); border-bottom-left-radius: 3px; }
.chat-meta { font-size: 10px; opacity: .78; margin-bottom: 4px; }
.chat-reply-form { display: flex; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.chat-reply-form input { flex: 1; padding: 11px 14px; border: 1px solid #cbd5e1; border-radius: 9px; }
.track-steps { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.track-step { padding: 6px 12px; border-radius: 99px; font-size: 12px; font-weight: 700; background: #f1f5f9; color: #64748b; }
.track-step.done { background: #dcfce7; color: #166534; }
@media (max-width: 780px) { .chat-layout { grid-template-columns: 1fr; } }

.rating-line { display: flex; align-items: center; gap: 6px; font-size: 12px; flex-wrap: wrap; }
.stars { color: #f59e0b; letter-spacing: 1px; font-size: 13px; }
