/* Kaizen Force V4 — Theme v2 (refresh sutil sobre el diseño base)
   Cambios en tipografía secundaria, formas de botones y tarjetas, animaciones extra.
   Para regresar al diseño anterior: quitar el <link> de este archivo en cada HTML. */

@import url('https://fonts.googleapis.com/css2?family=Russo+One&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  /* Familia secundaria / display alternativa para acentos */
  --font-accent: 'Russo One', 'Oswald', Impact, sans-serif;
  --font-body: 'Manrope', 'Inter', system-ui, -apple-system, sans-serif;
  /* Radios actualizados — botones más pill, tarjetas con curvas mayores */
  --radius-lg: 18px;
  --radius-xl: 26px;
}

/* Tipografía body refrescada (Manrope) — más moderna y legible */
body {
  font-family: var(--font-body);
  font-feature-settings: 'ss01', 'cv11';
}

/* Acento tipográfico para botones, hero, eyebrows */
.btn,
.eyebrow,
.btn-accent {
  font-family: var(--font-accent);
  letter-spacing: 0.14em;
}
.btn--primary,
.btn--gold,
.btn--whatsapp {
  font-family: var(--font-accent);
}

/* ===== Botones rediseñados ===== */
.btn {
  position: relative;
  border-radius: var(--radius-full);
  padding: 13px 28px;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  overflow: hidden;
  isolation: isolate;
}
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.18) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 600ms ease;
  pointer-events: none;
  z-index: -1;
}
.btn:hover::before { transform: translateX(120%); }

.btn--primary {
  background: linear-gradient(135deg, var(--color-red-bright), var(--color-red-dark));
  border-color: var(--color-red);
}
.btn--primary:hover {
  background: linear-gradient(135deg, var(--color-red-bright), var(--color-red));
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(225, 29, 44, 0.45);
}

.btn--gold {
  background: linear-gradient(135deg, var(--color-gold-bright), var(--color-gold));
}
.btn--gold:hover { transform: translateY(-2px); }

.btn--ghost {
  border-radius: var(--radius-full);
  border-color: var(--color-border-strong);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.btn--xl {
  padding: 18px 36px;
  font-size: 0.95rem;
  letter-spacing: 0.18em;
}

.btn--outline-gold {
  background: transparent;
  color: var(--color-gold-bright);
  border: 1px solid var(--color-border-gold);
}
.btn--outline-gold:hover {
  background: var(--color-gold-soft);
  color: var(--color-gold-bright);
  border-color: var(--color-gold);
  transform: translateY(-2px);
}

.btn--in-cart {
  background: linear-gradient(135deg, #4ade80, #22c55e) !important;
  color: #062a10 !important;
  border-color: #22c55e !important;
}

@keyframes btnPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.08); }
  100% { transform: scale(1); }
}
.btn-pop { animation: btnPop 320ms ease both; }

/* ===== Tarjetas refresh ===== */
.product-card,
.category-card,
.how-step,
.benefit,
.cta-block {
  border-radius: var(--radius-xl);
}
.product-card {
  transition: transform 380ms cubic-bezier(0.2, 0.8, 0.2, 1), border-color var(--tr), box-shadow var(--tr);
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px -16px rgba(225, 29, 44, 0.25), 0 8px 22px rgba(0,0,0,0.5);
}

/* ===== Tarjetas de producto: alturas uniformes ===== */
.product-card { min-height: 460px; }
.product-card__name {
  min-height: 2.4em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card__desc {
  min-height: 2.4em;
}
.product-card__flavors-tag {
  align-self: flex-start;
}
/* Reservar espacio para flavors-tag aunque no exista, así todas las tarjetas igualan */
.product-card__body::before {
  content: '';
  display: none;
}
.product-card__actions {
  margin-top: auto;
  min-height: 44px;
  display: flex;
  align-items: stretch;
}
.product-card__actions .btn,
.product-card__actions .product-card__qty {
  height: 44px;
  width: 100%;
}

/* ===== Producto: descuento, sabores, stepper ===== */
.product-card__price-old {
  font-size: 0.85rem;
  color: var(--color-text-dim);
  text-decoration: line-through;
  text-decoration-color: rgba(255,255,255,0.4);
}
.product-card__discount {
  position: absolute;
  top: 12px;
  right: 56px;
  background: linear-gradient(135deg, var(--color-red-bright), var(--color-red-dark));
  color: #fff;
  font-family: var(--font-accent);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  padding: 4px 9px;
  border-radius: var(--radius-full);
  z-index: 2;
  box-shadow: 0 4px 12px rgba(225,29,44,0.35);
  animation: pulseRed 2.4s ease-in-out infinite;
}

.product-card__flavors-tag {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-accent);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--color-gold-soft);
  color: var(--color-gold-bright);
  margin-bottom: 8px;
  border: 1px solid var(--color-border-gold);
  min-height: 22px;
}
.product-card__flavors-tag--placeholder {
  background: transparent;
  border-color: transparent;
  pointer-events: none;
  visibility: hidden;
}
.product-card__flavors-tag--matched {
  background: rgba(225, 29, 44, 0.12);
  color: var(--color-red-bright);
  border-color: rgba(225, 29, 44, 0.45);
  letter-spacing: 0.12em;
  font-size: 0.68rem;
}

.product-card__qty {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: linear-gradient(135deg, rgba(74,222,128,0.18), rgba(34,197,94,0.16));
  border: 1px solid rgba(74,222,128,0.5);
  border-radius: var(--radius-full);
  padding: 4px;
  position: relative;
  z-index: 2;
  animation: stepperIn 320ms cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
@keyframes stepperIn {
  from { transform: scale(0.92); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.product-card__qty-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: rgba(0,0,0,0.35);
  color: #d1fadf;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(74,222,128,0.4);
  cursor: pointer;
  transition: background var(--tr), color var(--tr), transform var(--tr);
  position: relative;
  z-index: 2;
}
.product-card__qty-btn:hover {
  background: var(--color-success);
  color: #062a10;
  transform: scale(1.08);
}
.product-card__qty-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.product-card__qty-btn svg { width: 14px; height: 14px; }
.product-card__qty-value {
  font-family: var(--font-accent);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--color-success);
  min-width: 22px;
  text-align: center;
}

/* ===== Hero brand image variation ===== */
.hero__brand-img {
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(225,29,44,0.18), transparent 70%);
  padding: 6px;
}

/* ===== Section heads más expresivos ===== */
.section-head {
  text-align: left;
}
.section-head h2,
.section-head .eyebrow {
  text-align: left;
}
.section-head h2 {
  position: relative;
  display: block;
}
.section-head h2::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-red), var(--color-gold));
  margin-top: 10px;
  border-radius: var(--radius-full);
}
.section-head--row {
  align-items: center;
}
.section-head--row > div {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.section-head--row .eyebrow,
.section-head--row h2 { text-align: left; }

/* ===== Tooltip refresh ===== */
.icon-btn[data-tooltip]::after {
  font-family: var(--font-accent);
  border-radius: var(--radius-full);
  padding: 6px 12px;
}

/* ===== Promo bar más pulida ===== */
.promo-bar {
  background: linear-gradient(90deg, var(--color-red-dark) 0%, var(--color-red) 50%, var(--color-red-dark) 100%);
  background-size: 200% auto;
  animation: promoShine 8s linear infinite;
  letter-spacing: 0.18em;
}
.promo-bar a {
  color: var(--color-gold-bright);
  text-decoration: underline;
  margin-left: 6px;
}
.promo-bar a:hover { color: #fff; }
@keyframes promoShine {
  0%   { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

/* ===== Reveal on scroll (animación suave de aparición) ===== */
@keyframes revealUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal-on-scroll {
  opacity: 0;
}
.reveal-on-scroll.is-visible {
  animation: revealUp 700ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

/* ===== Site-header refresh ===== */
.site-header {
  background: rgba(8,8,8,0.78);
  border-bottom: 1px solid rgba(225,29,44,0.18);
}

/* ===== Eyebrow refresh ===== */
.eyebrow {
  font-family: var(--font-accent);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
}

/* ===== Page-head (catálogo, perfil, etc.) refresh ===== */
.page-head h1,
.cat-head h1,
.panel-head h1 {
  font-family: var(--font-accent);
  letter-spacing: 0.06em;
}

/* ===== Footer refresh sutil ===== */
.footer-col h5 {
  font-family: var(--font-accent);
  letter-spacing: 0.22em;
}

/* ===== Carrusel horizontal con scroll-snap ===== */
.carousel-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 16px;
  padding: 4px 16px 18px;
  margin-inline: -16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--color-red-dark) transparent;
}
.carousel-row::-webkit-scrollbar { height: 8px; }
.carousel-row::-webkit-scrollbar-track { background: transparent; }
.carousel-row::-webkit-scrollbar-thumb { background: var(--color-red-dark); border-radius: 4px; }
.carousel-row > * {
  flex: 0 0 78%;
  max-width: 280px;
  scroll-snap-align: start;
}
.carousel-row::after {
  content: '';
  flex: 0 0 1px;
}
@media (min-width: 768px) {
  .carousel-row > * { flex: 0 0 42%; max-width: 320px; }
}
@media (min-width: 1024px) {
  .carousel-row {
    margin-inline: 0;
    padding-inline: 4px;
    scroll-padding-inline: 0;
  }
  .carousel-row > * { flex: 0 0 24%; max-width: 320px; }
}

/* "Ver más [categoría]" como última tarjeta del carrusel */
.carousel-row__see-more {
  flex: 0 0 60%;
  max-width: 220px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(225,29,44,0.08), rgba(202,161,47,0.06));
  border: 1.5px dashed var(--color-border-gold);
  border-radius: var(--radius-xl);
  color: var(--color-gold-bright);
  font-family: var(--font-accent);
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
  font-size: 0.72rem;
  text-decoration: none;
  padding: 24px 16px;
  min-height: 460px;
  transition: background var(--tr), border-color var(--tr), transform var(--tr);
}
.carousel-row__see-more:hover {
  background: linear-gradient(135deg, rgba(225,29,44,0.16), rgba(202,161,47,0.12));
  border-color: var(--color-gold);
  color: var(--color-gold-bright);
  transform: translateY(-3px);
}
.carousel-row__see-more svg {
  width: 36px;
  height: 36px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  padding: 6px;
}

/* Catálogo: vista por categorías (filas) */
.catalog-by-cat {
  display: flex;
  flex-direction: column;
  gap: 36px;
}
.cat-row .section-head--row { margin-bottom: 16px; }
.cat-row .section-head--row > div { gap: 16px; }
.cat-row .section-head--row .eyebrow {
  display: inline-block;
  margin-bottom: 0;
}

/* También aplicamos categorías en home como carrusel en móvil */
.category-grid {
  display: flex !important;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 16px;
  padding: 4px 16px 16px;
  margin-inline: -16px;
  -webkit-overflow-scrolling: touch;
}
.category-grid > * {
  flex: 0 0 70%;
  max-width: 240px;
  scroll-snap-align: start;
}
@media (min-width: 768px) {
  .category-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    margin-inline: 0;
    padding-inline: 0;
    overflow: visible;
  }
  .category-grid > * { max-width: none; }
}
@media (min-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* ===== Etiquetas opcionales en formularios ===== */
.field__optional {
  display: inline;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--color-text-dim);
  font-weight: 400;
  margin-left: 4px;
}

/* ===== Sección Mis reseñas dentro de perfil ===== */
.profile-reviews {
  margin-top: 32px;
}
.profile-reviews .section-head { margin-bottom: 14px; }

/* ===== Helpers de formulario ===== */
.field__help {
  display: block;
  margin-top: 4px;
  font-size: 0.7rem;
  color: var(--color-text-dim);
  letter-spacing: 0.04em;
  text-align: right;
}
.field__select {
  width: 100%;
  min-height: 48px;
  background-color: var(--bg-carbon);
  border: 1px solid var(--color-border-strong);
  color: var(--color-text);
  border-radius: var(--radius-md);
  padding: 12px 46px 12px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(135deg, rgba(202, 161, 47, 0.08), transparent 44%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23caa12f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='7 9 12 14 17 9'/></svg>");
  background-repeat: no-repeat, no-repeat;
  background-position: left top, right 14px center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}
.field__select:hover {
  border-color: var(--color-border-gold);
  background-color: var(--bg-surface);
}
.field__select:focus {
  outline: 2px solid rgba(202, 161, 47, 0.32);
  outline-offset: 1px;
  border-color: var(--color-gold);
}
.field__select option {
  background: #101010;
  color: var(--color-text);
}

/* ===== Perfil: vista pública por defecto ===== */
.public-profile .profile-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.public-profile .profile-actions .btn { flex: 0 1 auto; }

/* ===== Order card: demo + estado ===== */
.order-card__title {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.order-card--demo {
  border: 1px dashed var(--color-warning);
  position: relative;
  background: linear-gradient(180deg, rgba(250,204,21,0.04), transparent 70%), var(--bg-surface);
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  .promo-bar,
  .product-card__discount,
  .hero__brand-img,
  .hero__glow--red,
  .hero__glow--gold {
    animation: none !important;
  }
}

/* ===== Saved address card en carrito ===== */
.saved-address {
  background: var(--bg-surface);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.saved-address__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.saved-address__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.saved-address__name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.saved-address__line {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}
.saved-address__refs {
  font-size: 0.85rem;
  color: var(--color-text-dim);
  font-style: italic;
}

/* ===== Perfil: textarea de referencias más grande ===== */
.profile-form__references {
  min-height: 110px;
  resize: vertical;
}

/* ===== Field optional badge: que no rompa la fila ===== */
.field__optional {
  font-size: 0.7em;
  letter-spacing: 0.04em;
  text-transform: none;
  font-weight: 400;
  color: var(--color-text-dim);
  margin-left: 4px;
}

/* ===== Search overlay ===== */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 5, 0.92);
  z-index: var(--z-drawer);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--tr), visibility var(--tr);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 16px 16px;
}
.search-overlay.is-open {
  opacity: 1;
  visibility: visible;
}
.search-overlay__panel {
  width: 100%;
  max-width: 640px;
  background: #0a0a0a;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 90px);
}
.search-overlay__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
}
.search-overlay__icon {
  display: inline-flex;
  color: var(--color-text-muted);
  width: 22px;
  height: 22px;
}
.search-overlay__icon svg { width: 22px; height: 22px; }
.search-overlay__input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--color-text);
  font-size: 1rem;
  padding: 8px 4px;
  outline: none;
}
.search-overlay__input::placeholder {
  color: var(--color-text-dim);
}
.search-overlay__results {
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.search-overlay__hint,
.search-overlay__empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.92rem;
}
.search-overlay__item {
  display: flex;
  gap: 12px;
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: var(--bg-surface);
  align-items: center;
  transition: border-color var(--tr), background var(--tr), transform var(--tr);
  text-decoration: none;
  color: var(--color-text);
}
.search-overlay__item:hover {
  border-color: var(--color-red);
  background: var(--bg-surface-hover);
  transform: translateX(2px);
}
.search-overlay__thumb {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-overlay__thumb img {
  width: 90%;
  height: 90%;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.6));
}
.search-overlay__meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.search-overlay__name {
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-overlay__sub {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.search-overlay__flavor {
  background: rgba(225, 29, 44, 0.14);
  color: var(--color-red-bright);
  border: 1px solid rgba(225, 29, 44, 0.4);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}
.search-overlay__price {
  font-family: var(--font-accent);
  font-size: 0.92rem;
  color: var(--color-gold-bright);
  letter-spacing: 0.04em;
}
