/* ===========================
   SWEET BAKERY — SAGE + CREAM THEME
   Full stylesheet rewrite — fonts, colors, animations updated
   =========================== */

:root {
  --main-bg: #fafbf7;        /* airy cream background */
  --accent: #eef3ee;         /* pale sage wash */
  --primary: #6f8f72;        /* soft sage for headings */
  --secondary: #3f5e49;      /* deep olive for text */
  --btn: #7aa785;            /* button sage */
  --btn-hover: #5e8e6b;      /* darker hover */
  --line: #e0e6e1;           /* subtle divider */
  --card-bg: #ffffff;        /* cards */
  --chip: #e9f2ea;           /* list hover/soft tags */
  --shadow: 0 10px 48px rgba(63, 94, 73, 0.12);
}

/* ----- Base Typography ----- */
body {
  font-family: 'Manrope', Arial, sans-serif;  /* NEW: clean, modern */
  background: var(--main-bg);
  color: var(--secondary);
}
h1, h2, .bakery-title, .why-subscribe-title, .section-title {
  font-family: 'Fraunces', Georgia, serif;    /* NEW: elegant display */
  letter-spacing: .2px;
}
.section-title {
  font-size: 2.3rem;
  color: var(--primary);
}

/* ----- Navbar & Hero Section ----- */
.theme-navbar {
  background: linear-gradient(90deg, #fbfcf9 70%, #edf3ee 100%) !important;
  border-bottom: 2px dashed rgba(0,0,0,0.04);
  font-family: 'Manrope', sans-serif;
}

.theme-navbar .nav-link {
  font-weight: 600;
  font-size: 1.05rem;
  color: #4b6a56;
  transition: color 0.25s ease;
}
.theme-navbar .nav-link:hover,
.theme-navbar .nav-link.active {
  color: #5c816a;
}
.theme-navbar .navbar-brand {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.5rem;
  color: #476a54;
}
.theme-navbar .navbar-brand:hover { color: #3e5c49; }
.theme-logo-text {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.4rem;
}

/* Compatibility body modifier (kept) */
body.christmas .theme-navbar {
  background: linear-gradient(to right, #fbfcf9, #eef4f0);
}
body.christmas .nav-link:hover { color: #5c816a; }
body.christmas .navbar-brand { color: #476a54; }

/* ----- Hero Section (Sage Sheen) ----- */
.theme-hero {
  background: linear-gradient(120deg, #fbfcf9 60%, #eaf2ec 100%);
  box-shadow: var(--shadow);
  border-radius: 2rem;
  margin: 2rem 0;
  position: relative;
  animation: leaf-fade 900ms cubic-bezier(.23,1.01,.32,1);
}
.theme-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(12px 12px at 18% 28%, rgba(125, 160, 134, .10) 0 40%, transparent 41%),
    radial-gradient(10px 10px at 82% 22%, rgba(173, 201, 181, .12) 0 40%, transparent 41%),
    radial-gradient(10px 10px at 70% 78%, rgba(205, 220, 209, .14) 0 40%, transparent 41%);
  opacity: .55;
  pointer-events: none;
  border-radius: 2rem;
}

@keyframes leaf-fade {
  from { opacity: 0; transform: translateY(34px) scale(.97);}
  to   { opacity: 1; transform: none;}
}

.bakery-title {
  letter-spacing: 1.5px;
  color: var(--primary);
  text-shadow: 0 2px 16px rgba(63, 94, 73, .14);
  animation: sprout-pop 780ms cubic-bezier(.45,.4,.42,1.35);
}

@keyframes sprout-pop {
  0%   { opacity: 0; filter: blur(4px) brightness(1.2); transform: translateY(8px) scale(.98);}
  55%  { opacity: .94; filter: blur(1px);}
  100% { opacity: 1; filter: none; transform: none;}
}

.bakery-lead {
  color: #4b6a56;
  font-size: 1.45rem;
  font-family: 'Manrope', Arial, sans-serif;
}

/* ----- Button Styles ----- */
.theme-btn-cta {
  background: var(--btn);
  color: #fff;
  border: none;
  font-size: 1.2rem;
  border-radius: 2rem;
  box-shadow: 0 0 24px 0 rgba(63, 94, 73, .18);
  transition: transform .22s, box-shadow .22s, background .2s;
  font-weight: 700;
  letter-spacing: 0.4px;
}
.theme-btn-cta:hover {
  background: var(--btn-hover);
  color: #fff;
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 6px 28px rgba(63,94,73,.22), 0 2px 18px rgba(209, 224, 214, .55);
}

/* ---------- PRODUCT CARD: Even Images ---------- */
.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--card-bg);
  border-radius: 1.3rem;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.card-img-container {
  width: 100%;
  aspect-ratio: 1/1;
  position: relative;
  background: #f7fbf7;
}
.product-img, .card-img-top {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  margin: 0 !important;
  z-index: 2;
}
.product-card .card-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.2rem 1rem 1.3rem 1rem;
  background: #fff;
  border-radius: 0 0 1.3rem 1.3rem;
}

@media (max-width: 991px) {
  .card-img-container { aspect-ratio: 4/3; }
}
@media (max-width: 576px) {
  .card-img-container { aspect-ratio: 16/11; }
}

/* ----- Carousel / Splide Styles ----- */
.splide__slide {
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: 1.5rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  border: 3px solid #e1e9e3;
}
.splide__slide img {
  width: 100%;
  height: 100%;
  max-width: 800px;
  max-height: 400px;
  object-fit: cover;
  border-radius: 1.5rem;
  filter: drop-shadow(0 0 10px rgba(63, 94, 73, .12));
  background: #fafbf7;
  transition: transform 820ms cubic-bezier(.25,1.15,.42,1.01);
}
.splide__slide:hover img { transform: scale(1.05) rotate(-0.8deg); }
.slide-caption {
  position: absolute;
  bottom: 1rem; left: 1rem;
  color: #2f4a3a;
  background: rgba(218, 231, 224, .92);
  padding: .5rem 1.2rem;
  border-radius: 1.2rem;
  font-weight: 800;
  font-size: 1.02em;
}

/* ----- Responsive Carousel for Mobile ----- */
@media (max-width: 768px) {
  .theme-hero { padding:2rem 1rem; }
  .bakery-title { font-size:2.1rem; }
  .splide__slide, .splide__slide img { height: 200px; max-height: 200px; }
}

/* ----- Footer ----- */
.theme-footer {
  background: #eef3ee;
  color: #3f5e49;
  border-top: 2px solid var(--line);
  font-size: 1.07em;
  letter-spacing: .4px;
}

/* ----- Newsletter & Why Subscribe Card ----- */
.newsletter-img {
  max-width: 200px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(125, 160, 134, .22);
  border-radius: 50%;
  margin: 0 auto;
  display: block;
}
.why-subscribe-card {
  background: linear-gradient(120deg, #fbfcf9 75%, #eaf2ec 100%);
  border-radius: 1.3rem;
  box-shadow: 0 2px 14px rgba(180, 198, 187, .26);
  border: 1px solid var(--line);
  min-width: 230px;
  transition: box-shadow 0.25s, transform .2s;
}
.why-subscribe-card:hover {
  box-shadow: 0 6px 28px rgba(63, 94, 73, .18);
  transform: translateY(-3px);
}
.why-subscribe-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.35em;
  color: var(--primary);
  letter-spacing: .8px;
}
.why-subscribe-list li {
  font-family: 'Manrope', Arial, sans-serif;
  font-size: 1.05em;
  transition: background 0.2s, color 0.2s, transform 0.18s;
  border-radius: 0.5em;
  padding: 0.2em 0.3em;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.why-subscribe-list li:hover {
  background: var(--chip);
  color: #446a55;
  transform: scale(1.04);
}

/* ----- Custom Emoji Icons ----- */
.icon-basket::before {
  content: "🧺";
  font-size: 1.1em;
  color: #446a55;
  display: inline-block;
  width: 1.6em;
  text-align: center;
}
.icon-cupcake::before { content: "🧁"; color: #8bb49a; font-size: 1.1em; }
.icon-cake::before    { content: "🎂"; color: #a6c7b2; font-size: 1.1em; }
.icon-cookie::before  { content: "🍪"; color: #6a8f77; font-size: 1.1em; }

/* ----- Animations (ALL NEW) ----- */
@keyframes leaf-fade { /* defined above */ }
@keyframes sprout-pop { /* defined above */ }
@keyframes drift-slide {
  0% { opacity: 0; transform: translateX(-34px) scale(.94) rotate(-.5deg);}
  70% { opacity: .96; filter: blur(0.8px);}
  100% { opacity: 1; transform: none; filter: none;}
}
@keyframes dew-shimmer {
  0%   { box-shadow: 0 4px 18px rgba(122, 167, 133, .32), 0 0 6px #fcfefd;}
  50%  { box-shadow: 0 8px 28px rgba(122, 167, 133, .58), 0 0 16px #e7f0ea;}
  100% { box-shadow: 0 4px 18px rgba(122, 167, 133, .32), 0 0 6px #fcfefd;}
}

.animate-fadein    { animation: leaf-fade 820ms cubic-bezier(.48,1.2,.53,.96); }
.animate-pop       { animation: sprout-pop 720ms cubic-bezier(.49,1.55,.54,1.0); }
.animate-slidein   { animation: drift-slide 920ms cubic-bezier(.57,1.2,.54,1.0); }

.card:hover, .theme-btn-cta:hover {
  box-shadow: 0 6px 28px rgba(63,94,73,.18), 0 2px 18px rgba(220,232,226,.55);
  transform: translateY(-5px) scale(1.02) rotate(-.4deg);
  transition: box-shadow 0.2s, transform 0.18s;
}

/* Subscribe Button – dew shimmer */
.subscribe-btn {
  background: var(--btn);
  color: #fff;
  border: none;
  border-radius: 2rem;
  font-size: 1.15rem;
  box-shadow: 0 4px 18px rgba(122, 167, 133, .30);
  transition: background 0.2s, transform 0.16s, box-shadow 0.16s;
  animation: dew-shimmer 2.6s infinite;
}
.subscribe-btn:hover,
.subscribe-btn:focus {
  background: var(--btn-hover);
  color: #fff;
  transform: scale(1.05) translateY(-1px);
  box-shadow: 0 6px 28px rgba(122, 167, 133, .46), 0 2px 12px rgba(63, 94, 73, .24);
}

/* Congrats Popup (Sage Cream) */
.congrats-popup {
  position: fixed;
  z-index: 99999;
  left: 50%;
  top: 15%;
  transform: translate(-50%, -50%);
  background: #f7fbf8;
  color: #3f5e49;
  padding: 1.1rem 2.4rem;
  border-radius: 1.6rem;
  box-shadow: 0 8px 44px rgba(63, 94, 73, .2), 0 2px 16px rgba(228, 237, 232, .8);
  font-size: 2rem;
  font-family: 'Fraunces', Georgia, serif;
  display: flex;
  align-items: center;
  gap: 1rem;
  opacity: 0;
  pointer-events: none;
  animation: none;
}
.congrats-popup.show {
  opacity: 1;
  pointer-events: auto;
  animation: popup-in-mint 0.42s cubic-bezier(.35,1.2,.35,.97);
}
@keyframes popup-in-mint {
  0% { opacity: 0; transform: translate(-50%, -70%) scale(0.9) rotate(-0.4deg);}
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0);}
}

/* Streamer Poppers (subtle bounce & drift) */
.popper {
  font-size: 2em;
  position: relative;
  display: inline-block;
  animation: popper-bounce 1.1s infinite alternate ease-in-out;
}
.left-popper  { animation-name: confetti-left; }
.right-popper { animation-name: confetti-right; }
@keyframes confetti-left {
  0% { left: -28px; transform: rotate(-12deg) scale(0.92);}
  50% { left: -14px; transform: rotate(-8deg) scale(1) skewY(1deg);}
  100% { left: 0; transform: rotate(-4deg) scale(1.04);}
}
@keyframes confetti-right {
  0% { right: -28px; transform: rotate(12deg) scale(0.92);}
  50% { right: -14px; transform: rotate(8deg) scale(1) skewY(-1deg);}
  100% { right: 0; transform: rotate(4deg) scale(1.04);}
}
@keyframes popper-bounce {
  0%   { transform: scale(0.97);}
  60%  { transform: scale(1.05) rotate(-0.4deg);}
  100% { transform: scale(1);}
}

/* About Section Right Image Sizing */
.about-img {
  max-width: 420px;
  width: 100%;
  height: auto;
  display: block;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 6px 40px rgba(63, 94, 73, .12);
}
@media (max-width: 992px) {
  .about-img { max-width: 320px; }
}
@media (max-width: 768px) {
  .about-img { max-width: 90vw; }
}

/* Baker Card Image + Card Animation */
.baker-img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  object-position: top center;
  border-radius: 50%;
  display: block;
  margin: 0 auto 1rem auto;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}
.baker-card {
  transition: transform 0.18s ease;
}
.baker-card:hover {
  transform: translateY(-5px);
}

/* Accordion – font alignment */
.signature .accordion-button,
.signature .accordion-body {
  font-family: 'Manrope', Arial, sans-serif !important;
}
.signature .accordion-button { font-weight: 700; }
.signature .accordion-body   { font-weight: 400; }
