/* HOMEPAGE — "All Pieces"
   Vibe: the flagship page, not one craft. Built from the actual brand
   mark (deep teal + red, sampled from images/brand/artdestiny-logo.png)
   plus a warm gold pulled from the same ornamental family every category
   theme already uses — so this reads as "all of them, together" rather
   than borrowing any one category's specific craft vibe. Motif is a
   faceted gem, standing in for the resin-casting process every category
   shares. */

:root {
  --ink: #1c2e29;
  --ink-soft: #5f6f6a;
  --paper: #faf7f1;
  --paper-alt: #f1ead9;
  --teal: #163b33;          /* exact brand mark color */
  --teal-dark: #0e2822;
  --gold: #bf8a2e;          /* decorative only — motifs, dividers */
  /* --gold-dark, --accent-dark, and --accent are all verified via a
     relative-luminance calculation to clear 4.5:1 (WCAG AA) against
     the paper/button-text they're actually used on, not eyeballed. */
  --gold-dark: #916923;
  --accent: #d4352e;        /* exact brand mark red — button backgrounds */
  --accent-dark: #a52a24;   /* darker, for accent text sitting on paper */
  --whatsapp: #1e8649;
  --whatsapp-dark: #1c8548;
  --border: #e6dbc7;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Outfit", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 16px;
  color: var(--teal);
}

p { margin: 0 0 16px; color: var(--ink-soft); }

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--teal-dark);
  color: #fff;
  box-shadow: 0 10px 22px rgba(14, 40, 34, 0.32);
}

.btn-whatsapp {
  background: var(--whatsapp);
  color: #fff;
  box-shadow: 0 8px 18px rgba(30, 134, 73, 0.24);
}

/* Header, brand, and nav chrome now live in css/category-nav.css, shared
   by every page (index + all categories) so they're identical everywhere. */

/* Chevron facet frieze, top and bottom of the hero */
.home-shimmer-strip {
  height: 16px;
  background-color: var(--teal-dark);
  background-image:
    linear-gradient(135deg, var(--gold) 25%, transparent 25%),
    linear-gradient(225deg, var(--gold) 25%, transparent 25%),
    linear-gradient(315deg, var(--accent) 25%, transparent 25%),
    linear-gradient(45deg, var(--accent) 25%, transparent 25%);
  background-position: 12px 0, 12px 0, 0 0, 0 0;
  background-size: 24px 24px;
}

/* Fixed faceted-gem corner motifs — a small scatter of "pieces," one
   per brand color, standing in for the whole collection */
.decor-motif { pointer-events: none; }
.decor-motif svg { display: block; width: 100%; height: 100%; }
.corner-motif {
  position: fixed;
  width: 130px;
  height: 130px;
  opacity: 0.16;
  z-index: 0;
}
.corner-motif.top-left { top: -30px; left: -30px; }
.corner-motif.bottom-right { bottom: -30px; right: -30px; transform: rotate(180deg); }

/* Hero — 401px + a 16px shimmer strip on each side (now siblings, not
   children, same structure every category page uses) = the 433px
   envelope locked across every page */
.hero {
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
  height: 401px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 0 76px;
  background:
    radial-gradient(circle at 12% 22%, rgba(22, 59, 51, 0.06) 0%, transparent 42%),
    radial-gradient(circle at 88% 78%, rgba(212, 53, 46, 0.05) 0%, transparent 45%),
    var(--paper);
  text-align: center;
}
.hero .container { position: relative; z-index: 1; }
.hero-icon {
  display: block;
  margin: 0 auto 16px;
  width: 40px;
  height: 40px;
}
.hero-icon svg { width: 100%; height: 100%; }
.hero-kicker {
  display: inline-block;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--gold-dark);
  margin-bottom: 18px;
}
.hero h1 { font-size: 2.6rem; }
.hero-sub { font-size: 1.05rem; margin: 0 auto 30px; max-width: 460px; }

/* About */
.about {
  position: relative;
  overflow: hidden;
  padding: 56px 0;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}
.about .container { max-width: 680px; position: relative; z-index: 1; }

/* Products */
.products { position: relative; overflow: hidden; padding: 20px 0 72px; background: var(--paper-alt); }
.products h2 { text-align: center; margin-bottom: 8px; }

/* Large faint stacked-frame watermark behind the grid — same shape as the
   hero icon and corner motifs, tying the whole page together */
.frame-watermark {
  position: absolute;
  top: 55%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 440px;
  height: 440px;
  opacity: 0.05;
  z-index: 0;
  pointer-events: none;
}
.frame-watermark svg { width: 100%; height: 100%; }

.product-search-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}
.product-search {
  width: 100%;
  max-width: 360px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--paper);
  color: var(--ink);
  font-size: 0.92rem;
  font-family: inherit;
}
.product-search:focus {
  border-color: var(--teal);
}
.product-search::-webkit-search-cancel-button {
  cursor: pointer;
}

.no-results {
  text-align: center;
  color: var(--ink-soft);
  margin: -8px 0 32px;
  position: relative;
  z-index: 1;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.product-tags .tag {
  background: var(--paper-alt);
  border: 1px solid var(--border);
  color: var(--ink-soft);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
  position: relative;
  z-index: 1;
}

.product-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 20px rgba(22, 59, 51, 0.08);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.product-card:hover {
  box-shadow: 0 14px 28px rgba(22, 59, 51, 0.14);
  transform: translateY(-2px);
}

.product-image {
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
}
.product-image.placeholder {
  background: repeating-linear-gradient(
    135deg,
    var(--paper-alt),
    var(--paper-alt) 10px,
    var(--border) 10px,
    var(--border) 20px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 0.85rem;
}
.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}
.product-image img.loaded {
  display: block;
}
.product-image:not(.placeholder) span {
  display: none;
}

.product-body { padding: 18px; display: flex; flex-direction: column; flex: 1; }
.product-body h3 { font-size: 1.2rem; margin-bottom: 6px; }
.product-desc { font-size: 0.9rem; flex: 1; margin-bottom: 16px; }

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.product-price { font-weight: 700; color: var(--accent-dark); }
.product-footer .btn { padding: 9px 16px; font-size: 0.85rem; white-space: nowrap; }

/* Custom CTA */
.custom-cta {
  position: relative;
  overflow: hidden;
  padding: 60px 0 88px;
  min-height: 345px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-top: 1px solid var(--border);
  text-align: center;
}
.custom-cta .container { max-width: 600px; }

/* 404 page */
.error-page {
  padding: 96px 0;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}
.error-page .container { max-width: 480px; }
.error-code {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 4.5rem;
  color: var(--accent-dark);
  margin: 0 0 8px;
  line-height: 1;
}
.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 8px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--ink-soft); text-decoration: none; font-size: 0.9rem; }
.footer-links a:hover { color: var(--teal); }
.footer-contact { display: flex; gap: 6px; align-items: center; margin: 0; font-size: 0.9rem; color: var(--ink-soft); }
.footer-contact a { color: var(--ink-soft); text-decoration: none; }
.footer-contact a:hover { color: var(--teal); }
.footer-policies { font-size: 0.8rem; color: var(--ink-soft); margin: 0 0 4px; }
.footer-note { font-size: 0.8rem; margin: 0; }

@media (max-width: 600px) {
  .home-shimmer-strip { height: 10px; background-size: 16px 16px; }
  .hero { height: 250px; padding: 8px 0 14px; }
  .hero-icon { width: 22px; height: 22px; margin-bottom: 6px; }
  .hero-kicker { font-size: 0.68rem; margin-bottom: 6px; }
  .hero h1 { font-size: 1.5rem; }
  .hero-sub { font-size: 0.82rem; margin: 0 auto 14px; }
  .frame-watermark { width: 300px; height: 300px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .product-footer { flex-direction: column; align-items: flex-start; gap: 8px; }
  .product-footer .btn { align-self: stretch; text-align: center; font-size: 0.72rem; padding: 9px 8px; }
  .product-image { aspect-ratio: 1 / 1; }
  .product-body { padding: 10px; }
  .product-body h3 {
    font-size: 0.95rem;
    margin-bottom: 2px;
    line-height: 1.25;
    min-height: 2.4rem;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
  .product-tags { display: none; }
  .product-tags .tag { font-size: 0.6rem; padding: 2px 8px; }
  .product-desc {
    font-size: 0.76rem;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
  }
  .product-price { font-size: 0.95rem; }
}
