@font-face {
  font-family: "framd";
  src: url("../assets/fonts/framd.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "FRAHV";
  src: url("../assets/fonts/FRAHV.TTF") format("truetype");
  font-display: swap;
}

:root {
  --text-blue: #2b3f94;
  --heading-blue: #15255f;
}

body {
  margin: 0;
  font-family: "framd", system-ui, sans-serif;
  background: #fffaf3;
  color: var(--text-blue);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--heading-blue);
}

/* NAV */

.nav {
  background: #2a3580;
  padding: 18px;
}

.nav-inner {
  max-width: 1100px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links {
  display: flex;
  align-items: center;
}

.nav-links a:first-child {
  margin-left: 0;
}

.nav-links a {
  color: white;
  margin-left: 25px;
  text-decoration: none;
  font-size: 14px;
  font-family: "FRAHV", system-ui, sans-serif;
}

.nav-cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
  padding: 4px;
}

.nav-cart:hover {
  transform: translateY(-1px);
}

.nav-cart img {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

.cart-count {
  position: absolute;
  top: -6px;
  right: -2px;
  background: #f25c5c;
  color: white;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 999px;
  line-height: 1;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
}

.cart-count[hidden] {
  display: none;
}

/* LOGO */

.logo img {
  height: 34px;
  width: auto;
}

/* HERO */

.hero {
  text-align: center;
  padding: 40px 20px;
}

.hero h1 {
  color: var(--heading-blue);
  margin-bottom: 25px;
}

.search-tabs {
  display: inline-flex;
  gap: 30px;
  margin-bottom: 12px;
}

.search-tab {
  border: none;
  background: none;
  font-size: 14px;
  color: var(--heading-blue);
  opacity: 0.45;
  cursor: pointer;
  padding-bottom: 4px;
}

.search-tab.is-active {
  opacity: 1;
  font-weight: 600;
  border-bottom: 2px solid var(--heading-blue);
}

.search-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.search-form-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.search-fields {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
}

.search-fields[hidden] {
  display: none;
}

.search-field {
  display: flex;
  flex-direction: column;
}

.search-field input,
.search-field select {
  width: 250px;
  height: 35px;
  border-radius: 20px;
  border: 1px solid #2a3580;
  padding-left: 15px;
  padding-right: 28px;
  background: #fff;
  font-family: inherit;
}

.search-field select {
  cursor: pointer;
  appearance: none;
}

.search-field-full input {
  width: 420px;
}

.swap {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  border: 1px solid #2a3580;
  background: white;
  cursor: pointer;
}

.search-btn {
  height: 35px;
  padding: 0 20px;
  border-radius: 20px;
  border: none;
  background: #2a3580;
  color: white;
  cursor: pointer;
}

/* MAP */

.map-section {
  display: flex;
  justify-content: center;
  margin-top: 30px;
  padding: 0 20px 40px;
}

.map {
  width: min(900px, 100%);
  height: auto;
  max-width: 100%;
  min-height: 420px;
  border: none;
  background: transparent;
  display: block;
}

/* FOOTER */

.footer {
  margin-top: 50px;
  padding: 40px 20px;
}

.footer-container {
  max-width: 1100px;
  margin: auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}

.footer-col h4 {
  font-size: 13px;
  margin-bottom: 10px;
  color: var(--heading-blue);
}

.footer-col a,
.footer-col p {
  display: block;
  font-size: 12px;
  color: var(--text-blue);
  margin: 4px 0;
}

.email-box {
  display: flex;
  margin-top: 10px;
}

.email-box input {
  flex: 1;
  border-radius: 20px;
  border: 1px solid #aaa;
  padding-left: 10px;
  height: 30px;
}

.email-box button {
  width: 35px;
  border: none;
  background: #2a3580;
  color: white;
  border-radius: 50%;
  cursor: pointer;
}

.footer-bottom {
  margin-top: 30px;
  padding: 10px 0;
}

.footer-bottom-container {
  max-width: 1100px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-blue);
}

.footer-links a {
  color: var(--text-blue);
  text-decoration: none;
  margin: 0 4px;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* ===== Our Story page ===== */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.story-hero {
  background: #fffaf3;
  padding: 48px 0 24px;
}

.story-hero h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: #273477;
}

.story-banner {
  padding: 0 0 34px;
}

.banner-box {
  width: 100%;
  height: 500px;
  background: #d8d8d8;
}

.banner-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-content {
  padding: 10px 0 90px;
}

.story-content-inner {
  max-width: 820px;
}

.story-content h2 {
  margin: 0 0 14px;
  color: #273477;
  font-size: 25px;
  font-weight: 700;
}

.story-content p {
  margin: 0 0 14px;
  font-size: 18px;
  line-height: 1.95;
  color: #273477;
}

.story-paths {
  background: #fffaf3;
  padding: 60px 0 110px;
  overflow: hidden;
}

.story-paths-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 70px;
}

.story-path-row {
  position: relative;
  min-height: 200px;
}

.story-path-wave {
  width: 140vw;
  max-width: 1600px;
  height: 160px;
  display: block;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}

.story-path-wave path {
  fill: none;
  stroke: #273477;
  stroke-width: 8;
  stroke-linecap: round;
}

.story-path-card {
  position: absolute;
  top: 59%;
  left: 65%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  z-index: 2;
}

.story-path-row:nth-child(1) .story-path-card {
  left: 30%;
}

.story-path-row:nth-child(3) .story-path-card {
  left: 40%;
}

.story-path-card::before {
  content: "";
  position: absolute;
  inset: -20px -70px;
  background: #fffaf3;
  border-radius: 999px;
  z-index: -1;
}

.story-path-icon {
  --story-icon-size: 200px;
  --story-icon-inner-size: 140px;
  width: var(--story-icon-size);
  height: var(--story-icon-size);
  border-radius: 50%;
  background: #1c2c83;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 35px rgba(11, 17, 68, 0.25);
  position: relative;
  opacity: 0;
  transform: translateY(60px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.story-path-row.is-visible .story-path-icon {
  opacity: 1;
  transform: none;
}

.story-path-icon img {
  width: var(--story-icon-inner-size);
  height: var(--story-icon-inner-size);
  filter: brightness(0) invert(1);
}

.story-path-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 390px;
  z-index: 1;
}

.curved-text {
  font-size: 17px;
  font-weight: 700;
  fill: #273477;
  letter-spacing: 1px;
}

.letter {
  opacity: 0;
  animation: letterFadeIn 0.4s ease forwards;
  animation-play-state: paused;
}

.story-path-row.is-visible .letter {
  animation-play-state: running;
}

.story-path-row.is-visible .letter:nth-child(1) { animation-delay: 0.2s; }
.story-path-row.is-visible .letter:nth-child(2) { animation-delay: 0.25s; }
.story-path-row.is-visible .letter:nth-child(3) { animation-delay: 0.3s; }
.story-path-row.is-visible .letter:nth-child(4) { animation-delay: 0.35s; }
.story-path-row.is-visible .letter:nth-child(5) { animation-delay: 0.4s; }
.story-path-row.is-visible .letter:nth-child(6) { animation-delay: 0.45s; }
.story-path-row.is-visible .letter:nth-child(7) { animation-delay: 0.5s; }
.story-path-row.is-visible .letter:nth-child(8) { animation-delay: 0.55s; }
.story-path-row.is-visible .letter:nth-child(9) { animation-delay: 0.6s; }
.story-path-row.is-visible .letter:nth-child(10) { animation-delay: 0.65s; }
.story-path-row.is-visible .letter:nth-child(11) { animation-delay: 0.7s; }
.story-path-row.is-visible .letter:nth-child(12) { animation-delay: 0.75s; }
.story-path-row.is-visible .letter:nth-child(13) { animation-delay: 0.8s; }
.story-path-row.is-visible .letter:nth-child(14) { animation-delay: 0.85s; }
.story-path-row.is-visible .letter:nth-child(15) { animation-delay: 0.9s; }
.story-path-row.is-visible .letter:nth-child(16) { animation-delay: 0.95s; }
.story-path-row.is-visible .letter:nth-child(17) { animation-delay: 1s; }
.story-path-row.is-visible .letter:nth-child(18) { animation-delay: 1.05s; }
.story-path-row.is-visible .letter:nth-child(19) { animation-delay: 1.1s; }
.story-path-row.is-visible .letter:nth-child(20) { animation-delay: 1.15s; }
.story-path-row.is-visible .letter:nth-child(21) { animation-delay: 1.2s; }
.story-path-row.is-visible .letter:nth-child(22) { animation-delay: 1.25s; }
.story-path-row.is-visible .letter:nth-child(23) { animation-delay: 1.3s; }

@keyframes letterFadeIn {
  to {
    opacity: 1;
  }
}

.nav-links a.active {
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* RWD */
@media (max-width: 720px) {
  .banner-box {
    height: 240px;
  }
  .story-content-inner {
    max-width: 100%;
  }

  .story-paths-inner {
    gap: 40px;
  }

  .story-path-row {
    min-height: 260px;
  }

  .story-path-card {
    position: static;
    transform: none;
    margin: 0 auto;
  }

  .story-path-card::before {
    inset: -10px -10px;
  }

  .story-path-wave {
    height: 140px;
    width: 160vw;
  }

  .story-path-icon {
    --story-icon-size: 150px;
    --story-icon-inner-size: 120px;
  }
}

.story-banner {
  width: 100%;
}

/* ===== Shop page ===== */

.shop-page {
  background: #fffaf3;
  padding-bottom: 120px;
}

.shop-hero {
  padding: 32px 0 12px;
}

.shop-hero .banner-box {
  height: 340px;
  background: #d8d8d8;
}

.products-section {
  padding: 10px 0 40px;
}

.products-section h2 {
  text-align: center;
  font-size: 33px;
  color: #1a2c80;
  margin: 50px 0 15px 0;
}


.product-carousel-wrapper {
  position: relative;
  width: 100%;
}


.product-carousel {
  display: flex;
  gap: 26px;
  overflow: hidden;
  scroll-behavior: smooth;
  padding: 34px 0;
  width: 100%;
}

.product-carousel::-webkit-scrollbar {
  display: none;
}

.product-carousel .recipe-card {
  flex: 0 0 240px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.product-carousel .recipe-card:hover {
  transform: translateY(-8px) scale(1.04);
  box-shadow: 0 18px 35px rgba(15, 23, 74, 0.18);
}

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: white;
  color: var(--heading-blue);
  box-shadow: 0 12px 24px rgba(15, 23, 74, 0.15);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  z-index: 5;
}

.carousel-arrow.is-left {
  left: 6px;
}

.carousel-arrow.is-right {
  right: 6px;
}

.carousel-arrow:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.product-carousel .recipe-card .code {
  font-size: 20px;
}

.product-carousel .recipe-card .name {
  font-size: 15px;
}

@media (max-width: 900px) {
  .carousel-arrow {
    display: none;
  }

  .product-carousel-wrapper {
    padding: 0;
  }

  .product-carousel {
    overflow-x: auto;
  }
}

.product-page {
  background: #fffaf3;
  padding: 30px 0 120px;
}

.product-hero {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
}

.product-hero .banner-box {
  height: 420px;
  background: #d8d8d8;
  border-radius: 16px;
}

.product-gallery {
  display: grid;
  grid-template-rows: 360px 152px;
  gap: 18px;
}

.product-gallery .gallery-main {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-gallery .gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-gallery .gallery-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.product-gallery .gallery-row div {
  background: #d8d8d8;
  border-radius: 18px;
  overflow: hidden;
}

.product-gallery .gallery-row div img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}


/* product-1..product-6: same visual centering tweak for second thumbnail image */
main[data-product-id="product-1"] .product-gallery .gallery-row div:nth-child(2) img,
main[data-product-id="product-2"] .product-gallery .gallery-row div:nth-child(2) img,
main[data-product-id="product-3"] .product-gallery .gallery-row div:nth-child(2) img,
main[data-product-id="product-4"] .product-gallery .gallery-row div:nth-child(2) img,
main[data-product-id="product-5"] .product-gallery .gallery-row div:nth-child(2) img,
main[data-product-id="product-6"] .product-gallery .gallery-row div:nth-child(2) img {
  object-position: 75% 50%;
}

.product-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.product-code {
  /*letter-spacing: 0.1em;*/
  text-transform: uppercase;
  font-size: 20px;
  font-weight: 900;
  color: var(--heading-blue);
  margin: 1px;
}

.product-info h1 {
  margin: 0 0 14px;
  color: var(--heading-blue);
  font-size: 44px;
  font-weight: 900;
}

.product-description {
  margin: 0;
  color: rgba(21, 37, 95, 0.75);
  line-height: 1.6;
}

/* Product-3 specific typography */
main[data-product-id="product-3"] .product-code {
  font-family: "FranklinGothic Heavy", "framd", system-ui, sans-serif;
  font-size: 48px;
  /*letter-spacing: 0.2em;*/
}

main[data-product-id="product-3"] .product-info h1 {
  font-family: "FranklinGothic Heavy", "framd", system-ui, sans-serif;
  font-size: 24px; /* ~33pt */
  line-height: 1.05;
}

main[data-product-id="product-3"] .product-description {
  font-family: "FranklinGothic Demi", "framd", system-ui, sans-serif;
  font-size: 16px; /* ~16pt */
}

/* Apply same typography for other product pages */
main[data-product-id="product-1"] .product-code,
main[data-product-id="product-2"] .product-code,
main[data-product-id="product-4"] .product-code,
main[data-product-id="product-5"] .product-code,
main[data-product-id="product-6"] .product-code {
  font-family: "FranklinGothic Heavy", "framd", system-ui, sans-serif;
  font-size: 48px;
  /*letter-spacing: 0.1em;*/
}

main[data-product-id="product-1"] .product-info h1,
main[data-product-id="product-2"] .product-info h1,
main[data-product-id="product-4"] .product-info h1,
main[data-product-id="product-5"] .product-info h1,
main[data-product-id="product-6"] .product-info h1 {
  font-family: "FranklinGothic Heavy", "framd", system-ui, sans-serif;
  font-size: 24px; /* ~33pt */
  line-height: 1.05;
}

main[data-product-id="product-1"] .product-description,
main[data-product-id="product-2"] .product-description,
main[data-product-id="product-4"] .product-description,
main[data-product-id="product-5"] .product-description,
main[data-product-id="product-6"] .product-description {
  font-family: "FranklinGothic Demi", "framd", system-ui, sans-serif;
  font-size: 16px; /* ~16pt */
}

.product-price {
  font-size: 48px;
  font-weight: 1000;
  color: var(--heading-blue);
  margin: 16px 0 6px;
}

.product-quantity {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
}

.product-quantity label {
  font-size: 15px;
  font-weight: 700;
  color: var(--heading-blue);
}

.product-quantity .qty-input {
  display: inline-flex;
  align-items: center;
  border: 2px solid var(--heading-blue);
  border-radius: 999px;
  overflow: hidden;
}

.product-quantity button {
  width: 36px;
  height: 36px;
  border: none;
  background: white;
  color: var(--heading-blue);
  font-size: 18px;
  cursor: pointer;
}

.product-quantity input {
  width: 48px;
  border: none;
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--heading-blue);
}

.product-quantity input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.product-quantity input[type="number"]::-webkit-outer-spin-button,
.product-quantity input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.add-to-cart-btn {
  border: none;
  background: var(--heading-blue);
  color: #fff;
  border-radius: 999px;
  padding: 14px 0;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 8px;
}

.product-inside {
  margin-top: 70px;
}

.product-inside h2 {
  text-align: center;
  color: var(--heading-blue);
}

.get-recipe-btn {
  display: block;
  width: fit-content;
  padding: 12px 100px;
  position: relative; top: 50px;
  margin: 12px auto 0;
  border: 2px solid var(--heading-blue);
  border-radius: 40px;
  background: transparent;
  color: var(--heading-blue);
  text-decoration: none;
  text-align: center;
  font-size: 25px;
  font-weight: 700;
  font-family: "FRAHV", system-ui, sans-serif;
  cursor: pointer;
  transition: all 0.25s ease;
}

.get-recipe-btn:hover {
  background: var(--heading-blue);
  color: white;
  tansform: translateY(-2px);
}

.product-inside > .get-recipe-btn {
  display: block;
  width: fit-content;
}

.inside-box-image {
  margin-top: 20px;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.inside-box-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* ensure image stays behind labels */
.inside-box-image img {
  position: relative;
  z-index: 0;
}

/* Ingredient labels over inside-box image */
.inside-box-image {
  position: relative;
}

.ingredient-label {
  position: absolute;
  color: #273477;
  font-weight: 800;
  font-family: "FranklinGothic Heavy", "framd", system-ui, sans-serif;
  font-size: 25px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  overflow: visible;
}

.ingredient-label {
  z-index: 10;
}

/* reveal animation for ingredient labels and connector lines */
.ingredient-label {
  z-index: 10;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}

.ingredient-label::before,
.ingredient-label::after {
  content: "";
  display: block;
  background: #273477;
  height: 3px;
  opacity: 0;
  transform-origin: left center;
  transform: scaleX(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* connectors coming from the right should scale from the right side */
.label-right::before {
  transform-origin: right center;
}
.label-left::after {
  transform-origin: left center;
}

.ingredient-label.is-visible {
  opacity: 1;
  transform: none;
}

.ingredient-label.is-visible::before,
.ingredient-label.is-visible::after {
  opacity: 1;
  transform: scaleX(1);
}

/* use absolute positioning for connector lines so width isn't limited by inline layout */
.label-left::after {
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  width: 160px;
}
.label-left::before { display: none; }

.label-right::before {
  position: absolute;
  right: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  width: 160px;
}
.label-right::after { display: none; }

/* Per-product positioning: allow each product page to override label placement */
/* Product 1 (original positions) */
main[data-product-id="product-1"] .ingredient-label.label-1 { top: 16%; right: 16%; }
main[data-product-id="product-1"] .ingredient-label.label-2 { top: 35%; left: 16%; }
main[data-product-id="product-1"] .ingredient-label.label-3 { top: 48%; left: 10%; }
/* allow label-3 to wrap into two lines on product-1 */
main[data-product-id="product-1"] .ingredient-label.label-3 {
  white-space: normal;
  max-width: 80px;
  line-height: 1.05;
}
/* shorten the connecting line for label-3 on product-1 when it points left */
main[data-product-id="product-1"] .ingredient-label.label-3.label-left::after {
  width: 140px !important;
  left: calc(100% + 22px);
}
main[data-product-id="product-1"] .ingredient-label.label-4 { top: 59%; right: 13%; }

/* Product 2: independent positions (label-3 shown on the right for this product) */
main[data-product-id="product-2"] .ingredient-label.label-1 { top: 15%; right: 12%; }
main[data-product-id="product-2"] .ingredient-label.label-2 { top: 39%; left: 28%; }
main[data-product-id="product-2"] .ingredient-label.label-3 { top: 53%; right: 23%; }
/* product-2 uses `label-single` on label-3 to keep it one-line */

/* Product 3: independent positions (defaults; tweak as needed) */
main[data-product-id="product-3"] .ingredient-label.label-1 { top: 14%; right: 14%; }
main[data-product-id="product-3"] .ingredient-label.label-2 { top: 35%; left: 19%; }
main[data-product-id="product-3"] .ingredient-label.label-3 { top: 52%; right: 20%; }
/* allow label-3 to wrap into two lines on product-3 if needed */
main[data-product-id="product-3"] .ingredient-label.label-3 {
  white-space: normal;
  max-width: 80px;
  line-height: 1.05;
}
/* shorten the connecting line for label-3 on product-3 when it points left */
main[data-product-id="product-3"] .ingredient-label.label-3.label-left::after {
  width: 140px !important;
}

/* Product 4: independent positions (defaults; tweak as needed) */
main[data-product-id="product-4"] .ingredient-label.label-1 { top: 12%; right: 12%; }
main[data-product-id="product-4"] .ingredient-label.label-2 { top: 34%; left: 24%; }
main[data-product-id="product-4"] .ingredient-label.label-3 { top: 53%; right: 15%; }
/* allow wrapping if needed for product-4 label-2 */
main[data-product-id="product-4"] .ingredient-label.label-2 {
  white-space: normal;
  max-width: 110px;
}

/* helper: keep specific labels on a single line (override label-3 wrap) */
.ingredient-label.label-single {
  white-space: nowrap !important;
  max-width: none !important;
}

/* Product 5: independent positions (defaults; tweak as needed) */
main[data-product-id="product-5"] .ingredient-label.label-1 { top: 12%; left: 14%; }
main[data-product-id="product-5"] .ingredient-label.label-2 { top: 37%; left: 26%; }
main[data-product-id="product-5"] .ingredient-label.label-3 { top: 53%; right: 16%; }
/* allow wrapping for long names if needed */
main[data-product-id="product-5"] .ingredient-label.label-1,
main[data-product-id="product-5"] .ingredient-label.label-2 {
  white-space: normal;
  max-width: 110px;
}

/* Product 6: independent positions (defaults; tweak as needed) */
main[data-product-id="product-6"] .ingredient-label.label-1 { top: 18%; right: 14%; }
main[data-product-id="product-6"] .ingredient-label.label-2 { top: 28%; left: 22%; }
main[data-product-id="product-6"] .ingredient-label.label-3 { top: 39%; right: 12%; }
main[data-product-id="product-6"] .ingredient-label.label-4 { top: 49%; left: 20%; }
main[data-product-id="product-6"] .ingredient-label.label-5 { top: 60%; right: 18%; }
/* allow wrapping for longer names on product-6 labels */
main[data-product-id="product-6"] .ingredient-label.label-2,
main[data-product-id="product-6"] .ingredient-label.label-4 {
  white-space: normal;
  max-width: 110px;
}

@media (max-width: 720px) {
  .ingredient-label { font-size: 20px; }
  .label-left::after, .label-right::before { width: 36px; }
  /* product-1 small-screen positions (matched to desktop values) */
  main[data-product-id="product-1"] .ingredient-label.label-3.label-left::after { width: 110px !important; left: calc(100% + 12px); }
  main[data-product-id="product-1"] .ingredient-label.label-1 { top: 16%; right: 16%; }
  main[data-product-id="product-1"] .ingredient-label.label-2 { top: 35%; left: 16%; }
  main[data-product-id="product-1"] .ingredient-label.label-3 { top: 48%; left: 10%; }
  main[data-product-id="product-1"] .ingredient-label.label-4 { top: 59%; right: 13%; }
  /* product-2 small-screen positions (matched to desktop values) */
  main[data-product-id="product-2"] .ingredient-label.label-1 { top: 15%; right: 12%; }
  main[data-product-id="product-2"] .ingredient-label.label-2 { top: 39%; left: 28%; }
  main[data-product-id="product-2"] .ingredient-label.label-3 { top: 53%; right: 23%; }
  /* product-3 small-screen positions (matched to desktop values) */
  main[data-product-id="product-3"] .ingredient-label.label-1 { top: 14%; right: 14%; }
  main[data-product-id="product-3"] .ingredient-label.label-2 { top: 35%; left: 19%; }
  main[data-product-id="product-3"] .ingredient-label.label-3 { top: 52%; right: 20%; }
}

  /* product-5 small-screen positions (matched to desktop values) */
  main[data-product-id="product-5"] .ingredient-label.label-1 { top: 12%; left: 14%; }
  main[data-product-id="product-5"] .ingredient-label.label-2 { top: 37%; left: 26%; }
  main[data-product-id="product-5"] .ingredient-label.label-3 { top: 53%; right: 16%; }

  /* product-6 small-screen positions (matched to desktop values) */
  main[data-product-id="product-6"] .ingredient-label.label-1 { top: 18%; right: 14%; }
  main[data-product-id="product-6"] .ingredient-label.label-2 { top: 28%; left: 22%; }
  main[data-product-id="product-6"] .ingredient-label.label-3 { top: 39%; right: 12%; }
  main[data-product-id="product-6"] .ingredient-label.label-4 { top: 49%; left: 20%; }
  main[data-product-id="product-6"] .ingredient-label.label-5 { top: 60%; right: 18%; }

  /* product-4 small-screen positions (matched to desktop values) */
  main[data-product-id="product-4"] .ingredient-label.label-1 { top: 12%; right: 12%; }
  main[data-product-id="product-4"] .ingredient-label.label-2 { top: 34%; left: 24%; }
  main[data-product-id="product-4"] .ingredient-label.label-3 { top: 53%; right: 15%; }

/* ===== Recipes page ===== */

.recipes-page {
  background: #fffaf3;
}

/* hero spacing closer to mock */
.recipes-hero {
  padding: 46px 0 12px;
  text-align: center;
}
.recipes-hero h1 {
  margin: 0 0 10px;
  font-size: 26px;
  font-weight: 700;
  color: #273477;
}

.recipes-search {
  margin: 8px auto 14px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.recipes-grid-section {
  padding: 14px 0 80px;
}

.recipes-grid-section .container {
  max-width: 800px;
  margin: 0 auto;
}

.recipes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 12px;
  row-gap: 48px;
  justify-items: center;
  margin-top: 12px;
}

.recipe-card {
  width: 210px;
  border-radius: 16px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  padding: 18px 19px 20px;
  aspect-ratio: 3 / 4;
  transform: translateZ(0);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.recipe-card:hover {
  transform: scale(1.04);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.1);
}

.recipe-card .card-img {
  position: relative;
  margin-bottom: 12px;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.35);
}

.recipe-card .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.recipe-card .card-body {
  text-align: left;
  margin-top: auto;
}

.card-body .code {
  font-weight: 800;
  font-size: 15pt;
  letter-spacing: 0.2px;
  margin-bottom: 6px;
  opacity: 0.9;
}

.card-body .name {
  font-size: 13px;
  line-height: 1.4;
  opacity: 0.92;
}

.card-body .name .accent {
  font-weight: 700;
}

.recipe-card .card-body {
  text-align: center;
}

.recipe-card .card-body .code {
  text-align: center;
}

.recipe-card .card-body .name {
  text-align: center;
}

/* themes (background colors) */
.recipe-card.theme-gold {
  background: #c99210;
}
.recipe-card.theme-red {
  background: #a3362a;
}
.recipe-card.theme-rose {
  background: #b77c82;
}
.recipe-card.theme-plum {
  background: #2f243c;
}
.recipe-card.theme-cream {
  background: #f6e6b8;
}
.recipe-card.theme-yellow {
  background: #f0d515;
}

/* text colors per theme */
.recipe-card.theme-plum .card-body,
.recipe-card.theme-plum .card-body .code,
.recipe-card.theme-plum .card-body .name {
  color: #fff;
}

.recipe-card.theme-gold .card-body,
.recipe-card.theme-gold .card-body .code,
.recipe-card.theme-gold .card-body .name {
  color: #5c3e01;
}

.recipe-card.theme-red .card-body,
.recipe-card.theme-red .card-body .code,
.recipe-card.theme-red .card-body .name {
  color: #400c05;
}

.recipe-card.theme-rose .card-body,
.recipe-card.theme-rose .card-body .code,
.recipe-card.theme-rose .card-body .name {
  color: #601b1d;
}

.recipe-card.theme-cream .card-body,
.recipe-card.theme-cream .card-body .code,
.recipe-card.theme-cream .card-body .name {
  color: #dba501;
}

.recipe-card.theme-yellow .card-body,
.recipe-card.theme-yellow .card-body .code,
.recipe-card.theme-yellow .card-body .name {
  color: #8b8000;
}

.recipes-note {
  margin: 56px 0 0;
  text-align: center;
  font-size: 11px;
  color: #273477;
  opacity: 0.75;
}

/* placeholder recipe detail */
.recipe-detail-hero {
  background: #fffaf3;
  padding: 42px 0 8px;
}
.recipe-detail-hero h1 {
  margin: 0 0 8px;
  color: #273477;
}
.recipe-detail-sub {
  margin: 0;
  font-size: 12px;
  color: #4b5563;
  opacity: 0.85;
}
.recipe-detail-body {
  background: #fffaf3;
  padding: 18px 0 80px;
}
.placeholder-box {
  height: 280px;
  border: 1px dashed rgba(39, 52, 119, 0.35);
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #273477;
  opacity: 0.75;
  background: rgba(255, 255, 255, 0.35);
}

/* recipe hero */

.recipe-hero {
  position: relative;
}

.recipe-hero img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: 10% 50%;
  opacity: 0;
  transform: scale(1.02);
  animation: recipeHeroFade 1s ease-out forwards;
}

.hero-title {
  position: absolute;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  color: #15255f;
  width: min(90%, 620px);
  padding: 0 20px;
  opacity: 0;
  animation: recipeHeroCopy 0.8s ease-out forwards;
  animation-delay: 0.25s;
}

.hero-title h1 {
  font-size: 32px;
  line-height: 1.2;
  margin: 0;
  text-align: left;
  color: #15255f;
}

@keyframes recipeHeroFade {
  from {
    opacity: 0;
    transform: scale(1.04);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes recipeHeroCopy {
  from {
    opacity: 0;
    transform: translate(-50%, 15px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* ingredients */

.ingredients .container,
.how-to .container {
  max-width: 620px;
  margin: auto;
}

.ingredients-grid-wrap {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 20px;
}

.ingredient-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.ingredient-img {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.ingredient-img img {
  height: 100%;
  width: auto;
  object-fit: contain;
  display: block;
}

.ingredient:hover .ingredient-img {
  transform: scale(1.08);
  box-shadow: 0 16px 30px rgba(21, 37, 95, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
}

.ingredient p {
  margin-top: 10px;
  font-size: 12px;
}

/* steps */

.step {
  text-align: center;
  margin: 50px 0;
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
  will-change: opacity, transform;
}

.step img {
  width: 180px;
  margin-top: 20px;
}

.step p {
  font-size: 13px;
  color: #273477;
}

.step.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* SHOP */

.shop-hero {
  padding: 120px 0;
  text-align: center;
  background: #f2ede4;
  color: #2a3580;
}

.shop-hero .container {
  max-width: 700px;
}

.shop-hero .eyebrow {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 12px;
  color: #b87c35;
  margin-bottom: 16px;
}

.shop-hero h1 {
  font-size: 42px;
  margin-bottom: 18px;
}

.shop-hero p {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 28px;
}

.shop-hero .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  border-radius: 999px;
  background: #2a3580;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
}

/* CONTACT */

.contact-section {
  padding: 80px 0;
}

.contact-heading {
  text-align: left;
  margin: 0 auto 40px;
  padding: 0 20px;
  max-width: 1100px;
}

.contact-heading h1 {
  margin-bottom: 10px;
}

.contact-heading h3 {
  margin: 0;
}

.contact-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

.contact-info h1 {
  font-size: 56px;
  color: var(--heading-blue);
  margin-bottom: 10px;
}

.contact-info h3 {
  font-size: 26px;
  color: var(--heading-blue);
  margin-bottom: 30px;
}

.company {
  margin-bottom: 30px;
}

.contact-block {
  margin-bottom: 30px;
}

.label {
  font-size: 13px;
  color: var(--text-blue);
  margin-bottom: 10px;
}

.phone {
  font-size: 26px;
  font-weight: 700;
  color: var(--heading-blue);
}

.email {
  font-size: 22px;
  font-weight: 700;
  color: var(--heading-blue);
}

.store-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.social-icons {
  display: flex;
  gap: 20px;
}

.social-icons img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  opacity: 0.7;
}

.contact-form form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.contact-form label {
  font-size: 13px;
  color: var(--heading-blue);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  padding: 12px 16px;
  border: 2px solid var(--heading-blue);
  border-radius: 20px;
  font-size: 14px;
  outline: none;
}

.contact-form textarea {
  height: 90px;
  resize: none;
}

.contact-form button {
  margin-top: 10px;
  background: var(--heading-blue);
  color: white;
  border: none;
  padding: 12px;
  border-radius: 20px;
  font-size: 15px;
  cursor: pointer;
  width: 120px;
  align-self: flex-end;
}

/* CART PAGE */

.cart-page {
  padding: 40px 0 90px;
}

.cart-hero {
  text-align: center;
  padding: 40px 20px 10px;
}

.cart-hero-inner {
  max-width: 640px;
  margin: 0 auto;
}

.cart-kicker {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: rgba(21, 37, 95, 0.6);
  margin: 0 0 8px;
  font-weight: 700;
}

.cart-hero h1 {
  font-size: 52px;
  margin: 0 0 10px;
}

.cart-hero p {
  margin: 0;
  color: rgba(43, 63, 148, 0.8);
}

.cart-section {
  padding: 20px;
}

.cart-container {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 40px;
  align-items: flex-start;
}

.cart-list-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cart-list-header {
  background: #fff;
  border-radius: 28px;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 18px 45px rgba(12, 23, 63, 0.08);
}

.cart-select-all {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--heading-blue);
  cursor: pointer;
}

.cart-select-all input {
  width: 18px;
  height: 18px;
  accent-color: var(--heading-blue);
}

.cart-delete-selected {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: none;
  color: var(--heading-blue);
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
}

.cart-delete-selected:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.cart-delete-selected img {
  width: 14px;
  height: 14px;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cart-item {
  background: #fff;
  border-radius: 32px;
  padding: 20px 24px;
  display: flex;
  gap: 18px;
  box-shadow: 0 25px 55px rgba(7, 15, 58, 0.08);
}

.cart-item-select {
  display: flex;
  align-items: flex-start;
  padding-top: 6px;
}

.cart-item-select input {
  width: 18px;
  height: 18px;
  accent-color: var(--heading-blue);
}

.cart-item-card {
  display: flex;
  gap: 18px;
  flex: 1;
}

.cart-item-media {
  width: 96px;
  height: 96px;
  border-radius: 26px;
  background: #f1f1f1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.cart-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cart-item-media.is-placeholder::after {
  content: "";
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: #d4d4d4;
}

.cart-item-media.is-placeholder img {
  display: none;
}

.cart-item-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cart-item-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.cart-item-name {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  color: var(--heading-blue);
}

.cart-item-meta {
  margin: 0;
  color: rgba(43, 63, 148, 0.8);
  font-size: 14px;
}

.cart-item-meta[hidden] {
  display: none;
}

.cart-item-remove {
  border: none;
  background: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.cart-item-remove img {
  width: 16px;
  height: 16px;
}

.cart-item-remove:hover {
  background: rgba(21, 37, 95, 0.08);
}

.cart-item-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.cart-qty-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(21, 37, 95, 0.08);
  padding: 4px;
  border-radius: 999px;
}

.cart-qty-control button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #fff;
  font-size: 18px;
  font-weight: 700;
  color: var(--heading-blue);
  cursor: pointer;
}

.cart-qty-control button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cart-qty-control input {
  width: 56px;
  border: none;
  background: transparent;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--heading-blue);
}

.cart-qty-control input:focus {
  outline: none;
}

.cart-item-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--heading-blue);
}

.cart-empty-state {
  margin: 0;
  padding: 40px;
  border-radius: 32px;
  text-align: center;
  background: rgba(255, 255, 255, 0.85);
  border: 2px dashed rgba(43, 63, 148, 0.3);
  color: rgba(43, 63, 148, 0.85);
  font-weight: 600;
}

.cart-empty-state a {
  color: var(--heading-blue);
}

.cart-summary {
  background: linear-gradient(180deg, #24338c, #1a245e);
  color: white;
  border-radius: 32px;
  padding: 28px;
  box-shadow: 0 25px 65px rgba(4, 6, 30, 0.45);
  position: sticky;
  top: 30px;
}

.cart-summary h2 {
  margin-top: 0;
  margin-bottom: 24px;
  color: #fff;
}

.summary-lines {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  font-size: 22px;
  font-weight: 700;
  margin-top: 18px;
}

.summary-voucher label {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.7;
}

.summary-voucher-input {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.summary-voucher-input input {
  flex: 1;
  border-radius: 999px;
  border: none;
  padding: 10px 14px;
  font-size: 14px;
}

.summary-voucher-input input:focus {
  outline: 2px solid rgba(255, 255, 255, 0.3);
}

.summary-voucher-input button {
  border: none;
  border-radius: 999px;
  padding: 0 18px;
  font-weight: 700;
  cursor: pointer;
  background: white;
  color: var(--heading-blue);
}

.cart-checkout-btn {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 14px 0;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  background: white;
  color: var(--heading-blue);
  margin-top: 20px;
}

.cart-summary-note {
  font-size: 13px;
  margin-top: 10px;
  opacity: 0.8;
}

@media (max-width: 980px) {
  .cart-container {
    grid-template-columns: 1fr;
  }

  .cart-summary {
    position: static;
  }
}

@media (max-width: 640px) {
  .cart-section {
    padding: 0 12px 20px;
  }

  .cart-item {
    flex-direction: column;
  }

  .cart-item-card {
    flex-direction: column;
  }

  .cart-item-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .cart-list-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
}
