/* =========================================================
   productos-responsive.css — Estilos responsivos para el catálogo
   ========================================================= */

@media (max-width: 980px) {
  .prod-layout {
    grid-template-columns: 1fr;
    gap: var(--sp-3);
  }

  .prod-layout,
  .prod-content {
    min-width: 0;
    width: 100%;
  }

  .prod-sidebar {
    position: static;
    margin-bottom: var(--sp-2);
    max-width: 100%;
    overflow: hidden;
  }

  .prod-sidebar-box {
    padding: 1.25rem;
    max-width: 100%;
    overflow: hidden;
  }

  .prod-sidebar-box h3 {
    border: none;
    margin-bottom: 0.5rem;
    padding-bottom: 0;
  }

  /* Transform categories sidebar into horizontal scroll on mobile */
  .prod-categories {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    gap: 0.5rem;
    width: 100%;
    scrollbar-width: none; /* Firefox */
    -webkit-overflow-scrolling: touch;
  }

  .prod-categories::-webkit-scrollbar {
    display: none; /* Safari & Chrome */
  }

  .prod-categories li {
    flex-shrink: 0;
  }

  .prod-cat-btn {
    white-space: nowrap;
    padding: 0.5rem 1rem;
  }

  .prod-help-box {
    display: none; /* Hide assistance block on mobile inside layout */
  }
}

@media (max-width: 768px) {
  .container {
    width: min(100% - 1.5rem, var(--maxw)) !important;
  }

  .prod-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .prod-search-wrap {
    min-width: 100%;
  }

  .prod-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .prod-card {
    padding: 0.75rem !important;
    border-radius: var(--radius) !important;
    gap: 0.4rem !important;
    min-width: 0 !important;
  }

  .prod-card-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.2rem !important;
    width: 100% !important;
  }

  .prod-badge {
    font-size: 0.6rem !important;
    padding: 0.2rem 0.4rem !important;
    white-space: nowrap !important;
  }

  .prod-code {
    font-size: 0.65rem !important;
  }

  .prod-card-img {
    height: 110px !important;
    padding: 0.25rem !important;
  }

  .prod-card h4 {
    font-size: 0.8rem !important;
    line-height: 1.25 !important;
    word-break: break-word !important;
  }

  .prod-card p {
    font-size: 0.7rem !important;
    line-height: 1.35 !important;
    height: 2.7em !important;
    -webkit-line-clamp: 2 !important;
  }

  .prod-specs {
    padding-top: 0.3rem !important;
    gap: 0.25rem !important;
  }

  .prod-sizes {
    gap: 0.25rem !important;
  }

  .size-pill {
    font-size: 0.65rem !important;
    padding: 0.15rem 0.35rem !important;
    min-width: 22px !important;
    text-align: center !important;
  }

  .prod-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.4rem !important;
    margin-top: auto !important;
  }

  .prod-qty {
    justify-content: center !important;
    width: 100% !important;
    border-radius: var(--radius) !important;
  }

  .prod-qty .qty-btn {
    width: 28px !important;
    height: 28px !important;
    font-size: 0.85rem !important;
  }

  .prod-qty .qty-input {
    height: 28px !important;
    width: 32px !important;
    font-size: 0.8rem !important;
    flex: none !important;
  }

  .btn-add-cart {
    width: 100% !important;
    padding: 0.45rem 0.6rem !important;
    font-size: 0.75rem !important;
    min-height: 32px !important;
  }

  .prod-hero-title {
    font-size: 2rem;
  }
}
