/* Empanada Store · constructor independiente de combos */
:root {
  --combo-blue: #315efb;
  --combo-violet: #7c3aed;
  --combo-orange: #f59e0b;
  --combo-green: #16a34a;
  --combo-ink: #111827;
  --combo-copy: #475569;
  --combo-muted: #64748b;
  --combo-line: #dce3ee;
  --combo-surface: #fff;
  --combo-soft: #f6f8fc;
}

html.dark {
  --combo-ink: #f8fafc;
  --combo-copy: #dbe4f0;
  --combo-muted: #aebdd0;
  --combo-line: rgba(255, 255, 255, .13);
  --combo-surface: #0d1728;
  --combo-soft: #111f33;
}

.es-combo-section {
  position: relative;
  padding: clamp(72px, 8vw, 112px) 0;
  overflow: clip;
  scroll-margin-top: 8px;
  background:
    radial-gradient(circle at 8% 12%, rgba(49, 94, 251, .13), transparent 28%),
    radial-gradient(circle at 92% 84%, rgba(245, 158, 11, .12), transparent 28%),
    linear-gradient(180deg, #f7f9fd, #eef3fb);
}

html.dark .es-combo-section {
  background:
    radial-gradient(circle at 8% 12%, rgba(96, 165, 250, .15), transparent 28%),
    radial-gradient(circle at 92% 84%, rgba(245, 158, 11, .11), transparent 30%),
    linear-gradient(180deg, #08111f, #0a1425);
}

.es-combo-section::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .35;
  pointer-events: none;
  background-image:
    linear-gradient(var(--combo-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--combo-line) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 84%, transparent);
}

.es-combo-header {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin-bottom: 38px;
}

.es-combo-kicker {
  display: inline-flex;
  min-height: 34px;
  padding: 7px 12px;
  align-items: center;
  gap: 8px;
  color: var(--combo-blue);
  border: 1px solid color-mix(in srgb, var(--combo-blue) 28%, var(--combo-line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--combo-blue) 7%, var(--combo-surface));
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.es-combo-header h2 {
  margin: 16px 0 12px;
  color: var(--combo-ink);
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: clamp(2.45rem, 5.7vw, 4.7rem);
  font-weight: 750;
  line-height: .98;
  letter-spacing: -.055em;
}

.es-combo-header h2 span {
  color: transparent;
  background: linear-gradient(110deg, var(--combo-blue), var(--combo-violet), var(--combo-orange));
  background-clip: text;
  -webkit-background-clip: text;
}

.es-combo-header__lead {
  max-width: 820px;
  margin: 0;
  color: var(--combo-copy);
  font-size: clamp(1.05rem, 1rem + .28vw, 1.24rem);
  font-weight: 700;
  line-height: 1.62;
}

.es-combo-header__note {
  margin: 9px 0 0;
  color: var(--combo-muted);
  font-size: 15px;
  font-weight: 650;
}

.es-combo-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(350px, .75fr);
  gap: clamp(22px, 3vw, 42px);
  align-items: start;
}

.es-combo-layout > * { min-width: 0; max-width: 100%; }

.es-combo-picker,
.es-combo-summary {
  border: 1px solid var(--combo-line);
  border-radius: 30px;
  background: color-mix(in srgb, var(--combo-surface) 94%, transparent);
  box-shadow: 0 24px 70px rgba(25, 43, 78, .11);
  backdrop-filter: blur(18px);
}

.es-combo-picker { padding: clamp(18px, 2.5vw, 30px); }

.es-combo-controls {
  display: flex;
  margin-bottom: 22px;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.es-combo-controls__title h3,
.es-combo-summary h3 {
  margin: 0;
  color: var(--combo-ink);
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: clamp(1.35rem, 2vw, 1.7rem);
  font-weight: 750;
  letter-spacing: -.035em;
}

.es-combo-controls__title p {
  margin: 5px 0 0;
  color: var(--combo-muted);
  font-size: 14px;
  font-weight: 650;
}

.es-combo-search {
  position: relative;
  width: min(300px, 100%);
}

.es-combo-search i {
  position: absolute;
  top: 50%;
  left: 15px;
  color: var(--combo-muted);
  transform: translateY(-50%);
}

.es-combo-search input {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px 11px 43px;
  color: var(--combo-ink);
  border: 1px solid var(--combo-line);
  border-radius: 14px;
  outline: none;
  background: var(--combo-soft);
  font: inherit;
  font-size: 16px;
  font-weight: 650;
}

.es-combo-search input:focus-visible {
  border-color: var(--combo-blue);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--combo-blue) 16%, transparent);
}

.es-combo-filters {
  display: flex;
  margin-bottom: 20px;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.es-combo-filters::-webkit-scrollbar { display: none; }

.es-combo-filter {
  min-height: 44px;
  padding: 9px 14px;
  flex: 0 0 auto;
  color: var(--combo-copy);
  border: 1px solid var(--combo-line);
  border-radius: 999px;
  background: var(--combo-soft);
  font: inherit;
  font-size: 14px;
  font-weight: 850;
  cursor: pointer;
}

.es-combo-filter.is-active {
  color: #fff;
  border-color: var(--combo-blue);
  background: var(--combo-blue);
  box-shadow: 0 8px 20px rgba(49, 94, 251, .22);
}

.es-combo-products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.es-combo-product {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 114px;
  grid-template-columns: 72px minmax(0, 1fr) 34px;
  padding: 13px;
  align-items: center;
  gap: 12px;
  color: var(--combo-ink);
  border: 1px solid var(--combo-line);
  border-radius: 20px;
  background: var(--combo-surface);
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.es-combo-product:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--combo-blue) 42%, var(--combo-line));
  box-shadow: 0 12px 28px rgba(25, 43, 78, .10);
  transform: translateY(-2px);
}

.es-combo-product.is-selected {
  border-color: var(--combo-blue);
  background: color-mix(in srgb, var(--combo-blue) 7%, var(--combo-surface));
  box-shadow: 0 10px 28px rgba(49, 94, 251, .14), inset 0 0 0 1px var(--combo-blue);
}

.es-combo-product:disabled { cursor: not-allowed; opacity: .48; }

.es-combo-product:focus-visible,
.es-combo-filter:focus-visible,
.es-combo-spin:focus-visible,
.es-combo-cta:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--combo-blue) 55%, transparent);
  outline-offset: 3px;
}

.es-combo-product__visual {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--combo-line);
  border-radius: 16px;
  background: #fff;
}

.es-combo-product__visual img { width: 100%; height: 100%; object-fit: cover; }
.es-combo-product__copy { display: block; min-width: 0; }

.es-combo-product__copy strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--combo-ink);
  font-size: 15px;
  font-weight: 850;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.es-combo-product__copy small {
  display: block;
  margin-top: 4px;
  color: var(--combo-muted);
  font-size: 12px;
  font-weight: 750;
}

.es-combo-product__copy b {
  display: block;
  margin-top: 6px;
  color: var(--combo-blue);
  font-size: 16px;
  font-weight: 900;
}

.es-combo-product__copy em { color: var(--combo-muted); font-size: 12px; font-style: normal; font-weight: 700; }

.es-combo-product__margin {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 7px;
  color: #9a5b00;
  border-radius: 999px;
  background: #fff4d6;
  font-size: 12px;
  font-weight: 850;
}

html.dark .es-combo-product__margin { color: #fcd98d; background: rgba(180, 83, 9, .24); }

.es-combo-product__check {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: var(--combo-blue);
  border: 1px solid color-mix(in srgb, var(--combo-blue) 34%, var(--combo-line));
  border-radius: 50%;
  background: color-mix(in srgb, var(--combo-blue) 8%, var(--combo-surface));
  font-size: 18px;
  font-weight: 950;
}

.is-selected .es-combo-product__check { color: #fff; background: var(--combo-blue); }

.es-combo-empty-search {
  grid-column: 1 / -1;
  margin: 0;
  padding: 28px;
  color: var(--combo-muted);
  border: 1px dashed var(--combo-line);
  border-radius: 18px;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
}

.es-combo-summary {
  position: relative;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.es-combo-summary__top { padding: 24px 24px 20px; border-bottom: 1px solid var(--combo-line); }

.es-combo-summary__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.es-combo-count {
  flex: 0 0 auto;
  padding: 6px 10px;
  color: var(--combo-blue);
  border-radius: 999px;
  background: color-mix(in srgb, var(--combo-blue) 9%, var(--combo-surface));
  font-size: 13px;
  font-weight: 900;
}

.es-combo-state {
  min-height: 46px;
  margin: 12px 0 0;
  color: var(--combo-copy);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

.es-combo-selected {
  display: grid;
  max-height: 220px;
  margin: 17px 0 0;
  padding: 0;
  gap: 8px;
  overflow: auto;
  list-style: none;
}

.es-combo-selected li { display: flex; align-items: start; justify-content: space-between; gap: 14px; color: var(--combo-copy); font-size: 14px; font-weight: 700; }
.es-combo-selected li span { min-width: 0; }
.es-combo-selected li strong { flex: 0 0 auto; color: var(--combo-ink); }
.es-combo-selected .es-combo-selection-empty { color: var(--combo-muted); font-weight: 650; }

.es-combo-totals { display: grid; padding: 20px 24px; gap: 10px; background: var(--combo-soft); }
.es-combo-total-row { display: flex; justify-content: space-between; gap: 16px; color: var(--combo-copy); font-size: 14px; font-weight: 700; }
.es-combo-total-row strong { color: var(--combo-ink); }
.es-combo-total-row--final { margin-top: 3px; padding-top: 14px; align-items: end; border-top: 1px solid var(--combo-line); font-size: 16px; font-weight: 900; }
.es-combo-total-row--final strong { color: var(--combo-blue); font-family: "Space Grotesk", sans-serif; font-size: 1.75rem; letter-spacing: -.04em; }

.es-combo-savings {
  margin: 0;
  padding: 11px 13px;
  color: #087443;
  border: 1px solid color-mix(in srgb, var(--combo-green) 22%, var(--combo-line));
  border-radius: 13px;
  background: color-mix(in srgb, var(--combo-green) 7%, var(--combo-surface));
  font-size: 14px;
  font-weight: 850;
  text-align: center;
}

html.dark .es-combo-savings { color: #7cebb3; }

.es-combo-margin-note {
  margin: 0;
  padding: 0 24px 18px;
  color: #8a5a0a;
  background: var(--combo-soft);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

html.dark .es-combo-margin-note { color: #f5cb7a; }

.es-combo-roulette { position: relative; padding: 24px; border-top: 1px solid var(--combo-line); }
.es-combo-roulette h4 { margin: 0; color: var(--combo-ink); font-size: 19px; font-weight: 900; }
.es-combo-roulette > p { margin: 6px 0 18px; color: var(--combo-muted); font-size: 14px; font-weight: 650; line-height: 1.5; }

.es-combo-roulette__stage {
  position: relative;
  display: grid;
  min-height: 214px;
  grid-template-columns: 174px minmax(84px, 1fr);
  align-items: center;
  gap: 8px;
}

.es-combo-wheel-wrap { position: relative; width: 174px; height: 174px; }
.es-combo-pointer {
  position: absolute;
  z-index: 3;
  top: -10px;
  left: 50%;
  width: 0;
  height: 0;
  border-right: 12px solid transparent;
  border-left: 12px solid transparent;
  border-top: 25px solid var(--combo-ink);
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .18));
  transform: translateX(-50%);
}

.es-combo-wheel {
  position: relative;
  width: 174px;
  height: 174px;
  border: 8px solid var(--combo-surface);
  border-radius: 50%;
  background: conic-gradient(
    #315efb 0 60deg,
    #f59e0b 60deg 120deg,
    #7c3aed 120deg 180deg,
    #0ea5e9 180deg 240deg,
    #16a34a 240deg 300deg,
    #ef7c31 300deg 360deg
  );
  box-shadow: 0 0 0 1px var(--combo-line), 0 16px 35px rgba(25, 43, 78, .18);
  transition: transform 2.2s cubic-bezier(.12, .72, .12, 1);
}

.es-combo-wheel::before { content: ""; position: absolute; inset: 41%; border: 5px solid var(--combo-surface); border-radius: 50%; background: var(--combo-ink); }
.es-combo-wheel span { position: absolute; left: 50%; top: 50%; color: #fff; font-size: 11px; font-weight: 950; text-shadow: 0 1px 4px rgba(0,0,0,.4); }
.es-combo-wheel span:nth-child(1) { transform: translate(-50%, -50%) rotate(30deg) translateY(-61px) rotate(-30deg); }
.es-combo-wheel span:nth-child(2) { transform: translate(-50%, -50%) rotate(90deg) translateY(-61px) rotate(-90deg); }
.es-combo-wheel span:nth-child(3) { transform: translate(-50%, -50%) rotate(150deg) translateY(-61px) rotate(-150deg); }
.es-combo-wheel span:nth-child(4) { transform: translate(-50%, -50%) rotate(210deg) translateY(-61px) rotate(-210deg); }
.es-combo-wheel span:nth-child(5) { transform: translate(-50%, -50%) rotate(270deg) translateY(-61px) rotate(-270deg); }
.es-combo-wheel span:nth-child(6) { transform: translate(-50%, -50%) rotate(330deg) translateY(-61px) rotate(-330deg); }

.es-combo-mascot { width: min(128px, 100%); max-height: 164px; justify-self: end; object-fit: contain; filter: drop-shadow(0 14px 18px rgba(25,43,78,.16)); }

.es-combo-spin {
  display: inline-flex;
  width: 100%;
  min-height: 50px;
  margin-top: 14px;
  padding: 12px 16px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #fff;
  border: 0;
  border-radius: 15px;
  background: linear-gradient(110deg, var(--combo-violet), var(--combo-blue));
  box-shadow: 0 12px 26px rgba(80, 70, 200, .22);
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.es-combo-spin:disabled { color: var(--combo-muted); background: var(--combo-line); box-shadow: none; cursor: not-allowed; }

.es-combo-roulette__result {
  min-height: 54px;
  margin-top: 12px;
  padding: 12px 13px;
  color: var(--combo-copy);
  border: 1px solid var(--combo-line);
  border-radius: 13px;
  background: var(--combo-soft);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.es-combo-roulette__result.has-bonus { color: #087443; border-color: color-mix(in srgb, var(--combo-green) 35%, var(--combo-line)); background: color-mix(in srgb, var(--combo-green) 8%, var(--combo-surface)); }
html.dark .es-combo-roulette__result.has-bonus { color: #7cebb3; }

.es-combo-actions { display: grid; padding: 0 24px 24px; gap: 10px; }
.es-combo-cta {
  display: inline-flex;
  min-height: 52px;
  padding: 12px 16px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #fff;
  border-radius: 15px;
  background: var(--combo-green);
  box-shadow: 0 12px 28px rgba(22, 163, 74, .20);
  font-size: 15px;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  white-space: normal;
}

.es-combo-cta--negotiate { color: var(--combo-ink); border: 1px solid var(--combo-line); background: var(--combo-surface); box-shadow: none; }
.es-combo-cta.is-disabled { color: var(--combo-muted); background: var(--combo-line); box-shadow: none; cursor: not-allowed; pointer-events: none; }
.es-combo-estimated { margin: 0; color: var(--combo-muted); font-size: 12px; font-weight: 650; line-height: 1.45; text-align: center; }

@media (max-width: 1100px) {
  .es-combo-layout { grid-template-columns: 1fr; }
  .es-combo-summary { position: static; }
  .es-combo-products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .es-combo-controls { align-items: stretch; flex-direction: column; }
  .es-combo-search { width: 100%; }
  .es-combo-products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .es-combo-section { padding: 66px 0; }
  .es-combo-header h2 { font-size: clamp(2.35rem, 13vw, 3.4rem); }
  .es-combo-picker, .es-combo-summary { border-radius: 23px; }
  .es-combo-controls { gap: 12px; }
  .es-combo-controls__title p { display: none; }
  .es-combo-products { grid-template-columns: 1fr; }
  .es-combo-product { min-height: 108px; grid-template-columns: 68px minmax(0, 1fr) 34px; }
  .es-combo-product__visual { width: 68px; height: 68px; }
  .es-combo-summary__top, .es-combo-roulette { padding: 20px; }
  .es-combo-totals { padding: 18px 20px; }
  .es-combo-margin-note { padding: 0 20px 16px; }
  .es-combo-actions { padding: 0 20px max(20px, env(safe-area-inset-bottom)); }
  .es-combo-roulette__stage { grid-template-columns: 158px minmax(76px, 1fr); min-height: 194px; }
  .es-combo-wheel-wrap, .es-combo-wheel { width: 158px; height: 158px; }
  .es-combo-wheel span:nth-child(1) { transform: translate(-50%, -50%) rotate(30deg) translateY(-54px) rotate(-30deg); }
  .es-combo-wheel span:nth-child(2) { transform: translate(-50%, -50%) rotate(90deg) translateY(-54px) rotate(-90deg); }
  .es-combo-wheel span:nth-child(3) { transform: translate(-50%, -50%) rotate(150deg) translateY(-54px) rotate(-150deg); }
  .es-combo-wheel span:nth-child(4) { transform: translate(-50%, -50%) rotate(210deg) translateY(-54px) rotate(-210deg); }
  .es-combo-wheel span:nth-child(5) { transform: translate(-50%, -50%) rotate(270deg) translateY(-54px) rotate(-270deg); }
  .es-combo-wheel span:nth-child(6) { transform: translate(-50%, -50%) rotate(330deg) translateY(-54px) rotate(-330deg); }

  body.empanada-combo-in-view .fixed.bottom-6.right-6.es-floating-dock,
  body.empanada-combo-in-view .fixed.right-6.bottom-6.es-floating-dock {
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
    transform: translate(-50%, 12px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  }
}

@media (max-width: 370px) {
  .es-combo-roulette__stage { grid-template-columns: 1fr; justify-items: center; }
  .es-combo-mascot { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .es-combo-product, .es-combo-wheel { transition-duration: .01ms; }
}
