/* ==========================================================================
   Goodluck Almirah — base styles (tokens, layout chrome, shared components)
   ========================================================================== */

:root {
  /* Brand */
  --green-950: #0c2218;
  --green-900: #102c20;
  --green-800: #163828;
  --green-700: #1f4a36;
  --green-600: #2b5e45;
  --green-100: #e3ece5;
  --lime: #8fd673;
  --lime-600: #74c257;

  /* Surfaces & text */
  --bg: #f6f5f0;
  --bg-alt: #efeee7;
  --card: #ffffff;
  --ink: #18201b;
  --ink-2: #2f3832;
  --muted: #58625b;
  --border: #e1e3dc;
  --border-strong: #c9cdc4;
  --on-dark: #f3f5f1;
  --on-dark-muted: #b9c6bd;
  --danger: #b42318;
  --danger-bg: #fdecea;
  --success: #1f7a45;
  --star: #e0a526;

  /* Type */
  --font-head: "Cormorant", "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Spacing (8pt rhythm) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(16, 44, 32, .06);
  --shadow: 0 6px 20px -8px rgba(16, 44, 32, .18);
  --shadow-lg: 0 24px 48px -16px rgba(16, 44, 32, .28);

  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: 150ms;
  --t: 220ms;
  --t-slow: 400ms;

  --container: 1240px;
  --header-h: 72px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.1; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--lime-600); outline-offset: 2px; border-radius: 4px; }
.skip-link {
  position: absolute; left: var(--s4); top: -60px; z-index: 1000;
  background: var(--lime); color: var(--green-950); padding: var(--s3) var(--s4); border-radius: var(--radius-sm); font-weight: 600;
  transition: top var(--t-fast) var(--ease);
}
.skip-link:focus { top: var(--s3); }
.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; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--s5); }
.section { padding: var(--s8) 0; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon-lg { width: 28px; height: 28px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 44px; padding: 0 var(--s5);
  border-radius: var(--radius-sm); border: 1.5px solid transparent;
  font-size: 14px; font-weight: 600; letter-spacing: .01em; white-space: nowrap;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--green-700); color: #fff; }
.btn-primary:hover { background: var(--green-800); box-shadow: var(--shadow); }
.btn-lime { background: var(--lime); color: var(--green-950); }
.btn-lime:hover { background: var(--lime-600); }
.btn-outline { border-color: var(--green-700); color: var(--green-700); background: transparent; }
.btn-outline:hover { background: var(--green-700); color: #fff; }
.btn-ghost-light { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-ghost-light:hover { background: #fff; color: var(--green-900); }
.btn-block { width: 100%; }
.btn-lg { min-height: 52px; font-size: 15px; }
.btn .spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.icon-btn {
  position: relative; display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.icon-btn:hover { background: rgba(255,255,255,.1); }
.badge {
  position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--lime); color: var(--green-950);
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.badge:empty, .badge[data-count="0"] { display: none; }

/* ---------- Top bar & header ---------- */
.topbar { background: var(--green-950); color: var(--on-dark-muted); font-size: 12px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; min-height: 34px; gap: var(--s4); }
.topbar ul { display: flex; gap: var(--s5); }
.topbar li { display: inline-flex; align-items: center; gap: 6px; }
.topbar .icon { width: 14px; height: 14px; }

.site-header { position: sticky; top: 0; z-index: 50; background: var(--green-800); color: var(--on-dark); box-shadow: 0 1px 0 rgba(255,255,255,.06); }
.site-header .container { display: flex; align-items: center; gap: var(--s5); min-height: var(--header-h); }
.logo { display: inline-flex; flex-direction: column; line-height: 1; }
.logo b { font-family: var(--font-body); font-weight: 800; font-size: 24px; letter-spacing: .02em; }
.logo small { font-size: 7.5px; letter-spacing: .22em; margin-top: 4px; color: var(--on-dark-muted); text-transform: uppercase; }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; gap: var(--s2); }
.main-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s3);
  font-size: 14px; font-weight: 500; color: var(--on-dark-muted); position: relative;
  transition: color var(--t-fast) var(--ease);
}
.main-nav a:hover, .main-nav a[aria-current="page"] { color: #fff; }
.main-nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: var(--s3); right: var(--s3); bottom: 8px; height: 2px; background: var(--lime); border-radius: 2px;
}
.header-actions { display: flex; align-items: center; gap: var(--s1); }
.header-actions .btn { margin-left: var(--s3); min-height: 40px; }
.menu-toggle { display: none; }

/* Search panel */
.search-panel { background: var(--green-900); border-top: 1px solid rgba(255,255,255,.08); }
.search-panel form { display: flex; gap: var(--s3); padding: var(--s4) 0; }
.search-panel input {
  flex: 1; min-height: 48px; padding: 0 var(--s4); border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.06); color: #fff;
}
.search-panel input::placeholder { color: var(--on-dark-muted); }

/* Mobile drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(8, 22, 15, .55); z-index: 90; opacity: 0; transition: opacity var(--t) var(--ease); }
.drawer-backdrop.open { opacity: 1; }
.mobile-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(320px, 86vw); z-index: 100;
  background: var(--green-800); color: var(--on-dark); padding: var(--s5);
  transform: translateX(100%); transition: transform var(--t) var(--ease);
  display: flex; flex-direction: column; gap: var(--s4);
}
.mobile-drawer.open { transform: none; }
.mobile-drawer .drawer-head { display: flex; justify-content: space-between; align-items: center; }
.mobile-drawer nav a { display: flex; align-items: center; min-height: 48px; font-size: 17px; border-bottom: 1px solid rgba(255,255,255,.08); }
.mobile-drawer nav a[aria-current="page"] { color: var(--lime); }

/* ---------- Page banner ---------- */
.page-banner {
  position: relative; overflow: hidden;
  background: linear-gradient(100deg, var(--green-800) 0%, var(--green-700) 60%, #2d5a43 100%);
  color: var(--on-dark);
}
.page-banner::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(600px 240px at 85% 50%, rgba(143,214,115,.14), transparent 70%);
}
.page-banner .container { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s5); padding-top: var(--s7); padding-bottom: var(--s7); }
.page-banner h1 { font-size: clamp(38px, 5vw, 56px); }
.page-banner p { color: var(--on-dark-muted); margin-top: var(--s3); max-width: 46ch; }
.page-banner .tagline { font-family: var(--font-head); font-size: clamp(20px, 2.2vw, 26px); text-align: right; line-height: 1.2; color: #fff; }

.page-head { padding: var(--s6) 0 var(--s5); display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s5); }
.page-head h1 { font-size: clamp(34px, 4vw, 46px); }
.page-head p { color: var(--muted); margin-top: var(--s2); max-width: 52ch; }
.page-head .tagline { font-family: var(--font-head); font-size: 22px; text-align: right; line-height: 1.2; color: var(--ink-2); }

.breadcrumb { font-size: 13px; color: var(--muted); padding-top: var(--s5); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: var(--s2); color: var(--border-strong); }
.breadcrumb a:hover { color: var(--green-700); text-decoration: underline; }

/* ---------- Product card ---------- */
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s5); }
.product-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: box-shadow var(--t) var(--ease), transform var(--t) var(--ease), border-color var(--t) var(--ease);
}
.product-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: transparent; }
.product-card .media { display: block; aspect-ratio: 4 / 4.2; background: var(--bg-alt); overflow: hidden; }
.product-card .media svg { width: 100%; height: 100%; transition: transform var(--t-slow) var(--ease); }
.product-card:hover .media svg { transform: scale(1.04); }
.product-card .body { padding: var(--s4); display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card h3 { font-family: var(--font-body); font-size: 15px; font-weight: 600; line-height: 1.35; }
.product-card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.product-card .price { font-weight: 700; font-size: 15px; }
.product-card .price s { font-weight: 400; color: var(--muted); font-size: 13px; margin-left: 6px; }
.product-card .foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: var(--s2); }
.product-card .wish { z-index: 2; }
.product-card .quick-add { position: relative; z-index: 2; }
.wish {
  position: absolute; top: var(--s3); right: var(--s3); width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255,255,255,.92); color: var(--ink-2); box-shadow: var(--shadow-sm);
  transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.wish:hover { color: var(--danger); transform: scale(1.06); }
.wish[aria-pressed="true"] { color: var(--danger); }
.wish[aria-pressed="true"] .icon { fill: currentColor; }
.quick-add {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--border); color: var(--green-700);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.quick-add:hover { background: var(--green-700); color: #fff; border-color: var(--green-700); }
.tag-off { position: absolute; top: var(--s3); left: var(--s3); z-index: 2; background: var(--lime); color: var(--green-950); font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 4px; }

.swatches { display: flex; gap: 6px; align-items: center; }
.swatch-dot { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.18); }

.empty-state { text-align: center; padding: var(--s8) var(--s5); color: var(--muted); grid-column: 1 / -1; }
.empty-state h2, .empty-state h3 { color: var(--ink); font-size: 30px; margin-bottom: var(--s2); }
.empty-state .btn { margin-top: var(--s5); }

/* ---------- Trust bar ---------- */
.trust-bar { border-top: 1px solid var(--border); background: var(--card); }
.trust-bar ul { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s5); padding: var(--s6) 0; }
.trust-bar li { display: flex; align-items: center; gap: var(--s3); justify-content: center; }
.trust-bar .icon { width: 32px; height: 32px; color: var(--green-700); stroke-width: 1.5; }
.trust-bar b { display: block; font-size: 14px; font-weight: 600; }
.trust-bar span { font-size: 13px; color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--green-900); color: var(--on-dark-muted); font-size: 14px; }
.site-footer .grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.5fr; gap: var(--s6); padding: var(--s7) 0 var(--s6); }
.site-footer h2 { font-family: var(--font-body); font-size: 14px; font-weight: 600; color: #fff; margin-bottom: var(--s4); letter-spacing: .02em; }
.site-footer .logo { color: #fff; margin-bottom: var(--s4); }
.site-footer li a { display: inline-flex; min-height: 32px; align-items: center; transition: color var(--t-fast) var(--ease); }
.site-footer li a:hover { color: var(--lime); }
.site-footer li button, .site-footer .legal button { min-height: 32px; color: inherit; text-align: left; transition: color var(--t-fast) var(--ease); }
.site-footer li button:hover, .site-footer .legal button:hover { color: var(--lime); }
.site-footer p { max-width: 36ch; }
.site-footer .legal { border-top: 1px solid rgba(255,255,255,.1); padding: var(--s4) 0; font-size: 13px; display: flex; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; }
.socials { display: flex; gap: var(--s2); margin-top: var(--s4); }
.socials a { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.18); color: #fff; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease); }
.socials a:hover { background: var(--lime); color: var(--green-950); border-color: var(--lime); }

.inline-form { display: flex; gap: var(--s2); }
.inline-form input {
  flex: 1; min-width: 0; min-height: 44px; padding: 0 var(--s4); border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.07); color: #fff;
}
.inline-form input::placeholder { color: var(--on-dark-muted); }
.form-msg { font-size: 13px; margin-top: var(--s2); min-height: 20px; }
.form-msg.ok { color: var(--lime); }
.form-msg.err { color: #ffb4a8; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field label .opt { font-weight: 400; color: var(--muted); }
.input, .field input, .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px var(--s4);
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--muted); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(31, 74, 54, .18); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
.field .error { display: none; font-size: 12.5px; color: var(--danger); align-items: center; gap: 4px; }
.field.invalid .error { display: flex; }
.field .hint { font-size: 12.5px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.form-grid .full { grid-column: 1 / -1; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); }
.error-summary { background: var(--danger-bg); color: var(--danger); border-radius: var(--radius-sm); padding: var(--s3) var(--s4); font-size: 14px; }
.success-panel { text-align: center; padding: var(--s6) var(--s4); }
.success-panel .tick { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto var(--s4); display: grid; place-items: center; background: var(--green-100); color: var(--success); }
.success-panel .tick .icon { width: 32px; height: 32px; stroke-width: 2.5; }
.success-panel h3 { font-size: 30px; margin-bottom: var(--s2); }
.success-panel p { color: var(--muted); }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: var(--s4); }
.modal-backdrop { position: absolute; inset: 0; background: rgba(8, 22, 15, .6); animation: fade var(--t) var(--ease); }
.modal-dialog {
  position: relative; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: var(--s6);
  animation: pop var(--t) var(--ease);
}
.modal-dialog.wide { width: min(880px, 100%); padding: 0; background: var(--green-950); }
.modal-dialog h2 { font-size: 32px; margin-bottom: var(--s2); }
.modal-dialog .lead { color: var(--muted); margin-bottom: var(--s5); }
.modal-close { position: absolute; top: var(--s3); right: var(--s3); z-index: 2; }
.modal-close:hover { background: var(--bg-alt); }
.modal-dialog.wide .modal-close { color: #fff; }
.modal-dialog.wide .modal-close:hover { background: rgba(255,255,255,.12); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
body.no-scroll { overflow: hidden; }

/* ---------- Toast ---------- */
.toast-region { position: fixed; bottom: var(--s5); left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: var(--s2); align-items: center; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: var(--s3);
  background: var(--green-950); color: #fff; padding: var(--s3) var(--s3) var(--s3) var(--s4); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); font-size: 14px; animation: toast-in var(--t) var(--ease);
}
.toast .icon { color: var(--lime); }
.toast a { color: var(--lime); font-weight: 600; text-decoration: underline; min-height: 32px; display: inline-flex; align-items: center; padding: 0 var(--s2); }
.toast.leaving { opacity: 0; transform: translateY(8px); transition: all var(--t) var(--ease); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-footer .grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 920px) {
  .main-nav, .header-actions .btn-quote { display: none; }
  .menu-toggle { display: inline-grid; }
  .header-actions { margin-left: auto; }
  .topbar .tag-right { display: none; }
  .trust-bar ul { grid-template-columns: repeat(2, 1fr); }
  .trust-bar li { justify-content: flex-start; }
}
@media (max-width: 720px) {
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
  .product-card .body { padding: var(--s3); }
  .page-banner .container, .page-head { flex-direction: column; align-items: flex-start; }
  .page-banner .tagline, .page-head .tagline { text-align: left; }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .topbar ul li:nth-child(n+2) { display: none; }
  .section { padding: var(--s7) 0; }
  .modal-dialog { padding: var(--s5); }
}
@media (max-width: 520px) {
  .container { padding: 0 var(--s4); }
  .site-footer .grid { grid-template-columns: 1fr; }
  .trust-bar ul { grid-template-columns: 1fr; gap: var(--s4); }
  .header-actions .icon-btn.account { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
