/*
 * ╔══════════════════════════════════════════════════════════════╗
 * ║         PINTUDECO — RESPONSIVE STYLESHEET                    ║
 * ║  Solo afecta tablet (≤1024px) y móvil (≤768px / ≤480px)    ║
 * ║  PC (>1024px) sin cambios.                                   ║
 * ╚══════════════════════════════════════════════════════════════╝
 */

/* ═══════════════════════════════════════════════
   TABLET — ≤1024px
═══════════════════════════════════════════════ */
@media (max-width: 1024px) {

  /* ── Nav: reducir padding y ocultar CTA en tablet mediano ── */
  nav {
    padding: 1rem 1.8rem;
  }
  nav ul { gap: 1rem; }
  nav ul a { font-size: .82rem; }

  /* ── Hero: reducir texto y reposicionar ── */
  #hero { height: 100svh; }

  .hero-carousel-list {
    width: 96%;
    max-width: 96%;
  }

  .hero-item:nth-child(2) .introduce {
    width: min(360px, 44%);
  }

  .hero-item .introduce .title {
    font-size: clamp(2.8rem, 5vw, 4.5rem);
  }

  /* ── Secciones: padding ajustado ── */
  section { padding: 5rem 2rem; }
  #como-trabajamos { padding: 5rem 2rem !important; }
  #news { padding: 5rem 2rem !important; }
  #nosotros, #contacto { padding: 5rem 2rem !important; }

  /* ── Footer: 2 columnas en tablet ── */
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }

  /* ── Grids que necesitan colapsar ── */
  .visualizer-grid { grid-template-columns: 1fr; }
  .formula-container { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .metrics-row { grid-template-columns: repeat(2, 1fr); }

  /* ── Product carousel ── */
  .product-item {
    max-width: 92%;
    gap: 2rem;
    grid-template-columns: 1fr 1.1fr;
  }
  .product-name { font-size: 3rem; }

  /* ── Nosotros inline grids ── */
  #nosotros > .fade-in[style*="grid-template-columns:1fr 1fr"],
  #nosotros div[style*="grid-template-columns: 1fr 1fr"],
  div[style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }

  div[style*="grid-template-columns:1.2fr 1fr"] { grid-template-columns: 1fr !important; }
  div[style*="grid-template-columns:repeat(3,1fr)"] { grid-template-columns: 1fr 1fr !important; }
  div[style*="grid-template-columns: repeat(3, 1fr)"] { grid-template-columns: 1fr 1fr !important; }

  /* ── Contacto 2 col → 1 col ── */
  div[style*="grid-template-columns:1.2fr 1fr"],
  div[style*="grid-template-columns: 1.2fr 1fr"] { grid-template-columns: 1fr !important; }

  /* ── Como trabajamos en tablet ── */
  .como-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
  }
  .como-arrow { transform: rotate(90deg); padding: .5rem 0; }
  .como-stats {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
  }
  .como-stat-divider { display: none; }
}

/* ═══════════════════════════════════════════════
   MÓVIL — ≤768px  (teléfonos en general)
═══════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ── Reset global ── */
  html { font-size: 13px; }

  /* ── Scrollbar invisible en móvil ── */
  ::-webkit-scrollbar { width: 3px; }

  /* ── Nav móvil ── */
  nav {
    padding: .85rem 1.1rem;
    gap: .5rem;
  }
  nav > ul { display: none !important; }
  .nav-cta { display: none !important; }
  .nav-hamburger { display: flex !important; }

  /* Logo un poco más pequeño */
  .logo-pintu, .logo-deco { font-size: 1.5rem !important; }
  .logo-block { padding: .25rem .7rem !important; }

  /* ── HERO CAROUSEL — stack vertical con animación suave ── */
  #hero {
    height: auto;
    min-height: 100svh;
    overflow: hidden;
    perspective: none;
  }

  /* Fondo blob: más sutil en móvil */
  #hero::before {
    width: 300px;
    height: 300px;
    top: 30%;
    left: 50%;
    opacity: 0.35;
  }

  .hero-carousel-list {
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    top: 0 !important;
    left: 0 !important;
    transform: none !important;
    transform-style: flat !important;
    padding-top: 72px;
    overflow: hidden;
  }

  /* Ocultar todos los items; solo mostrar el activo (2do) */
  .hero-item {
    position: relative !important;
    transform: none !important;
    filter: none !important;
    opacity: 0 !important;
    width: 100% !important;
    height: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    display: block !important;
    transition: opacity 0.5s ease, height 0.5s ease;
  }

  /* El 2do hijo (activo) siempre visible */
  .hero-item:nth-child(2) {
    opacity: 1 !important;
    height: auto !important;
    pointer-events: auto !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 1.2rem 1.2rem 1.5rem !important;
    gap: 1.8rem !important;
  }

  /* Texto — centrado arriba */
  .hero-item:nth-child(2) .introduce {
    opacity: 1 !important;
    pointer-events: auto !important;
    position: relative !important;
    top: auto !important;
    transform: none !important;
    width: 100% !important;
    text-align: center !important;
    order: 1;
  }

  .hero-item .introduce .eyebrow {
    justify-content: center !important;
    font-size: .7rem;
  }
  .hero-item .introduce .eyebrow::before { display: none !important; }

  .hero-item .introduce .title {
    font-size: clamp(2.6rem, 12vw, 4rem) !important;
    margin-bottom: .8rem !important;
  }

  .hero-item .introduce .des {
    max-width: 100% !important;
    font-size: .88rem !important;
    margin-bottom: 1.3rem !important;
  }

  .hero-item .introduce .hero-actions {
    justify-content: center !important;
    gap: .75rem !important;
    flex-wrap: wrap;
  }

  .seeMore { display: none !important; }

  /* Swatch — imagen abajo */
  .hero-item:nth-child(2) .color-swatch-hero {
    position: relative !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    width: min(300px, 85vw) !important;
    height: 200px !important;
    order: 2 !important;
    border-radius: 20px !important;
    margin: 0 auto !important;
    box-shadow:
      0 4px 15px rgba(0,0,0,0.4),
      0 20px 50px rgba(0,0,0,0.5),
      inset 0 1px 0 rgba(255,255,255,0.15) !important;
  }

  /* Ocultar fondo 3D */
  .hero-item:nth-child(1),
  .hero-item:nth-child(3),
  .hero-item:nth-child(4),
  .hero-item:nth-child(5),
  .hero-item:nth-child(6) {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
  }

  /* Animaciones de entrada del texto — sin delay en móvil */
  .hero-item:nth-child(2) .introduce .eyebrow,
  .hero-item:nth-child(2) .introduce .title,
  .hero-item:nth-child(2) .introduce .des,
  .hero-item:nth-child(2) .introduce .hero-actions {
    opacity: 1 !important;
    transform: none !important;
    animation: heroMobileFadeIn 0.6s ease-out both !important;
    filter: none !important;
  }
  .hero-item:nth-child(2) .introduce .title { animation-delay: 0.1s !important; }
  .hero-item:nth-child(2) .introduce .des { animation-delay: 0.2s !important; }
  .hero-item:nth-child(2) .introduce .hero-actions { animation-delay: 0.3s !important; }

  @keyframes heroMobileFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* Swatch también entra con animación */
  .hero-item:nth-child(2) .color-swatch-hero {
    animation: swatchFloat 0.7s 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both !important;
  }
  @keyframes swatchFloat {
    from { opacity: 0; transform: translateY(24px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
  }

  /* Flechas del hero — centradas debajo del swatch */
  .hero-arrows {
    position: relative !important;
    bottom: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    left: auto !important;
    transform: none !important;
    padding: .75rem 2rem 1.2rem !important;
    justify-content: center !important;
    gap: 2.5rem !important;
    z-index: 20;
  }

  /* Botones flechas — más grandes en táctil */
  #heroPrev, #heroNext {
    width: 52px !important;
    height: 52px !important;
    font-size: 1.5rem !important;
    touch-action: manipulation;
  }

  /* ── Secciones generales ── */
  section { padding: 3.5rem 1.1rem !important; }
  #como-trabajamos { padding: 3.5rem 1.1rem !important; }
  #news { padding: 3.5rem 1.1rem !important; }

  .section-title { font-size: clamp(2rem, 9vw, 3rem) !important; }
  .section-sub { font-size: .92rem !important; }

  /* ── Como trabajamos ── */
  .como-grid {
    grid-template-columns: 1fr !important;
    gap: 1rem !important;
    margin-top: 2.5rem !important;
    margin-bottom: 2.5rem !important;
  }
  .como-arrow { transform: rotate(90deg); padding: .3rem 0; }
  .como-card { padding: 1.8rem 1.5rem !important; }
  .como-stats {
    grid-template-columns: 1fr 1fr !important;
    padding: 1.5rem 1.2rem !important;
    gap: 1.5rem !important;
  }
  .como-stat-divider { display: none !important; }
  .como-stat-num { font-size: 2.2rem !important; }

  /* ── News grid ── */
  .news-grid { grid-template-columns: 1fr !important; gap: 1.2rem !important; }

  /* ── Visualizador de color ── */
  .visualizer-grid { grid-template-columns: 1fr !important; gap: 1.2rem !important; }
  .color-grid { grid-template-columns: repeat(4, 1fr) !important; }
  .preview-scene { min-height: 230px !important; }
  .color-panel { padding: 1.2rem !important; }

  /* ── Fórmula ── */
  .formula-container { grid-template-columns: 1fr !important; gap: 1.2rem !important; }
  .formula-card { padding: 1.5rem !important; }
  .formula-header { flex-wrap: wrap; }
  .qty-options { grid-template-columns: 1fr 1fr !important; gap: .5rem; }

  /* ── Pedidos — formulario ── */
  .order-form {
    padding: 1.5rem 1.1rem !important;
    max-width: 100% !important;
  }
  .form-row { grid-template-columns: 1fr !important; gap: 0 !important; }
  .order-flow { gap: .6rem !important; }
  .flow-arrow { display: none; }

  /* ── Admin ── */
  .admin-layout { grid-template-columns: 1fr !important; }
  .admin-sidebar { display: none !important; }
  .metrics-row { grid-template-columns: 1fr 1fr !important; gap: .65rem !important; }
  .metric-card { padding: 1rem !important; }
  .metric-value { font-size: 1.7rem !important; }
  .orders-panel { overflow-x: auto !important; }
  .orders-table { min-width: 580px; }
  .panel-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: .75rem !important;
  }
  .filter-tabs { flex-wrap: wrap; }

  /* ── Nosotros ── */
  #nosotros, #contacto { padding: 3.5rem 1.1rem !important; }

  /* Todos los grids de 2 columnas en nosotros → 1 columna */
  #nosotros div[style*="grid-template-columns"],
  #contacto div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }

  /* Misión/Visión/Valores: 1 col en móvil */
  div[style*="grid-template-columns:repeat(3"] {
    grid-template-columns: 1fr !important;
  }
  div[style*="grid-template-columns: repeat(3"] {
    grid-template-columns: 1fr !important;
  }

  /* Iframe del mapa */
  iframe { height: 250px !important; }

  /* ── Footer ── */
  footer { padding: 3rem 1.1rem 1.5rem !important; }
  .footer-grid { grid-template-columns: 1fr !important; gap: 1.8rem !important; }
  .footer-bottom {
    flex-direction: column !important;
    gap: .75rem !important;
    text-align: center !important;
    font-size: .75rem !important;
  }

  /* ── Botones generales ── */
  .btn-primary, .btn-ghost {
    padding: .85rem 1.3rem !important;
    font-size: .88rem !important;
  }

  /* ── Product carousel (catálogo) ── */
  .product-carousel { height: auto !important; min-height: 680px; }
  .product-item {
    grid-template-columns: 1fr !important;
    height: auto !important;
    max-width: 95% !important;
    gap: 1.5rem !important;
    padding-bottom: 3rem;
  }
  .product-image-wrap img { width: 65% !important; }
  .product-name { font-size: 2.5rem !important; }
  .product-info-card { padding-right: 0 !important; }
  .product-tab-content ul { grid-template-columns: 1fr !important; }

  /* ── Catalog grid ── */
  .catalog-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 1rem !important; }

  /* ── Modal ── */
  .modal-card { padding: 2rem 1.5rem !important; }

  /* ── WhatsApp button: menor en pantallas pequeñas ── */
  a[href*="wa.me"][style*="position:fixed"] {
    width: 50px !important;
    height: 50px !important;
    bottom: 20px !important;
    right: 20px !important;
  }

  /* ── Tabs de color ajustadas ── */
  .preview-tabs { overflow-x: auto; scrollbar-width: none; }
  .preview-tabs::-webkit-scrollbar { display: none; }
  .preview-tab { padding: .7rem 1rem; white-space: nowrap; }

  /* ── Scroll animations: reducir delay en móvil ── */
  .fade-in {
    transition: opacity .4s, transform .4s !important;
  }
}

/* ═══════════════════════════════════════════════
   MÓVIL PEQUEÑO — ≤480px  (iPhone SE, Galaxy S chicos)
═══════════════════════════════════════════════ */
@media (max-width: 480px) {

  html { font-size: 12px; }

  nav { padding: .8rem .9rem !important; }
  .logo-pintu, .logo-deco { font-size: 1.35rem !important; }

  /* Hero */
  .hero-item:nth-child(2) .color-swatch-hero {
    width: 88vw !important;
    height: 180px !important;
  }

  .hero-item .introduce .title {
    font-size: clamp(2.2rem, 13vw, 3.2rem) !important;
  }

  /* Color grid — 3 cols en pantallas muy chicas */
  .color-grid { grid-template-columns: repeat(3, 1fr) !important; }

  /* Catálogo — 1 col */
  .catalog-grid { grid-template-columns: 1fr !important; }

  /* Metrics — 1 col */
  .metrics-row { grid-template-columns: 1fr !important; }

  /* Como stats — 1 col */
  .como-stats { grid-template-columns: 1fr 1fr !important; }

  /* Quantity options */
  .qty-options { grid-template-columns: 1fr 1fr !important; }

  /* Botones de hero */
  .hero-item .introduce .hero-actions {
    flex-direction: column !important;
    align-items: center !important;
    gap: .6rem !important;
  }
  .btn-primary, .btn-ghost {
    width: 100% !important;
    justify-content: center !important;
    text-align: center;
  }

  /* Footer — un poco de padding */
  footer { padding: 2.5rem .9rem 1.2rem !important; }

  /* Secciones */
  section { padding: 3rem .9rem !important; }
  #como-trabajamos, #news, #nosotros, #contacto {
    padding: 3rem .9rem !important;
  }

  /* Como card */
  .como-card { padding: 1.5rem 1.2rem !important; }

  /* Flechas hero: más juntas */
  .hero-arrows { padding: .5rem 1.5rem 1rem !important; gap: 3rem !important; }
}

/* ═══════════════════════════════════════════════
   TOUCH: mejorar experiencia táctil en todos los móviles
═══════════════════════════════════════════════ */
@media (hover: none) and (pointer: coarse) {

  /* Quitar efectos hover que no aplican en touch */
  .news-card:hover { transform: none; box-shadow: none; }
  .como-card:hover { transform: none; }
  .btn-primary:hover { transform: none; }
  .btn-ghost:hover { transform: none; }
  .nav-cta:hover { transform: none; }

  /* Tap targets mínimo 44px */
  #heroPrev, #heroNext {
    min-width: 44px;
    min-height: 44px;
  }

  .sidebar-item,
  .product-tab-btn,
  .filter-tab,
  .preview-tab,
  .qty-option {
    min-height: 44px;
  }

  /* Inputs: tamaño mínimo para evitar zoom en iOS */
  input, select, textarea {
    font-size: 16px !important;
  }
}

/* ═══════════════════════════════════════════════
   LANDSCAPE MÓVIL — altura reducida
═══════════════════════════════════════════════ */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {

  #hero {
    min-height: auto;
    height: auto;
  }

  .hero-item:nth-child(2) {
    flex-direction: row !important;
    align-items: center !important;
    padding: 1rem 1.5rem !important;
    gap: 2rem !important;
    padding-top: 70px !important;
  }

  .hero-item:nth-child(2) .introduce {
    order: 1 !important;
    text-align: left !important;
    width: 50% !important;
  }

  .hero-item .introduce .eyebrow { justify-content: flex-start !important; }
  .hero-item .introduce .eyebrow::before { display: inline-block !important; }

  .hero-item:nth-child(2) .color-swatch-hero {
    order: 2 !important;
    width: 40% !important;
    height: 220px !important;
  }

  .hero-arrows { position: absolute !important; bottom: 8px !important; }

  .hero-item .introduce .title {
    font-size: clamp(1.8rem, 6vw, 2.8rem) !important;
  }
}

/* ═══════════════════════════════════════════════
   FIXES ESPECÍFICOS POR PÁGINA
═══════════════════════════════════════════════ */

/* ── PEDIDO — sección de selección de color ── */
@media (max-width: 768px) {
  #orders .order-form { padding: 1.5rem 1rem !important; }
  .selected-color-preview {
    flex-wrap: wrap;
    gap: .75rem;
  }
  .combo-grid { grid-template-columns: 1fr !important; }
  .custom-qty { flex-direction: column; }
  .qty-input, .qty-unit-select { width: 100%; }
  .order-summary { padding: .85rem; }
  .summary-row { font-size: .82rem; }

  /* Flow steps en pedido */
  .order-flow {
    flex-direction: column;
    gap: .5rem;
  }
  .flow-arrow { display: none; }
  .flow-step { background: var(--bg-card); border-radius: var(--radius-sm); padding: .6rem .9rem; width: 100%; }

  /* ── CATÁLOGO ── */
  .catalog-header { padding: 5rem 1.2rem 2rem !important; }
  .catalog-filters { flex-wrap: wrap; gap: .5rem; }
  .catalog-filter-btn { font-size: .75rem; padding: .4rem .8rem; }

  /* Catálogo sidebar → oculto en móvil */
  .catalog-sidebar { display: none !important; }
  .catalog-layout { grid-template-columns: 1fr !important; }

  /* ── COLOR.HTML ── */
  #color-page section,
  .color-page-section { padding: 3.5rem 1.1rem !important; }
}

/* ── Swiper / carousel táctil en catálogo ── */
@media (max-width: 768px) {
  .product-carousel {
    overflow: visible;
    touch-action: pan-y;
  }
  .product-list {
    touch-action: pan-y;
  }
  .p-nav-btn {
    width: 44px !important;
    height: 44px !important;
    font-size: 1.3rem !important;
  }
  .product-nav {
    bottom: -10px !important;
    gap: 1.5rem !important;
  }
}

/* ── Admin: tabs de filtro en columna ── */
@media (max-width: 480px) {
  .filter-tabs { gap: .25rem; }
  .filter-tab { font-size: .72rem; padding: .3rem .65rem; }
  .status-badge { font-size: .65rem; padding: .2rem .6rem; }

  /* Tabla de pedidos — texto aún más pequeño */
  .orders-table td { font-size: .8rem; padding: .75rem 1rem; }
  .orders-table th { font-size: .65rem; padding: .65rem 1rem; }

  /* Métrica cards en admin — números más ajustados */
  .metric-value { font-size: 1.5rem !important; }
  .metric-label { font-size: .65rem !important; }
}

/* ── Mejora de legibilidad en mobile dark ── */
@media (max-width: 768px) {
  .formula-table td { font-size: .85rem !important; padding: .75rem 0 !important; }
  .amount-badge { font-size: .78rem !important; }
  .product-description { font-size: .95rem !important; }
  .news-title { font-size: 1.5rem !important; }
  .news-excerpt { font-size: .88rem !important; }
  .news-img { height: 170px !important; }

  /* Smooth scroll en móvil */
  html { scroll-behavior: smooth; }

  /* Evitar overflow horizontal global */
  body { overflow-x: hidden !important; max-width: 100vw !important; }
}

/* ═══════════════════════════════════════════════
   NOSOTROS — grids inline con clases responsivas
═══════════════════════════════════════════════ */
@media (max-width: 900px) {
  .nos-grid-2col   { grid-template-columns: 1fr !important; gap: 2rem !important; }
  .nos-stats-grid  { grid-template-columns: 1fr 1fr !important; }
  .nos-mvv-grid    { grid-template-columns: 1fr !important; gap: 1.5rem !important; }
  .ctc-grid-2col   { grid-template-columns: 1fr !important; gap: 2rem !important; }
  .ctc-form-row    { grid-template-columns: 1fr !important; }
}
@media (max-width: 480px) {
  .nos-stats-grid  { grid-template-columns: 1fr 1fr !important; }
}

/* ═══════════════════════════════════════════════
   CATÁLOGO — responsive específico
═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Catálogo sección wrapper */
  #catalogo-precios { padding: 3.5rem 1.1rem !important; }

  .cat-filter-row {
    gap: .4rem !important;
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: .25rem;
  }
  .cat-filter-row::-webkit-scrollbar { display: none; }
  .cat-pill {
    white-space: nowrap;
    flex-shrink: 0;
    padding: .45rem .9rem !important;
    font-size: .78rem !important;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }

  .cat-card-header { height: 75px !important; }
  .cat-card-emoji { font-size: 1.8rem !important; }

  /* Product carousel en catálogo */
  .product-carousel { min-height: auto !important; height: auto !important; }
  .product-item {
    position: relative !important;
    transform: translate(-50%, -50%) !important;
  }
  .product-item.active {
    display: grid !important;
    grid-template-columns: 1fr !important;
    height: auto !important;
    max-width: 95% !important;
    gap: 1.2rem !important;
    padding-bottom: 2rem !important;
  }
  .product-item.prev,
  .product-item.next { display: none !important; }

  .product-image-wrap { justify-content: center !important; }
  .product-image-wrap img { width: 55% !important; max-width: 200px; }
  .product-name { font-size: 2.2rem !important; }
  .product-description { font-size: .9rem !important; }
  .product-tabs { gap: 1rem !important; }
  .product-tab-btn { font-size: .82rem !important; }
  .product-tab-content ul { grid-template-columns: 1fr !important; }

  /* Ajustar alto del contenedor del carrusel en catálogo */
  section .product-carousel {
    height: 560px !important;
  }
}

@media (max-width: 480px) {
  .catalog-grid { grid-template-columns: 1fr !important; gap: .85rem !important; }
  .cat-card-header { height: 65px !important; }
}

/* ═══════════════════════════════════════════════
   COLOR PAGE — visualizador responsivo
═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  #visualizer { padding: 3.5rem 1.1rem !important; }
  #formula { padding: 3.5rem 1.1rem !important; }

  /* Color panel más compacto */
  .color-panel { padding: 1.2rem !important; }
  .color-panel h3 { font-size: .72rem !important; }

  /* Tono slider full width */
  #toneSlider { width: 100%; }

  /* Category filter tabs overflow scroll */
  div[style*="display:flex;gap:.4rem;flex-wrap:wrap;margin-bottom:1rem;"] {
    overflow-x: auto !important;
    flex-wrap: nowrap !important;
    scrollbar-width: none;
    padding-bottom: .3rem;
    gap: .35rem !important;
  }

  /* Preview panel */
  .preview-panel { min-height: 350px; }
  .preview-scene { min-height: 240px !important; }

  /* Color info bottom bar */
  .color-info {
    padding: 1rem !important;
    gap: .75rem !important;
  }
  .color-chip { width: 36px !important; height: 36px !important; }
  .color-name { font-size: .9rem !important; }
}

/* ═══════════════════════════════════════════════
   ADMIN — responsive específico  
═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  #admin { padding: 3.5rem 1.1rem !important; }

  /* Login box centrado */
  #adminLogin {
    max-width: 100% !important;
    padding: 2rem 1.5rem !important;
    margin-top: 2rem !important;
  }

  /* Admin panel cuando está visible */
  #adminLayout {
    display: block !important;
    grid-template-columns: 1fr !important;
  }

  /* Admin nav tab visible en móvil (reemplaza sidebar) */
  .admin-mobile-tabs {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    padding-bottom: .5rem;
    margin-bottom: 1.2rem;
    scrollbar-width: none;
  }
  .admin-mobile-tabs::-webkit-scrollbar { display: none; }

  /* search bar en panel header */
  #adminLayout div[style*="display:flex;align-items:center;gap:.5rem;flex:1;max-width:280px;"] {
    max-width: 100% !important;
    flex: 1 !important;
  }

  /* Sync button compact */
  #syncBtn { font-size: .72rem !important; padding: .4rem .65rem !important; }

  /* Formula detail compact */
  #formulaDetail { padding: 1.2rem !important; }
}
