/* ACED Perú — custom styles & image placeholders */

:root {
  --aced-stripe-a: #edecf3;
  --aced-stripe-b: #f6f5fa;
  --aced-ph-ink: #9a96a3;
}

html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

/* ---- Image placeholder (user drops real images later) ---- */
.ph {
  position: relative;
  overflow: hidden;
  background-color: var(--aced-stripe-b);
  background-image: repeating-linear-gradient(
    135deg,
    var(--aced-stripe-a) 0 8px,
    var(--aced-stripe-b) 8px 18px
  );
  display: flex;
  align-items: center;
  justify-content: center;
}
.ph::after {
  content: attr(data-label);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--aced-ph-ink);
  text-align: center;
  padding: 0 14px;
  max-width: 90%;
  line-height: 1.5;
}
.ph--dark {
  --aced-stripe-a: #1c1c1f;
  --aced-stripe-b: #232327;
  --aced-ph-ink: #6f6f76;
}

/* play button overlay for video placeholders */
.ph-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.ph-play > span {
  width: 76px;
  height: 76px;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ph-play > span::before {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent #fff;
  margin-left: 5px;
}

/* ---- Wordmark logo ---- */
.aced-logo { display: inline-flex; align-items: center; gap: 9px; }
.aced-logo__img {
  width: 42px; height: 42px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}
.aced-logo__type {
  font-weight: 500; font-size: 18px; letter-spacing: -0.01em; color: #000;
  line-height: 1; white-space: nowrap;
}
.aced-logo__type strong { font-weight: 600; }
.aced-flag {
  width: 22px; height: 15px; flex-shrink: 0; border-radius: 2px;
  background: linear-gradient(90deg, #D91023 0 33.33%, #fff 33.33% 66.66%, #D91023 66.66% 100%);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
}

/* ---- Helpers ---- */
.nav-link { position: relative; }
.nav-link.is-active { color: #000; font-weight: 600; }
.nav-link.is-active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -22px; height: 2px; background: #000;
}

.card-hover { transition: border-color .2s ease, transform .2s ease; }
.card-hover:hover { border-color: #cfc4c5; transform: translateY(-2px); }

.btn-press { transition: opacity .18s ease, transform .12s ease; }
.btn-press:active { transform: scale(0.985); }

/* fade-up reveal */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* input focus ring matching DS (1px black on focus) */
.field {
  width: 100%;
  background: #fff;
  border: 1px solid #cfc4c5;
  border-radius: 0.375rem;
  padding: 12px 14px;
  font-size: 1rem;
  color: #1a1b1f;
  transition: border-color .15s ease, box-shadow .15s ease;
  appearance: none;
}
.field::placeholder { color: #a8a3ab; }
.field:focus { outline: none; border-color: #000; box-shadow: 0 0 0 1px #000; }
.field.invalid { border-color: #ba1a1a; box-shadow: 0 0 0 1px #ba1a1a; }
.field-label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; color: #1a1b1f; text-transform: uppercase; margin-bottom: 7px; display: block; }
.field-error { color: #ba1a1a; font-size: 0.8125rem; margin-top: 6px; display: none; }
.field-error.show { display: block; }

/* mobile menu */
.mobile-menu { transition: opacity .25s ease, visibility .25s ease; }

/* hide scrollbar on filter row */
.no-sb::-webkit-scrollbar { display: none; }
.no-sb { -ms-overflow-style: none; scrollbar-width: none; }

/* ---- Hero carousel ---- */
.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .7s ease;
  pointer-events: none;
}
.carousel-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 42px; height: 42px;
  border-radius: 9999px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(4px);
  color: #1a1b1f;
  display: grid; place-items: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
  opacity: 0;
  transition: opacity .25s ease, background .15s ease;
  cursor: pointer;
}
#hero-carousel:hover .carousel-arrow { opacity: 1; }
.carousel-arrow:hover { background: #fff; }
.carousel-dot {
  width: 8px; height: 8px;
  border-radius: 9999px;
  background: rgba(255,255,255,0.55);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.12);
  cursor: pointer;
  transition: width .25s ease, background .25s ease;
}
.carousel-dot.is-on { width: 22px; background: #fff; }
@media (max-width: 640px) { .carousel-arrow { opacity: 1; width: 36px; height: 36px; } }

/* image-slot empty state -> striped placeholder look (matches design) */
image-slot:not([data-filled]) {
  background-color: #f6f5fa;
  background-image: repeating-linear-gradient(135deg, #edecf3 0 8px, #f6f5fa 8px 18px);
  border-radius: 10px;
  overflow: hidden;
}

/* ---- Botón flotante de WhatsApp (sigue al visitante) ---- */
#wa-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 70;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 56px;
  height: 56px;
  border-radius: 9999px;
  background: #1a1b1f;
  color: #fff;
  box-shadow: 0 10px 28px rgba(0,0,0,0.28);
  transition: transform .15s ease, opacity .25s ease, visibility .25s ease;
}
#wa-fab:hover { transform: translateY(-2px); }
#wa-fab:active { transform: scale(0.96); }
#wa-fab .wa-fab__label { display: none; }
#wa-fab.wa-fab--hidden { opacity: 0; visibility: hidden; transform: translateY(12px); pointer-events: none; }
/* en pantallas grandes: pastilla con texto */
@media (min-width: 768px) {
  #wa-fab {
    right: 22px;
    bottom: 22px;
    width: auto;
    height: auto;
    padding: 13px 20px;
  }
  #wa-fab .wa-fab__label { display: inline; font-weight: 600; font-size: 15px; letter-spacing: .01em; white-space: nowrap; }
}

/* ---- Temporizador de oferta (10% por tiempo limitado) ---- */
#promo-timer {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 75;
  width: 250px;
  max-width: calc(100vw - 32px);
  background: #1a1b1f;
  color: #fff;
  border-radius: 16px;
  padding: 16px 16px 15px;
  box-shadow: 0 14px 36px rgba(0,0,0,0.32);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .3s ease, transform .3s ease;
}
#promo-timer.promo-timer--in { opacity: 1; transform: none; }
#promo-timer.promo-timer--hidden { opacity: 0; visibility: hidden; transform: translateY(14px); pointer-events: none; }
#promo-timer-x {
  position: absolute; top: 9px; right: 9px;
  width: 26px; height: 26px; border-radius: 9999px;
  display: grid; place-items: center;
  color: rgba(255,255,255,.6); background: rgba(255,255,255,.08);
  transition: background .15s ease, color .15s ease;
}
#promo-timer-x:hover { background: rgba(255,255,255,.16); color: #fff; }
.promo-timer__top { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; padding-right: 22px; }
.promo-timer__badge {
  flex-shrink: 0;
  background: #79ff5b; color: #0c5a13;
  font-weight: 700; font-size: 15px; letter-spacing: -.02em;
  padding: 7px 9px; border-radius: 9px;
}
.promo-timer__title { font-size: 14.5px; font-weight: 600; line-height: 1.2; }
.promo-timer__sub { font-size: 11.5px; color: rgba(255,255,255,.55); margin-top: 2px; line-height: 1.3; }
.promo-timer__clock {
  display: flex; align-items: center; justify-content: center; gap: 2px;
  font-variant-numeric: tabular-nums;
  font-weight: 700; font-size: 30px; letter-spacing: .02em;
  background: rgba(255,255,255,.07); border-radius: 10px;
  padding: 8px 0; margin-bottom: 13px;
}
.promo-timer__clock span { min-width: 38px; text-align: center; }
.promo-timer__colon { min-width: 0 !important; color: rgba(255,255,255,.5); }
.promo-timer__cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; background: #fff; color: #1a1b1f;
  font-weight: 600; font-size: 14px;
  padding: 12px; border-radius: 10px;
  transition: opacity .15s ease, transform .12s ease;
}
.promo-timer__cta:hover { opacity: .9; }
.promo-timer__cta:active { transform: scale(.98); }
#promo-timer.promo-timer--ended .promo-timer__clock { color: #ff8a8a; }
@media (max-width: 767px) {
  /* Versión compacta: barra delgada horizontal, poco intrusiva */
  #promo-timer {
    left: 8px; right: 8px; bottom: 8px;
    width: auto; max-width: none;
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px;
    border-radius: 12px;
  }
  #promo-timer-x {
    position: static; order: 5;
    width: 22px; height: 22px;
    margin-left: 2px;
  }
  /* badge -10% a la izquierda */
  .promo-timer__top {
    margin-bottom: 0; padding-right: 0;
    gap: 8px; flex-shrink: 0;
  }
  .promo-timer__badge { font-size: 13px; padding: 5px 7px; border-radius: 7px; }
  /* ocultar título/subtítulo en la versión barra */
  .promo-timer__top > div { display: none; }
  /* reloj compacto en línea */
  .promo-timer__clock {
    margin-bottom: 0; padding: 5px 8px;
    font-size: 19px; border-radius: 8px;
    flex-shrink: 0;
  }
  .promo-timer__clock span { min-width: 24px; }
  /* botón flexible que ocupa el resto */
  .promo-timer__cta {
    flex: 1; min-width: 0;
    padding: 9px 10px; font-size: 13px;
    white-space: nowrap;
  }
  .promo-timer__cta svg { display: none; }
}

/* ---- Carrito (drawer) ---- */
#cart-btn.cart-bump { animation: cartBump .4s ease; }
@keyframes cartBump { 0%,100%{transform:none;} 30%{transform:scale(1.18);} 60%{transform:scale(.94);} }
.cart-drawer { position: fixed; inset: 0; z-index: 110; }
.cart-drawer[hidden] { display: none; }
.cart-drawer__backdrop { position: absolute; inset: 0; background: rgba(15,14,20,.5); opacity: 0; transition: opacity .3s ease; }
.cart-drawer.is-open .cart-drawer__backdrop { opacity: 1; }
.cart-drawer__panel {
  position: absolute; top: 0; right: 0; height: 100%;
  width: 420px; max-width: 92vw;
  background: #fff; display: flex; flex-direction: column;
  box-shadow: -12px 0 40px rgba(0,0,0,.18);
  transform: translateX(100%); transition: transform .32s cubic-bezier(.2,.7,.3,1);
}
.cart-drawer.is-open .cart-drawer__panel { transform: none; }
.cart-drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 20px; border-bottom: 1px solid #e9e7ed; }
.cart-drawer__x { width: 38px; height: 38px; border-radius: 9999px; display: grid; place-items: center; color: #1a1b1f; background: #f4f3f8; transition: background .15s ease; }
.cart-drawer__x:hover { background: #e9e7ed; }
.cart-drawer__body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.cart-drawer__foot { padding: 16px 20px 20px; border-top: 1px solid #e9e7ed; background: #faf8fe; }
.cart-empty { text-align: center; padding: 40px 10px; display: flex; flex-direction: column; align-items: center; }
.cart-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid #eeedf3; }
.cart-item__thumb { flex-shrink: 0; width: 60px; height: 60px; border-radius: 10px; background: #f4f3f8; display: grid; place-items: center; overflow: hidden; font-size: 26px; }
.cart-item__thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item__info { flex: 1; min-width: 0; }
.cart-item__del { flex-shrink: 0; width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; color: #7e7576; transition: background .15s ease, color .15s ease; }
.cart-item__del:hover { background: #ffdad6; color: #ba1a1a; }
.cart-prizes { margin-top: 18px; background: #f6fff2; border: 1px solid #c9f0bd; border-radius: 14px; padding: 14px 16px; }
.cart-prizes__title { font-size: 14px; font-weight: 700; color: #0c5a13; display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }
.cart-prizes__star { color: #1fbf2f; }
.cart-prizes__note { font-size: 12.5px; color: #4c4546; margin-bottom: 8px; }
.cart-prize { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid #d8f0cd; }
.cart-prize:first-of-type { border-top: 0; }
.cart-prize.is-locked { opacity: .65; }
.cart-prize__emoji { font-size: 26px; flex-shrink: 0; }
.cart-prize__info { flex: 1; min-width: 0; }
.cart-prize__btn { flex-shrink: 0; background: #1a1b1f; color: #fff; font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 8px; transition: opacity .15s ease; }
.cart-prize__btn:hover { opacity: .85; }
.cart-prize__btn.is-added { background: #1fbf2f; }
.cart-prize__lock { flex-shrink: 0; color: #7e7576; }
.cart-total { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cart-checkout { width: 100%; display: flex; align-items: center; justify-content: center; gap: 9px; background: #25D366; color: #fff; font-weight: 700; font-size: 15px; padding: 15px; border-radius: 12px; transition: opacity .15s ease, transform .12s ease; }
.cart-checkout:hover { opacity: .92; }
.cart-checkout:active { transform: scale(.99); }
.cart-checkout:disabled { background: #cfc4c5; cursor: not-allowed; }

