/* ==========================================================================
   Dreamhorse Designs — site stylesheet
   Fonts (Fraunces, Karla) are loaded via <link> in each page's <head>.
   ========================================================================== */

:root {
  --linen: #EAE1CC;
  --linen-card: #F5EFDF;
  --espresso: #3B2E23;
  --espresso-soft: #5A4A3A;
  --sage: #5F6E4F;
  --sage-dark: #454F38;
  --clay: #A2503B;
  --gold: #C0912F;
  --stitch: #8A7A5C;
  --radius: 4px;
}

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

body {
  background: var(--linen);
  color: var(--espresso);
  font-family: 'Karla', sans-serif;
  line-height: 1.5;
}

h1, h2, h3, .display {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--espresso);
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; height: auto; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Stitched divider — signature element referencing sewn goods */
.stitch-divider {
  height: 2px;
  background-image: repeating-linear-gradient(
    to right,
    var(--stitch) 0, var(--stitch) 10px,
    transparent 10px, transparent 18px
  );
  width: 100%;
}

/* ---------- HEADER ---------- */
header {
  background: var(--linen);
  border-bottom: 1px solid rgba(59, 46, 35, 0.12);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
}
.logo-mark {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-mark img {
  width: 44px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}
.logo-text {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: block;
}
.logo-sub {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--espresso-soft);
  display: block;
  margin-top: 2px;
}
nav.links {
  display: flex;
  gap: 34px;
  font-size: 14.5px;
  font-weight: 500;
}
nav.links a {
  position: relative;
  padding-bottom: 4px;
}
nav.links a:hover { color: var(--clay); }
.nav-icons { display: flex; gap: 18px; align-items: center; }
.cart-btn {
  background: var(--sage);
  color: var(--linen-card);
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.cart-count {
  display: inline-block;
  background: var(--clay);
  color: var(--linen-card);
  border-radius: 999px;
  font-size: 11.5px;
  line-height: 1;
  padding: 3px 6px;
  margin-left: 4px;
}
.cart-count[hidden] { display: none; }

/* ---------- CART PAGE ---------- */
.add-to-cart { margin-left: 10px; }
.cart-list { display: flex; flex-direction: column; gap: 16px; margin-bottom: 28px; }
.cart-row {
  display: grid;
  grid-template-columns: 72px 1fr auto auto auto;
  align-items: center;
  gap: 16px;
  background: var(--linen-card);
  border: 1px solid rgba(59, 46, 35, 0.1);
  border-radius: var(--radius);
  padding: 12px 16px;
}
.cart-row img { width: 72px; height: 72px; object-fit: cover; border-radius: 4px; }
.cart-row-info h3 { font-size: 15px; margin-bottom: 4px; }
.cart-row-info .price { font-size: 13px; color: var(--espresso-soft); }
.cart-row-qty { display: flex; align-items: center; gap: 8px; }
.qty-btn {
  width: 28px; height: 28px;
  border: 1.5px solid var(--espresso);
  background: transparent;
  border-radius: var(--radius);
  font-size: 15px;
  cursor: pointer;
  line-height: 1;
}
.cart-row-total { font-weight: 700; font-size: 14.5px; min-width: 64px; text-align: right; }
.cart-remove {
  background: transparent;
  border: none;
  color: var(--espresso-soft);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
}
.cart-remove:hover { color: var(--clay); }
.cart-summary {
  max-width: 360px;
  margin-left: auto;
  background: var(--linen-card);
  border: 1.5px dashed var(--stitch);
  border-radius: 8px;
  padding: 20px 24px;
}
.cart-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 16px;
  margin-bottom: 10px;
}
@media (max-width: 560px) {
  .cart-row { grid-template-columns: 56px 1fr; grid-template-areas: "img info" "img qty" "img total"; }
  .cart-row img { grid-area: img; width: 56px; height: 56px; }
  .cart-row-info { grid-area: info; }
  .cart-row-qty { grid-area: qty; }
  .cart-row-total { grid-area: total; text-align: left; }
  .cart-remove { position: absolute; margin-left: auto; }
  .cart-summary { max-width: 100%; }
}

/* ---------- BUTTONS ---------- */
.btn-primary {
  background: var(--clay);
  color: var(--linen-card);
  padding: 14px 26px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 14.5px;
  display: inline-block;
  border: none;
  cursor: pointer;
}
.btn-primary:disabled {
  background: var(--stitch);
  cursor: not-allowed;
  opacity: 0.7;
}
.btn-secondary {
  border: 1.5px solid var(--espresso);
  padding: 13px 24px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 14.5px;
  display: inline-block;
  background: transparent;
  cursor: pointer;
}

/* ---------- HERO ---------- */
.hero {
  padding: 76px 0 88px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  font-size: 12.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clay);
  font-weight: 700;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: 52px;
  line-height: 1.05;
  margin-bottom: 22px;
}
.hero h1 em {
  font-style: italic;
  color: var(--sage-dark);
}
.hero p {
  font-size: 17px;
  color: var(--espresso-soft);
  max-width: 440px;
  margin-bottom: 30px;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-visual {
  background: var(--linen-card);
  border-radius: 8px;
  aspect-ratio: 4 / 4.6;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 1px solid rgba(59, 46, 35, 0.1);
}
.hero-visual { flex-direction: column; gap: 16px; padding: 30px; }
.hero-visual img { width: 66%; height: auto; object-fit: contain; }
.hero-wordmark {
  font-family: 'Fraunces', serif;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--espresso);
  text-align: center;
  line-height: 1.15;
}

/* ---------- MARQUEE / craft types strip ---------- */
.strip {
  background: var(--sage-dark);
  color: var(--linen-card);
  padding: 13px 0;
  overflow: hidden;
  white-space: nowrap;
}
.strip-inner {
  display: inline-block;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}
.strip-inner span { margin: 0 22px; opacity: 0.92; }

/* ---------- SECTIONS ---------- */
.section { padding: 84px 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
  gap: 24px;
  flex-wrap: wrap;
}
.section-head h2 { font-size: 32px; }
.section-head p { color: var(--espresso-soft); font-size: 14.5px; max-width: 320px; }

/* ---------- CATEGORY GRID (homepage) ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.cat-card {
  background: var(--linen-card);
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(59, 46, 35, 0.1);
  transition: transform 0.2s ease;
}
.cat-card:hover { transform: translateY(-3px); }
.cat-thumb {
  aspect-ratio: 5 / 4;
  background: linear-gradient(135deg, #DED2AF, #C9B98A);
  display: flex;
  align-items: center;
  justify-content: center;
}
.cat-thumb svg { width: 56px; height: 56px; opacity: 0.55; }
.cat-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cat-body { padding: 18px 20px 22px; }
.cat-body h3 { font-size: 18px; margin-bottom: 6px; }
.cat-body p { font-size: 13.5px; color: var(--espresso-soft); margin-bottom: 12px; }
.cat-link { font-size: 13px; font-weight: 700; color: var(--clay); }

.cat-card.wide { grid-column: span 2; }
.cat-card.wide .cat-thumb { aspect-ratio: 5 / 2.2; }
.cat-card.coming .cat-thumb {
  background: transparent;
  border: 1.5px dashed var(--stitch);
}
.cat-card.coming { background: transparent; border-style: dashed; }

.badge-soon {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--stitch);
  background: var(--linen);
  border: 1px solid var(--stitch);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 8px;
}

/* ---------- BREADCRUMB ---------- */
.breadcrumb {
  padding: 22px 0 0;
  font-size: 13px;
  color: var(--espresso-soft);
}
.breadcrumb a:hover { color: var(--clay); }

/* ---------- PAGE HEADER (interior pages) ---------- */
.page-head { padding: 40px 0 8px; }
.page-head h1 { font-size: 40px; margin-bottom: 12px; }
.page-head p { color: var(--espresso-soft); font-size: 15.5px; max-width: 560px; }
.party-note {
  display: inline-block;
  margin-top: 14px;
  padding: 10px 16px;
  background: var(--linen-card);
  border: 1.5px dashed var(--stitch);
  border-radius: 8px;
  font-size: 14px;
  color: var(--espresso-soft);
  max-width: 560px;
}

/* ---------- PRODUCT GRID (category pages) ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 40px 0 0;
}
.product-card {
  background: var(--linen-card);
  border: 1px solid rgba(59, 46, 35, 0.1);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.2s ease;
}
.product-card:hover { transform: translateY(-3px); }
.product-card .thumb {
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #DED2AF, #C9B98A);
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .info { padding: 16px 18px 20px; }
.product-card .info h3 { font-size: 16px; margin-bottom: 4px; }
.product-card .price { font-size: 14px; color: var(--espresso-soft); font-weight: 700; }
.blank-sizes { font-size: 13px; color: var(--espresso-soft); margin-bottom: 8px; }
.design-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.design-thumb { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.design-thumb img {
  width: 52px; height: 52px; object-fit: cover; border-radius: 4px;
  cursor: pointer; border: 2px solid transparent; opacity: 0.65;
}
.design-thumb img.active { border-color: var(--clay); opacity: 1; }
.design-thumb span { font-size: 11px; color: var(--espresso-soft); text-align: center; }
.blanks-note { color: var(--espresso-soft); font-size: 14.5px; margin: 0 0 24px; }

.empty-note {
  padding: 48px 0;
  color: var(--espresso-soft);
  font-size: 15px;
}

/* ---------- PRODUCT DETAIL ---------- */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  padding: 32px 0 72px;
  align-items: start;
}
.product-gallery {
  background: var(--linen-card);
  border: 1px solid rgba(59, 46, 35, 0.1);
  border-radius: 8px;
  padding: 14px;
  align-self: start;
}
.product-gallery img { display: block; width: 100%; height: auto; border-radius: 4px; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; }
.gallery-thumbs img {
  width: 64px; height: 64px; object-fit: cover; border-radius: 4px;
  cursor: pointer; border: 2px solid transparent; opacity: 0.65;
}
.gallery-thumbs img.active { border-color: var(--clay); opacity: 1; }
.product-info h1 { font-size: 34px; margin-bottom: 10px; }
.product-info .price { font-size: 20px; font-weight: 700; margin-bottom: 20px; }
.product-info .desc { color: var(--espresso-soft); font-size: 15px; margin-bottom: 24px; }
.product-info .options { margin-bottom: 24px; }
.product-info label {
  display: block;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 6px;
}
.product-info select,
.product-info input[type="text"] {
  width: 100%;
  max-width: 320px;
  padding: 10px 12px;
  border: 1.5px solid rgba(59, 46, 35, 0.3);
  border-radius: var(--radius);
  font: inherit;
  background: var(--linen-card);
  margin-bottom: 16px;
}

/* ---------- FORMS (custom order / contact) ---------- */
.form-grid { max-width: 640px; padding: 32px 0 0; }
.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 6px;
}
.form-row input,
.form-row textarea,
.form-row select {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid rgba(59, 46, 35, 0.3);
  border-radius: var(--radius);
  font: inherit;
  background: var(--linen-card);
}
.form-row textarea { min-height: 130px; resize: vertical; }

/* ---------- STORY ---------- */
.story {
  background: var(--espresso);
  color: var(--linen);
  padding: 88px 0;
}
.story-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 60px;
  align-items: center;
}
.story-visual {
  aspect-ratio: 1 / 1;
  background: rgba(234, 225, 204, 0.08);
  border: 1px solid rgba(234, 225, 204, 0.18);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px;
  gap: 16px;
}
.story-visual svg { width: 60%; }
.story-visual .tag { color: #D8CDB0; font-size: 14px; max-width: 260px; }
.story .eyebrow { color: var(--gold); }
.story h2 { color: var(--linen); font-size: 30px; margin-bottom: 18px; }
.story p { color: #D8CDB0; font-size: 15.5px; margin-bottom: 16px; max-width: 480px; }

/* ---------- CUSTOM ORDER CALLOUT ---------- */
.custom-callout { padding: 64px 0; }
.callout-box {
  background: var(--linen-card);
  border: 1.5px dashed var(--stitch);
  border-radius: 8px;
  padding: 44px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.callout-box h3 { font-size: 24px; margin-bottom: 8px; }
.callout-box p { color: var(--espresso-soft); font-size: 14.5px; max-width: 420px; }

/* ---------- FOOTER ---------- */
footer {
  background: var(--sage-dark);
  color: var(--linen);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-grid--no-brand { grid-template-columns: 1fr 1fr 1fr; }
footer h4 {
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
  color: var(--gold);
  font-weight: 700;
}
footer ul { list-style: none; }
footer li { margin-bottom: 9px; font-size: 13.5px; color: #D8CDB0; }
footer li a:hover { color: var(--linen); }
footer p.tag { font-size: 13.5px; color: #D8CDB0; max-width: 260px; }
.footer-brand {
  display: inline-flex;
  background: var(--linen-card);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 16px;
}
.footer-brand img { width: 132px; height: auto; display: block; }
.footer-bottom {
  border-top: 1px solid rgba(234, 225, 204, 0.15);
  padding-top: 22px;
  font-size: 12.5px;
  color: #B7AB8C;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.age-note {
  font-size: 12.5px;
  color: #B7AB8C;
  width: 100%;
  margin-bottom: 14px;
  max-width: 640px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 820px) {
  .hero-grid,
  .story-grid,
  .product-detail { grid-template-columns: 1fr; }
  .cat-grid,
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-card.wide { grid-column: span 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  nav.links { display: none; }
  .hero h1 { font-size: 38px; }
  .callout-box { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 520px) {
  .cat-grid,
  .product-grid { grid-template-columns: 1fr; }
  .cat-card.wide { grid-column: span 1; }
  .wrap { padding: 0 20px; }
}
