/* ============================================================
   RESPONSIVE — main.css (index.html)
   ============================================================ */

@media (max-width: 992px) {

  /* --- Header --- */
  .top-header .inner { flex-wrap: wrap; gap: 12px; padding: 10px 16px; }
  .search-bar { order: 3; width: 100%; max-width: 100%; }
  .search-cat { width: 100%; }
  .search-input { flex: 1 1 auto; }

  /* --- Navbar --- */
  .navbar .inner {
    height: auto;
    min-height: 48px;
    flex-wrap: wrap;
    padding: 0;
    overflow: visible;
  }
  .nav-links { flex: 1 1 auto; flex-wrap: wrap; height: auto; }
  .nav-links a { height: 44px; }
  .nav-search-btn {
    width: 100%;
    margin-left: 0;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,.08);
    justify-content: center;
    padding: 10px 16px;
    order: 10;
  }
  .nav-search-btn a { display: block; text-align: center; width: 100%; }

  /* --- Layout principal: 3 col → 2 col --- */
  .main-wrapper {
    grid-template-columns: 200px 1fr;
    gap: 14px;
    margin: 16px auto;
  }
  .right-col {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 14px;
  }
  .right-col .sidebar-box { flex: 1 1 calc(50% - 7px); }
  .map-container { padding-bottom: 50%; }

  /* --- About --- */
  .about-container { grid-template-columns: 1fr; gap: 24px; }

  /* --- Fotos tienda --- */
  .fotos_tienda { flex-wrap: wrap; margin-right: 0; gap: 10px; }
  .foto-item { height: 180px; flex: 1 1 calc(50% - 10px); }

  /* --- Footer --- */
  .footer-inner { grid-template-columns: repeat(2, 1fr); gap: 24px; padding: 32px 16px; }
  .footer-brand { grid-column: 1 / -1; }

  /* --- Cookie bar --- */
  .cookie-bar { flex-wrap: wrap; gap: 10px; padding: 12px 16px; justify-content: flex-start; }
  .cookie-bar p { width: 100%; flex: none; text-align: left; }
  .cookie-actions { width: 100%; flex-wrap: wrap; gap: 8px; }
  .cookie-accept, .cookie-reject, .cookie-configure { flex: 1 1 auto; text-align: center; }
}

/* ============================================================
   ≤ 768px  MOBILE GRANDE
   ============================================================ */
@media (max-width: 768px) {

  /* --- Header --- */
  .top-header .inner { flex-direction: column; align-items: stretch; padding: 10px 14px; }
  .logo { justify-content: center; }
  .contact-info { justify-content: center; }
  .search-bar { flex-direction: column; }
  .search-cat, .search-input, .search-btn { width: 100%; }

  /* --- Navbar --- */
  .navbar .inner { height: auto; flex-direction: column; padding: 0; overflow: visible; }
  .nav-cat-dropdown { width: 100%; }
  .nav-cat-btn { width: 100%; height: 48px; justify-content: flex-start; }
  .nav-cat-menu {
    position: fixed; left: 0; right: 0; width: 100vw;
    min-width: unset; border-radius: 0; z-index: 1001;
  }
  .nav-links { flex-direction: column; width: 100%; height: auto; }
  .nav-links a {
    width: 100%; height: 44px; padding: 0 16px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    overflow: hidden;
  }
  .nav-links a::after { display: none; }
  .nav-search-btn {
    width: 100%; margin-left: 0; padding: 12px 16px;
    order: 10; justify-content: center;
    border-top: 1px solid rgba(255,255,255,.1); border-left: none;
  }
  .nav-search-btn a { display: block; width: 100%; text-align: center; white-space: normal; }

  /* --- Layout: 1 col --- */
  .main-wrapper { grid-template-columns: 1fr; margin: 12px auto; padding: 0 14px; }
  .center-col { order: -1; }
  .right-col { grid-column: auto; flex-direction: column; }
  .right-col .sidebar-box { flex: 1 1 100%; }

  /* --- Tech sidebar --- */
  .tech-area { display: flex; flex-direction: row; align-items: center; }
  .foto_perfil { width: 120px; height: 120px; flex-shrink: 0; margin-bottom: 2%; border-radius: 0; }
  .tech-body { padding: 12px 14px; }
  .tech-body p { font-size: 13px; text-align: left; }

  /* --- Fachada --- */
  .fachada-img { min-height: 200px; }

  /* --- About --- */
  .about-section { padding: 24px 14px; margin: 14px auto; }
  .section-title { font-size: 22px; }
  .feature-item { padding: 12px; gap: 10px; }
  .feature-icon { width: 40px; height: 40px; font-size: 18px; }
  .feature-text h4 { font-size: 13px; }
  .feature-text p  { font-size: 11px; }

  /* --- Fotos tienda --- */
  .fotos_tienda { flex-direction: column; gap: 8px; margin: 0 0 24px; }
  .foto-item { height: 200px; flex: none; width: 100%; }

  /* --- Footer --- */
  .footer-inner { grid-template-columns: 1fr; gap: 20px; padding: 24px 14px; }
  .footer-brand { grid-column: auto; }
  .copy-inner { flex-direction: column; gap: 12px; text-align: center; padding: 0 14px; }
  .social-links { justify-content: center; }

  /* --- Cookie bar --- */
  .cookie-bar { flex-direction: column; gap: 10px; text-align: center; padding: 14px; }
  .cookie-actions { flex-direction: column; width: 100%; }
  .cookie-accept, .cookie-reject, .cookie-configure { width: 100%; }
}

/* ============================================================
   ≤ 480px  MOBILE PEQUEÑO
   ============================================================ */
@media (max-width: 480px) {

  .logo-text { font-size: 0.95rem; }
  .logo-icon img { width: 38px; height: 38px; }

  .tech-area { flex-direction: column; }
  .foto_perfil {
    width: 100%;
    height: auto;
    overflow: hidden;
  }
  .foto_perfil img {
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
  }

  .about-features { gap: 10px; }
  .feature-item { flex-direction: column; align-items: flex-start; }

  .footer-logo { flex-direction: column; gap: 8px; }
  .footer-logo-icon img { width: 40px; height: 40px; }

  .lightbox img { max-width: 96vw; max-height: 80vh; }
}
