
/* ============================================
   RESPONSIVE MÓVIL GLOBAL - iPhone/Samsung
   ============================================ */

/* Viewport fix para móviles modernos */
html { height: -webkit-fill-available; }
body { min-height: 100vh; min-height: -webkit-fill-available; }

/* NAV en móvil */
@media(max-width:640px){
  .nav { padding: 10px 16px !important; gap: 8px !important; }
  .brand img { height: 36px !important; }
  .nav-cart { font-size: 20px !important; }
  .menu.open { 
    position: fixed !important; top: 0 !important; left: 0 !important;
    width: 100vw !important; height: 100vh !important;
    background: #fff !important; z-index: 9997 !important;
    display: flex !important; flex-direction: column !important;
    padding: 60px 24px 24px !important; gap: 16px !important;
    overflow-y: auto !important;
  }
  .hamb { display: flex !important; }

  /* Grid productos - 2 columnas en móvil */
  .product-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; }
  .product-card .product-img { height: 160px !important; }
  .product-card h3 { font-size: 13px !important; }
  .product-card .price { font-size: 18px !important; }
  .card-btn-group .btn-ver { font-size: 12px !important; min-height: 44px !important; }
  .card-btn-group .btn-regalo { font-size: 11px !important; min-height: 40px !important; }

  /* Banner hero */
  .ninos-banner-wrap { border-radius: 16px !important; }

  /* Section head */
  .ninos-section-head { flex-direction: column !important; gap: 12px !important; }
  .ninos-section-head .h2 { font-size: 24px !important; }

  /* Filtros */
  .ninos-filters { gap: 8px !important; }
  .ninos-filters select { min-width: 0 !important; width: 100% !important; font-size: 13px !important; }
  .ninos-filters label { width: calc(50% - 4px) !important; }

  /* Cart drawer */
  .cart-drawer { width: 100vw !important; padding: 16px !important; }
  .drawer-head h2 { font-size: 20px !important; }

  /* Modal producto */
  #productModal { padding: 8px !important; }
  #productModal .product-detail-modal {
    width: 96vw !important;
    max-height: 96vh !important;
    padding: 14px !important;
    border-radius: 20px !important;
  }
  #productModal .product-detail-grid { grid-template-columns: 1fr !important; gap: 16px !important; }
  #productModal #modalProductImage { height: 220px !important; }
  #productModal .detail-info h2 { font-size: 22px !important; }
  #productModal .detail-price { font-size: 32px !important; }
  #productModal .detail-options { grid-template-columns: 1fr !important; }
  #productModal .recommend-grid { grid-template-columns: 1fr 1fr !important; }

  /* Checkout modal */
  .checkout-modal { width: 96vw !important; padding: 16px !important; border-radius: 20px !important; }
  .checkout-grid-fields { grid-template-columns: 1fr !important; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr !important; gap: 20px !important; }
  
  /* Paginación */
  .pager-pages { display: none !important; }
}

/* Tablets */
@media(min-width:641px) and (max-width:900px){
  .product-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 16px !important; }
  #productModal .product-detail-grid { grid-template-columns: 1fr !important; }
  .footer-grid { grid-template-columns: 1fr 1fr !important; }
}

/* Touch targets - mínimo 44px en móvil */
@media(max-width:900px){
  button, a, select, input[type="number"] {
    min-height: 44px !important;
  }
  .detail-gallery button { 
    flex: 0 0 64px !important; width: 64px !important; height: 64px !important; 
  }
}



/* FIX ULTRA FINAL: títulos completos de productos sin corte */
body .product-card h3,
body .product-grid .product-card h3,
body #productsGrid .product-card h3,
body .products-grid .product-card h3,
body .product-card .product-body h3,
body .product-card .product-title,
body .product-card .product-name,
body .product-name-card,
body .recommend-card .name,
body .similar-card .name,
body .related-card .name {
  display: block !important;
  -webkit-box-orient: initial !important;
  -webkit-line-clamp: unset !important;
  line-clamp: unset !important;
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: normal !important;
  word-break: break-word !important;
  overflow-wrap: anywhere !important;
  hyphens: auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin-bottom: 10px !important;
}

body .product-card .product-body,
body .product-card,
body .recommend-card,
body .similar-card,
body .related-card {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
}

@media (max-width: 768px){
  body .product-card h3,
  body .product-grid .product-card h3,
  body #productsGrid .product-card h3,
  body .products-grid .product-card h3,
  body .product-card .product-body h3,
  body .product-card .product-title,
  body .product-card .product-name,
  body .product-name-card,
  body .recommend-card .name,
  body .similar-card .name,
  body .related-card .name {
    font-size: 14px !important;
    line-height: 1.15 !important;
  }
}

