/* Shopora Home — shared warm-stone family theme with sage accent */
:root {
  --limestone: #f6f1e7;
  --paper: #fffdf8;
  --sand: #ece3d0;
  --ink: #2e2a24;
  --muted: #7a6e5c;
  --line: #d9cdb4;
  --accent: #7d8c6f;
  --accent-dark: #5f6d52;
  --red: #a03a2a;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(46, 42, 36, 0.08);
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--limestone);
  color: var(--ink);
  line-height: 1.6;
}
img { max-width: 100%; }
a { color: var(--accent-dark); }

/* ---------- header ---------- */
.site-header {
  background: var(--ink);
  border-bottom: 1px solid rgba(255,255,255,0.14);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 1px;
  text-decoration: none;
  color: #fff;
  white-space: nowrap;
}
.brand span { color: var(--accent-dark); }
.main-nav {
  display: flex;
  gap: 4px;
  margin-left: 8px;
  overflow-x: auto;
  flex: 1;
}
.main-nav a {
  text-decoration: none;
  color: #fff;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.main-nav a:hover, .main-nav a.active { background: rgba(255,255,255,0.16); }
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}
.currency-select {
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 7px 8px;
  font-size: 13px;
  color: #fff;
}
.cart-btn {
  position: relative;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  cursor: pointer;
  color: #fff;
}
.cart-btn:hover { background: rgba(255,255,255,0.16); }
.cart-count {
  display: inline-block;
  min-width: 20px;
  text-align: center;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  padding: 1px 6px;
  margin-left: 6px;
}

/* ---------- layout ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 48px 0; }
.section-title {
  font-family: var(--font-display);
  font-size: 30px;
  margin: 0 0 8px;
}
.section-sub { color: var(--muted); margin: 0 0 28px; }

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--sand), var(--limestone));
  border-bottom: 1px solid var(--line);
  padding: 72px 0 64px;
  text-align: center;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 56px);
  margin: 0 0 12px;
  line-height: 1.15;
}
.hero p { color: var(--muted); font-size: 18px; margin: 0 0 28px; }
.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border: none;
  padding: 13px 30px;
  border-radius: 999px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.15s;
}
.btn:hover { background: var(--accent-dark); }
.btn.secondary {
  background: transparent;
  color: var(--accent-dark);
  border: 1px solid var(--accent);
}
.btn.secondary:hover { background: var(--sand); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* ---------- category tiles ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 14px;
}
.cat-tile {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 12px;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform 0.15s;
}
.cat-tile:hover { transform: translateY(-3px); }
.cat-tile .cat-name { font-weight: 600; font-size: 15px; }
.cat-tile .cat-count { font-size: 12px; color: var(--muted); }

/* ---------- product grid & cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
.product-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform 0.15s;
}
.product-card:hover { transform: translateY(-3px); }
.product-card .p-img {
  aspect-ratio: 1 / 1;
  background: var(--sand);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-card .p-img img { width: 100%; height: 100%; object-fit: cover; }
.product-card .p-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card .p-cat { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.product-card .p-title { font-size: 15px; font-weight: 600; line-height: 1.35; margin: 0; }
.product-card .p-price { font-size: 17px; font-weight: 700; color: var(--accent-dark); margin-top: auto; }
.product-card .p-price s { color: var(--muted); font-weight: 400; font-size: 13px; margin-left: 8px; }
.stars { color: var(--accent-dark); font-size: 13px; letter-spacing: 1px; }
.stars .dim { color: var(--line); }

/* ---------- trust strip ---------- */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.trust-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.trust-item h3 { margin: 0 0 6px; font-size: 16px; }
.trust-item p { margin: 0; font-size: 14px; color: var(--muted); }

/* ---------- shop page ---------- */
.shop-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 24px; }
.shop-head h1 { font-family: var(--font-display); font-size: 30px; margin: 0; margin-right: auto; }
.search-input, .sort-select {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
  color: var(--ink);
}
.search-input { min-width: 220px; }
.filter-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.pill {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  color: var(--ink);
}
.pill:hover { background: var(--sand); }
.pill.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 32px; }

/* ---------- product detail ---------- */
.pd-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 40px 0;
}
.pd-gallery { display: flex; flex-direction: column; gap: 12px; }
.pd-main-img {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.pd-main-img img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.pd-thumbs img {
  width: 72px; height: 72px; object-fit: cover;
  border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
  background: var(--paper);
}
.pd-thumbs img.active { border-color: var(--accent); border-width: 2px; }
.pd-info h1 { font-family: var(--font-display); font-size: 30px; margin: 0 0 8px; }
.pd-price { font-size: 26px; font-weight: 700; color: var(--accent-dark); margin: 12px 0; }
.pd-price s { color: var(--muted); font-weight: 400; font-size: 18px; margin-left: 10px; }
.pd-desc { color: var(--muted); font-size: 15px; }
.variant-label { font-weight: 600; font-size: 14px; margin: 18px 0 8px; }
.variant-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.variant-opt {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
}
.variant-opt.active { border-color: var(--accent); background: var(--sand); }
.variant-opt:disabled { opacity: 0.45; cursor: not-allowed; text-decoration: line-through; }
.qty-row { display: flex; gap: 12px; align-items: center; margin: 22px 0; }
.qty-input {
  width: 70px; border: 1px solid var(--line); border-radius: 8px;
  padding: 10px; font-size: 15px; background: var(--paper); color: var(--ink);
}
.ship-note { font-size: 13px; color: var(--muted); margin-top: 14px; }
.review-summary {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; margin-top: 24px;
}

/* ---------- cart drawer ---------- */
.cart-overlay {
  position: fixed; inset: 0; background: rgba(46, 42, 36, 0.45);
  opacity: 0; pointer-events: none; transition: opacity 0.2s; z-index: 90;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(400px, 92vw);
  background: var(--paper); z-index: 100;
  transform: translateX(105%); transition: transform 0.25s ease;
  display: flex; flex-direction: column;
  border-left: 1px solid var(--line);
}
.cart-drawer.open { transform: none; }
.cart-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 20px; border-bottom: 1px solid var(--line);
}
.cart-head h2 { margin: 0; font-size: 20px; font-family: var(--font-display); }
.cart-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--ink); }
.cart-items { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.cart-item { display: flex; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.cart-item img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--sand); }
.cart-item .ci-info { flex: 1; }
.cart-item .ci-title { font-size: 14px; font-weight: 600; margin: 0 0 4px; }
.cart-item .ci-variant { font-size: 12px; color: var(--muted); }
.cart-item .ci-row { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.ci-qty { display: flex; align-items: center; gap: 8px; }
.ci-qty button {
  width: 26px; height: 26px; border: 1px solid var(--line); background: var(--paper);
  border-radius: 6px; cursor: pointer; font-size: 14px; line-height: 1;
}
.ci-remove { background: none; border: none; color: var(--red); font-size: 12px; cursor: pointer; padding: 0; }
.cart-foot { padding: 18px 20px; border-top: 1px solid var(--line); }
.cart-total { display: flex; justify-content: space-between; font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.cart-error { color: var(--red); font-size: 13px; margin-top: 10px; }
.cart-empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--limestone); margin-top: 64px; }
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 48px 20px 28px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 28px;
}
.footer-inner h4 { margin: 0 0 12px; font-size: 15px; color: var(--sand); }
.footer-inner a { color: var(--limestone); text-decoration: none; font-size: 14px; display: block; margin-bottom: 8px; opacity: 0.85; }
.footer-inner a:hover { opacity: 1; }
.footer-brand { font-family: var(--font-display); font-size: 24px; margin-bottom: 10px; }
.footer-brand span { color: var(--sand); }
.footer-note { font-size: 13px; opacity: 0.7; }
.footer-bottom {
  border-top: 1px solid rgba(246, 241, 231, 0.15);
  padding: 18px 20px; text-align: center; font-size: 13px; opacity: 0.7;
}

/* ---------- empty states / misc ---------- */
.empty-state {
  text-align: center; padding: 60px 20px; color: var(--muted);
  background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius);
}
.empty-state h2 { font-family: var(--font-display); color: var(--ink); }
.notice {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px 20px; margin-bottom: 20px; font-size: 14px;
}
.thankyou { text-align: center; padding: 80px 20px; }
.thankyou h1 { font-family: var(--font-display); font-size: 38px; }

@media (max-width: 760px) {
  .pd-layout { grid-template-columns: 1fr; }
  .main-nav { display: none; }
  .header-inner { flex-wrap: wrap; }
  .section { padding: 32px 0; }
}

/* ---------- cookie consent banner ---------- */
#consent-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 200;
  background: var(--ink); color: var(--limestone);
  border-top: 3px solid var(--accent);
  box-shadow: 0 -8px 30px rgba(46, 42, 36, 0.25);
}
.consent-inner {
  max-width: 1200px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.consent-inner p { margin: 0; font-size: 14px; flex: 1; min-width: 240px; }
.consent-actions { display: flex; gap: 10px; }
.consent-accept { background: var(--accent); border-color: var(--accent); color: #fff; }
.consent-decline { background: transparent; border: 1px solid var(--line); color: var(--limestone); }

/* ---------- newsletter ---------- */
.newsletter-form { display: flex; gap: 8px; margin-top: 8px; }
.newsletter-form input {
  flex: 1; min-width: 0; padding: 10px 12px; font-size: 14px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink);
}
.newsletter-form .btn { padding: 10px 16px; font-size: 14px; }
.nl-msg { font-size: 13px; margin: 8px 0 0; color: var(--muted); min-height: 18px; }
.nl-msg.ok { color: var(--accent-dark); }
.nl-msg.err { color: var(--red); }

#nl-popup { position: fixed; inset: 0; z-index: 300; display: flex; align-items: center; justify-content: center; padding: 20px; }
.nl-overlay { position: absolute; inset: 0; background: rgba(46, 42, 36, 0.55); }
.nl-modal {
  position: relative; background: var(--paper); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); max-width: 420px; width: 100%; padding: 32px 28px; text-align: center;
}
.nl-modal h2 { font-family: var(--font-display); margin: 0 0 8px; font-size: 28px; }
.nl-modal p { color: var(--muted); font-size: 14px; }
#nl-popup-form { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
#nl-popup-form input {
  padding: 12px 14px; font-size: 15px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--limestone); color: var(--ink);
}
#nl-popup-form .btn { width: 100%; }
.nl-close {
  position: absolute; top: 10px; right: 14px; background: none; border: none;
  font-size: 26px; color: var(--muted); cursor: pointer; line-height: 1;
}
.nl-no { background: none; border: none; color: var(--muted); font-size: 13px; cursor: pointer; margin-top: 10px; text-decoration: underline; }
