/* ===== Bamiwo — Sephora-inspired design system (v2 overhaul) ===== */
:root {
  --ink: #111111;
  --ink-soft: #4a4a4a;
  --paper: #ffffff;
  --mist: #f4f3f1;
  --line: #e3e1dc;
  --accent: #c3122f;
  --accent-dark: #980e24;
  --gold: #a9884f;
  --radius: 2px;
  --radius-lg: 6px;
  --max-width: 1320px;
  --font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

h1, h2, h3 {
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.08;
  margin: 0 0 14px;
  color: var(--ink);
}
h1 { font-size: clamp(2rem, 3.6vw, 3rem); }
h2 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
p { margin: 0 0 14px; color: var(--ink-soft); }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 10px;
  display: block;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: 1.5px solid var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  background: var(--ink);
  color: var(--paper);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-block { width: 100%; }
.btn-small { padding: 10px 16px; font-size: 0.7rem; }

/* ===== Utility bar ===== */
.util-bar {
  background: var(--ink);
  color: #cfcfcf;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}
.util-bar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 34px;
}
.util-bar a { color: #cfcfcf; }
.util-bar a:hover { color: var(--paper); }
.util-links { display: flex; gap: 20px; }
@media (max-width: 700px) { .util-links { display: none; } }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 76px;
}
.logo {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.logo span { color: var(--accent); }

.main-nav { display: flex; gap: 26px; position: relative; }
.main-nav > a, .nav-item > button {
  background: none;
  border: none;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  padding: 8px 0;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.main-nav > a:hover, .main-nav > a.active, .nav-item > button:hover { border-color: var(--accent); color: var(--accent); }

.nav-item { position: relative; }
.mega-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: 0 16px 32px rgba(0,0,0,0.08);
  padding: 18px;
  min-width: 220px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 70;
}
.nav-item:hover .mega-menu, .nav-item:focus-within .mega-menu { display: flex; }
.mega-menu a {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 9px 10px;
  border-radius: var(--radius);
  color: var(--ink);
}
.mega-menu a:hover { background: var(--mist); color: var(--accent); }

.search-wrap { flex: 1; max-width: 380px; margin-left: auto; }
.search-form {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 8px 16px;
  gap: 8px;
}
.search-form input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 0.85rem;
  background: transparent;
}
.search-form button { background: none; border: none; cursor: pointer; display: flex; }

.header-actions { display: flex; align-items: center; gap: 18px; }
.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
}
.icon-btn svg { width: 20px; height: 20px; }
.badge {
  position: absolute;
  top: -6px;
  right: -10px;
  background: var(--accent);
  color: var(--paper);
  font-size: 0.62rem;
  font-weight: 800;
  border-radius: 999px;
  min-width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}
.nav-toggle { display: none; background: none; border: none; cursor: pointer; }

@media (max-width: 960px) {
  .main-nav { display: none; }
  .search-wrap { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* ===== Promo hero tiles (Sephora-style landing strip) ===== */
.promo-strip { padding: 32px 0 8px; }
.promo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.promo-tile {
  background: var(--mist);
  border-radius: var(--radius-lg);
  padding: 26px;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  position: relative;
  overflow: hidden;
}
.promo-tile.dark { background: var(--ink); color: var(--paper); }
.promo-tile.dark h3, .promo-tile.dark p { color: var(--paper); }
.promo-tile.accent { background: var(--accent); color: var(--paper); }
.promo-tile.accent h3, .promo-tile.accent p { color: var(--paper); }
.promo-tile h3 { font-size: 1.15rem; margin-bottom: 8px; }
.promo-tile p { font-size: 0.85rem; margin-bottom: 16px; max-width: 220px; }
.promo-tile .promo-thumb {
  position: absolute;
  right: -10px;
  bottom: -10px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(0,0,0,0.18);
  border: 4px solid var(--paper);
}
.promo-tile .promo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.promo-link { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
.promo-link::after { content: " ›"; }

@media (max-width: 860px) { .promo-grid { grid-template-columns: 1fr; } }

/* ===== Category rail ===== */
.cat-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 26px 0 6px;
  scrollbar-width: none;
}
.cat-rail::-webkit-scrollbar { display: none; }
.cat-chip {
  flex: none;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.cat-chip:hover { border-color: var(--ink); color: var(--ink); }
.cat-chip.active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* ===== Section ===== */
.section { padding: 48px 0; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.section-head p { margin: 0; max-width: 520px; }
.result-count { font-size: 0.78rem; color: var(--ink-soft); font-weight: 700; }

/* ===== Product grid + 3D tilt tiles ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}
@media (max-width: 1080px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 780px) { .product-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (max-width: 480px) { .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }

.product-tile {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  will-change: transform;
  transform-style: preserve-3d;
  transition: transform 0.35s cubic-bezier(.22,1,.36,1), box-shadow 0.35s ease;
}
.product-tile:hover { box-shadow: 0 26px 40px -18px rgba(17,17,17,0.28); }

.tile-media {
  position: relative;
  aspect-ratio: 1/1;
  background: var(--mist);
  overflow: hidden;
}
.tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translateZ(0);
  transition: transform 0.35s ease;
}
.product-tile:hover .tile-media img { transform: scale(1.06); }
.tile-glare {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255,255,255,0.35), rgba(255,255,255,0) 55%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.product-tile:hover .tile-glare { opacity: 1; }

.wish-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.92);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transform: translateZ(30px);
}
.wish-btn svg { width: 18px; height: 18px; stroke: var(--ink); fill: none; transition: fill 0.15s ease, stroke 0.15s ease; }
.wish-btn.active svg { fill: var(--accent); stroke: var(--accent); }

.sale-flag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent);
  color: var(--paper);
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  border-radius: var(--radius);
  transform: translateZ(30px);
}

.tile-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; transform: translateZ(20px); }
.tile-category { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); font-weight: 700; }
.tile-name { font-size: 0.92rem; font-weight: 700; color: var(--ink); line-height: 1.3; min-height: 2.4em; }
.tile-price { font-weight: 800; color: var(--ink); font-size: 0.95rem; }
.tile-price .was { color: #9c9c9c; text-decoration: line-through; font-weight: 500; margin-right: 6px; font-size: 0.88em; }
.tile-actions { margin-top: auto; }

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

/* ===== Split / about ===== */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: center;
}
.split-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3.4;
  background: var(--mist);
}
.split-media img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

.founder-card {
  background: var(--mist);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-top: 22px;
  border-left: 3px solid var(--accent);
}
.founder-card .name { font-weight: 800; color: var(--ink); margin-bottom: 6px; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.04em; }

/* ===== CTA band ===== */
.cta-band {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-lg);
  padding: 52px;
  text-align: center;
}
.cta-band h2, .cta-band p { color: var(--paper); }
.cta-band p { color: #cfcfcf; }
.cta-form { display: flex; gap: 10px; justify-content: center; max-width: 440px; margin: 24px auto 0; flex-wrap: wrap; }
.cta-form input {
  flex: 1;
  min-width: 220px;
  padding: 13px 18px;
  border-radius: 999px;
  border: none;
  font-size: 0.9rem;
}

/* ===== Footer ===== */
.site-footer { background: var(--mist); border-top: 1px solid var(--line); padding: 52px 0 24px; margin-top: 30px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; margin-bottom: 36px; }
.footer-grid > div { min-width: 0; }
.footer-grid h4 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px; color: var(--ink); font-weight: 800; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-grid a, .footer-grid p { font-size: 0.85rem; color: var(--ink-soft); }
.footer-grid a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 0.75rem;
  color: #8f8c86;
}
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ===== Mobile nav drawer ===== */
.main-nav.nav-open {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 76px;
  left: 0;
  right: 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 16px 24px 24px;
  gap: 4px;
  z-index: 65;
}
.main-nav.nav-open .mega-menu { display: none; position: static; border: none; box-shadow: none; padding: 4px 0 12px 12px; }
.main-nav.nav-open .nav-item.open .mega-menu { display: flex; }

/* ===== Simple content pages ===== */
.page-hero { padding: 54px 0 18px; text-align: center; }
.page-hero p { max-width: 640px; margin: 0 auto; }
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { margin-top: 36px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 780px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-card { background: var(--mist); border-radius: var(--radius-lg); padding: 26px; }
.contact-card dt { font-weight: 800; margin-top: 16px; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); }
.contact-card dd { margin: 4px 0 0; color: var(--ink-soft); }
.form-field { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.form-field input, .form-field textarea {
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1.5px solid var(--line);
  font-family: inherit;
  font-size: 0.92rem;
  background: var(--paper);
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--ink); }

/* ===== Cart drawer ===== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17,17,17,0.45);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 90;
}
.cart-overlay.open { opacity: 1; pointer-events: auto; }

.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(400px, 92vw);
  background: var(--paper);
  box-shadow: -20px 0 40px rgba(0,0,0,0.15);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(.22,1,.36,1);
  z-index: 95;
  display: flex;
  flex-direction: column;
}
.cart-panel.open { transform: translateX(0); }

.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}
.cart-drawer-header h3 { margin: 0; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.05em; }
.cart-close { background: none; border: none; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--ink); }

.cart-drawer-items { flex: 1; overflow-y: auto; padding: 10px 22px; }
.cart-empty { padding: 40px 0; text-align: center; color: var(--ink-soft); font-size: 0.9rem; }

.cart-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.cart-row-img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--radius); background: var(--mist); }
.cart-row-body { flex: 1; }
.cart-row-name { font-size: 0.85rem; font-weight: 700; margin-bottom: 4px; }
.cart-row-price { font-size: 0.82rem; color: var(--ink-soft); margin-bottom: 8px; }
.cart-row-qty { display: flex; align-items: center; gap: 10px; }
.cart-row-qty button {
  width: 24px; height: 24px;
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.cart-row-qty span { font-size: 0.85rem; font-weight: 700; min-width: 16px; text-align: center; }
.cart-row-remove {
  background: none; border: none; cursor: pointer; color: var(--ink-soft);
  font-size: 1.2rem; line-height: 1; padding: 4px;
}
.cart-row-remove:hover { color: var(--accent); }

.cart-drawer-footer { padding: 18px 22px 24px; border-top: 1px solid var(--line); }
.cart-summary-row { display: flex; justify-content: space-between; font-size: 0.88rem; color: var(--ink-soft); margin-bottom: 8px; }
.cart-summary-row.cart-total { color: var(--ink); font-weight: 800; font-size: 1rem; margin-bottom: 16px; }

/* ===== Checkout page ===== */
.checkout-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 44px; align-items: start; }
@media (max-width: 900px) { .checkout-grid { grid-template-columns: 1fr; } }
.checkout-summary { background: var(--mist); border-radius: var(--radius-lg); padding: 24px; position: sticky; top: 96px; }
.checkout-line { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.checkout-line img { width: 52px; height: 52px; object-fit: cover; border-radius: var(--radius); }
.checkout-line-name { font-size: 0.85rem; font-weight: 700; flex: 1; }
.checkout-line-qty { font-size: 0.78rem; color: var(--ink-soft); }
.checkout-line-price { font-size: 0.85rem; font-weight: 700; }
.pay-status { font-size: 0.85rem; margin-top: 12px; padding: 12px; border-radius: var(--radius); display: none; }
.pay-status.show { display: block; }
.pay-status.success { background: #eaf6ec; color: #1c6b2c; }
.pay-status.error { background: #fbeaea; color: var(--accent-dark); }

.pay-tabs { display: flex; gap: 10px; margin-bottom: 20px; }
.pay-tab {
  flex: 1;
  padding: 12px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
}
.pay-tab.active { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.pay-panel { display: none; }
.pay-panel.active { display: block; }
#square-card-container { padding: 14px; border: 1.5px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; min-height: 48px; }
.setup-notice { background: #fff8e6; border: 1px solid #f0d98c; border-radius: var(--radius); padding: 14px 16px; font-size: 0.82rem; color: #6b5518; margin-bottom: 20px; }

.ship-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 10px;
  cursor: pointer;
}
.ship-option:has(input:checked) { border-color: var(--ink); background: var(--mist); }
.ship-option input { accent-color: var(--ink); }
.ship-option-body { flex: 1; display: flex; flex-direction: column; }
.ship-option-name { font-size: 0.85rem; font-weight: 700; }
.ship-option-days { font-size: 0.78rem; color: var(--ink-soft); }
.ship-option-price { font-size: 0.9rem; font-weight: 800; }
