/* ============================================================
   TÄLU · Componentes globales reusables
   - .nav-cart estándar (copiado exacto de raw.html)
   - .btn-add-cart
   - .recommended (mini grid al final de cada PDP)
   - .ingredient-real (cards de ingredientes con iconos 3D)
   - .review-hero (review destacado al inicio)
   ============================================================ */

/* ==================== NAV CART ESTÁNDAR ==================== */
/* Fix bug brillo fuera del cart: el shimmer se mueve via background-position
   del propio nav-cart (no via ::before), así queda recortado al border-radius
   automáticamente. Mantiene overflow:visible para que el badge cart-count
   pueda asomar fuera del círculo. */
.nav-cart{
  position: relative;
  overflow: visible;
  width: 46px; height: 46px; border-radius: 999px;
  background:
    linear-gradient(110deg, transparent 38%, rgba(255,255,255,.55) 50%, transparent 62%) 0 0 / 250% 100% no-repeat,
    linear-gradient(135deg, #f5dea0 0%, #e7c179 45%, #c9a35d 100%);
  background-position: -150% 0, 0 0;
  border: 1px solid rgba(255,255,255,.4);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow:
    0 12px 26px -10px rgba(166,130,61,.55),
    inset 0 1px 0 rgba(255,255,255,.45);
  transition: transform .3s ease, filter .3s ease;
  animation: cart-shimmer-bg 3.6s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes cart-shimmer-bg{
  0%   { background-position: -150% 0, 0 0; }
  60%  { background-position: 250% 0, 0 0; }
  100% { background-position: 250% 0, 0 0; }
}
.nav-cart:hover{
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 18px 34px -10px rgba(166,130,61,.7), inset 0 1px 0 rgba(255,255,255,.55);
}
.nav-cart .cart-icon{ display: block; transition: transform .3s ease; position: relative; z-index: 1; }
.nav-cart:hover .cart-icon{ transform: translateY(-1px); }
.nav-cart .cart-count{
  position: absolute;
  top: -5px; right: -5px;
  min-width: 22px; height: 22px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff8e8 0%, #f5dea0 50%, #c9a35d 100%);
  color: #1a1410;
  font-family: "Inter", sans-serif;
  font-size: 11px; font-weight: 700; line-height: 1;
  box-shadow: 0 4px 10px -2px rgba(0,0,0,.35), 0 0 0 2px rgba(244,239,232,.95);
  transform: scale(0); opacity: 0;
  transition: transform .35s cubic-bezier(.2,.7,.3,1), opacity .25s ease;
  pointer-events: none; z-index: 2;
}
.nav-cart .cart-count.visible{ transform: scale(1); opacity: 1; }
.nav-cart.is-animating{ animation: cart-pulse .65s cubic-bezier(.3,.9,.3,1); }
.nav-cart.is-animating .cart-icon{ animation: cart-bounce .65s cubic-bezier(.3,.9,.3,1); }
.nav-cart.is-animating .cart-count{ animation: badge-pop .5s cubic-bezier(.2,.7,.3,1); }
@keyframes cart-pulse{
  0%,100%{ transform: scale(1); box-shadow: 0 12px 26px -10px rgba(166,130,61,.55), inset 0 1px 0 rgba(255,255,255,.45), 0 0 0 0 rgba(232,207,148,0); }
  50%    { transform: scale(1.12); box-shadow: 0 18px 36px -10px rgba(166,130,61,.85), inset 0 1px 0 rgba(255,255,255,.65), 0 0 0 6px rgba(232,207,148,.35); }
}
@keyframes cart-bounce{
  0%,100%{ transform: translate(0,0); }
  35%    { transform: translate(0,-6px); }
  65%    { transform: translate(0,2px); }
}
@keyframes badge-pop{
  0%   { transform: scale(.6); }
  50%  { transform: scale(1.45); }
  100% { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce){
  .nav-cart.is-animating, .nav-cart.is-animating .cart-icon, .nav-cart.is-animating .cart-count{ animation: none; }
  .nav-cart::before{ animation: none; }
}

/* ==================== BOTÓN AGREGAR AL CARRITO ==================== */
.btn-add-cart{
  position: relative; isolation: isolate;
  padding: 18px 36px;
  font-family: "Inter", sans-serif;
  font-size: 12px; letter-spacing: .26em; text-transform: uppercase; font-weight: 600;
  border-radius: 999px;
  background:
    linear-gradient(100deg, transparent 25%, rgba(255,255,255,.4) 45%, rgba(255,255,255,.4) 55%, transparent 75%) 0 0 / 250% 100% no-repeat,
    linear-gradient(135deg, #f5dea0 0%, #e7c179 30%, #c9a35d 60%, #a6823d 100%);
  background-position: -100% 0, 0 0;
  color: #1a1410;
  border: 1px solid rgba(255,255,255,.4);
  box-shadow: 0 18px 36px -12px rgba(166,130,61,.6), inset 0 1px 0 rgba(255,255,255,.5);
  animation: btn-shine 4s ease-in-out infinite;
  transition: transform .35s ease, filter .35s ease;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  text-decoration: none;
}
@keyframes btn-shine{
  0%{ background-position: -150% 0, 0 0 } 60%{ background-position: 250% 0, 0 0 } 100%{ background-position: 250% 0, 0 0 }
}
.btn-add-cart:hover{ transform: translateY(-3px); filter: brightness(1.08); }
.btn-add-cart svg{ width: 18px; height: 18px; }

/* ==================== SECCIÓN RECOMENDADOS ==================== */
.recommended{
  padding: 110px 40px 90px;
  border-top: 1px solid currentColor;
  border-color: rgba(201,163,93,.18);
}
.recommended .rec-header{
  text-align: center;
  max-width: 720px; margin: 0 auto 56px;
}
.recommended .rec-eyebrow{
  font-size: 11px; letter-spacing: .32em; text-transform: uppercase;
  font-weight: 500;
  display: inline-flex; gap: 14px; align-items: center; justify-content: center;
  margin-bottom: 16px;
}
.recommended .rec-eyebrow::before, .recommended .rec-eyebrow::after{
  content: ""; width: 30px; height: 1px; background: currentColor;
}
.recommended h2{
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(32px, 4vw, 50px);
  font-weight: 400; letter-spacing: -.015em; line-height: 1.05;
  margin: 0;
}
.recommended h2 em{ font-style: italic; }
.rec-grid{
  max-width: 1180px; margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.rec-card{
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(201,163,93,.32);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(244,239,232,.03));
  transition: transform .55s cubic-bezier(.2,.7,.2,1), border-color .4s ease, box-shadow .55s ease, background .35s ease;
  transform-style: preserve-3d;
  perspective: 900px;
  position: relative;
  will-change: transform;
  --mx: 0; --my: 0;
}
.rec-card.is-revealing{ opacity: 0; transform: translateY(20px) scale(.96); }
.rec-card.is-revealed{
  opacity: 1; transform: translateY(0) scale(1);
  transition: opacity .8s ease, transform .8s cubic-bezier(.2,.7,.2,1);
}
.rec-card:hover{
  transform: perspective(900px) rotateX(calc(var(--my) * -5deg)) rotateY(calc(var(--mx) * 5deg)) translateY(-6px) translateZ(10px);
  border-color: rgba(201,163,93,.7);
  background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(244,239,232,.06));
  box-shadow: 0 30px 60px -22px rgba(0,0,0,.55),
              0 8px 18px -10px rgba(166,130,61,.35);
}
.rec-card .rec-img{
  aspect-ratio: 1/1;
  overflow: hidden;
  position: relative;
}
.rec-card .rec-img img{
  width: 100%; height: 100%; object-fit: cover;
  /* Scale base 1.12 para que el producto llene mejor el contenedor (las PNGs vienen con aire transparente) */
  transform: scale(1.12);
  transition: transform 1s ease;
}
.rec-card:hover .rec-img img{ transform: scale(1.2); }
.rec-card .rec-body{
  padding: 18px 16px 20px;
}
.rec-card h3{
  font-family: "Cormorant Garamond", serif;
  font-size: 19px; font-weight: 500;
  margin: 0 0 4px;
  line-height: 1.15;
}
.rec-card .rec-tag{
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  opacity: .65;
  margin-bottom: 8px;
}
.rec-card .rec-price{
  font-family: "Cormorant Garamond", serif;
  font-size: 18px; font-weight: 500;
  margin-top: 6px;
}
.rec-card .rec-price .was{
  font-size: 13px; text-decoration: line-through; opacity: .45;
  margin-right: 6px; font-weight: 400;
}

/* ==================== INGREDIENTES REALES ==================== */
.ingredients-real{
  padding: 110px 40px 90px;
}
.ingredients-real .section-header{
  text-align: center;
  max-width: 720px; margin: 0 auto 50px;
}
.ingredients-grid{
  max-width: 1180px; margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.ing-card{
  padding: 24px 22px;
  border-radius: 14px;
  background: rgba(0,0,0,.03);
  border: 1px solid rgba(201,163,93,.18);
  display: flex; gap: 16px; align-items: flex-start;
  transition: transform .4s ease, border-color .4s ease;
}
.ing-card:hover{ transform: translateY(-2px); border-color: rgba(201,163,93,.45); }
.ing-card.featured{
  background:
    radial-gradient(ellipse 100% 60% at 50% 0%, rgba(201,163,93,.16), transparent 70%),
    rgba(0,0,0,.05);
  border-color: rgba(201,163,93,.5);
  box-shadow: 0 14px 30px -14px rgba(166,130,61,.3);
  grid-column: span 2;
}
.ing-card .ing-icon{
  width: 56px; height: 56px;
  flex-shrink: 0;
  border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(245,222,160,.4), rgba(201,163,93,.15));
  border: 1px solid rgba(201,163,93,.4);
  font-size: 28px;
  filter: drop-shadow(0 6px 10px rgba(166,130,61,.25));
}
.ing-card.featured .ing-icon{
  width: 80px; height: 80px;
  font-size: 42px;
  background: linear-gradient(135deg, #ffd28a 0%, #f4be72 50%, #c9a35d 100%);
  filter: drop-shadow(0 12px 20px rgba(166,130,61,.4));
}
.ing-card .ing-name{
  font-family: "Cormorant Garamond", serif;
  font-size: 18px; font-weight: 500;
  margin: 0 0 4px;
  line-height: 1.2;
}
.ing-card.featured .ing-name{ font-size: 22px; }
.ing-card .ing-desc{
  font-size: 13px; line-height: 1.55;
  opacity: .85;
}
.ing-card.featured .ing-desc{ font-size: 14px; }
.ing-card .ing-pct{
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(201,163,93,.2);
  font-size: 10px; letter-spacing: .12em; font-weight: 700;
}
@media (max-width: 700px){
  .ing-card.featured{ grid-column: span 1; }
}

/* ==================== REVIEW HERO (1 review destacado) ==================== */
.review-hero-block{
  padding: 80px 40px 60px;
}
.review-hero-card{
  max-width: 920px; margin: 0 auto;
  padding: 38px 44px;
  border-radius: 18px;
  background:
    radial-gradient(ellipse 100% 60% at 0% 50%, rgba(201,163,93,.12), transparent 70%),
    rgba(0,0,0,.03);
  border: 1px solid rgba(201,163,93,.25);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 28px;
  align-items: center;
  position: relative;
}
.review-hero-card .quote-mark{
  font-family: "Cormorant Garamond", serif;
  font-size: 90px; line-height: .8;
  font-style: italic;
  opacity: .35;
  margin: 0;
}
.review-hero-card .stars{
  font-size: 14px; letter-spacing: 3px;
  margin-bottom: 8px;
  opacity: .9;
}
.review-hero-card blockquote{
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: clamp(18px, 1.7vw, 24px);
  line-height: 1.5;
}
.review-hero-card .author{
  margin-top: 14px;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase;
  opacity: .7;
  display: inline-flex; gap: 12px; align-items: center;
}
.review-hero-card .verified{
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(76,175,129,.18);
  border: 1px solid rgba(76,175,129,.45);
  color: #4caf81;
  font-size: 10px;
  font-weight: 600;
}
@media (max-width: 700px){
  .review-hero-card{ grid-template-columns: 1fr; gap: 12px; padding: 28px 22px; }
  .review-hero-card .quote-mark{ font-size: 60px; }
}
