/* ============================================
   CANTON — MOBILE RESPONSIVE STYLES
   ============================================ */

/* Hamburguesa oculta en desktop */
.nav-hamburger { display: none; }

/* Drawer oculto por defecto */
.mobile-drawer,
.mobile-drawer-overlay { display: none; }

/* Desktop: prod-header-mobile invisible */
.prod-header-mobile { display: none; }

@media (max-width: 768px) {

  /* ─── NAV ─────────────────────────────────── */
  .nav-inner { padding: 14px 20px !important; }
  .nav-logo img { height: 30px !important; }
  .nav-links, .nav-search { display: none !important; }

  /* Hamburguesa — negro por defecto en todas las páginas */
  .nav-hamburger {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #1c1c1c !important;
  }

  .nav-hamburger svg {
    width: 22px; height: 22px;
    stroke: currentColor; fill: none; stroke-width: 1.8;
  }

  /* Solo index.html tiene id="navbar" y nav transparente con foto → blanco */
  #navbar:not(.white) .nav-hamburger {
    color: rgba(255,255,255,0.92) !important;
  }
  #navbar.white .nav-hamburger {
    color: #1c1c1c !important;
  }

  /* ─── DRAWER ──────────────────────────────── */
  .mobile-drawer {
    display: block;
    position: fixed;
    top: 0; right: -100%;
    width: 80%; max-width: 320px; height: 100%;
    background: #ffffff;
    z-index: 1000;
    transition: right 0.35s cubic-bezier(.22,.61,.36,1);
    overflow-y: auto;
    padding: 0 0 40px;
    box-shadow: -8px 0 32px rgba(0,0,0,0.12);
  }
  .mobile-drawer.open { right: 0; }

  .mobile-drawer-overlay {
    display: block;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 999;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s;
  }
  .mobile-drawer-overlay.open { opacity: 1; pointer-events: all; }

  .drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e0e0dc;
  }
  .drawer-header img { height: 28px; }
  .drawer-close {
    background: none; border: none; cursor: pointer; padding: 4px; color: #1c1c1c;
  }
  .drawer-close svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; }

  .drawer-nav { list-style: none; padding: 8px 0; }
  .drawer-nav > li > a,
  .drawer-nav > li > button {
    display: block; width: 100%; text-align: left;
    padding: 15px 24px; font-size: 14px; font-weight: 400;
    letter-spacing: 0.07em; text-decoration: none;
    color: #1c1c1c; background: none; border: none;
    border-bottom: 1px solid #e0e0dc;
    cursor: pointer; font-family: 'Hanken Grotesk', sans-serif;
  }
  .drawer-submenu { display: none; background: #f5f5f3; padding: 6px 0; }
  .drawer-submenu.open { display: block; }
  .drawer-submenu a {
    display: block; padding: 11px 36px; font-size: 13px;
    color: #1c1c1c; text-decoration: none;
    border-bottom: 1px solid #e0e0dc;
  }
  .drawer-submenu a:last-child { border-bottom: none; }
  .drawer-arrow { float: right; transition: transform 0.2s; display: inline-block; }
  .drawer-arrow.open { transform: rotate(180deg); }

  /* ─── HERO ────────────────────────────────── */
  .hero { min-height: 100svh !important; }
  .hero-logotipo { width: clamp(160px, 60vw, 280px) !important; }
  .hero-tagline { font-size: 12px !important; width: clamp(160px, 60vw, 280px) !important; margin-top: -30px !important; }
  .hero-subtitle { font-size: 10px !important; text-align: center; padding: 0 20px; }


  /* ─── VISTAS TÉCNICAS ────────────────────── */
  .medidas-imgs { grid-template-columns: 1fr !important; gap: 16px !important; }
  .medidas-imgs img { max-height: 240px !important; }


  /* ─── CARD INFO TEXTO ────────────────────── */
  .card-nombre { color: white !important; }
  .card-badge, .card-desc { color: rgba(255,255,255,0.80) !important; }
  .producto-nombre { color: white !important; }
  .producto-desc { color: rgba(255,255,255,0.80) !important; }


  /* ─── CARD INFO PADDING MOBILE ──────────── */
  .card-info { padding: 40px 16px 12px !important; background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 100%) !important; }
  .card-nombre, .producto-nombre { color: white !important; font-size: 11px !important; }
  .card-badge, .card-desc { color: rgba(255,255,255,0.80) !important; font-size: 10px !important; }

  /* ─── INDEX PRODUCTOS DESTACADOS ───────────── */
  .productos-grid .producto-info { padding: 8px 12px 10px 14px !important; background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 100%) !important; }
  .productos-grid .producto-nombre { font-size: 11px !important; color: white !important; }
  .productos-grid .producto-desc { font-size: 10px !important; color: white !important; }

  /* ─── GRILLA PRODUCTOS ───────────────────── */
  .productos-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 2px !important; }

  /* ─── CATEGORÍAS INDEX ───────────────────── */
  .cat-row-2 { grid-template-columns: 1fr !important; }
  .cat-half, .cat-full { aspect-ratio: 4/3 !important; }

  /* ─── SECCIONES GENERALES ─────────────────── */
  .section-productos { padding: 48px 16px !important; }
  .page-content { padding: 40px 16px 60px !important; }
  .page-header { margin-bottom: 24px !important; }

  /* ─── PÁGINA DE PRODUCTO ─────────────────── */
  .producto-page { padding: 24px 16px 60px !important; }

  .producto-top {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
  }

  .prod-header-mobile {
    display: block !important;
    order: 1;
  }
  .prod-header-mobile h1 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 2px;
  }
  .prod-header-mobile .producto-linea {
    font-size: 13px;
    color: #999;
    margin-bottom: 0;
  }

  .main-image { order: 2; }

  .thumbnails { flex-direction: row !important; gap: 8px !important; order: 3; }
  .thumb { width: 60px !important; height: 60px !important; }
  .thumb-add { width: 60px !important; height: 60px !important; }

  .producto-page .producto-info { padding-left: 0 !important; order: 4; }
  /* En mobile ocultamos h1 y linea dentro de producto-info (se muestran arriba en prod-header-mobile) */
  .producto-info > h1 { display: none !important; }
  .producto-info > .producto-linea { display: none !important; }
  .producto-page .producto-info > .producto-desc { display: block !important; font-size: 13px !important; line-height: 1.7 !important; color: #444 !important; margin-bottom: 20px !important; }

  .btn-presupuesto { width: 100%; text-align: center; display: block !important; box-sizing: border-box; }

  /* ─── COLORES ────────────────────────────── */
  .color-dot {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    border-radius: 50% !important;
    flex-shrink: 0 !important;
  }
  .colores-grid { gap: 6px !important; }
  .color-label {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
    display: block !important;
    width: 100% !important;
    font-size: 12px !important;
  }

  /* ─── TABS ───────────────────────────────── */
  .tab-header { font-size: 11px !important; padding: 12px 8px 10px !important; letter-spacing: 0.02em !important; }
  .tab-header:first-child { padding-left: 0 !important; }

  /* ─── PÁGINAS DE TEXTO ───────────────────── */
  .contact-section, .garantia-section, .cuidado-section {
    grid-template-columns: 1fr !important; gap: 8px !important; margin-bottom: 32px !important;
  }
  .contact-section-label, .garantia-label, .cuidado-label { font-weight: 700 !important; }
  .page-title { font-size: 16px !important; margin-bottom: 28px !important; }

  /* ─── FOOTER ─────────────────────────────── */
  footer { padding: 40px 20px 28px !important; }
  .footer-nav-2 { flex-wrap: wrap !important; gap: 6px 16px !important; }
  .footer-nav-1 a, .footer-nav-2 a { font-size: 11px !important; }
  .footer-bottom { flex-direction: column !important; gap: 4px !important; font-size: 11px !important; align-items: center; }
  .social-icon { width: 42px !important; height: 42px !important; }

}

/* ─── SUMAME PROFESIONAL: hero mobile ────────── */
@media (max-width: 768px) {
  .hero-profesional {
    height: 28vh !important;
    min-height: 180px !important;
  }
  .hero-profesional .hero-content h1 {
    font-size: 15px !important;
    letter-spacing: 0.12em !important;
    margin-bottom: 6px !important;
    white-space: nowrap !important;
  }
  .hero-profesional .hero-content p {
    font-size: 12px !important;
    white-space: nowrap !important;
  }
  .form-section {
    padding: 40px 24px 60px !important;
  }
}

/* ─── FIX OVERFLOW GLOBAL ─────────────────────── */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100% !important;
  }
}

/* ─── BOTONES: fondo gris clarito ─────────────── */
.btn-presupuesto {
  background: #f5f5f3 !important;
}
.btn-presupuesto:hover {
  background: var(--black) !important;
  color: white !important;
}
.btn-enviar {
  background: #f5f5f3 !important;
}
.btn-enviar:hover {
  background: var(--black) !important;
  color: white !important;
}

/* ─── BTN ENVIAR: redondeo ─────────────────────── */
.btn-enviar {
  border-radius: 999px !important;
}

/* ─── TODOS LOS BOTONES: redondeo global ───────── */
.btn-ver,
.btn-contacto,
.btn-ver-mas {
  border-radius: 999px !important;
}

/* ─── CAT-BTN: redondeo ────────────────────────── */
.cat-btn {
  border-radius: 999px !important;
}

/* ─── PRODUCTOS DESTACADOS: hover effect ───────── */
.destacado-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--gray-light);
}
.destacado-card .img-base,
.destacado-card .img-hover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: opacity 0.4s ease, transform 0.55s cubic-bezier(.22,.61,.36,1);
}
.destacado-card .img-base {
  opacity: 1;
  transform: scale(1);
}
.destacado-card .img-hover {
  opacity: 0;
  transform: scale(1.04);
}
.destacado-card:hover .img-base {
  opacity: 0;
  transform: scale(1.04);
}
.destacado-card:hover .img-hover {
  opacity: 1;
  transform: scale(1);
}
.destacado-card .card-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 16px 18px 18px;
  z-index: 2;
  transition: background 0.4s;
}
.destacado-card:hover .card-info {
  background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 100%);
}
