/* =========================================================
   CATÁLOGO DINÁMICO EVOLUTECH (prefijo evx- para no chocar)
   ========================================================= */
.evx-shop, .evx-modal {
  --evx-accent: #0ED1D3;
  --evx-accent-d: #079a9c;
  --evx-accent-soft: #e6fbfb;
  --evx-ink: #0f1b2d;
  --evx-ink-2: #4a5568;
  --evx-muted: #8a94a6;
  --evx-line: #e6eaf0;
  --evx-bg: #f5f7fa;
  --evx-card: #ffffff;
  --evx-danger: #e5484d;
  --evx-ok: #16a34a;
  --evx-wa: #25D366;
  --evx-radius: 16px;
  --evx-shadow: 0 1px 2px rgba(15, 27, 45, .06), 0 8px 24px rgba(15, 27, 45, .06);
  --evx-shadow-h: 0 4px 10px rgba(15, 27, 45, .08), 0 18px 40px rgba(15, 27, 45, .12);
}
.evx-shop {
  background: var(--evx-bg);
  padding: 72px 0 80px;
  color: var(--evx-ink);
  scroll-margin-top: 70px;
}
.evx-shop *, .evx-modal * { box-sizing: border-box; }

/* ---------- Encabezado ---------- */
.evx-head { text-align: center; max-width: 720px; margin: 0 auto 28px; }
.evx-eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--evx-accent-d); background: var(--evx-accent-soft); padding: 6px 12px; border-radius: 999px; margin-bottom: 12px;
}
.evx-head h2 { font-size: clamp(26px, 4vw, 38px); font-weight: 800; margin: 0 0 8px; color: var(--evx-ink); line-height: 1.15; }
.evx-head p { color: var(--evx-ink-2); margin: 0; font-size: 16px; }

/* ---------- Buscador ---------- */
.evx-search-wrap { position: relative; max-width: 760px; margin: 0 auto; z-index: 30; }
.evx-search {
  display: flex; align-items: center; gap: 10px; background: #fff; border: 2px solid var(--evx-line);
  border-radius: 999px; padding: 6px 8px 6px 22px; box-shadow: var(--evx-shadow); transition: border-color .2s, box-shadow .2s;
}
.evx-search:focus-within { border-color: var(--evx-accent); box-shadow: 0 0 0 5px rgba(14, 209, 211, .15), var(--evx-shadow); }
.evx-search > .bi-search { font-size: 20px; color: var(--evx-muted); }
.evx-search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 17px; padding: 12px 0; color: var(--evx-ink);
}
.evx-search input::-webkit-search-cancel-button { display: none; }
.evx-clear {
  border: 0; background: var(--evx-bg); color: var(--evx-ink-2); width: 34px; height: 34px; border-radius: 50%;
  display: none; align-items: center; justify-content: center; cursor: pointer; font-size: 18px;
}
.evx-search.has-text .evx-clear { display: inline-flex; }
.evx-search-btn {
  border: 0; background: var(--evx-accent); color: #fff; font-weight: 700; border-radius: 999px; padding: 12px 22px;
  cursor: pointer; transition: background .2s; white-space: nowrap;
}
.evx-search-btn:hover { background: var(--evx-accent-d); }

.evx-quick { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; font-size: 13px; color: var(--evx-muted); }
.evx-quick button {
  border: 1px dashed #c9d2de; background: transparent; color: var(--evx-ink-2); border-radius: 999px; padding: 4px 12px; cursor: pointer; font-size: 13px;
}
.evx-quick button:hover { border-color: var(--evx-accent); color: var(--evx-accent-d); }

/* ---------- Sugerencias ---------- */
.evx-suggest {
  position: absolute; left: 0; right: 0; top: calc(100% + 10px); background: #fff; border-radius: 18px;
  box-shadow: 0 20px 50px rgba(15, 27, 45, .18); border: 1px solid var(--evx-line); overflow: hidden; display: none;
  max-height: 70vh; overflow-y: auto;
}
.evx-suggest.open { display: block; animation: evxDrop .16s ease-out; }
@keyframes evxDrop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.evx-sg-label { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--evx-muted); padding: 12px 18px 6px; }
.evx-sg-item {
  display: flex; align-items: center; gap: 14px; padding: 9px 18px; cursor: pointer; color: var(--evx-ink); text-decoration: none;
}
.evx-sg-item:hover, .evx-sg-item.active { background: var(--evx-accent-soft); }
.evx-sg-thumb { width: 46px; height: 46px; border-radius: 10px; background: #fff; border: 1px solid var(--evx-line); flex: 0 0 46px; object-fit: contain; padding: 3px; }
.evx-sg-ico { width: 46px; height: 46px; border-radius: 10px; background: var(--evx-accent-soft); color: var(--evx-accent-d); display: flex; align-items: center; justify-content: center; font-size: 20px; flex: 0 0 46px; }
.evx-sg-text { flex: 1; min-width: 0; }
.evx-sg-name { font-size: 14px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.evx-sg-name mark { background: transparent; color: var(--evx-accent-d); font-weight: 800; padding: 0; }
.evx-sg-meta { font-size: 12px; color: var(--evx-muted); margin-top: 2px; }
.evx-sg-price { font-weight: 800; font-size: 14px; white-space: nowrap; }
.evx-sg-all { display: block; padding: 13px 18px; border-top: 1px solid var(--evx-line); font-weight: 700; color: var(--evx-accent-d); cursor: pointer; }
.evx-sg-all.active, .evx-sg-all:hover { background: var(--evx-accent-soft); }
.evx-sg-empty { padding: 22px 18px; color: var(--evx-ink-2); text-align: center; }

/* ---------- Categorías ---------- */
.evx-chips-wrap { position: relative; margin: 30px 0 18px; }
.evx-chips {
  display: flex; gap: 10px; overflow-x: auto; scroll-behavior: smooth; padding: 4px 2px 10px; scrollbar-width: thin;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 24px), transparent 100%);
  padding-left: 24px; padding-right: 24px;
}
.evx-chips::-webkit-scrollbar { height: 6px; }
.evx-chips::-webkit-scrollbar-thumb { background: #d3dae4; border-radius: 6px; }
.evx-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--evx-line); background: #fff;
  color: var(--evx-ink); border-radius: 999px; padding: 9px 16px 9px 12px; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all .18s; white-space: nowrap;
}
.evx-chip i { font-size: 17px; color: var(--evx-accent-d); }
.evx-chip small { font-size: 12px; font-weight: 700; color: var(--evx-muted); background: var(--evx-bg); border-radius: 999px; padding: 1px 8px; }
.evx-chip:hover { border-color: var(--evx-accent); transform: translateY(-1px); }
.evx-chip.active { background: var(--evx-ink); border-color: var(--evx-ink); color: #fff; }
.evx-chip.active i { color: var(--evx-accent); }
.evx-chip.active small { background: rgba(255,255,255,.15); color: #fff; }
.evx-chip-skel { width: 130px; height: 40px; border-radius: 999px; flex: 0 0 auto; }
.evx-chips-arrow {
  position: absolute; top: 4px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--evx-line); background: #fff;
  box-shadow: var(--evx-shadow); display: none; align-items: center; justify-content: center; cursor: pointer; z-index: 2; color: var(--evx-ink);
}
.evx-chips-arrow.prev { left: -6px; } .evx-chips-arrow.next { right: -6px; }
@media (min-width: 768px) { .evx-chips-arrow.show { display: flex; } }

/* ---------- Barra de resultados ---------- */
.evx-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.evx-count { color: var(--evx-ink-2); font-size: 15px; }
.evx-count b { color: var(--evx-ink); }
.evx-active-filters { display: inline-flex; gap: 6px; margin-left: 8px; flex-wrap: wrap; }
.evx-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--evx-accent-soft); color: var(--evx-accent-d); border-radius: 999px; padding: 3px 6px 3px 12px; font-size: 13px; font-weight: 600; }
.evx-pill button { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 4px; }
.evx-sort { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--evx-ink-2); }
.evx-sort select { border: 1px solid var(--evx-line); border-radius: 10px; padding: 8px 12px; background: #fff; color: var(--evx-ink); font-size: 14px; cursor: pointer; }

/* ---------- Grilla y tarjetas ---------- */
.evx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
@media (max-width: 575px) { .evx-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

.evx-card {
  background: var(--evx-card); border-radius: var(--evx-radius); box-shadow: var(--evx-shadow); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .22s ease, box-shadow .22s ease; position: relative;
  animation: evxIn .35s ease both;
}
.evx-card:hover { transform: translateY(-4px); box-shadow: var(--evx-shadow-h); }
@keyframes evxIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.evx-card-img {
  position: relative; aspect-ratio: 1 / 1; background: #fff; border: 0; padding: 18px; cursor: zoom-in; display: block; width: 100%;
  border-bottom: 1px solid var(--evx-line);
}
.evx-card-img img { width: 100%; height: 100%; object-fit: contain; transition: transform .35s ease; }
.evx-card:hover .evx-card-img img { transform: scale(1.06); }
.evx-badge {
  position: absolute; top: 12px; left: 12px; background: var(--evx-danger); color: #fff; font-size: 12px; font-weight: 800;
  padding: 4px 10px; border-radius: 999px; letter-spacing: .02em;
}
.evx-quickview {
  position: absolute; right: 12px; bottom: 12px; background: rgba(15, 27, 45, .85); color: #fff; font-size: 12px; font-weight: 600;
  border-radius: 999px; padding: 6px 12px; opacity: 0; transform: translateY(6px); transition: all .2s;
}
.evx-card:hover .evx-quickview { opacity: 1; transform: none; }
.evx-card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; flex: 1; }
.evx-card-cat { font-size: 12px; color: var(--evx-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.evx-card-title {
  font-size: 15px; font-weight: 700; line-height: 1.35; margin: 0 0 10px; color: var(--evx-ink); cursor: pointer;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.95em;
}
.evx-card-title:hover { color: var(--evx-accent-d); }
.evx-stock { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--evx-ok); font-weight: 600; margin-bottom: 10px; }
.evx-stock::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(22, 163, 74, .15); }
.evx-price { margin-top: auto; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.evx-price strong { font-size: 21px; font-weight: 800; color: var(--evx-ink); }
.evx-price del { color: var(--evx-muted); font-size: 14px; }
.evx-actions { display: flex; gap: 8px; }
.evx-btn-wa {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: var(--evx-wa); color: #fff !important;
  border-radius: 12px; padding: 10px 12px; font-weight: 700; font-size: 14px; text-decoration: none !important; transition: background .2s;
}
.evx-btn-wa:hover { background: #128C7E; }
.evx-btn-ghost {
  width: 44px; flex: 0 0 44px; border: 1px solid var(--evx-line); background: #fff; border-radius: 12px; color: var(--evx-ink); cursor: pointer; font-size: 17px;
}
.evx-btn-ghost:hover { border-color: var(--evx-accent); color: var(--evx-accent-d); }
@media (max-width: 575px) {
  .evx-card-body { padding: 10px 12px 12px; }
  .evx-card-title { font-size: 13px; }
  .evx-price strong { font-size: 17px; }
  .evx-btn-wa { font-size: 13px; padding: 9px 8px; }
  .evx-btn-ghost { display: none; }
  .evx-search { padding-left: 16px; }
  .evx-search-btn { display: none; }
  .evx-search input { font-size: 16px; }
}

/* Skeleton */
.evx-skel { background: linear-gradient(90deg, #eef1f5 25%, #f7f9fb 37%, #eef1f5 63%); background-size: 400% 100%; animation: evxShimmer 1.3s ease infinite; border-radius: 8px; }
@keyframes evxShimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.evx-card.is-skel .evx-card-img { cursor: default; }
.evx-card.is-skel .evx-skel-img { width: 100%; height: 100%; border-radius: 12px; }
.evx-skel-line { height: 12px; margin-bottom: 10px; }

/* Vacío / más */
.evx-empty { grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: var(--evx-ink-2); }
.evx-empty i { font-size: 48px; color: var(--evx-accent); display: block; margin-bottom: 10px; }
.evx-empty h4 { color: var(--evx-ink); font-weight: 800; }
.evx-empty button { margin-top: 14px; }
.evx-more { text-align: center; margin-top: 34px; }
.evx-more-btn {
  border: 2px solid var(--evx-ink); background: transparent; color: var(--evx-ink); font-weight: 700; padding: 12px 28px;
  border-radius: 999px; cursor: pointer; transition: all .2s;
}
.evx-more-btn:hover { background: var(--evx-ink); color: #fff; }
.evx-more small { display: block; color: var(--evx-muted); margin-top: 10px; }

/* ---------- Modal de detalle ---------- */
.evx-modal {
  position: fixed; inset: 0; background: rgba(15, 27, 45, .6); z-index: 2000; display: none; align-items: center; justify-content: center;
  padding: 20px; backdrop-filter: blur(3px);
}
.evx-modal.open { display: flex; animation: evxFade .2s ease; }
@keyframes evxFade { from { opacity: 0; } to { opacity: 1; } }
.evx-modal-box {
  background: #fff; border-radius: 22px; width: 100%; max-width: 980px; max-height: calc(100vh - 40px); overflow: auto; position: relative;
  display: grid; grid-template-columns: 1.05fr 1fr; color: #0f1b2d; animation: evxPop .25s ease;
}
@keyframes evxPop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.evx-modal-close {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: #f5f7fa;
  font-size: 20px; cursor: pointer; z-index: 3; color: #0f1b2d;
}
.evx-gal { padding: 28px; border-right: 1px solid #e6eaf0; }
.evx-gal-main { aspect-ratio: 1 / 1; display: flex; align-items: center; justify-content: center; }
.evx-gal-main img { max-width: 100%; max-height: 100%; object-fit: contain; }
.evx-gal-thumbs { display: flex; gap: 8px; margin-top: 14px; overflow-x: auto; }
.evx-gal-thumbs button { width: 64px; height: 64px; flex: 0 0 64px; border: 2px solid #e6eaf0; border-radius: 12px; background: #fff; padding: 4px; cursor: pointer; }
.evx-gal-thumbs button.active { border-color: #0ED1D3; }
.evx-gal-thumbs img { width: 100%; height: 100%; object-fit: contain; }
.evx-info { padding: 34px 30px 28px; display: flex; flex-direction: column; }
.evx-info .evx-card-cat { margin-bottom: 8px; }
.evx-info h3 { font-size: 22px; font-weight: 800; line-height: 1.3; margin: 0 0 10px; color: #0f1b2d; }
.evx-info .evx-code { font-size: 13px; color: #8a94a6; margin-bottom: 14px; }
.evx-info .evx-price strong { font-size: 30px; }
.evx-info .evx-price { margin: 6px 0 14px; }
.evx-info-desc { font-size: 14px; color: #4a5568; line-height: 1.6; margin-bottom: 18px; }
.evx-info-desc ul { padding-left: 18px; margin: 0; }
.evx-info .evx-btn-wa { flex: 0 0 auto; padding: 14px; font-size: 16px; margin-top: auto; }
.evx-info-note { font-size: 12px; color: #8a94a6; margin-top: 10px; text-align: center; }
@media (max-width: 767px) {
  .evx-modal { padding: 0; align-items: flex-end; }
  .evx-modal-box { grid-template-columns: 1fr; border-radius: 22px 22px 0 0; max-height: 92vh; }
  .evx-gal { border-right: 0; border-bottom: 1px solid #e6eaf0; padding: 20px; }
  .evx-gal-main { aspect-ratio: 4 / 3; }
  .evx-info { padding: 20px; }
}
body.evx-lock { overflow: hidden; }

/* ---------- Correcciones frente a estilos globales de main.css ---------- */
/* main.css define "p { line-height: 5px }" y eso amontonaba la descripción */
.evx-shop p, .evx-modal p, .evx-modal li, .evx-shop li { line-height: 1.6 !important; margin: 0 0 .6em; color: inherit; }
.evx-info-desc, .evx-info-desc p, .evx-info-desc li { font-size: 14.5px; color: #4a5568 !important; line-height: 1.65 !important; }
.evx-info-desc ul { margin: 0; padding-left: 18px; }
.evx-info-desc li { margin-bottom: 4px; }
.evx-stock { color: var(--evx-ok, #16a34a) !important; }
.evx-head p { line-height: 1.6 !important; }

/* El modal va por encima del menú fijo (navbar) y del botón de WhatsApp */
.evx-modal { z-index: 100000; overscroll-behavior: contain; }
.evx-modal-box {
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);     /* dvh = alto REAL visible (no cambia con la barra del navegador) */
  overscroll-behavior: contain;        /* el scroll del modal no arrastra la página de fondo */
  -webkit-overflow-scrolling: touch;
}

/* ---------- Modal en celulares (Android / iPhone) ---------- */
@media (max-width: 767px) {
  .evx-modal { height: 100%; height: 100dvh; }
  .evx-modal-box {
    max-height: 88vh;
    max-height: 88dvh;
    padding-bottom: env(safe-area-inset-bottom, 0px);   /* respeta la barra inferior del iPhone */
  }
  /* La X queda "pegada" arriba aunque se haga scroll dentro del modal */
  .evx-modal-close {
    position: sticky; top: 10px; justify-self: end; align-self: start;
    margin: 10px 10px -50px 0; grid-row: 1; grid-column: 1;
    box-shadow: 0 2px 10px rgba(15, 27, 45, .18); background: #fff;
  }
}

/* Bloqueo de la página de fondo mientras el modal está abierto (iPhone ignora overflow:hidden) */
html.evx-lock, body.evx-lock { overflow: hidden; overscroll-behavior: none; }
body.evx-lock { position: fixed; left: 0; right: 0; width: 100%; }
.evx-info { overflow-wrap: anywhere; }
.evx-info h3 { font-size: clamp(18px, 2.2vw, 22px); }
