/* =========================
   Granny’s Gift — styles.css
   Two-column hero (form + photo) + gallery
   ========================= */

/* ---- Brand palette ---- */
:root{
  --brand-deep: #5A158A;
  --brand-mid:  #8E24AA;
  --brand-lite: #BA68C8;
  --brand-gold: #FFD54F;
  --brand-ink:  #2b2233;
  --brand-cream:#FFF8E1;

  --wrap-max: 1120px; /* comfortable width */
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--brand-ink);
  background: #FBF5FF; /* light lavender */
  line-height: 1.45;
}

/* Center container */
.wrap { max-width: var(--wrap-max); margin: 0 auto; padding: 0 12px; }

/* Banner (no crop, compact) */
.brand-hero { margin: 8px auto 10px; max-width: var(--wrap-max); padding: 0 12px; }
.brand-hero img {
  display: block; width: 100%; height: auto; object-fit: contain;
  max-height: 120px; border-radius: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.08);
}

/* Card base */
.card{
  background:#fff; border:1px solid #eee; border-radius:16px; padding:16px;
  box-shadow:0 10px 28px rgba(90,21,138,.08);
}

/* ===== Two-column hero ===== */
.hero-grid{
  display: grid;
  grid-template-columns: 1.1fr 0.9fr; /* form slightly wider */
  gap: 16px;
  align-items: start;
}

/* Right-side photo: fits, never cropped */
.product-hero { position: sticky; top: 10px; }
.hero-figure { margin: 0; }
.hero-cake{
  width: 100%;
  height: auto;          /* don't crop this hero image */
  object-fit: contain;   /* show full cake “in its full glory” */
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.10);
}

/* Stack on smaller screens */
@media (max-width: 960px){
  .hero-grid { grid-template-columns: 1fr; }
  .product-hero { position: static; }
}

/* ===== Form & controls ===== */
h1, h2 { margin: 6px 0 10px; color: var(--brand-ink); }

.row { margin: 8px 0; }
.row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

label .req { color: #c62828; font-weight: 700; margin-left: 4px; }

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 10px;
  background:#fff; color: var(--brand-ink); font-size: 16px;
}
input:focus, select:focus, textarea:focus {
  outline: 3px solid rgba(142,36,170,.18);
  border-color: var(--brand-mid);
}
textarea { resize: vertical; min-height: 96px; }
.muted { color: #6b6572; }
.tiny  { font-size: 12px; }
.hp { display: none !important; }

/* Buttons */
.btn{
  background: linear-gradient(180deg, var(--brand-mid), var(--brand-deep));
  border: 2px solid var(--brand-gold);
  color:#fff; font-weight:700;
  padding:10px 16px; border-radius:12px;
  box-shadow:0 6px 16px rgba(90,21,138,.18);
  cursor: pointer;
}
.btn[disabled]{ opacity:.55; cursor:not-allowed; }
.btn.ready{ outline: 3px solid var(--brand-gold); }
.btn.small{ width:auto; padding:8px 12px; }

/* Status & total */
.status { min-height: 20px; margin-top: 6px; font-size: 14px; }
.status.ok    { color: #1b5e20; }
.status.error { color: #b71c1c; }

.total-row { margin:8px 0; display:flex; justify-content:flex-end; }
.total-box {
  background: var(--brand-cream);
  border: 1px solid #ffe082;
  border-radius: 10px;
  padding: 6px 10px;
  font-weight: 700;
}

/* Divider */
.divider { border:0; height:1px; background:#eee; margin:14px 0; }

/* Success panel */
.success-panel {
  background: #f3e7ff; border: 1px solid #e2cfff; border-radius: 14px; padding: 12px; margin-bottom: 10px;
}
.success-panel .check {
  width: 32px; height: 32px; line-height: 32px; text-align:center; border-radius: 50%;
  background: #e8f5e9; color: #1b5e20; font-weight: 800; margin-bottom: 6px;
}
.summary dt { font-weight: 700; }
.summary dd { margin: 0 0 6px 0; }

/* Ingredients (banner-themed) */
.ingredients-card{
  background: linear-gradient(135deg, var(--brand-deep), var(--brand-mid) 60%, var(--brand-lite));
  color:#fff; border:2px solid var(--brand-gold); border-radius:14px; padding:12px;
}
.ingredients-card h2 { color: var(--brand-cream); margin-top: 0; }
.ingredients-list{
  display:grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr));
  gap: 6px 10px; padding:0; margin:6px 0; list-style:none;
}
.ingredients-list li::before{ content:"•"; color:#FFE082; margin-right:6px; }
.ingredients-card strong { color: #FFD54F; font-weight: 800; }

/* Contact (subtle fruit border) */
.contact-card{
  background:#fff; border-radius:14px; padding:12px;
  border: 12px solid transparent; border-image-slice:30; border-image-repeat:round;
  border-image-source: url("data:image/svg+xml;utf8,\
  <svg xmlns='http://www.w3.org/2000/svg' width='60' height='30' viewBox='0 0 60 30'>\
    <rect width='60' height='30' fill='none'/>\
    <circle cx='15' cy='15' r='10' fill='%23FFEB3B' stroke='%23FBC02D' stroke-width='3'/>\
    <circle cx='30' cy='15' r='10' fill='%234CAF50' stroke='%232E7D32' stroke-width='3'/>\
    <g transform='translate(45 15)'><circle r='10' fill='%238D6E63'/><circle r='6' fill='%23FAFAFA'/></g>\
  </svg>");
}

/* Newsletter */
.newsletter-card{ border:1px solid #eee; border-radius:14px; padding:12px; }

/* ===== Gallery (below hero) ===== */
.gallery h2 { margin-top: 0; }
.gallery-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}
.gallery-grid img{
  width: 100%;
  height: clamp(200px, 32vh, 340px);  /* larger, but never too tall */
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
}

/* Compact on small screens */
@media (max-width: 540px){
  .row.two { grid-template-columns: 1fr; }
}

/* === Seasonal sticker (near top of banner) === */
.brand-hero { position: relative; } /* enable absolute positioning inside */
.promo-sticker{
  position: absolute; top: 10px; right: 22px;
  background: linear-gradient(180deg, var(--brand-lite), var(--brand-mid));
  color: #fff;
  border: 2px solid var(--brand-gold);
  border-radius: 999px;
  padding: 7px 16px;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: .16em;
  text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(90,21,138,.18);
  white-space: nowrap;
}
.promo-sticker strong{ color: #FFF59D; font-weight: 900; }

@media (max-width: 960px){
  /* on small screens, place sticker below the banner neatly */
  .promo-sticker{
    position: static; display: inline-block; margin: 8px 0 0 0;
  }
}

/* === Product menu (right column) === */
.menu-card{
  margin-top: 12px;
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 12px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}
.menu-title{
  margin: 0 0 8px 0;
  color: var(--brand-ink);
  font-size: 18px;
}
.menu-list{
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: 8px;
}
.menu-list li{
  display: grid; grid-template-columns: 1fr auto; gap: 12px;
  align-items: center;
  padding: 8px 10px;
  border: 1px dashed #e9e3ef;
  border-radius: 10px;
  background: #fff;
}
.menu-list li span:last-child{
  font-weight: 800; color: var(--brand-deep);
}
.menu-note{ margin-top: 8px; }

/* Keep hero layout behavior from earlier */
.product-hero { position: sticky; top: 10px; }
.hero-figure { margin: 0; }
.hero-cake{
  width: 100%;
  height: auto;              /* show the full cake, never cropped */
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.10);
}

/* Flavor sign under hero photo */
.flavor-tag{
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  margin: 10px 0 4px;
  border-radius: 999px;
  background: var(--brand-cream);
  border: 1px solid #ffe082;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-ink);
}

/* Our Story block inside the left card */
.about-story{
  position: relative;
  background: linear-gradient(135deg, var(--brand-cream), #f4e5ff);
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(90,21,138,.12);
  box-shadow: 0 8px 20px rgba(90,21,138,.08);
  margin-bottom: 14px;
  overflow: hidden;
}
.about-story::before{
  content: "Granny";
  position: absolute;
  right: -10px;
  bottom: -24px;
  font-size: 56px;
  font-weight: 800;
  color: rgba(90,21,138,.06);
  letter-spacing: .08em;
  transform: rotate(-8deg);
  pointer-events: none;
}
.about-story h2{
  margin-top: 0;
  margin-bottom: 6px;
}
.about-story p{
  margin: 4px 0;
  font-size: 14px;
}
.about-story .about-tagline{
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-mid);
  text-transform: uppercase;
  letter-spacing: .12em;
}

