/* ══ LAYLITA'S CRAFT HOUSE — CATEGORY PAGE STYLES ══
   Page-hero, filter-bar, products section, CTA banner, related section.
   Loaded on category pages only.
════════════════════════════════════════════ */

/* ══ PAGE HERO ══ */
.page-hero {
  min-height: 36vh;
  background: linear-gradient(135deg, var(--pink-pale) 0%, var(--plum-pale) 45%, var(--pink-light) 100%);
  padding: 4rem 4rem 4.5rem;
  display: flex; align-items: center;
  position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; top: -60px; right: -60px;
  width: 220px; height: 220px; border-radius: 50%;
  background: var(--plum-light); opacity: 0.35;
}
.page-hero::after {
  content: ''; position: absolute; bottom: -60px; left: -60px;
  width: 200px; height: 200px; border-radius: 50%;
  background: var(--pink-light); opacity: 0.3;
}

.hero-paper-card {
  background: var(--warm-white); padding: 2.5rem 2.5rem 2rem;
  max-width: 600px; position: relative;
  box-shadow: 4px 6px 0 rgba(160,60,110,0.12), 6px 10px 28px rgba(80,20,60,0.1);
  transform: rotate(-1deg);
  border: 1.5px solid rgba(216,100,154,0.18); border-radius: 4px; z-index: 2;
}
.hero-paper-card::before {
  content: ''; position: absolute; top: -12px; left: -10px; right: -10px;
  height: 22px; background: var(--tape-plum);
  transform: rotate(-1.5deg); border-radius: 2px;
}
.hero-paper-card::after {
  content: ''; position: absolute; bottom: -10px; left: 0; right: 0; height: 12px;
  background: var(--warm-white);
  clip-path: polygon(0 0,2% 100%,4% 20%,6% 90%,8% 10%,10% 80%,12% 0,14% 70%,16% 5%,18% 85%,20% 0,22% 75%,24% 10%,26% 90%,28% 0,30% 80%,32% 5%,34% 95%,36% 0,38% 85%,40% 10%,42% 90%,44% 0,46% 80%,48% 15%,50% 90%,52% 0,54% 75%,56% 10%,58% 90%,60% 0,62% 85%,64% 5%,66% 95%,68% 10%,70% 80%,72% 0,74% 90%,76% 10%,78% 85%,80% 0,82% 70%,84% 5%,86% 90%,88% 0,90% 80%,92% 10%,94% 90%,96% 0,98% 80%,100% 0);
}

.breadcrumb { font-family: 'Caveat', cursive; font-size: 0.88rem; font-weight: 700; color: var(--plum-mid); margin-bottom: 0.5rem; }
.breadcrumb a { color: var(--plum-strong); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.page-hero-eyebrow { font-family: 'Caveat', cursive; font-size: 0.9rem; font-weight: 700; color: var(--pink-strong); margin-bottom: 0.3rem; }
.page-hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 600;
  color: var(--ink); line-height: 1.15; margin-bottom: 0.7rem;
}
.page-hero-title em { color: var(--pink-strong); font-style: italic; }
.page-hero-desc { font-family: 'Lora', Georgia, serif; font-style: italic; font-size: 0.9rem; color: var(--ink-soft); line-height: 1.75; }

/* ══ FILTER BAR ══ */
.filter-bar {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  padding: 1rem 4rem; background: var(--warm-white);
  border-bottom: 1.5px dashed var(--pink-light);
  position: sticky; top: 100px; z-index: 100;
}
.filter-label { font-family: 'Caveat', cursive; font-size: 0.9rem; font-weight: 700; color: var(--ink-soft); margin-right: 0.3rem; }
.filter-btn {
  font-family: 'Caveat', cursive; font-size: 0.95rem; font-weight: 700;
  color: var(--ink); background: var(--pink-pale);
  border: 1.5px solid var(--pink-light); border-radius: 30px;
  padding: 0.3rem 1rem; cursor: pointer;
  transition: all 0.2s; min-height: 36px;
  -webkit-tap-highlight-color: transparent;
}
.filter-btn:hover { background: var(--pink-light); border-color: var(--pink-mid); }
.filter-btn.active { background: var(--pink-strong); color: #fff; border-color: var(--pink-strong); }

/* ══ PRODUCTS SECTION ══ */
.products-section { padding: 3.5rem 4rem; background: var(--cream); }
.products-label { font-family: 'Caveat', cursive; font-size: 0.88rem; font-weight: 700; color: var(--pink-mid); text-align: center; letter-spacing: 0.12em; margin-bottom: 2rem; }
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }

.product-card {
  background: var(--warm-white); position: relative;
  box-shadow: 3px 4px 0 rgba(160,60,110,0.1), 5px 8px 18px rgba(80,20,60,0.09);
  transition: transform 0.25s, box-shadow 0.25s;
  border: 1.5px solid rgba(216,100,154,0.15); border-radius: 4px;
  animation: popIn 0.55s ease both;
}
.product-card::before { content: ''; position: absolute; top: -9px; left: 22%; right: 22%; height: 18px; border-radius: 2px; z-index: 2; }
.product-card:nth-child(3n+1)         { transform: rotate(-1.2deg); }
.product-card:nth-child(3n+2)         { transform: rotate(0.8deg); }
.product-card:nth-child(3n)           { transform: rotate(-0.5deg); }
.product-card:nth-child(3n+1)::before { background: var(--tape-pink); transform: rotate(-1deg); }
.product-card:nth-child(3n+2)::before { background: var(--tape-plum); transform: rotate(1.5deg); }
.product-card:nth-child(3n)::before   { background: var(--tape-rose); transform: rotate(-0.5deg); }
.product-card:hover { transform: rotate(0deg) translateY(-6px) scale(1.02) !important; box-shadow: 6px 10px 0 rgba(160,60,110,0.12), 10px 18px 30px rgba(80,20,60,0.13); z-index: 10; }
.product-card:nth-child(1) { animation-delay: 0.04s; } .product-card:nth-child(2) { animation-delay: 0.10s; }
.product-card:nth-child(3) { animation-delay: 0.16s; } .product-card:nth-child(4) { animation-delay: 0.22s; }
.product-card:nth-child(5) { animation-delay: 0.28s; } .product-card:nth-child(6) { animation-delay: 0.34s; }
.product-card:nth-child(7) { animation-delay: 0.40s; } .product-card:nth-child(8) { animation-delay: 0.46s; }
.product-card:nth-child(9) { animation-delay: 0.52s; }

.product-img-wrap { height: 200px; display: flex; align-items: center; justify-content: center; font-size: 5rem; position: relative; overflow: hidden; border-radius: 3px 3px 0 0; }
.product-card:nth-child(3n+1) .product-img-wrap { background: var(--pink-pale); }
.product-card:nth-child(3n+2) .product-img-wrap { background: var(--plum-pale); }
.product-card:nth-child(3n)   .product-img-wrap { background: #FEF0F7; }
.product-emoji { filter: drop-shadow(2px 3px 5px rgba(140,40,100,0.15)); transition: transform 0.3s; }
.product-card:hover .product-emoji { transform: scale(1.12) rotate(6deg); }

.product-badge {
  position: absolute; top: 0.8rem; left: 0.8rem;
  font-family: 'Caveat', cursive; font-size: 0.85rem; font-weight: 700;
  padding: 0.2rem 0.7rem; background: var(--pink-strong); color: #fff;
  border-radius: 30px; transform: rotate(-2deg);
  box-shadow: 1px 2px 0 rgba(140,40,100,0.25); z-index: 1;
}
.product-info { padding: 1rem 1.3rem 1.4rem; border-top: 1.5px dashed var(--pink-light); }
.product-name { font-family: 'Playfair Display', Georgia, serif; font-size: 1.2rem; font-weight: 600; color: var(--ink); margin-bottom: 0.3rem; }
.product-meta { font-family: 'Lora', Georgia, serif; font-style: italic; font-size: 0.82rem; color: var(--ink-soft); line-height: 1.6; margin-bottom: 0.7rem; }
.product-price { font-family: 'Caveat', cursive; font-size: 1.15rem; font-weight: 700; color: var(--plum-strong); }
.product-price .per { font-family: 'Lora', Georgia, serif; font-size: 0.75rem; color: var(--ink-soft); font-weight: 400; font-style: italic; }

/* ══ CTA BANNER ══ */
.cta-banner {
  background: linear-gradient(135deg, var(--pink-strong) 0%, var(--plum-strong) 100%);
  padding: 3.5rem 4rem;
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  position: relative;
}
.cta-banner::before, .cta-banner::after {
  content: ''; position: absolute; left: 0; right: 0; height: 3px;
  background: repeating-linear-gradient(90deg, var(--gold-light) 0, var(--gold-light) 12px, var(--pink-light) 12px, var(--pink-light) 24px, var(--plum-light) 24px, var(--plum-light) 36px, #fff 36px, #fff 48px);
  opacity: 0.4;
}
.cta-banner::before { top: 0; } .cta-banner::after { bottom: 0; }
.cta-banner-text h3 { font-family: 'Playfair Display', Georgia, serif; font-size: 1.9rem; font-weight: 600; color: #fff; margin-bottom: 0.4rem; }
.cta-banner-text p  { font-family: 'Lora', Georgia, serif; font-style: italic; font-size: 0.9rem; color: rgba(255,255,255,0.8); }
.cta-banner .btn-craft { background: var(--warm-white); color: var(--pink-dark); box-shadow: 3px 3px 0 rgba(80,20,60,0.25); }
.cta-banner .btn-craft:hover { background: var(--pink-pale); box-shadow: 4px 5px 0 rgba(80,20,60,0.3); }

/* ══ RELATED SECTION ══ */
.related-section { padding: 4.5rem 4rem; background: var(--plum-pale); position: relative; }
.related-title { font-family: 'Playfair Display', Georgia, serif; font-size: 2rem; font-weight: 600; color: var(--ink); margin-bottom: 0.3rem; }
.related-sub { font-family: 'Lora', Georgia, serif; font-style: italic; font-size: 0.88rem; color: var(--ink-soft); margin-bottom: 2rem; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
.related-card {
  display: flex; align-items: center; justify-content: center; gap: 1rem;
  background: var(--warm-white); border: 1.5px solid rgba(216,100,154,0.18);
  padding: 1.2rem 1.4rem; text-decoration: none; color: inherit;
  position: relative; border-radius: 4px;
  box-shadow: 2px 3px 0 rgba(160,60,110,0.08), 3px 5px 12px rgba(80,20,60,0.07);
  transition: transform 0.25s, box-shadow 0.25s;
  min-height: var(--tap-min); -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.related-card:nth-child(1) { transform: rotate(-0.8deg); }
.related-card:nth-child(2) { transform: rotate(0.5deg); }
.related-card:nth-child(3) { transform: rotate(-0.4deg); }
.related-card::before { content: ''; position: absolute; top: -8px; left: 30%; right: 30%; height: 16px; border-radius: 2px; z-index: 1; }
.related-card:nth-child(1)::before { background: var(--tape-pink); }
.related-card:nth-child(2)::before { background: var(--tape-plum); }
.related-card:nth-child(3)::before { background: var(--tape-rose); }
.related-card:hover { transform: rotate(0deg) translateY(-4px) scale(1.02) !important; box-shadow: 4px 6px 0 rgba(160,60,110,0.12), 6px 10px 20px rgba(80,20,60,0.1); z-index: 5; }
.related-card .rel-emoji { font-size: 2.2rem; }
.related-card .rel-name  { font-family: 'Playfair Display', Georgia, serif; font-size: 1.1rem; font-weight: 600; color: var(--ink); text-align: center; }
.related-card .rel-link  { font-family: 'Lora', Georgia, serif; font-style: italic; font-size: 0.8rem; color: var(--plum-strong); text-align: center; }

/* ══ TABLET ══ */
@media (max-width: 1100px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: 1fr 1fr; }
  .page-hero    { padding: 3rem 2rem 4rem; }
}

/* ══ MOBILE ══ */
@media (max-width: 768px) {
  .page-hero { padding: 2.5rem 1.2rem 3.5rem; min-height: auto; }
  .hero-paper-card { transform: rotate(-0.5deg); padding: 1.8rem 1.4rem 1.5rem; }
  .page-hero-emoji { display: none; }
  .filter-bar { padding: 0.8rem 1.2rem; top: 75px; }
  .products-section { padding: 2.5rem 1.2rem; }
  .product-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .product-card:nth-child(3n+1),
  .product-card:nth-child(3n+2),
  .product-card:nth-child(3n) { transform: rotate(0deg); }
  .product-img-wrap { height: 160px; font-size: 4rem; }
  .cta-banner { flex-direction: column; padding: 2.5rem 1.2rem; text-align: center; }
  .related-section { padding: 3.5rem 1.2rem; }
  .related-grid { grid-template-columns: 1fr; }
  .related-card:nth-child(1),
  .related-card:nth-child(2),
  .related-card:nth-child(3) { transform: rotate(0deg); }
}

/* ══ SMALL MOBILE ══ */
@media (max-width: 400px) {
  .page-hero-title { font-size: 1.9rem; }
  .product-name { font-size: 1.1rem; }
  .cta-banner-text h3 { font-size: 1.5rem; }
}
