/* =====================================================================
   Gift Store — Storefront styles
   Colors are driven by CSS variables injected from admin settings.
   ===================================================================== */

:root {
  --bg: #f7f1e6;
  --text: #26211b;
  --accent: #b5462f;
  --muted: #8a8175;
  --card: #ffffff;
  --border: #e7ddc9;
  --radius: 10px;
  --maxw: 1200px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .serif {
  font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

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

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.btn {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s ease, background 0.2s ease;
}
.btn:hover { opacity: 0.88; }

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--muted);
}
.btn-outline:hover { border-color: var(--text); opacity: 1; }

.btn-link {
  color: var(--accent);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

.eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, #fff);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  max-width: var(--maxw);
  margin: 0 auto;
}
.logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.35rem;
  letter-spacing: 0.12em;
  color: var(--accent);
  text-transform: uppercase;
}
.main-nav {
  display: flex;
  gap: 1.6rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}
.main-nav a:hover { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 1rem; }
.cart-link {
  position: relative;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}
.cart-count {
  display: inline-flex;
  min-width: 1.2rem;
  height: 1.2rem;
  padding: 0 0.3rem;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: 0.7rem;
  margin-left: 0.25rem;
}
.nav-toggle { display: none; background: none; border: 0; font-size: 1.4rem; cursor: pointer; color: var(--text); }

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  background-size: cover;
  background-position: center;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15), rgba(0,0,0,0.45));
}
.hero-content { position: relative; z-index: 2; padding: 2rem; }
.hero-content h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); margin: 0 0 0.5rem; color: #fff; }
.hero-content .hero-sub { font-size: 1rem; letter-spacing: 0.05em; margin-bottom: 1.5rem; }

/* ---- Section scaffolding ---- */
.section { padding: 4rem 0; }
.section-head { text-align: center; margin-bottom: 2.5rem; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin: 0.3rem 0; }

/* ---- Feature (split) ---- */
.feature { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: center; }
.feature .feature-media img { border-radius: var(--radius); width: 100%; object-fit: cover; }
.feature .feature-body h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 0.75rem; }
.feature .feature-body p { color: var(--muted); margin-bottom: 1.5rem; }

/* ---- Collection grid ---- */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.collection-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--card);
  border: 1px solid var(--border);
}
.collection-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.collection-card:hover img { transform: scale(1.04); }
.collection-card .label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1rem 1.25rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.55));
  color: #fff;
  font-family: 'Playfair Display', serif;
  font-size: 1.1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ---- Product grid ---- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.product-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.product-card:hover { box-shadow: 0 12px 32px rgba(0,0,0,0.08); transform: translateY(-3px); }
.product-card .thumb { aspect-ratio: 1 / 1; overflow: hidden; background: var(--bg); }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .info { padding: 1rem 1.1rem 1.25rem; display: flex; flex-direction: column; gap: 0.4rem; flex: 1; }
.product-card .info h3 { font-size: 1.05rem; margin: 0; }
.product-card .price { color: var(--accent); font-weight: 600; }
.product-card .cat { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.product-card .info .btn { margin-top: auto; text-align: center; }

/* ---- Banner ---- */
.banner { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; align-items: stretch; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.banner .banner-media { min-height: 320px; background-size: cover; background-position: center; }
.banner .banner-body { padding: 3rem; display: flex; flex-direction: column; justify-content: center; background: var(--card); text-align: center; }
.banner .banner-body h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 1rem; }
.banner .banner-body p { color: var(--muted); margin-bottom: 1.5rem; }

/* ---- Video ---- */
.video-section { position: relative; }
.video-wrap { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 7; background: #000; }
.video-wrap video, .video-wrap iframe { width: 100%; height: 100%; object-fit: cover; border: 0; }
.video-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #2a241d, #4a3f33);
  color: #fff;
}
.play-badge {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(255,255,255,0.9); color: var(--text);
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}

/* ---- Text block ---- */
.text-block { max-width: 760px; margin: 0 auto; text-align: center; }
.text-block p { color: var(--muted); }

/* ---- Footer ---- */
.site-footer { background: color-mix(in srgb, var(--bg) 80%, #000 4%); border-top: 1px solid var(--border); padding: 3rem 0 1.5rem; margin-top: 2rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; }
.footer-grid h4 { font-family: inherit; font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 1rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.9rem; }
.footer-grid a:hover { color: var(--accent); }
.footer-about { font-size: 0.92rem; color: var(--muted); max-width: 32ch; }
.footer-bottom { text-align: center; font-size: 0.78rem; color: var(--muted); margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.social { display: flex; gap: 1rem; margin-top: 1rem; }

/* ---- Forms / cart ---- */
.page-title { text-align: center; padding: 3rem 0 1rem; }
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th, .cart-table td { padding: 1rem 0.75rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.cart-table img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; }
.qty-input { width: 64px; padding: 0.4rem; border: 1px solid var(--border); border-radius: 6px; }
.cart-summary { max-width: 360px; margin-left: auto; margin-top: 2rem; }
.cart-summary .row { display: flex; justify-content: space-between; padding: 0.5rem 0; }
.cart-summary .total { font-size: 1.2rem; font-weight: 600; border-top: 1px solid var(--border); padding-top: 0.75rem; }

.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.85rem; margin-bottom: 0.3rem; }
.field input, .field textarea, .field select {
  width: 100%; padding: 0.65rem; border: 1px solid var(--border);
  border-radius: 8px; font-size: 1rem; background: #fff; color: var(--text);
}

.flash { padding: 0.85rem 1rem; border-radius: 8px; margin: 1rem 0; }
.flash.success { background: #e4f5e9; color: #1f7a3d; }
.flash.error { background: #fde8e4; color: #9b2c1a; }

.empty-state { text-align: center; padding: 4rem 1rem; color: var(--muted); }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .main-nav { display: none; }
  .nav-toggle { display: block; }
  .main-nav.open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
  .feature, .banner { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .collection-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
}
