/* Event pages (11.11, Black Friday, Navidad...), the home event band and the event link on product pages. 2.29.0 */
.article-page--event, .home-event { --event-accent: var(--pink); --event-hot: #fff6fa; }
.article-page--event { padding-bottom: 32px; }
.article-page--event .event-section { margin-top: 34px; }
.article-page--event h2 { margin: 0 0 4px; font-size: clamp(20px, 2.2vw, 24px); line-height: 1.25; }
.event-section__sub { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.event-section__note { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.event-section__header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.event-section__header > a { flex: none; margin-bottom: 14px; color: var(--orange-dark); font-weight: 750; font-size: 14px; }

/* Hero */
.event-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 1fr); gap: 24px; align-items: center; margin-top: 10px; padding: 28px; overflow: hidden; border-radius: 20px; color: #fff; background: linear-gradient(120deg, #1b1340, #4b0f3a 55%, #c2410c); isolation: isolate; }
.event-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--event-image, none) center / cover no-repeat; opacity: .22; }
.event-hero__labels { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.event-hero__labels .store-badge { color: #fff; background: #ffffff22; }
.event-status { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border: 1px solid #ffffff55; border-radius: 99px; background: #ffffff1f; font-size: 12px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.event-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; }
.event-status.is-active::before { background: #4ade80; box-shadow: 0 0 0 3px #4ade8044; }
.event-status.is-upcoming::before { background: #fbbf24; }
.event-hero h1 { margin: 12px 0 8px; color: #fff; font-size: clamp(26px, 3.4vw, 38px); line-height: 1.1; }
.event-hero__lead { margin: 0; color: #ffe9dc; font-size: 16px; line-height: 1.55; }
.event-hero__lead strong { color: #fff; }
.event-hero__scope { margin: 8px 0 0; color: #ffd9c4; font-size: 12px; }
.event-countdown { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; margin-top: 18px; }
.event-countdown__label { flex-basis: 100%; margin: 0; color: #ffd9c4; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.event-countdown > div { min-width: 66px; padding: 8px 12px; border-radius: 10px; background: #ffffff1a; text-align: center; }
.event-countdown strong { display: block; font-size: 24px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.event-countdown small { color: #ffd9c4; font-size: 11px; }
.event-hero__card { padding: 18px; border-radius: 16px; background: var(--white); color: var(--ink); box-shadow: 0 18px 40px #0003; }
.event-hero__eyebrow { margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.event-hero__big { margin: 2px 0; font-size: clamp(26px, 3vw, 32px); font-weight: 850; line-height: 1.15; }
.event-hero__small { margin: 0; color: var(--muted); font-size: 13px; }
.event-hero__code { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin: 12px 0 0; padding: 8px 8px 8px 12px; border: 1.5px dashed #f0a35e; border-radius: 10px; background: #fffaf4; }
.event-hero__code strong { font-family: ui-monospace, Consolas, monospace; font-size: 16px; letter-spacing: .05em; color: var(--orange-dark); }
.event-hero__code .button { min-height: 34px; padding: 6px 12px; font-size: 13px; }
.event-progress { height: 7px; margin-top: 14px; overflow: hidden; border-radius: 99px; background: #eef1f6; }
.event-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--pink), var(--orange)); }
.event-progress__dates { display: flex; justify-content: space-between; margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.event-hero__cta { display: flex; justify-content: center; gap: 6px; width: 100%; margin-top: 14px; }
.event-hero__ad, .event-hero__ended { margin: 6px 0 0; color: var(--muted); font-size: 11px; text-align: center; }
.event-hero__ended { font-size: 13px; }
.article-page--event.is-ended .event-hero { background: linear-gradient(120deg, #334155, #475569); }

/* Codes */
.event-codes__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.event-code { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; padding: 12px 14px; border: 1.5px dashed #f0a35e; border-radius: 12px; background: var(--white); }
.event-code > span { grid-column: 1; }
.event-code__off { color: var(--orange-dark); font-size: 22px; font-weight: 850; line-height: 1.1; }
.event-code__min { color: var(--muted); font-size: 13px; }
.event-code__min em { color: var(--event-accent); font-style: normal; font-weight: 700; }
.event-code__code { font-family: ui-monospace, Consolas, monospace; font-size: 14px; font-weight: 800; letter-spacing: .04em; overflow-wrap: anywhere; }
.event-code__code small { font-weight: 600; color: var(--muted); letter-spacing: 0; }
.event-code__copy.button { grid-column: 2; grid-row: 1 / span 3; min-height: 34px; padding: 6px 12px; font-size: 13px; }
.event-code.is-limited { border-style: solid; border-color: var(--event-accent); background: var(--event-hot); }
.event-code.is-limited:not(.is-available) { opacity: .78; }
.event-codes__more { display: none; margin: 10px auto 0; padding: 6px 10px; border: 0; background: none; color: var(--orange-dark); font-weight: 750; cursor: pointer; }
.event-codes--manual table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 12px; overflow: hidden; }
.event-codes--manual th, .event-codes--manual td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 14px; }

/* Timeline (the guide's "Fechas clave" list) */
.event-timeline ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin: 12px 0 0; padding: 18px 16px 14px; list-style: none; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.event-timeline li { position: relative; padding: 24px 12px 0 0; font-size: 13.5px; color: var(--muted); }
.event-timeline li::before { content: ""; position: absolute; top: 6px; left: 0; right: 0; height: 3px; background: #eef1f6; }
.event-timeline li::after { content: ""; position: absolute; top: 0; left: 0; width: 15px; height: 15px; border: 3px solid #cbd3df; border-radius: 50%; background: var(--white); }
.event-timeline li strong { display: block; color: var(--ink); }
.event-timeline li.is-now::after { border-color: var(--event-accent); background: var(--event-accent); box-shadow: 0 0 0 4px #e7138233; }
.event-timeline li.is-past { opacity: .6; }

/* Products */
.event-products .offer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.event-products .offer-card { position: relative; }
.event-card-badge { position: absolute; top: 40px; left: 10px; z-index: 3; padding: 3px 8px; border-radius: 6px; background: var(--pink); color: #fff; font-size: 11px; font-weight: 850; line-height: 1.3; pointer-events: none; }
.event-card-coupon { margin: 0 0 8px; color: var(--green); font-size: 12.5px; font-weight: 750; }

/* Guide */
.event-guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.event-box { padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--white); }
.event-box h2 { font-size: 19px; }
.event-box ul { margin: 8px 0 0; padding: 0; list-style: none; }
.event-box li { padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.event-box li:first-child { border-top: 0; }
.event-box .rank-math-faq-item, .event-box .rank-math-list-item { border-top: 1px solid var(--line); }
.event-box .rank-math-faq-item:first-child, .event-box .rank-math-list-item:first-child { border-top: 0; }
.event-box .rank-math-answer p { margin: 0; }
.event-box .rank-math-question { position: relative; margin: 0; padding: 11px 26px 11px 0; font-size: 15px; cursor: pointer; }
.event-box .rank-math-question::after { content: "+"; position: absolute; right: 2px; top: 9px; color: var(--orange-dark); font-size: 18px; }
.event-box .is-open .rank-math-question::after { content: "–"; }
.event-box.is-interactive .rank-math-faq-item:not(.is-open) .rank-math-answer, .event-box.is-interactive .rank-math-list-item:not(.is-open) .rank-math-answer { display: none; }
.event-box .rank-math-answer { padding: 0 0 12px; color: var(--muted); font-size: 14px; }
.event-guide__more { margin: 14px 0 0; color: var(--muted); font-size: 14px; }
.event-guide__more a { color: var(--orange-dark); font-weight: 700; }


/* Home band */
.home-event { margin: 18px 0 8px; }
.home-event__band { margin-top: 0; }
.home-event__title { margin: 12px 0 8px; font-size: clamp(25px, 3vw, 34px); line-height: 1.12; }
.home-event__title a { color: #fff; }
.home-event__actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
.home-event__primary.button { background: #fff; color: var(--orange-dark); border-color: #fff; font-weight: 850; }
.home-event__secondary.button { background: transparent; color: #fff; border: 1px solid #ffffff88; }
.home-event__codes { padding: 14px 16px; }
.home-event__codes-title { margin: 0 0 6px; font-size: 14px; font-weight: 800; }
.home-event__code { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.home-event__code:first-of-type { border-top: 0; }
.home-event__off { color: var(--orange-dark); font-size: 19px; font-weight: 850; }
.home-event__code.is-limited .home-event__off { color: var(--event-accent); }
.home-event__code strong { display: block; font-family: ui-monospace, Consolas, monospace; font-size: 13.5px; letter-spacing: .04em; }
.home-event__code small { display: block; color: var(--muted); font-size: 12px; }
.home-event__code .button { min-height: 32px; padding: 5px 11px; font-size: 12.5px; }
.home-event__all { display: block; margin-top: 8px; color: var(--orange-dark); font-size: 13px; font-weight: 800; text-align: center; }
.home-event__others { display: grid; gap: 8px; margin-top: 10px; }
.home-event__others a { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); font-size: 14px; }
.home-event__others a > span:last-child { margin-left: auto; color: var(--orange-dark); font-weight: 800; }
.home-event__tag { padding: 2px 9px; border-radius: 99px; background: #fff4e5; color: #9a4b00; font-size: 12px; font-weight: 800; }
.home-event__tag.is-active { background: #fff1f6; color: var(--pink); }
.home-event__when { color: var(--muted); font-size: 13px; }
.home-event__products { margin-top: 22px; }
.home-event__products h2 { margin: 0 0 4px; font-size: clamp(20px, 2.2vw, 24px); }
.home-event__products .offer-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }

/* Next events */
.event-next__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 12px; }
.event-next__grid a { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.event-next__grid small { display: block; color: var(--muted); font-size: 12px; }
.event-next__grid strong { font-size: 15px; }

/* Sticky bar (mobile) */
.event-sticky { display: none; }

/* Menu and product page */
.site-nav__event { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 99px; background: #fff1f6; color: var(--pink) !important; }
.site-nav__event span { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.product-event-link { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 0; padding: 6px 12px 6px 6px; border-radius: 99px; background: #fff1f6; color: var(--ink); font-size: 13.5px; font-weight: 650; }
.product-event-link__badge { padding: 2px 8px; border-radius: 99px; background: var(--pink); color: #fff; font-size: 12px; font-weight: 850; }

@media (max-width: 980px) {
  .home-event__products .offer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-event__products .offer-grid > :nth-child(n+5) { display: none; }
  .event-hero { grid-template-columns: minmax(0, 1fr); padding: 20px; }
  .event-codes__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event-products .offer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .event-guide-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .article-page--event.has-event-codes, body.home:has(.home-event .event-sticky) { padding-bottom: 84px; }
  .home-event__actions .button { width: 100%; justify-content: center; }
  .event-codes__grid { grid-template-columns: minmax(0, 1fr); }
  .event-codes__grid:not(.is-expanded) > .event-code:nth-child(n+5) { display: none; }
  .event-codes__more { display: block; }
  .event-section__header { display: block; }
  .event-section__header > a { display: inline-block; margin: 0 0 12px; }
  .event-timeline ul { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .event-timeline li { padding: 0 0 0 28px; }
  .event-timeline li::before { display: none; }
  .event-timeline li::after { top: 2px; }
  .event-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; display: flex; gap: 12px; align-items: center; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--white); box-shadow: 0 -6px 18px #20272c14; }
  .event-sticky > div { display: flex; flex: 1; flex-direction: column; min-width: 0; font-size: 12px; color: var(--muted); }
  .event-sticky strong { color: var(--ink); font-size: 15px; }
  .event-sticky .button { flex: none; }
}

html[data-color-mode="dark"] .event-hero__code { background: #2f2826; }
html[data-color-mode="dark"] .article-page--event { --event-hot: #33212b; }
html[data-color-mode="dark"] .event-progress, html[data-color-mode="dark"] .event-timeline li::before { background: #3a4654; }
html[data-color-mode="dark"] .site-nav__event, html[data-color-mode="dark"] .product-event-link { background: #3a2230; }
