
@media (max-width: 576px) {
  .carousel .carousel-item > div { display: none; }
  .carousel .carousel-item > div:first-child { display: block; }
  .carousel-control-prev, .carousel-control-next { width: 12%; }
  .carousel-indicators [data-bs-target] { width: 8px; height: 8px; }
  .product-card, .card { max-width: 100%; width: 100%; }
}
.qty-wrap { display:inline-flex; align-items:center; gap:6px; border:1px solid #ddd; border-radius:10px; padding:4px 6px; }
.qty-btn { border:none; background:#f3f4f6; width:34px; height:34px; border-radius:8px; font-size:20px; line-height:1; cursor:pointer; }
.qty-btn:active { transform: scale(0.98); }
.qty-input { width:44px; text-align:center; border:none; background:transparent; font-weight:600; pointer-events:none; }
.btn-whatsapp { background:#25D366; color:#fff; border:none; padding:12px 16px; border-radius:10px; font-weight:700; display:inline-flex; align-items:center; gap:8px; box-shadow:0 6px 16px rgba(37,211,102,.25); transition: transform .04s ease, box-shadow .2s ease; }
.btn-whatsapp:hover { box-shadow:0 8px 22px rgba(37,211,102,.35); }
.btn-whatsapp:active { transform: translateY(1px) scale(0.99); }
.btn-whatsapp .wa-dot { width:8px; height:8px; border-radius:50%; background:#fff; opacity:.85; }


/* 1) Carrusel tipo 'gallery' en móvil: 1 item por vista con scroll-snap */
@media (max-width: 576px) {
  .gallery {
    display: flex !important;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0 12px;
  }
  .gallery::-webkit-scrollbar { display: none; }
  .gallery-item {
    min-width: 100%;
    scroll-snap-align: center;
  }
}


/* Stepper de cantidades */
.qty-wrap { display:inline-flex; align-items:center; gap:6px; border:1px solid #ddd; border-radius:10px; padding:4px 6px; }
.qty-btn { border:none; background:#f3f4f6; width:34px; height:34px; border-radius:8px; font-size:20px; line-height:1; cursor:pointer; }
.qty-btn:active { transform: scale(0.98); }
.qty-input { width:44px; text-align:center; border:none; background:transparent; font-weight:600; pointer-events:none; }

/* Botón WhatsApp visible */
.btn-whatsapp { background:#25D366; color:#fff; border:none; padding:12px 16px; border-radius:10px; font-weight:700; display:inline-flex; align-items:center; gap:8px; box-shadow:0 6px 16px rgba(37,211,102,.25); transition: transform .04s ease, box-shadow .2s ease; }
.btn-whatsapp:hover { box-shadow:0 8px 22px rgba(37,211,102,.35); }
.btn-whatsapp:active { transform: translateY(1px) scale(0.99); }
.btn-whatsapp .wa-dot { width:8px; height:8px; border-radius:50%; background:#fff; opacity:.85; }


/* === FIX: Gallery como carrusel 1x en móvil (≤576px), sin tocar la lógica === */
@media (max-width: 576px) {
  .gallery {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 0 12px;
  }
  .gallery::-webkit-scrollbar { display: none; }
  .gallery > * {
    flex: 0 0 100% !important;   /* exactamente 1 por vista */
    max-width: 100% !important;
    scroll-snap-align: center;
  }
}
/* Ajustes leves en pantallas medianas si lo deseas (comenta si no) */
/*
@media (min-width: 577px) and (max-width: 768px) {
  .gallery > * { flex: 0 0 80% !important; }
}
*/


/* === Carrusel por referencia: 1 producto por vista (móvil y tablet) === */
.ref-gallery {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 0 12px;
}
.ref-gallery::-webkit-scrollbar { display: none; }
.ref-gallery > * {
  scroll-snap-align: center;
}
@media (max-width: 992px) {
  .ref-gallery > * { flex: 0 0 100% !important; max-width: 100% !important; }
}
/* Respaldo: si usan .gallery directamente */
@media (max-width: 992px) {
  .gallery { display:flex !important; flex-wrap:nowrap !important; overflow-x:auto; scroll-snap-type:x mandatory; gap:12px; }
  .gallery > * { flex:0 0 100% !important; max-width:100% !important; scroll-snap-align:center; }
}

/* Stepper visual (se mantiene) */
.qty-wrap { display:inline-flex; align-items:center; gap:6px; border:1px solid #ddd; border-radius:10px; padding:4px 6px; }
.qty-btn { border:none; background:#f3f4f6; width:34px; height:34px; border-radius:8px; font-size:20px; line-height:1; cursor:pointer; }
.qty-btn:active { transform: scale(0.98); }
.qty-input { width:44px; text-align:center; border:none; background:transparent; font-weight:600; }


/* === Botón WhatsApp más grande y responsive === */
.btn-whatsapp {
  background: #25D366; color: #fff; border: none;
  padding: 14px 20px; border-radius: 12px; font-weight: 800;
  font-size: 1.05rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 8px 22px rgba(37, 211, 102, 0.35);
  transition: transform .04s ease, box-shadow .2s ease;
}
@media (max-width: 576px) {
  .btn-whatsapp { width: 100%; }
}
.btn-whatsapp:hover { box-shadow: 0 10px 26px rgba(37,211,102,.45); }
.btn-whatsapp:active { transform: translateY(1px) scale(0.99); }
.btn-whatsapp .wa-dot { width:10px; height:10px; border-radius:50%; background:#fff; opacity:.85; }


/* Botón Agregar grande y azul */
.btn-agregar {
  background: #0d6efd; color: #fff; border: none;
  padding: 12px 16px; border-radius: 10px; font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 6px 16px rgba(13,110,253,.25);
  transition: transform .04s ease, box-shadow .2s ease;
}
.btn-agregar:hover { box-shadow: 0 8px 22px rgba(13,110,253,.35); }
.btn-agregar:active { transform: translateY(1px) scale(0.99); }
@media (max-width: 576px){ .btn-agregar { width: 100%; } }


/* =========================
   App-like Typography Scale
   (sin tocar tu HTML ni lógica)
   ========================= */
:root{
  --app-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  --fs-title: clamp(20px, 4.5vw, 22px);   /* Títulos de referencia / producto */
  --fs-subtitle: clamp(17px, 3.8vw, 19px);
  --fs-body: 16px;                        /* Texto base como en apps */
  --fs-label: 15px;                       /* Etiquetas "Talla", "Cantidad" */
  --fs-button: 17px;                      /* Botones como en apps */
  --lh-compact: 1.25;
  --lh-normal: 1.35;
}
html, body { font-family: var(--app-font); font-size: var(--fs-body); line-height: var(--lh-normal); }

/* Títulos visibles en cards y secciones */
h1, h2 { font-size: var(--fs-title); line-height: var(--lh-compact); font-weight: 800; }
h3, h4 { font-size: var(--fs-subtitle); line-height: var(--lh-compact); font-weight: 700; }
.card h3, .card h4, .product-card h3, .product-card h4 { font-size: var(--fs-subtitle); line-height: var(--lh-compact); font-weight: 700; }

/* Texto y etiquetas */
label, .label, .tallas label, .talla-item label, .form-label { font-size: var(--fs-label); }
p, li, td, th, small, .text { font-size: var(--fs-body); }

/* Inputs */
input, select, textarea { font-size: var(--fs-body); }
.qty-input { font-size: var(--fs-body); }

/* Botones */
button, .btn, input[type="button"], input[type="submit"] { font-size: var(--fs-button); }
.btn-agregar, .btn-whatsapp { font-size: var(--fs-button); padding: 14px 18px; border-radius: 12px; }
.qty-btn { font-size: 22px; width: 38px; height: 38px; } /* más cómodos para el dedo */


/* =========================
   App-like Weights & Line Heights
   ========================= */
:root{
  --w-title: 800;
  --w-subtitle: 700;
  --w-label: 600;
  --w-body: 400;
  --w-button: 700;

  --lh-tight: 1.18;
  --lh-normal: 1.35;
  --lh-relaxed: 1.5;
}

/* Títulos principales */
h1, h2 {
  font-weight: var(--w-title);
  line-height: var(--lh-tight);
  letter-spacing: 0.1px;
  margin-bottom: 8px;
}

/* Subtítulos y nombres de producto */
h3, h4,
.card h3, .card h4,
.product-card h3, .product-card h4 {
  font-weight: var(--w-subtitle);
  line-height: var(--lh-tight);
  letter-spacing: 0.1px;
  margin-bottom: 6px;
}

/* Texto base */
body, p, li, td, th, small, .text {
  font-weight: var(--w-body);
  line-height: var(--lh-relaxed);
  letter-spacing: 0.1px;
}

/* Etiquetas y metadatos (tallas, cantidad, etc.) */
label, .label, .tallas label, .talla-item label, .form-label {
  font-weight: var(--w-label);
  line-height: var(--lh-normal);
  letter-spacing: 0.15px;
}

/* Inputs */
input, select, textarea, .qty-input {
  font-weight: var(--w-body);
  line-height: var(--lh-normal);
}

/* Botones */
button, .btn, input[type="button"], input[type="submit"],
.btn-agregar, .btn-whatsapp {
  font-weight: var(--w-button);
  line-height: var(--lh-normal);
  letter-spacing: 0.2px;
}


/* =========================
   Aesthetic Pass v2 (App-like)
   ========================= */

/* Palette & tokens */
:root{
  --brand-blue: #0d6efd;
  --brand-green: #25D366;
  --text-strong: #0f172a;   /* slate-900 */
  --text-body: #1f2937;     /* gray-800 */
  --text-muted: #6b7280;    /* gray-500 */
  --bg-card: #ffffff;
  --border: #e5e7eb;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);

  --radius: 12px;
  --radius-lg: 14px;
  --radius-xl: 16px;

  /* Typography scale (refined) */
  --fs-title: clamp(22px, 5vw, 26px);
  --fs-subtitle: clamp(18px, 4.2vw, 20px);
  --fs-body: 16px;
  --fs-label: 15.5px;
  --fs-button: 18px;

  --w-title: 800;
  --w-subtitle: 700;
  --w-label: 600;
  --w-body: 400;
  --w-button: 700;

  --lh-tight: 1.18;
  --lh-normal: 1.35;
  --lh-relaxed: 1.5;
}

html, body {
  color: var(--text-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

/* Headings */
h1, h2 {
  font-size: var(--fs-title);
  font-weight: var(--w-title);
  line-height: var(--lh-tight);
  letter-spacing: .2px;
  color: var(--text-strong);
  margin: 10px 0 8px;
}
h3, h4, .card h3, .card h4, .product-card h3, .product-card h4 {
  font-size: var(--fs-subtitle);
  font-weight: var(--w-subtitle);
  line-height: var(--lh-tight);
  letter-spacing: .15px;
  color: var(--text-strong);
  margin: 8px 0 6px;
}

/* Labels & text */
label, .label, .tallas label, .talla-item label, .form-label {
  font-size: var(--fs-label);
  font-weight: var(--w-label);
  line-height: var(--lh-normal);
  letter-spacing: .2px;
  color: var(--text-strong);
}
p, li, td, th, small, .text { font-size: var(--fs-body); line-height: var(--lh-relaxed); }

/* Cards */
.card, .product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card img, .product-card img {
  display: block;
  width: 100%;
  height: auto;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  object-fit: cover;
}

/* Buttons base */
button, .btn, input[type="button"], input[type="submit"] {
  font-size: var(--fs-button);
  font-weight: var(--w-button);
  border-radius: var(--radius-lg);
  min-height: 44px; /* touch target */
  line-height: 1.1;
  letter-spacing: .2px;
}

/* Primary actions */
.btn-agregar {
  background: var(--brand-blue); color: #fff; border: none;
  padding: 14px 18px; border-radius: var(--radius-lg);
  box-shadow: 0 10px 26px rgba(13,110,253,.28);
  transition: transform .04s ease, box-shadow .25s ease;
}
.btn-agregar:hover { box-shadow: 0 14px 32px rgba(13,110,253,.36); }
.btn-agregar:active { transform: translateY(1px) scale(0.99); }

.btn-whatsapp {
  background: var(--brand-green); color: #fff; border: none;
  padding: 16px 20px; border-radius: var(--radius-xl);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.35);
}
@media (max-width: 576px){
  .btn-agregar, .btn-whatsapp { width: 100%; }
}

/* Focus ring (accesible) */
:where(button, .btn, input, select, textarea):focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(13,110,253,.25), 0 0 0 5px rgba(13,110,253,.15);
}

/* Inputs & steppers */
input, select, textarea { border-radius: var(--radius); }
.qty-wrap {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 6px 8px;
  background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.03);
}
.qty-btn {
  border: none; background: #f3f4f6; width: 44px; height: 44px;
  border-radius: 12px; font-size: 22px; line-height: 1; cursor: pointer;
  transition: transform .04s ease, background .15s ease;
}
.qty-btn:hover { background: #e5e7eb; }
.qty-btn:active { transform: scale(0.98); }
.qty-input {
  width: 54px; text-align: center; border: none; background: transparent;
  font-weight: 700; color: var(--text-strong);
}

/* Gallery/carousel (1x mobile/tablet) */
.ref-gallery {
  display: flex !important; flex-wrap: nowrap !important; gap: 14px;
  overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  padding: 0 12px;
}
.ref-gallery::-webkit-scrollbar { display: none; }
.ref-gallery > * { scroll-snap-align: center; }
@media (max-width: 992px) {
  .ref-gallery > * { flex: 0 0 100% !important; max-width: 100% !important; }
}
/* fallback */
@media (max-width: 992px) {
  .gallery { display:flex !important; flex-wrap:nowrap !important; overflow-x:auto; scroll-snap-type:x mandatory; gap:14px; }
  .gallery > * { flex:0 0 100% !important; max-width:100% !important; scroll-snap-align:center; }
}


/* === Brand hero title (Angels style) === */
.brand-title-hero {
  color: #fff !important;
  font-size: clamp(28px, 6.5vw, 40px);
  font-weight: 900;
  letter-spacing: .4px;
  line-height: 1.1;
  text-shadow: 0 2px 6px rgba(0,0,0,.30);
  margin: 6px 0;
}
.brand-title-hero a { color: #fff !important; text-decoration: none; }


/* =========================
   Mobile-first touch targets
   ========================= */

/* Botones del carrusel de fotos del producto: más grandes (mínimo 44x44) */
.product-carousel .carousel-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  border-radius: 999px;
  padding: 0;
  background-color: rgba(0,0,0,0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.product-carousel .carousel-btn:active { transform: translateY(-50%) scale(0.98); }

/* Inputs numéricos del grid de tallas: altura cómoda */
.fila-talla input[type="number"],
.talla-cantidad input[type="number"] {
  min-height: 44px;
  border-radius: 12px;
}

/* Modal del pedido: experiencia tipo app en móvil */
#modal .modal-card {
  background: #fff;
  width: 92%;
  max-width: 820px;
  border-radius: 16px;
  padding: 18px;
}
@media (max-width: 576px) {
  #modal { align-items: flex-end; }
  #modal .modal-card {
    width: 100%;
    max-width: 100%;
    border-radius: 18px 18px 0 0;
    margin: 0 !important;
    height: 92vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }
  #modal .modal-body-scroll {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 4px;
    flex: 1 1 auto;
  }
  #modal .modal-actions {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding-top: 10px;
    box-shadow: 0 -10px 22px rgba(0,0,0,.06);
  }
  #modal table { font-size: 14px; }
  #modal th, #modal td { padding: 6px; }
  #modal input, #modal textarea { min-height: 44px; font-size: 16px; }
  #modal button { min-height: 44px; border-radius: 12px; }
}
