/*
Theme Name: Twin Bakers
Author: Twin Bakers
Description: A warm, mobile-first bakery catalogue and order-request theme for cakes, croissants, and baked treats.
Version: 1.0.0
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: twin-bakers
*/

:root {
  --berry: #c9004f;
  --berry-dark: #830735;
  --pink: #ef3b82;
  --blush: #fff0f3;
  --cream: #fffaf4;
  --ink: #35131f;
  --muted: #765e66;
  --white: #fff;
  --gold: #d7a140;
  --radius: 26px;
  --shadow: 0 16px 45px rgba(92, 28, 52, .11);
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: var(--sans); line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.container { width: min(1180px, calc(100% - 36px)); margin-inline: auto; }
.site-main { overflow: hidden; }
.section { padding: 84px 0; }
.section--pink { background: var(--blush); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.eyebrow { color: var(--berry); font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.04; }
h1, h2 { font-family: var(--serif); color: var(--berry-dark); }
h1 { font-size: clamp(3rem, 7vw, 6.2rem); letter-spacing: -.055em; }
h2 { font-size: clamp(2rem, 4vw, 3.6rem); letter-spacing: -.035em; }
h3 { font-size: 1.18rem; }
p { margin: 0 0 1rem; }
.button { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; gap: 9px; padding: 12px 23px; border: 2px solid var(--berry); border-radius: 999px; background: var(--berry); color: var(--white); font-weight: 800; cursor: pointer; transition: .2s ease; }
.button:hover { background: var(--berry-dark); border-color: var(--berry-dark); transform: translateY(-2px); }
.button--outline { color: var(--berry); background: transparent; }
.button--light { color: var(--berry-dark); border-color: var(--white); background: var(--white); }
.text-link { color: var(--berry); font-weight: 800; }

.site-header { position: sticky; z-index: 50; top: 0; border-bottom: 1px solid rgba(131,7,53,.08); background: rgba(255,250,244,.94); backdrop-filter: blur(14px); }
.header-inner { min-height: 84px; display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 28px; }
.brand img { width: 94px; height: 76px; object-fit: contain; }
.site-nav { display: flex; align-items: center; justify-content: center; gap: 28px; font-weight: 750; }
.site-nav ul { display: flex; align-items: center; justify-content: center; gap: 28px; margin: 0; padding: 0; list-style: none; }
.site-nav a:hover { color: var(--berry); }
.header-cta { white-space: nowrap; }
.menu-toggle { display: none; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--blush); color: var(--berry-dark); font-size: 1.4rem; }

.hero { position: relative; min-height: 690px; display: grid; align-items: center; background: linear-gradient(90deg, #fff8f0 0%, #fff5f4 48%, #fbdce2 100%); }
.hero::after { content: ''; position: absolute; inset: auto -8vw -120px auto; width: 360px; height: 360px; border-radius: 50%; background: rgba(239,59,130,.08); }
.hero-grid { display: grid; grid-template-columns: .92fr 1.08fr; align-items: center; gap: 44px; padding: 58px 0; }
.hero-copy p { max-width: 540px; color: var(--muted); font-size: 1.15rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-visual { position: relative; min-height: 550px; }
.hero-main { width: 100%; height: 550px; border-radius: 45% 45% 24px 24px; object-fit: cover; box-shadow: var(--shadow); }
.hero-character { position: absolute; right: -34px; bottom: -22px; width: 190px; filter: drop-shadow(0 16px 22px rgba(83,24,45,.18)); }
.hero-character, .story-characters img { mix-blend-mode: multiply; }
.hero-note { position: absolute; left: -34px; bottom: 36px; max-width: 225px; padding: 16px 18px; border-radius: 18px; background: var(--white); box-shadow: var(--shadow); font-weight: 800; }

.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.category-card { position: relative; min-height: 330px; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); }
.category-card img { width: 100%; height: 100%; object-fit: cover; transition: .35s ease; }
.category-card:hover img { transform: scale(1.04); }
.category-card::after { content: ''; position: absolute; inset: 35% 0 0; background: linear-gradient(transparent, rgba(42,6,20,.82)); }
.category-card__copy { position: absolute; z-index: 2; inset: auto 24px 20px; color: #fff; }
.category-card__copy p { opacity: .82; margin: 0; }

.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.product-card { overflow: hidden; border: 1px solid rgba(131,7,53,.08); border-radius: 22px; background: #fff; box-shadow: 0 8px 26px rgba(92,28,52,.07); transition: .2s ease; }
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.product-card__image { aspect-ratio: 1 / 1; overflow: hidden; background: var(--blush); }
.product-card__image img { width: 100%; height: 100%; object-fit: cover; transition: .35s ease; }
.product-card:hover img { transform: scale(1.035); }
.product-card__body { padding: 18px; }
.product-card__tag { display: inline-block; margin-bottom: 8px; color: var(--berry); font-size: .72rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.product-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 15px; }
.price { color: var(--berry-dark); font-weight: 850; }

.story { display: grid; grid-template-columns: 1.05fr .95fr; gap: 44px; align-items: center; border-radius: 34px; background: var(--berry-dark); color: #fff; overflow: hidden; }
.story-copy { padding: 54px; }
.story h2 { color: #fff; }
.story p { color: rgba(255,255,255,.78); }
.story-characters { min-height: 430px; padding: 25px 25px 0; display: flex; align-items: flex-end; justify-content: center; background: radial-gradient(circle at 50% 45%, #ffd4df, #f39ab4); }
.story-characters img { width: 48%; max-height: 405px; object-fit: contain; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.step { padding: 28px; border-radius: 22px; background: #fff; box-shadow: var(--shadow); counter-increment: step; }
.step::before { content: '0' counter(step); display: block; color: var(--pink); font-family: var(--serif); font-size: 2rem; font-weight: 800; }

.order-band { padding: 70px 0; background: linear-gradient(110deg, var(--berry-dark), var(--berry)); color: #fff; }
.order-band__inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.order-band h2 { color: #fff; }
.order-band p { max-width: 620px; color: rgba(255,255,255,.8); }

.site-footer { padding: 54px 0 30px; background: #2e101a; color: rgba(255,255,255,.76); }
.footer-grid { display: grid; grid-template-columns: 1.3fr repeat(2, .7fr); gap: 40px; }
.footer-brand img { width: 96px; border-radius: 50%; margin-bottom: 16px; }
.site-footer h3 { color: #fff; }
.footer-links { display: grid; gap: 9px; }
.copyright { margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); font-size: .86rem; }

.page-hero { padding: 76px 0 52px; text-align: center; background: var(--blush); }
.single-product { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; padding: 70px 0; align-items: start; }
.single-product__image { border-radius: 28px; overflow: hidden; position: sticky; top: 115px; }
.single-product__image img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.single-product__content { padding-top: 12px; }
.product-description { color: var(--muted); }
.order-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 28px; padding: 26px; border-radius: 24px; background: #fff; box-shadow: var(--shadow); }
.order-form h2, .order-form .full { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 6px; font-size: .85rem; font-weight: 800; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; border: 1px solid #e5ccd4; border-radius: 12px; padding: 11px 13px; background: #fffdfb; }
.notice { margin: 18px 0; padding: 15px 18px; border-radius: 12px; background: #e9f8ee; color: #145d2b; font-weight: 700; }
.archive-wrap { padding: 72px 0; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 34px; }
.filter-pill { padding: 9px 15px; border-radius: 999px; background: #fff; border: 1px solid #eed3dc; color: var(--berry-dark); font-weight: 750; }
.filter-pill:hover { background: var(--berry); color: #fff; }
.empty-state { padding: 50px; text-align: center; border-radius: 24px; background: #fff; }

@media (max-width: 980px) {
  .header-inner { grid-template-columns: auto 1fr auto auto; }
  .menu-toggle { display: inline-grid; place-items: center; }
  .site-nav { display: none; position: absolute; top: 84px; left: 0; right: 0; padding: 22px; background: var(--cream); box-shadow: var(--shadow); flex-direction: column; }
  .site-nav ul { flex-direction: column; }
  .site-nav.is-open { display: flex; }
  .hero-grid, .story, .single-product { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
  .hero-copy { text-align: center; }
  .hero-copy p { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .category-grid { grid-template-columns: 1fr; }
  .single-product__image { position: static; }
}

@media (max-width: 640px) {
  .container { width: min(100% - 26px, 1180px); }
  .section { padding: 60px 0; }
  .header-inner { min-height: 72px; grid-template-columns: auto 1fr auto; }
  .brand img { width: 70px; height: 62px; }
  .header-cta { display: none; }
  .site-nav { top: 72px; }
  .hero-grid { padding: 38px 0 54px; }
  .hero-visual { min-height: 390px; }
  .hero-main { height: 390px; border-radius: 150px 150px 22px 22px; }
  .hero-character { width: 120px; right: -12px; }
  .hero-note { left: 8px; bottom: 12px; max-width: 175px; font-size: .8rem; }
  .section-head, .order-band__inner { align-items: flex-start; flex-direction: column; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .product-card__body { padding: 13px; }
  .product-card h3 { font-size: .96rem; }
  .product-card__meta { align-items: flex-start; flex-direction: column; }
  .story-copy { padding: 36px 25px; }
  .story-characters { min-height: 300px; }
  .steps, .footer-grid { grid-template-columns: 1fr; }
  .order-form { grid-template-columns: 1fr; padding: 20px; }
  .order-form h2, .order-form .full { grid-column: auto; }
}
