/* ==========================================================================
   KING FOOT WEARS — DESIGN SYSTEM
   Mobile-first. Black / Gold / Cream premium footwear brand.
   ========================================================================== */

:root {
  --black: #0d0d0d;
  --ink: #171512;
  --ink-soft: #6b6459;
  --cream: #faf7f1;
  --cream-card: #ffffff;
  --gold: #b8912f;
  --gold-deep: #8a6a1e;
  --gold-soft: #e7d4a1;
  --line: #e6e0d3;
  --danger: #a5372a;
  --success: #1f6b3f;
  --shadow-card: 0 1px 2px rgba(20, 16, 8, 0.06), 0 14px 28px -18px rgba(20, 16, 8, 0.22);
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.5;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 18px; }

.section { padding: 48px 0; }
.section-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-tight { padding: 28px 0 48px; }

.section-head { margin-bottom: 24px; }
.section-head.center { text-align: center; }
.section-head h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
.section-head p { color: var(--ink-soft); margin-top: 8px; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  min-height: 48px;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--black); color: #fff; }
.btn-primary:hover { background: #000; }
.btn-gold { background: var(--gold); color: #241a05; }
.btn-gold:hover { background: var(--gold-deep); color: #fff; }
.btn-outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-whatsapp { background: #25d366; color: #05330f; }
.btn-whatsapp:hover { background: #1fbd59; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; min-height: 38px; font-size: 0.82rem; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--black);
  border-bottom: 1px solid #2a2620;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}
.logo {
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
  letter-spacing: 0.03em;
}
.logo span { color: var(--gold); }
.main-nav { display: none; gap: 26px; }
.main-nav a { color: #d8d2c4; font-size: 0.92rem; font-weight: 500; transition: color 0.15s; }
.main-nav a:hover, .main-nav a.active { color: var(--gold); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  position: relative;
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.12);
}
.cart-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--gold); color: #241a05;
  font-size: 0.68rem; font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}
.menu-toggle { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); border-radius: 50%; width: 42px; height: 42px; color: #fff; display:flex; align-items:center; justify-content:center; }
.mobile-nav {
  display: none;
  flex-direction: column;
  background: var(--black);
  border-top: 1px solid #2a2620;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: 14px 18px;
  color: #e8e3d6;
  border-bottom: 1px solid #221f1a;
  font-weight: 500;
}
@media (min-width: 900px) {
  .main-nav { display: flex; }
  .menu-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* ---------------- Hero ---------------- */
.hero {
  background: linear-gradient(180deg, #14110d 0%, var(--black) 100%);
  color: #fff;
  padding: 56px 0 48px;
}
.hero-eyebrow {
  display: inline-block;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.hero h1 { font-size: clamp(2.1rem, 8vw, 3.4rem); color: #fff; }
.hero h1 span { color: var(--gold); }
.hero p.lead { color: #c9c3b4; margin-top: 16px; font-size: 1.05rem; max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* ---------------- Category grid ---------------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 700px) { .category-grid { grid-template-columns: repeat(5, 1fr); } }
.category-card {
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 14px;
  text-align: center;
  transition: border-color 0.15s, transform 0.15s;
}
.category-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.category-card .cat-icon { font-size: 1.6rem; margin-bottom: 8px; }
.category-card h4 { font-size: 0.88rem; font-weight: 600; font-family: inherit; }
.category-card p { font-size: 0.74rem; color: var(--ink-soft); margin-top: 2px; }

/* ---------------- Product grid & cards ---------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
@media (min-width: 640px) { .product-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
@media (min-width: 1000px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }

.product-card {
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.product-card:hover { transform: translateY(-3px); }
.product-thumb { position: relative; aspect-ratio: 1/1; overflow: hidden; background: #f1ede3; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-cat-tag {
  position: absolute; top: 10px; left: 10px;
  background: rgba(13,13,13,0.82);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 5px 9px;
  border-radius: 999px;
}
.product-id-tag {
  position: absolute; top: 10px; right: 10px;
  background: var(--gold);
  color: #241a05;
  font-size: 0.64rem;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
}
.product-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-body h3 { font-size: 0.92rem; line-height: 1.3; font-family: inherit; font-weight: 600; }
.product-body .product-cat-label { font-size: 0.72rem; color: var(--ink-soft); }
.product-price { font-weight: 800; color: var(--ink); font-size: 1.02rem; margin-top: 2px; }
.product-colors { font-size: 0.72rem; color: var(--ink-soft); }
.product-sizes { font-size: 0.72rem; color: var(--ink-soft); }
.product-actions { margin-top: auto; padding-top: 8px; display: flex; }
.product-actions .btn { flex: 1; }

/* ---------------- Feature cards ---------------- */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
@media (min-width: 700px) { .feature-grid { grid-template-columns: repeat(4, 1fr); } }
.feature-card {
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 18px;
}
.feature-icon {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--black);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  margin-bottom: 12px;
}
.feature-card h3 { font-size: 1rem; font-family: inherit; margin-bottom: 4px; }
.feature-card p { font-size: 0.86rem; color: var(--ink-soft); }

/* ---------------- CTA band ---------------- */
.cta-band {
  background: var(--black);
  color: #fff;
  border-radius: 20px;
  padding: 42px 24px;
  text-align: center;
  max-width: 1240px;
  margin: 0 18px;
}
@media (min-width: 1276px) { .cta-band { margin: 0 auto; } }
.cta-band h2 { color: #fff; }
.cta-band p { color: #c9c3b4; margin-top: 10px; }
.cta-band .btn { margin-top: 22px; }

/* ---------------- Footer ---------------- */
.site-footer { background: var(--black); color: #b9b3a4; padding: 40px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer-brand .logo { margin-bottom: 8px; }
.footer-brand p { font-size: 0.86rem; }
.footer-col h4 { color: #fff; font-size: 0.86rem; margin-bottom: 10px; font-family: inherit; }
.footer-col a, .footer-col p { display: block; font-size: 0.86rem; margin-bottom: 8px; color: #b9b3a4; }
.footer-bottom { border-top: 1px solid #262219; margin-top: 28px; padding-top: 18px; font-size: 0.78rem; text-align: center; color: #8a8474; }

/* ---------------- Search + Sort bar ---------------- */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  align-items: center;
}
.search-field {
  flex: 1 1 220px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
}
.search-field input { border: none; outline: none; background: transparent; width: 100%; font-size: 0.92rem; }
.sort-select, .filter-toggle-btn {
  border: 1px solid var(--line);
  background: var(--cream-card);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.86rem;
  font-weight: 600;
  min-height: 44px;
}
.result-count { font-size: 0.84rem; color: var(--ink-soft); margin-bottom: 14px; }

/* ---------------- Category chips ---------------- */
.chip-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.chip {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--cream-card);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.chip.active { background: var(--black); color: #fff; border-color: var(--black); }

/* ---------------- Filter drawer ---------------- */
.filter-overlay {
  position: fixed; inset: 0;
  background: rgba(13,13,13,0.5);
  z-index: 60;
  display: none;
}
.filter-overlay.open { display: block; }
.filter-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(380px, 88vw);
  background: var(--cream);
  z-index: 61;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
}
.filter-drawer.open { transform: translateX(0); }
.filter-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px; border-bottom: 1px solid var(--line);
  background: #fff;
}
.filter-drawer-head h3 { font-size: 1.05rem; }
.filter-drawer-body { padding: 18px; overflow-y: auto; flex: 1; }
.filter-drawer-foot { padding: 16px 18px; border-top: 1px solid var(--line); display: flex; gap: 10px; background: #fff; }
.filter-drawer-foot .btn { flex: 1; }
.filter-group { margin-bottom: 22px; }
.filter-group h4 { font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); margin-bottom: 10px; font-family: inherit; }
.filter-option-list { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-pill {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 0.8rem;
  font-weight: 600;
}
.filter-pill.active { background: var(--gold); border-color: var(--gold); color: #241a05; }
.price-range-row { display: flex; align-items: center; gap: 10px; font-size: 0.84rem; }
.price-range-row input[type="range"] { flex: 1; }

/* ---------------- Empty state ---------------- */
.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-soft); }

/* ---------------- Breadcrumb ---------------- */
.breadcrumb { font-size: 0.8rem; color: var(--ink-soft); margin-bottom: 18px; }
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb a:hover { color: var(--gold-deep); }

/* ---------------- Product detail ---------------- */
.product-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
@media (min-width: 860px) { .product-detail { grid-template-columns: 1fr 1fr; gap: 44px; } }
.detail-media {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  aspect-ratio: 1/1;
  background: #f1ede3;
}
.detail-media img { width: 100%; height: 100%; object-fit: cover; }
.detail-id-cat { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.detail-id-cat .id-badge { background: var(--black); color: var(--gold); font-size: 0.72rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.detail-id-cat .cat-label { font-size: 0.8rem; color: var(--ink-soft); }
.detail-info h1 { font-size: clamp(1.5rem, 4vw, 2rem); }
.detail-price { font-size: 1.5rem; font-weight: 800; margin: 12px 0 20px; }

.option-block { margin-bottom: 22px; }
.option-block label { display: block; font-size: 0.84rem; font-weight: 700; margin-bottom: 10px; }
.option-block .required-note { color: var(--danger); font-weight: 600; font-size: 0.78rem; margin-left: 6px; }
.swatch-row, .size-row { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch-btn {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: #fff;
  font-size: 0.86rem;
  font-weight: 600;
  min-height: 44px;
}
.swatch-btn.active { border-color: var(--gold); background: var(--gold-soft); color: #4a3910; }
.size-btn {
  width: 52px; height: 52px;
  border-radius: 12px;
  border: 1.5px solid var(--line);
  background: #fff;
  font-weight: 700;
  font-size: 0.92rem;
}
.size-btn.active { background: var(--black); border-color: var(--black); color: #fff; }

.qty-row { display: flex; align-items: center; gap: 14px; }
.qty-stepper { display: flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.qty-stepper button { width: 46px; height: 46px; background: #fff; font-size: 1.2rem; font-weight: 700; }
.qty-stepper span { width: 44px; text-align: center; font-weight: 700; }

.form-error-msg {
  display: none;
  background: #fdecea;
  border: 1px solid #f3c6c1;
  color: var(--danger);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 10px;
  margin-bottom: 14px;
}
.form-error-msg.show { display: block; }

.detail-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.detail-info-block { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--ink-soft); }
.detail-info-block h4 { font-size: 0.9rem; color: var(--ink); margin-bottom: 8px; font-family: inherit; }

.added-toast {
  position: fixed;
  bottom: 20px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--black); color: #fff;
  padding: 12px 20px; border-radius: 999px;
  font-size: 0.86rem; font-weight: 600;
  opacity: 0; pointer-events: none;
  transition: all 0.2s ease;
  z-index: 80;
  white-space: nowrap;
}
.added-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------------- Cart ---------------- */
.cart-layout { display: grid; grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 900px) { .cart-layout { grid-template-columns: 1.6fr 1fr; align-items: start; } }
.cart-item {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 14px;
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}
.cart-item img { width: 78px; height: 78px; object-fit: cover; border-radius: 10px; }
.cart-item-name { font-weight: 700; font-size: 0.92rem; }
.cart-item-meta { font-size: 0.78rem; color: var(--ink-soft); margin: 4px 0; }
.cart-item-row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; flex-wrap: wrap; gap: 8px; }
.cart-item-price { font-weight: 800; }
.remove-link { color: var(--danger); font-size: 0.8rem; font-weight: 600; background: none; border: none; padding: 0; }
.qty-stepper-sm { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; }
.qty-stepper-sm button { width: 30px; height: 30px; font-weight: 700; background: #fff; }
.qty-stepper-sm span { width: 28px; text-align: center; font-size: 0.86rem; font-weight: 700; }

.summary-card {
  background: var(--cream-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow-card);
}
.summary-card h3 { font-size: 1.05rem; margin-bottom: 14px; }
.summary-row { display: flex; justify-content: space-between; font-size: 0.9rem; padding: 8px 0; }
.summary-row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 14px; font-size: 1.1rem; font-weight: 800; }
.empty-cart { text-align: center; padding: 60px 20px; }
.empty-cart h2 { margin-bottom: 10px; }
.empty-cart p { color: var(--ink-soft); margin-bottom: 20px; }

/* ---------------- Checkout form ---------------- */
.form-field { margin-bottom: 16px; }
.form-field label { display: block; font-size: 0.84rem; font-weight: 700; margin-bottom: 6px; }
.form-field input, .form-field textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.94rem;
  background: #fff;
  min-height: 48px;
}
.form-field textarea { min-height: 90px; resize: vertical; }
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--gold); }
.field-error { display: none; color: var(--danger); font-size: 0.78rem; margin-top: 5px; font-weight: 600; }

.order-line { display: flex; justify-content: space-between; gap: 10px; font-size: 0.88rem; padding: 10px 0; border-bottom: 1px solid var(--line); }
.order-line:last-child { border-bottom: none; }
.order-line-meta { color: var(--ink-soft); font-size: 0.78rem; margin-top: 2px; }

.hairline { border: none; border-top: 1px solid var(--line); }

@media (max-width: 480px) {
  .cta-band { margin: 0 12px; padding: 32px 18px; }
}
