/* THEME 18 — Mosaic Fragments
   Vibe: real tile mosaic — small vibrant tesserae set with visible dark
   grout lines, Mediterranean/zellige color palette, each piece looking
   "assembled" rather than machine-uniform. Distinct from the earlier
   (deleted) hex "Gem Mosaic" theme — this one is grout + tesserae, not
   faceted gemstones. */

:root {
  --ink: #262524;
  --ink-soft: #625d55;
  --paper: #f7f2e7;
  --paper-alt: #efe7d4;
  --grout: #2b2b2b;
  --cobalt: #1f5c8b;
  /* --teal and --coral darkened slightly from their original hues so white
     text (the WhatsApp button, the price tag) reaches 4.5:1 WCAG AA
     contrast — verified with a relative-luminance calculation. */
  --teal: #1e846c;
  --ochre: #d99a2b;
  --coral: #cc4a30;
  --border: #d9cead;
  --radius: 4px;
}

* { box-sizing: border-box; }

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

.theme-tag {
  position: fixed;
  bottom: 12px;
  right: 12px;
  background: var(--cobalt);
  color: #fff;
  font-size: 0.72rem;
  padding: 6px 14px;
  border-radius: 999px;
  z-index: 50;
}

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

h1, h2, h3 {
  font-family: "Cinzel", serif;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 16px;
  color: var(--ink);
}

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

.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 3px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--cobalt); color: #fff; box-shadow: 0 8px 18px rgba(31,92,139,0.3); }
.btn-whatsapp { background: var(--teal); color: #fff; box-shadow: 0 8px 18px rgba(31,138,112,0.3); }

/* decorative tesserae strip — a repeating pinwheel checker mimicking tiled fragments */
.tile-strip {
  height: 16px;
  background-image: repeating-conic-gradient(
    from 0deg,
    var(--cobalt) 0deg 90deg,
    var(--teal) 90deg 180deg,
    var(--ochre) 180deg 270deg,
    var(--coral) 270deg 360deg
  );
  background-size: 20px 20px;
}

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

/* Hero */
.hero { position: relative; overflow: hidden; padding: 70px 0 56px; text-align: center; background: var(--paper-alt); display: flex; flex-direction: column; justify-content: center; box-sizing: border-box; height: 401px; }
.hero .container { position: relative; z-index: 1; }
.hero-kicker { display: inline-block; font-size: 0.85rem; color: var(--coral); margin-bottom: 18px; letter-spacing: 0.06em; text-transform: uppercase; }
.hero h1 { font-size: 2.6rem; }
.hero-sub { font-size: 1.05rem; margin: 0 auto 30px; max-width: 460px; }

.motif-tree-hero {
  top: 20px;
  left: 24px;
  width: 150px;
  transform: rotate(-6deg);
}

/* Decorative mosaic sun-face motifs (SVG in the markup) */
.decor-motif { pointer-events: none; }
.decor-motif svg { display: block; width: 100%; height: 100%; }

.corner-motif {
  position: fixed;
  width: 150px;
  height: 150px;
  opacity: 0.16;
  z-index: 0;
}
.corner-motif.top-left { top: -45px; left: -45px; }
.corner-motif.bottom-right { bottom: -45px; right: -45px; }

/* Decorative mosaic artwork — real images (images/decor/mosaic-art/).
   Two kinds: transparent cut-outs (cat, strawberry) used like the Lippan
   background accents, and full rectangular scenes shown as small "framed
   panel" photos (white border + shadow + slight tilt) since those pieces
   are complete compositions rather than motifs meant to blend in. */
.decor-img {
  position: absolute;
  pointer-events: none;
  z-index: 0;
  width: 200px;
  height: auto;
}
.motif-panel {
  border: 8px solid #fdfcf8;
  box-shadow: 0 10px 24px rgba(43,43,43,0.25);
  z-index: 0;
}

.about { position: relative; overflow: hidden; padding: 56px 0; text-align: center; display: flex; flex-direction: column; justify-content: center; min-height: 320px; }
.about .container { max-width: 640px; position: relative; z-index: 1; }
.motif-sparrow-panel {
  top: 50%;
  right: 16px;
  transform: translateY(-50%) rotate(4deg);
  width: 170px;
}

/* Products — a growing grid, balanced left/right + centered-behind pieces */
.motif-cat {
  top: -20px;
  left: 16px;
  width: 170px;
  opacity: 0.5;
}
.motif-penguin-panel {
  top: 24%;
  right: 16px;
  width: 160px;
  transform: rotate(5deg);
}
.motif-pondfish-panel {
  top: 55%;
  left: 16px;
  width: 150px;
  transform: rotate(4deg);
}
.motif-women-panel {
  bottom: 20px;
  right: 16px;
  width: 155px;
  transform: rotate(-4deg);
}
.motif-strawberry {
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 170px;
  opacity: 0.16;
  z-index: 0;
}

/* Products */
.products { position: relative; overflow: hidden; padding: 20px 0 72px; }
.products h2 { text-align: center; margin-bottom: 8px; font-size: 2.3rem; }
.product-search-wrap { display: flex; justify-content: center; margin: 16px 0 12px; }
.product-search {
  width: 100%; max-width: 360px; padding: 10px 18px; border-radius: 3px;
  border: 2px solid var(--grout); background: #fff; color: var(--ink); font-family: inherit; font-size: 0.92rem;
}
.product-search:focus { border-color: var(--cobalt); }
.no-results { text-align: center; color: var(--ink-soft); margin: -8px 0 24px; }

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 28px;
  margin-top: 28px;
}

.product-card {
  background: #fff;
  border: 3px solid var(--grout);
  border-radius: var(--radius);
  overflow: visible;
  display: flex;
  flex-direction: column;
  box-shadow: 5px 5px 0 rgba(43,43,43,0.15);
  position: relative;
}
.product-card:nth-child(3n+1) { transform: rotate(-0.6deg); }
.product-card:nth-child(3n+2) { transform: rotate(0.5deg); }
.product-card:nth-child(3n)   { transform: rotate(-0.3deg); }
.product-card:hover { transform: translateY(-3px) rotate(0deg); }

/* corner tile-chip, like a stray tessera set at the edge */
.product-card::before {
  content: "";
  position: absolute;
  top: -8px;
  left: -8px;
  width: 18px;
  height: 18px;
  background: var(--ochre);
  border: 2px solid var(--grout);
  transform: rotate(20deg);
  z-index: 3;
}

.product-image { aspect-ratio: 4 / 3; position: relative; overflow: hidden; border-bottom: 1px solid var(--grout); }
.product-image.placeholder {
  background: repeating-linear-gradient(
    135deg, var(--paper-alt), var(--paper-alt) 10px, #e2d6ba 10px, #e2d6ba 20px
  );
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 0.8rem;
}
.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.15rem; margin-bottom: 6px; }
.product-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.product-tags .tag {
  background: var(--cobalt); color: #fff; font-size: 0.68rem; font-weight: 600;
  padding: 3px 10px; border-radius: 2px;
}
.product-desc { font-size: 0.88rem; flex: 1; margin-bottom: 16px; }

.product-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.product-price {
  font-weight: 700;
  color: #fff;
  background: var(--coral);
  padding: 3px 10px;
  border: 2px solid var(--grout);
  font-family: "Cinzel", serif;
  font-size: 0.95rem;
}
.product-footer .btn { padding: 9px 18px; font-size: 0.78rem; white-space: nowrap; }

/* Custom CTA */
.custom-cta { position: relative; overflow: hidden; padding: 60px 0 88px; text-align: center; background: var(--paper-alt); border-top: 1px solid var(--border); display: flex; flex-direction: column; justify-content: center; min-height: 345px; }
.custom-cta .container { max-width: 600px; position: relative; z-index: 1; }
.motif-cocktail-panel {
  top: 50%;
  left: 16px;
  transform: translateY(-50%) rotate(-5deg);
  width: 160px;
}

/* Footer */
.site-footer { border-top: 1px solid var(--grout); padding: 32px 0; display: flex; flex-direction: column; justify-content: center; min-height: 200px; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.footer-links { display: flex; gap: 22px; }
.footer-links a { color: var(--ink-soft); text-decoration: none; font-size: 0.92rem; }
.footer-links a:hover { color: var(--cobalt); }
.footer-contact { display: flex; gap: 6px; align-items: center; margin: 0; font-size: 0.92rem; color: var(--ink-soft); }
.footer-contact a { color: var(--ink-soft); text-decoration: none; }
.footer-contact a:hover { color: var(--cobalt); }
.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) {
  .tile-strip { height: 10px; }
  .hero { height: 250px; padding: 8px 0 14px; }
  .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; }
  .product-card { transform: none !important; }
  .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; }

  /* On a phone-width screen there's no page margin outside the container
     for these real photo accents to sit in the way they do on desktop —
     they'd otherwise land right on top of centered text. Shrink them and
     tuck each into its section's corner (clipped by that section's
     overflow:hidden, same trick .corner-motif already uses) so they read
     as a small corner flourish instead of covering the copy. */
  .motif-tree-hero { top: -30px; left: -50px; width: 65px; }
  .motif-sparrow-panel { top: auto; bottom: -20px; right: -40px; transform: rotate(4deg); width: 85px; }
  .motif-cat { top: -30px; left: -40px; width: 85px; }
  .motif-penguin-panel { top: -20px; right: -40px; width: 80px; }
  .motif-pondfish-panel { top: auto; bottom: -20px; left: -40px; width: 80px; }
  .motif-women-panel { bottom: -30px; right: -40px; width: 80px; }
  .motif-cocktail-panel { top: -20px; bottom: auto; left: -40px; transform: rotate(-5deg); width: 80px; }
}
