/* modals.css — Drawer carrito, drawer favoritos, modal checkout, modal producto,
                modal de autenticación (login / registro / recuperar contraseña)
   Tu-Librería */

/* ══════════════════════════════════════════════════════════════════
   AUTH MODAL — Login / Registro / Recuperar contraseña
   ══════════════════════════════════════════════════════════════════ */

/* Overlay oscuro detrás del modal */
.auth-overlay {
  position: fixed; inset: 0;
  background: rgba(26,24,20,0.6);
  z-index: 500;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease;
  backdrop-filter: blur(3px);
}
.auth-overlay.open { opacity: 1; pointer-events: all; }

/* Contenedor del modal */
.auth-modal {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -48%) scale(0.97);
  width: min(440px, 95vw);
  background: var(--warm-white);
  border-radius: var(--radius-xl);
  z-index: 501;
  opacity: 0; pointer-events: none;
  transition: all 0.28s cubic-bezier(0.34,1.1,0.64,1);
  box-shadow: 0 24px 80px rgba(26,24,20,0.2);
  overflow: hidden;
}
.auth-modal.open {
  opacity: 1; pointer-events: all;
  transform: translate(-50%,-50%) scale(1);
}

/* Header del modal */
.auth-modal-header {
  padding: 24px 24px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.auth-modal-logo {
  font-family: 'DM Serif Display', serif;
  font-size: 20px; color: var(--ink);
}
.auth-modal-close {
  background: none; border: none; cursor: pointer;
  padding: 6px; color: var(--ink-muted);
  border-radius: 50%;
  transition: background var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.auth-modal-close:hover { background: var(--surface); }
.auth-modal-close svg { width: 18px; height: 18px; display: block; }

/* Tabs de navegación login / registrarme */
.auth-tabs {
  display: flex; gap: 0;
  border-bottom: 1.5px solid var(--border);
  margin: 20px 24px 0;
}
.auth-tab-btn {
  flex: 1; padding: 10px 0;
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 600;
  color: var(--ink-light);
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1.5px;
  transition: all var(--transition);
}
.auth-tab-btn:hover { color: var(--ink); }
.auth-tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Cuerpo del modal */
.auth-modal-body { padding: 24px; }

/* Campo de formulario */
.auth-field {
  display: flex; flex-direction: column; gap: 5px;
  margin-bottom: 14px;
}
.auth-field label {
  font-size: 12px; font-weight: 600;
  color: var(--ink-muted); letter-spacing: 0.03em;
}
.auth-field input {
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit; font-size: 14px; color: var(--ink);
  background: var(--warm-white);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.auth-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.auth-field input.error { border-color: #EF4444; }

/* Fila de dos columnas (Nombre / Apellido) */
.auth-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}

/* Botón principal */
.auth-btn-primary {
  width: 100%; padding: 13px;
  background: var(--accent); color: white;
  border: none; border-radius: 50px;
  font-family: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer; margin-top: 4px;
  transition: all var(--transition);
}
.auth-btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(200,69,42,0.3);
}
.auth-btn-primary:disabled { opacity: 0.7; cursor: not-allowed; }

/* Mensaje de error */
.auth-error {
  display: none; align-items: center; gap: 8px;
  background: #FEF2F2; border: 1px solid #FCA5A5;
  color: #B91C1C; padding: 10px 12px;
  border-radius: var(--radius); font-size: 13px;
  margin-bottom: 14px;
}
.auth-error svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Mensaje de éxito (recuperar contraseña) */
.auth-success {
  display: none; align-items: center; gap: 8px;
  background: var(--success-light); border: 1px solid #6EE7B7;
  color: var(--success); padding: 12px;
  border-radius: var(--radius); font-size: 13px;
  margin-bottom: 14px;
}
.auth-success svg { width: 16px; height: 16px; flex-shrink: 0; }

/* Link "¿Olvidaste tu contraseña?" */
.auth-link-row {
  text-align: right; margin-top: -6px; margin-bottom: 14px;
}
.auth-link {
  font-size: 13px; color: var(--accent);
  background: none; border: none; cursor: pointer;
  font-family: inherit; padding: 0;
  text-decoration: underline; text-underline-offset: 2px;
}
.auth-link:hover { color: var(--accent-hover); }

/* Texto "¿Ya tenés cuenta? Iniciá sesión" */
.auth-switch {
  text-align: center; margin-top: 16px;
  font-size: 13px; color: var(--ink-muted);
}
.auth-switch button {
  background: none; border: none; cursor: pointer;
  font-family: inherit; font-size: 13px;
  color: var(--accent); font-weight: 600;
  padding: 0; text-decoration: underline; text-underline-offset: 2px;
}
.auth-switch button:hover { color: var(--accent-hover); }

/* Divider "o" */
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0; color: var(--ink-light); font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ══════════════════════════════════════════════════════════════════
   HEADER — Botón de usuario logueado + dropdown
   ══════════════════════════════════════════════════════════════════ */

/* Wrapper relativo para posicionar el dropdown */
.header-user-wrapper {
  position: relative;
}

/* Botón del usuario logueado (reemplaza el "Mi cuenta" estático) */
#headerUserBtn {
  display: none; /* oculto por defecto; auth.js lo muestra cuando hay sesión */
}

/* Nombre del usuario en el header — truncado si es muy largo */
#headerUserName {
  max-width: 80px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Dropdown del usuario */
.user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 200px;
  background: var(--warm-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 250;
  opacity: 0; pointer-events: none;
  transform: translateY(-6px);
  transition: all 0.2s ease;
}
.user-dropdown.open {
  opacity: 1; pointer-events: all;
  transform: translateY(0);
}
.user-dropdown-header {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border-light);
}
.user-dropdown-name {
  font-size: 14px; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-dropdown-email {
  font-size: 11px; color: var(--ink-light); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.user-dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  font-size: 13px; font-weight: 500; color: var(--ink);
  cursor: pointer; background: none; border: none;
  width: 100%; text-align: left; font-family: inherit;
  transition: background var(--transition);
  text-decoration: none;
}
.user-dropdown-item:hover { background: var(--surface); }
.user-dropdown-item svg { width: 16px; height: 16px; color: var(--ink-muted); flex-shrink: 0; }
.user-dropdown-divider { height: 1px; background: var(--border-light); margin: 4px 0; }
.user-dropdown-item.danger { color: #B91C1C; }
.user-dropdown-item.danger svg { color: #B91C1C; }
.user-dropdown-item.danger:hover { background: #FEF2F2; }

/* ── CART DRAWER ── */
  .cart-overlay {
    position: fixed; inset: 0; background: rgba(26,24,20,0.5);
    z-index: 200; opacity: 0; pointer-events: none;
    transition: opacity var(--transition);
    backdrop-filter: blur(2px);
  }
  .cart-overlay.open { opacity: 1; pointer-events: all; }
  .cart-drawer {
    position: fixed; top: 0; right: 0; bottom: 0; width: 420px;
    background: var(--warm-white); z-index: 201;
    transform: translateX(100%); transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    display: flex; flex-direction: column;
    box-shadow: -8px 0 40px rgba(26,24,20,0.12);
  }
  .cart-drawer.open { transform: translateX(0); }
  .cart-header {
    padding: 20px 24px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
  }
  .cart-header h2 { font-family: 'DM Serif Display', serif; font-size: 22px; }
  .cart-close {
    background: none; border: none; cursor: pointer; padding: 6px;
    color: var(--ink-muted); border-radius: var(--radius);
    transition: background var(--transition);
  }
  .cart-close:hover { background: var(--surface); }
  .cart-close svg { width: 20px; height: 20px; display: block; }
  .cart-items { flex: 1; overflow-y: auto; padding: 20px 24px; }
  .cart-empty {
    text-align: center; padding: 60px 20px; color: var(--ink-muted);
  }
  .cart-empty svg { width: 48px; height: 48px; margin: 0 auto 16px; display: block; color: var(--ink-light); }
  .cart-item {
    display: flex; gap: 14px; padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
  }
  .ci-img {
    width: 72px; height: 72px; background: var(--surface);
    border-radius: var(--radius); overflow: hidden; flex-shrink: 0;
  }
  .ci-img img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
  .ci-body { flex: 1; }
  .ci-name { font-size: 13px; font-weight: 500; line-height: 1.4; margin-bottom: 6px; color: var(--ink); }
  .ci-brand { font-size: 11px; color: var(--ink-light); margin-bottom: 8px; }
  .ci-controls { display: flex; align-items: center; gap: 8px; }
  .qty-btn {
    width: 26px; height: 26px; border: 1px solid var(--border);
    border-radius: var(--radius); background: var(--surface);
    cursor: pointer; font-size: 16px; color: var(--ink);
    display: flex; align-items: center; justify-content: center;
    transition: all var(--transition);
  }
  .qty-btn:hover { background: var(--accent); color: white; border-color: var(--accent); }
  .qty-val { font-size: 14px; font-weight: 600; min-width: 20px; text-align: center; }
  .ci-remove {
    background: none; border: none; cursor: pointer; padding: 4px;
    color: var(--ink-light); transition: color var(--transition);
    margin-left: auto; align-self: flex-start;
  }
  .ci-remove:hover { color: var(--accent); }
  .ci-remove svg { width: 14px; height: 14px; display: block; }
  .ci-price { font-size: 15px; font-weight: 700; font-family: 'DM Serif Display', serif; color: var(--ink); white-space: nowrap; }
  .cart-footer {
    padding: 20px 24px; border-top: 1px solid var(--border);
  }
  .cart-summary-row {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 13px; color: var(--ink-muted); margin-bottom: 8px;
  }
  .cart-total-row {
    display: flex; justify-content: space-between; align-items: baseline;
    margin: 16px 0 20px; padding-top: 12px; border-top: 1px solid var(--border);
  }
  .cart-total-label { font-size: 15px; font-weight: 600; color: var(--ink); }
  .cart-total-val { font-size: 26px; font-weight: 700; font-family: 'DM Serif Display', serif; color: var(--ink); }
  .checkout-btn {
    width: 100%; padding: 15px; background: var(--accent); color: white;
    border: none; border-radius: 50px; font-family: inherit;
    font-size: 15px; font-weight: 600; cursor: pointer;
    transition: all var(--transition); display: flex;
    align-items: center; justify-content: center; gap: 10px;
  }
  .checkout-btn:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(200,69,42,0.3); }
  .ml-note {
    text-align: center; margin-top: 12px; font-size: 12px; color: var(--ink-light);
    display: flex; align-items: center; justify-content: center; gap: 6px;
  }
  .ml-note img { height: 18px; }

  /* ── CHECKOUT MODAL ── */
  .co-overlay {
    position:fixed; inset:0; background:rgba(26,24,20,0.6);
    z-index:400; opacity:0; pointer-events:none;
    transition:opacity 0.25s; backdrop-filter:blur(3px);
  }
  .co-overlay.open { opacity:1; pointer-events:all; }
  .co-modal {
    position:fixed; top:50%; left:50%; transform:translate(-50%,-48%) scale(0.97);
    width:min(560px,95vw); max-height:92vh; overflow-y:auto;
    background:var(--warm-white); border-radius:var(--radius-xl);
    z-index:401; opacity:0; pointer-events:none;
    transition:all 0.28s cubic-bezier(0.34,1.1,0.64,1);
    box-shadow:0 24px 80px rgba(26,24,20,0.2);
  }
  .co-modal.open { opacity:1; pointer-events:all; transform:translate(-50%,-50%) scale(1); }
  .co-header { padding:24px 28px 0; display:flex; align-items:center; justify-content:space-between; }
  .co-header h2 { font-family:'DM Serif Display',serif; font-size:22px; }
  .co-close { background:none; border:none; cursor:pointer; padding:6px; color:var(--ink-muted); border-radius:50%; transition:background var(--transition); }
  .co-close:hover { background:var(--surface); }
  .co-close svg { width:20px; height:20px; display:block; }
  .co-body { padding:20px 28px 28px; }
  .co-step { display:none; }
  .co-step.active { display:block; }
  .co-section-title { font-size:11px; font-weight:700; letter-spacing:0.1em; text-transform:uppercase; color:var(--ink-light); margin:20px 0 12px; }
  .co-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
  .co-row.full { grid-template-columns:1fr; }
  .co-field { display:flex; flex-direction:column; gap:5px; }
  .co-field label { font-size:12px; font-weight:600; color:var(--ink-muted); }
  .co-field input, .co-field select, .co-field textarea {
    padding:10px 12px; border:1.5px solid var(--border); border-radius:var(--radius);
    font-family:inherit; font-size:14px; color:var(--ink); background:var(--warm-white);
    outline:none; transition:border-color var(--transition);
  }
  .co-field input:focus, .co-field select:focus, .co-field textarea:focus { border-color:var(--accent); }
  .co-field input.error, .co-field select.error { border-color:#EF4444; }
  .co-shipping-opts { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:4px; }
  .co-ship-opt {
    border:1.5px solid var(--border); border-radius:var(--radius-lg); padding:14px;
    cursor:pointer; transition:all var(--transition); text-align:center;
  }
  .co-ship-opt:hover { border-color:var(--accent); }
  .co-ship-opt.selected { border-color:var(--accent); background:var(--accent-light); }
  .co-ship-icon { font-size:24px; margin-bottom:6px; }
  .co-ship-name { font-size:13px; font-weight:600; color:var(--ink); }
  .co-ship-desc { font-size:11px; color:var(--ink-muted); margin-top:2px; }
  .co-ship-price { font-size:13px; font-weight:700; color:var(--accent); margin-top:4px; }
  .co-summary-line { display:flex; justify-content:space-between; font-size:13px; color:var(--ink-muted); padding:5px 0; }
  .co-summary-total { display:flex; justify-content:space-between; align-items:baseline; padding:12px 0 0; border-top:1.5px solid var(--border); margin-top:8px; }
  .co-summary-total span:first-child { font-size:15px; font-weight:600; }
  .co-summary-total span:last-child { font-family:'DM Serif Display',serif; font-size:28px; }
  .co-pay-opts { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
  .co-pay-opt { border:1.5px solid var(--border); border-radius:var(--radius-lg); padding:14px 10px; cursor:pointer; transition:all var(--transition); display:flex; align-items:center; gap:10px; }
  .co-pay-opt:hover { border-color:var(--accent); }
  .co-pay-opt.selected { border-color:var(--accent); background:var(--accent-light); }
  .co-pay-opt svg { flex-shrink:0; }
  .co-pay-name { font-size:13px; font-weight:600; }
  .co-pay-desc { font-size:11px; color:var(--ink-muted); }
  .co-btn { width:100%; padding:14px; border:none; border-radius:50px; font-family:inherit; font-size:15px; font-weight:600; cursor:pointer; transition:all var(--transition); display:flex; align-items:center; justify-content:center; gap:8px; margin-top:20px; }
  .co-btn-primary { background:var(--accent); color:white; }
  .co-btn-primary:hover { background:var(--accent-hover); transform:translateY(-1px); box-shadow:0 6px 20px rgba(200,69,42,0.3); }
  .co-btn-ghost { background:var(--surface); color:var(--ink); }
  .co-btn-ghost:hover { background:var(--border); }
  .co-progress { display:flex; align-items:center; gap:0; margin:16px 28px 0; }
  .co-step-dot { width:28px; height:28px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:700; flex-shrink:0; transition:all var(--transition); }
  .co-step-dot.done { background:var(--success); color:white; }
  .co-step-dot.current { background:var(--accent); color:white; }
  .co-step-dot.pending { background:var(--surface); color:var(--ink-light); border:1.5px solid var(--border); }
  .co-step-line { flex:1; height:2px; background:var(--border); }
  .co-step-line.done { background:var(--success); }
  .co-step-label { font-size:10px; text-align:center; color:var(--ink-muted); margin-top:4px; }

  /* ── SUCCESS SCREEN ── */
  .co-success { text-align:center; padding:20px 0 8px; }
  .co-success-icon { width:72px; height:72px; background:var(--success-light); border-radius:50%; display:flex; align-items:center; justify-content:center; margin:0 auto 20px; }
  .co-success-icon svg { width:36px; height:36px; color:var(--success); }
  .co-order-num { font-size:13px; background:var(--surface); border-radius:var(--radius); padding:10px 16px; display:inline-block; font-weight:600; margin:12px 0; letter-spacing:0.05em; }

  /* ── PRODUCT DETAIL MODAL ── */
  .pd-overlay {
    position: fixed; inset: 0; background: rgba(26,24,20,0.6);
    z-index: 300; opacity: 0; pointer-events: none;
    transition: opacity 0.25s ease; backdrop-filter: blur(3px);
  }
  .pd-overlay.open { opacity: 1; pointer-events: all; }
  .pd-modal {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -48%) scale(0.97);
    width: min(900px, 95vw); max-height: 90vh;
    overflow: hidden;                          /* clips scrollbar dentro del border-radius */
    background: var(--warm-white); border-radius: var(--radius-xl);
    z-index: 301; opacity: 0; pointer-events: none;
    transition: all 0.28s cubic-bezier(0.34,1.1,0.64,1);
    box-shadow: 0 24px 80px rgba(26,24,20,0.2);
  }
  .pd-modal.open { opacity: 1; pointer-events: all; transform: translate(-50%,-50%) scale(1); }

  /* El scroll ocurre aquí, adentro del modal (la barra queda dentro del border-radius) */
  .pd-scroll-wrap {
    overflow-y: auto;
    max-height: 90vh;
  }
  /* Scrollbar sin flechitas */
  .pd-scroll-wrap::-webkit-scrollbar { width: 6px; }
  .pd-scroll-wrap::-webkit-scrollbar-track { background: transparent; }
  .pd-scroll-wrap::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
  .pd-scroll-wrap::-webkit-scrollbar-thumb:hover { background: var(--ink-light); }
  .pd-scroll-wrap::-webkit-scrollbar-button { display: none; }

  .pd-close {
    position: sticky; top: 16px; float: right; margin: 16px 16px 0 0;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 50%; width: 36px; height: 36px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    color: var(--ink-muted); transition: all var(--transition); z-index: 2;
  }
  .pd-close:hover { background: var(--accent); color: white; border-color: var(--accent); }
  .pd-close svg { width: 16px; height: 16px; display: block; }

  /* ── Layout: top (imagen + info) + bottom (desc + specs) ── */
  .pd-inner { padding: 32px 36px 36px; clear: both; }

  .pd-top {
    display: flex; gap: 36px; align-items: center; margin-bottom: 28px;
  }
  .pd-img-wrap {
    flex-shrink: 0; width: 340px;
    display: flex; align-items: center; justify-content: center;
  }
  .pd-img-wrap img { width: 100%; max-height: 340px; object-fit: contain; }

  .pd-info-col { flex: 1; min-width: 0; }
  .pd-breadcrumb { font-size: 12px; color: var(--ink-light); margin-bottom: 8px; }
  .pd-brand { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
  .pd-name { font-family: 'DM Serif Display', serif; font-size: 22px; line-height: 1.25; color: var(--ink); margin-bottom: 16px; }
  .pd-price-main { font-family: 'DM Serif Display', serif; font-size: 30px; font-weight: 700; color: var(--ink); }
  .pd-price-neto { font-size: 12px; color: var(--ink-light); margin-top: 3px; margin-bottom: 8px; }
  .pd-price-local {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--success-light); color: var(--success);
    padding: 5px 12px; border-radius: 20px; font-size: 13px;
    font-weight: 600; margin-bottom: 12px;
  }
  .pd-price-local span { background: var(--success); color: white; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 20px; }

  .pd-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
  .pd-add-btn {
    width: 100%; padding: 13px; background: var(--ink); color: white;
    border: none; border-radius: 50px; font-family: inherit;
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: all var(--transition); display: flex; align-items: center; justify-content: center; gap: 8px;
  }
  .pd-add-btn:hover { background: var(--accent); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(200,69,42,0.25); }
  .pd-wa-btn {
    width: 100%; padding: 12px; background: #25D366; color: white;
    border: none; border-radius: 50px; font-family: inherit;
    font-size: 14px; font-weight: 600; cursor: pointer;
    transition: all var(--transition); display: flex; align-items: center; justify-content: center; gap: 8px;
  }
  .pd-wa-btn:hover { background: #1ebe5d; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,211,102,0.3); }

  /* ── Bottom: descripción y specs a ancho completo ── */
  .pd-bottom { border-top: 1px solid var(--border); padding-top: 24px; }
  .pd-desc { font-size: 14px; line-height: 1.75; color: var(--ink-muted); margin-bottom: 24px; }
  .pd-specs-title { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-light); margin-bottom: 10px; }
  .pd-specs { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
  .pd-specs tr { border-bottom: 1px solid var(--border-light); }
  .pd-specs td { padding: 7px 4px; font-size: 13px; }
  .pd-specs td:first-child { color: var(--ink-muted); width: 35%; }
  .pd-specs td:last-child { font-weight: 500; color: var(--ink); }

  @media (max-width: 640px) {
    /* Botón cerrar: fijo en la esquina del modal, sin float */
    .pd-close {
      position: absolute;
      float: none;
      top: 12px;
      right: 12px;
      margin: 0;
    }
    /* El modal necesita position relative para que absolute funcione en sus hijos */
    .pd-modal { position: fixed; } /* ya lo tiene, pero aseguramos containing block */
    /* Espacio superior para que el contenido no quede bajo el botón close */
    .pd-scroll-wrap { padding-top: 52px; }

    /* Layout columna en mobile */
    .pd-inner { padding: 0 16px 24px; clear: none; }
    .pd-top { flex-direction: column; gap: 12px; }

    /* Imagen: contenedor con overflow hidden para evitar superposición */
    .pd-img-wrap {
      width: 100%;
      height: 200px;
      overflow: hidden;         /* evita que la imagen desborde sobre el texto */
      flex-shrink: 0;
    }
    .pd-img-wrap img {
      width: 100%;
      height: 100%;             /* forzar al contenedor de 200px */
      max-height: 200px;        /* sobreescribe el 340px de desktop */
      object-fit: contain;
    }

    .pd-name { font-size: 18px; }
    .pd-price-main { font-size: 24px; }
    .pd-breadcrumb { font-size: 11px; }
  }
