/* ============================================================
   Tommy Footwears — Storefront CSS
   public/css/store.css
   ============================================================ */

/* ── FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Barlow+Condensed:wght@400;600;700;800;900&family=DM+Sans:wght@300;400;500&display=swap');

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* ── DESIGN TOKENS ── */
:root {
  /* Core palette */
  --black:   #0A0A09;
  --off:     #111110;
  --card:    #181817;
  --red:     #C8251A;
  --red-dim: rgba(200,37,26,.12);
  --cream:   #F5F0E8;
  --cream-dim: rgba(245,240,232,.06);
  --gold:    #B8945A;

  /* Text */
  --text:    #F5F0E8;
  --muted:   rgba(245,240,232,.45);
  --dim:     rgba(245,240,232,.18);

  /* Borders */
  --border:  rgba(245,240,232,.08);
  --border-strong: rgba(245,240,232,.16);

  /* Fonts */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-serif:   'Cormorant Garamond', Georgia, serif;
  --font-cond:    'Barlow Condensed', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  /* Spacing */
  --nav-h: 72px;
  --max-w: 1280px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

/* ── BASE ── */
body {
  background: var(--black);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }

/* ── CONTAINER ── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .18em;
  border: none;
  cursor: pointer;
  padding: .85rem 2rem;
  transition: all .22s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--red);
  color: #fff;
}
.btn-primary:hover {
  background: #a81e14;
  transform: translateY(-1px);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--cream);
  background: var(--cream-dim);
}
.btn-ghost {
  background: transparent;
  color: var(--muted);
  padding: .85rem 0;
}
.btn-ghost:hover { color: var(--text); }
.btn svg {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none; stroke-width: 2;
}

/* ── SECTION LABEL ── */
.section-label {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .28em;
  color: var(--red);
  margin-bottom: .6rem;
  display: block;
}

/* ── PRODUCT CARD ── */
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  transition: border-color .2s, transform .2s;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
}
.product-card:hover {
  border-color: rgba(200,37,26,.3);
  transform: translateY(-3px);
}
.product-card-img {
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--off);
  position: relative;
}
.product-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.product-card:hover .product-card-img img { transform: scale(1.04); }
.product-card-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-cond);
  font-size: .65rem; letter-spacing: .2em;
  color: var(--dim); text-transform: uppercase;
}
.product-card-badge {
  position: absolute; top: .85rem; left: .85rem;
  font-family: var(--font-cond); font-weight: 700;
  font-size: .58rem; text-transform: uppercase; letter-spacing: .14em;
  padding: .22rem .55rem; background: var(--red); color: #fff;
}
.product-card-body { padding: 1rem 1.1rem 1.2rem; }
.product-card-name {
  font-family: var(--font-serif);
  font-size: 1.05rem; font-weight: 400;
  color: var(--text); margin-bottom: .25rem;
  line-height: 1.3;
}
.product-card-gender {
  font-family: var(--font-cond); font-weight: 600;
  font-size: .6rem; text-transform: uppercase; letter-spacing: .16em;
  color: var(--muted); margin-bottom: .5rem;
}
.product-card-price {
  font-family: var(--font-cond); font-weight: 800;
  font-size: 1rem; color: var(--text);
  display: flex; align-items: baseline; gap: .5rem;
}
.product-card-price .original {
  font-size: .82rem; color: var(--dim);
  text-decoration: line-through; font-weight: 400;
}

/* ── CATEGORY CARD ── */
.cat-card {
  position: relative; overflow: hidden;
  aspect-ratio: 3/4;
  display: block; text-decoration: none;
  background: var(--card);
  border: 1px solid var(--border);
  transition: border-color .25s;
}
.cat-card:hover { border-color: rgba(200,37,26,.4); }
.cat-card img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s ease;
}
.cat-card:hover img { transform: scale(1.05); }
.cat-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,10,9,.85) 0%, rgba(10,10,9,.2) 50%, transparent 100%);
  display: flex; flex-direction: column;
  justify-content: flex-end; padding: 1.5rem 1.4rem;
}
.cat-card-label {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700; color: #fff; line-height: 1;
  margin-bottom: .4rem;
}
.cat-card-count {
  font-family: var(--font-cond); font-weight: 600;
  font-size: .62rem; text-transform: uppercase; letter-spacing: .2em;
  color: rgba(245,240,232,.45);
}
.cat-card-arrow {
  position: absolute; top: 1rem; right: 1rem;
  width: 32px; height: 32px;
  border: 1px solid rgba(245,240,232,.2);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateX(-6px);
  transition: all .25s;
}
.cat-card:hover .cat-card-arrow { opacity: 1; transform: translateX(0); }
.cat-card-arrow svg { width: 14px; height: 14px; stroke: #fff; fill: none; stroke-width: 2; }

/* ── DIVIDER ── */
.divider {
  height: 1px;
  background: var(--border);
  border: none;
}

/* ── PILL TAG ── */
.pill {
  display: inline-block;
  font-family: var(--font-cond); font-weight: 700;
  font-size: .58rem; text-transform: uppercase; letter-spacing: .14em;
  padding: .22rem .6rem; border: 1px solid var(--border);
  color: var(--muted);
}

/* ── RESPONSIVE GRID HELPERS ── */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: .85rem; }
}
@media (max-width: 480px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}