/* Diseño configurable de la tienda: botones, efectos, pestañas y bloques informativos.
   Se aplica a la tienda (html.storefront) y a la vista previa del panel (.fx-preview).
   Los tokens llegan como atributos data-* validados en el servidor. */

:is(html.storefront, .fx-preview) {
  --btn-radius: 999px;
  --ink: color-mix(in srgb, var(--brand) 82%, black);
  --soft: color-mix(in srgb, var(--accent) 55%, white);
  --softer: color-mix(in srgb, var(--accent) 28%, white);
  --line-soft: color-mix(in srgb, var(--accent) 70%, var(--brand) 8%);
  --shadow-brand: 0 8px 22px color-mix(in srgb, var(--brand) 26%, transparent);
  --shadow-rest: 0 6px 14px color-mix(in srgb, var(--brand) 25%, transparent);
  --ease: cubic-bezier(.2, .8, .2, 1);
}
/* Intensidad de la sombra de los botones (al pasar el mouse y en la pestaña activa). */
:is(html.storefront, .fx-preview)[data-shadow="sin-sombra"] { --shadow-brand: none; --shadow-rest: none; }
:is(html.storefront, .fx-preview)[data-shadow="sombra-suave"] { --shadow-brand: 0 4px 12px color-mix(in srgb, var(--brand) 14%, transparent); --shadow-rest: 0 3px 8px color-mix(in srgb, var(--brand) 12%, transparent); }
:is(html.storefront, .fx-preview)[data-shadow="sombra-intensa"] { --shadow-brand: 0 12px 28px color-mix(in srgb, var(--brand) 40%, transparent); --shadow-rest: 0 8px 18px color-mix(in srgb, var(--brand) 34%, transparent); }
:is(html.storefront, .fx-preview)[data-shadow="sombra-fuerte"] { --shadow-brand: 0 16px 36px color-mix(in srgb, var(--brand) 55%, transparent); --shadow-rest: 0 10px 24px color-mix(in srgb, var(--brand) 45%, transparent); }
:is(html.storefront, .fx-preview) .filters a.active { box-shadow: var(--shadow-rest); }
:is(html.storefront, .fx-preview)[data-btn="redondeado"] { --btn-radius: 10px; }
:is(html.storefront, .fx-preview)[data-btn="recto"] { --btn-radius: 3px; }

/* ---------- Botones ---------- */
:is(html.storefront, .fx-preview) :is(button:not(.step, .plain, .zoom, .lightbox-close, .popup-close, .slide-prev, .slide-next, .info-tab), .btn, .slide .catcard, .bar .account) {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--btn-radius);
  background-color: var(--brand);
  color: #fff;
  font-weight: 650;
  letter-spacing: .01em;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s, color .25s, background-size .45s var(--ease);
}
:is(html.storefront, .fx-preview) :is(.filters a, .info-tab) {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--btn-radius);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s, color .25s, background-size .45s var(--ease);
}
:is(html.storefront, .fx-preview) .filters a:not(.active):hover {
  background-color: color-mix(in srgb, var(--accent) 70%, var(--brand) 18%);
}

/* Elevar con sombra */
[data-fx="elevar"] :is(button:not(.step, .plain, .zoom, .lightbox-close, .popup-close, .slide-prev, .slide-next), .btn, .slide .catcard, .bar .account, .filters a, .info-tab):hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-brand);
}
[data-fx="elevar"] :is(button:not(.plain), .btn, .catcard, .filters a, .info-tab):active { transform: translateY(0) scale(.97); }

/* Destello de luz que cruza el botón */
[data-fx="brillo"] :is(button:not(.step, .plain, .zoom, .lightbox-close, .popup-close, .slide-prev, .slide-next), .btn, .slide .catcard, .bar .account, .filters a, .info-tab)::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgb(255 255 255 / .55) 50%, transparent 70%);
  transform: translateX(-120%);
  pointer-events: none;
}
[data-fx="brillo"] :is(button:not(.plain), .btn, .catcard, .account, .filters a, .info-tab):hover::after {
  transform: translateX(120%);
  transition: transform .7s var(--ease);
}

/* Relleno que se desliza desde la izquierda */
[data-fx="relleno"] :is(button:not(.step, .plain, .zoom, .lightbox-close, .popup-close, .slide-prev, .slide-next), .btn, .slide .catcard, .bar .account) {
  background-image: linear-gradient(var(--btn-hover-bg, var(--ink)), var(--btn-hover-bg, var(--ink)));
  background-repeat: no-repeat;
  background-size: 0% 100%;
}
[data-fx="relleno"] :is(.filters a:not(.active), .info-tab[aria-selected="false"]) {
  background-image: linear-gradient(var(--brand), var(--brand));
  background-repeat: no-repeat;
  background-size: 0% 100%;
}
[data-fx="relleno"] :is(button:not(.plain), .btn, .catcard, .account, .filters a, .info-tab):hover { background-size: 100% 100%; }
[data-fx="relleno"] :is(.filters a:not(.active), .info-tab[aria-selected="false"]):hover { color: #fff; }

/* Halo pulsante */
[data-fx="pulso"] :is(button:not(.step, .plain, .zoom, .lightbox-close, .popup-close, .slide-prev, .slide-next), .btn, .slide .catcard, .bar .account, .filters a, .info-tab):hover {
  animation: fx-pulse 1.2s var(--ease) infinite;
}
@keyframes fx-pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 45%, transparent); }
  100% { box-shadow: 0 0 0 12px transparent; }
}

/* Colores propios al pasar el cursor (opcional, desde el panel) */
[data-hover]:not([data-fx="relleno"]) :is(button:not(.step, .plain, .zoom, .lightbox-close, .popup-close, .slide-prev, .slide-next, .info-tab), .btn, .slide .catcard, .bar .account, .filters a:not(.active), .info-tab[aria-selected="false"]):hover {
  background-color: var(--btn-hover-bg);
  color: var(--btn-hover-ink);
}
[data-hover][data-fx="relleno"] :is(button:not(.plain), .btn, .catcard, .account, .filters a, .info-tab):hover { color: var(--btn-hover-ink); }
[data-hover][data-fx="relleno"] :is(.filters a:not(.active), .info-tab[aria-selected="false"]) { background-image: linear-gradient(var(--btn-hover-bg), var(--btn-hover-bg)); }

/* Onda al hacer clic (la crea effects.js) */
.fx-ripple {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  background: currentColor;
  opacity: .28;
  transform: scale(0);
  animation: fx-ripple .6s ease-out forwards;
  pointer-events: none;
}
@keyframes fx-ripple { to { transform: scale(2.6); opacity: 0; } }

:is(html.storefront, .fx-preview) :is(button:not(.plain), .btn, .filters a, .info-tab):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--brand) 45%, white);
  outline-offset: 3px;
}

/* ---------- Títulos de sección ---------- */
:is(html.storefront, .fx-preview) :is(.block-head :is(h1, h2), .catalogarea > h2, .guide h2, .pv-title) {
  text-align: center;
  font-weight: 800;
  letter-spacing: .02em;
}
[data-heads="mayusculas"] :is(.block-head :is(h1, h2), .catalogarea > h2, .guide h2, .pv-title) { text-transform: uppercase; }
[data-heads="normal"] :is(.block-head :is(h1, h2), .catalogarea > h2, .guide h2, .pv-title) { text-transform: none; }
:is(.block-head :is(h1, h2), .catalogarea > h2, .guide h2)::after {
  content: "";
  display: block;
  width: 46px;
  height: 3px;
  border-radius: 3px;
  margin: 14px auto 0;
  background: var(--accent);
}

/* ---------- Bloques informativos ---------- */
.info-block { margin-block: clamp(48px, 7vw, 88px); max-width: min(var(--content, 1200px), 1110px); }
.block-head { text-align: center; margin-bottom: 26px; background: none; border: 0; }
.block-head :is(h1, h2) { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin: 0; }
.block-head p { margin: 12px auto 0; max-width: 62ch; color: #5d5470; }

.info-ico {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--brand);
  color: #fff;
}
.info-ico .ico { width: 20px; height: 20px; }

/* Pestañas */
.info-tabs { display: none; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 18px; }
.js .info-tabs, .fx-preview .info-tabs { display: flex; }
.info-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 0;
  padding: 9px 16px 9px 10px;
  border: 0;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--brand);
  background-color: var(--soft);
}
.info-tab .info-ico { width: 26px; height: 26px; border-radius: 50%; background: transparent; color: currentColor; }
.info-tab .info-ico .ico { width: 17px; height: 17px; }
.info-tab[aria-selected="true"] { background-color: var(--brand); color: #fff; box-shadow: var(--shadow-brand); }
.tab-text { display: grid; text-align: left; line-height: 1.2; }
.tab-text small { font-weight: 400; font-size: .74rem; color: inherit; opacity: .75; }

.info-block[data-tabs="fichas"] .info-tabs { display: none; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.js .info-block[data-tabs="fichas"] .info-tabs { display: grid; }
.info-block[data-tabs="fichas"] .info-tab {
  border-radius: calc(var(--radius-card, 16px) - 2px);
  padding: 14px 16px;
  background-color: var(--softer);
  border: 2px solid transparent;
  font-size: .95rem;
  justify-content: flex-start;
}
.info-block[data-tabs="fichas"] .info-tab .info-ico { width: 40px; height: 40px; border-radius: 11px; background: var(--brand); color: #fff; }
.info-block[data-tabs="fichas"] .info-tab[aria-selected="true"] { background-color: #fff; color: var(--brand); border-color: var(--line-soft); box-shadow: 0 10px 26px color-mix(in srgb, var(--brand) 14%, transparent); }
.tab-arrow { margin-left: auto; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; transform: rotate(90deg); transition: transform .3s var(--ease), background .3s; }
.tab-arrow .ico { width: 15px; height: 15px; }
.info-tab[aria-selected="true"] .tab-arrow { transform: rotate(-90deg); background: var(--brand); color: #fff; }

/* Grupos y tarjetas */
.info-groups.stacked { display: grid; gap: 22px; }
.info-block[data-layout="precios"] .info-groups.stacked { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); align-items: start; }
.info-group {
  border-radius: calc(var(--radius-card, 16px) + 4px);
  padding: clamp(14px, 2vw, 18px);
  background: var(--softer);
}
.info-group[hidden] { display: none; }
[data-cards="borde"] .info-group { background: #fff; border: 1px solid var(--line-soft); }
[data-cards="sombra"] .info-group { background: #fff; box-shadow: 0 14px 40px color-mix(in srgb, var(--brand) 10%, transparent); }
.info-block[data-layout="iconos"] .info-group { background: transparent; padding: 0; box-shadow: none; border: 0; }

.info-lead { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 2px 2px 14px; font-size: .86rem; color: #5d5470; }
.info-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px 5px 9px;
  border-radius: 999px;
  background: var(--brand); color: #fff;
  font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.info-pill .ico { width: 14px; height: 14px; }
.info-lead i { font-family: var(--font-script), cursive; font-style: normal; font-size: 1.25rem; color: var(--brand); }

.info-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.info-card {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  border-radius: var(--radius-card, 16px);
  background: #fff;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--brand) 6%, transparent);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
[data-cards="borde"] .info-card { box-shadow: none; border: 1px solid var(--line-soft); }
[data-cards="sombra"] .info-card { box-shadow: 0 10px 30px color-mix(in srgb, var(--brand) 12%, transparent); }
.info-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px color-mix(in srgb, var(--brand) 16%, transparent); }
.info-card h3 { font-size: 1rem; margin: 0 0 6px; line-height: 1.25; color: var(--brand); text-transform: none; letter-spacing: 0; }
.info-card p { margin: 0; font-size: .86rem; line-height: 1.5; color: #4e4760; }
.info-card strong { color: var(--brand); }
.info-body { min-width: 0; flex: 1; }

.info-block[data-layout="pasos"] .info-card { flex-direction: column; padding-top: 20px; }
.step-n {
  position: absolute; top: 12px; right: 18px;
  font: 800 1.9rem/1 var(--font-title), sans-serif;
  color: color-mix(in srgb, var(--accent) 80%, white);
}
.info-badge {
  flex: none; align-self: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--brand); color: #fff;
  font-size: .76rem; font-weight: 700; white-space: nowrap;
}
.info-card:nth-child(3n+2) .info-badge { background: var(--highlight); }
.info-block[data-layout="tarjetas"] .info-card .info-ico { background: var(--softer); color: var(--brand); border-radius: 50%; }

.info-block[data-layout="precios"] .info-grid { grid-template-columns: 1fr; }
.info-block[data-layout="precios"] .info-card { padding: 0; overflow: hidden; align-items: stretch; }
.info-block[data-layout="precios"] .info-card > .info-ico { margin: 18px 0 0 18px; }
.info-block[data-layout="precios"] .info-body { padding: 18px 0 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 8px; }
.chips span { padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--brand); font-size: .74rem; font-weight: 600; }
.info-price {
  flex: none; display: grid; place-content: center; text-align: center;
  min-width: 112px; padding: 14px;
  background: var(--soft);
  border-left: 2px dashed color-mix(in srgb, var(--brand) 22%, transparent);
}
.info-price strong { font: 800 1.35rem/1.1 var(--font-title), sans-serif; color: var(--brand); }
.info-price small { font-size: .74rem; color: #6c6280; }

.info-block[data-layout="iconos"] .info-card { flex-direction: column; align-items: center; text-align: center; padding: 26px 18px; background: #f6f6f8; }
.info-block[data-layout="iconos"] .info-card .info-ico { width: 64px; height: 64px; border-radius: 20px; background: var(--soft); color: var(--brand); }
.info-block[data-layout="iconos"] .info-card .info-ico .ico { width: 34px; height: 34px; }

.info-tips { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 12px; margin-top: 12px; }
.info-tip { display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 14px; border-radius: var(--radius-card, 16px); background: #fff; font-size: .84rem; color: #4e4760; }
.info-tip .info-ico { width: 30px; height: 30px; border-radius: 9px; background: var(--softer); color: var(--brand); }
.info-tip.warn .info-ico { background: var(--highlight); color: #fff; }
.info-tip strong { color: var(--brand); }

/* Cambio de pestaña y aparición al desplazarse */
[data-motion] .info-group.is-entering { animation: fx-fade-up .45s var(--ease); }
@keyframes fx-fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.js [data-motion] .reveal, html.js[data-motion] .reveal { transition: opacity .7s var(--ease), transform .7s var(--ease); }
html.js[data-motion] .reveal.pending { opacity: 0; transform: translateY(26px); }

@media (max-width: 640px) {
  .info-tabs { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 6px; scrollbar-width: none; }
  .info-tab { flex: none; }
  .info-block[data-layout="precios"] .info-card { flex-wrap: wrap; }
  .info-price { min-width: 100%; border-left: 0; border-top: 2px dashed color-mix(in srgb, var(--brand) 22%, transparent); }
  .info-badge { align-self: flex-start; }
  .info-block[data-layout="tarjetas"] .info-card { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  :is(html.storefront, .fx-preview) *, :is(html.storefront, .fx-preview) *::after { animation: none !important; transition: none !important; }
  html.js[data-motion] .reveal.pending { opacity: 1; transform: none; }
}

/* ---------- Menú de la tienda (Diseño y efectos) ---------- */
:is(.bar nav, .pv-menu) a { color: var(--menu-ink, inherit); font-size: var(--menu-size, inherit); text-underline-offset: 5px; transition: color .2s, background-color .2s, box-shadow .2s; }
:is(.bar nav, .pv-menu) a:hover { color: var(--menu-hover, var(--menu-ink, inherit)); }
:is(.bar nav, .pv-menu) a[aria-current="page"] { color: var(--menu-active, var(--brand)); }
.pv-menu a:hover { text-decoration: underline; }
[data-menu-case="mayusculas"] :is(.bar nav, .pv-menu) a { text-transform: uppercase; letter-spacing: .04em; }
[data-menu-fx="ninguno"] :is(.bar nav, .pv-menu) a:hover { text-decoration: none; }
[data-menu-fx="fondo"] :is(.bar nav, .pv-menu) a { padding: 6px 10px; border-radius: 8px; }
[data-menu-fx="fondo"] :is(.bar nav, .pv-menu) a:is(:hover, [aria-current="page"]) { text-decoration: none; background-color: color-mix(in srgb, var(--menu-hover, var(--brand)) 11%, transparent); box-shadow: none; }
[data-menu-fx="linea"] :is(.bar nav, .pv-menu) a { padding-block: 6px; }
[data-menu-fx="linea"] :is(.bar nav, .pv-menu) a:hover { text-decoration: none; box-shadow: inset 0 -2px 0 currentColor; }

/* ---------- Bordes de botones y pestañas ---------- */
[data-btn-border] :is(button:not(.step, .plain, .zoom, .lightbox-close, .popup-close, .slide-prev, .slide-next, .info-tab), .btn, .slide .catcard) {
  border: var(--btn-bw, 0px) solid var(--btn-bc, color-mix(in srgb, var(--brand) 70%, black));
}
[data-btn-border] :is(button:not(.step, .plain, .zoom, .lightbox-close, .popup-close, .slide-prev, .slide-next, .info-tab), .btn, .slide .catcard):hover {
  border-color: var(--btn-bc-hover, var(--btn-bc, color-mix(in srgb, var(--brand) 70%, black)));
}
[data-tab-border] .info-tabs .info-tab, [data-tab-border] .info-tabs .info-tab[aria-selected] {
  border: var(--tab-bw, 0px) solid var(--tab-bc, var(--brand));
}
[data-tab-border] .info-tabs .info-tab:hover { border-color: var(--tab-bc-hover, var(--tab-bc, var(--brand))); }

/* ---------- Etiquetas («Mismo día») ---------- */
.info-badge, .info-card:nth-child(3n+2) .info-badge {
  border: var(--badge-bw, 0px) solid var(--badge-bc, var(--brand));
}
.info-card .info-badge { background: var(--badge-bg, var(--brand)); color: var(--badge-ink, #fff); }
.info-card:nth-child(3n+2) .info-badge { background: var(--badge-bg, var(--highlight)); }
[data-badge-shadow="sombra-suave"] .info-badge { box-shadow: 0 2px 6px color-mix(in srgb, var(--badge-bg, var(--brand)) 25%, transparent); }
[data-badge-shadow="sombra-media"] .info-badge { box-shadow: 0 4px 12px color-mix(in srgb, var(--badge-bg, var(--brand)) 35%, transparent); }
[data-badge-shadow="sombra-intensa"] .info-badge { box-shadow: 0 8px 20px color-mix(in srgb, var(--badge-bg, var(--brand)) 50%, transparent); }

/* ---------- Bloques: fondo propio, avisos como tarjetas, mapa ---------- */
.info-block.has-bg .info-group { background: var(--block-bg); border-color: transparent; }
.info-block.has-card-bg .info-card { background: var(--card-bg); }
.info-block[data-layout="iconos"].has-card-bg .info-card { background: var(--card-bg); }
.info-tip { border: 1px solid color-mix(in srgb, var(--brand) 8%, transparent); box-shadow: 0 2px 8px color-mix(in srgb, var(--brand) 6%, transparent); line-height: 1.45; }
.info-tip .info-ico { border-radius: 10px; }
.info-tip .info-ico .ico { width: 17px; height: 17px; }
.info-lead { align-items: center; }
.info-lead-text { display: inline-flex; align-items: baseline; gap: .4em; flex-wrap: wrap; line-height: 1.2; }
.info-lead-text i { line-height: 1; }
.info-map { margin-bottom: 22px; border-radius: calc(var(--radius-card, 16px) + 4px); overflow: hidden; background: var(--softer); }
.info-map iframe { display: block; width: 100%; height: clamp(220px, 32vw, 340px); border: 0; }
.info-map p { margin: 0; padding: 10px 16px; text-align: center; font-size: .9rem; color: #4e4760; }
.ico-custom { fill-rule: nonzero; }
.info-block[data-layout="iconos"] .info-card .info-ico:has(.ico-custom) { background: transparent; width: auto; height: auto; }
.info-block[data-layout="iconos"] .info-card .info-ico .ico-custom { width: 64px; height: 64px; }
