/* ============================================================
   web-products.css — Product Grid, Cards, Detail, Filters
   Module: Catalog / Product display for public web
   Dependencies: web.css (variables, base styles)
   ============================================================ */

/* ── Filters ── */

.web-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
  align-items: center;
}

.web-search {
  flex: 1 1 220px;
  padding: 12px 16px;
  font-size: 16px;
  border: 1px solid var(--web-border);
  border-radius: var(--web-radius-sm);
  background: var(--web-card);
  color: var(--web-text);
  outline: none;
  transition: border-color var(--web-transition), box-shadow var(--web-transition);
  min-height: 48px;
}

.web-search::placeholder {
  color: var(--web-text-muted);
}

.web-search:focus {
  border-color: var(--web-primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--web-primary) 14%, transparent);
}

.web-select {
  flex: 0 1 180px;
  padding: 12px 16px;
  font-size: 16px;
  border: 1px solid var(--web-border);
  border-radius: var(--web-radius-sm);
  background: var(--web-card);
  color: var(--web-text);
  outline: none;
  cursor: pointer;
  transition: border-color var(--web-transition), box-shadow var(--web-transition);
  min-height: 48px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 38px;
}

.web-select:focus {
  border-color: var(--web-primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--web-primary) 14%, transparent);
}

/* ── Product Grid ── */

.web-products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.web-product-card {
  background: var(--web-card);
  border-radius: var(--web-radius);
  border: 1px solid var(--web-border);
  box-shadow: var(--web-card-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              border-color 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
}

.web-product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.14), 0 4px 12px rgba(0,0,0,0.08);
  border-color: color-mix(in srgb, var(--web-primary) 40%, var(--web-border));
}

@media (prefers-color-scheme: dark) {
  .web-product-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 24px color-mix(in srgb, var(--web-primary) 15%, transparent);
  }
}

.web-product-img {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--web-bg-alt);
  flex-shrink: 0;
  position: relative;
}

.web-product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
}

.web-product-card:hover .web-product-img img {
  transform: scale(1.08);
}

/* Gradient overlay that appears on hover */
.web-product-img::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.web-product-card:hover .web-product-img::after {
  opacity: 1;
}

.web-product-no-img {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.8rem;
  color: var(--web-text-muted);
  background: var(--web-bg-alt);
  opacity: 0.4;
}

.web-product-info {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.web-product-name {
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--web-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.web-product-brand {
  font-size: 0.78rem;
  color: var(--web-text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.web-product-category {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--web-primary) 10%, transparent);
  color: var(--web-primary);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  width: fit-content;
}

.web-product-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--web-primary) 8%, transparent);
  color: var(--web-primary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.web-product-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--web-primary);
  margin-top: auto;
  padding-top: 8px;
  letter-spacing: -0.01em;
}

.web-product-stock {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  width: fit-content;
}

.web-in-stock {
  background: #ecfdf5;
  color: #065f46;
}

.web-out-stock {
  background: #fef2f2;
  color: #991b1b;
}

@media (prefers-color-scheme: dark) {
  .web-in-stock {
    background: rgba(34,197,94,0.15);
    color: #4ade80;
  }
  .web-out-stock {
    background: rgba(239,68,68,0.15);
    color: #f87171;
  }
}

/* Add to Cart button on product cards */
.web-add-to-cart-btn {
  width: 100%;
  margin-top: 0.85rem;
  justify-content: center;
  font-size: 0.85rem;
  padding: 0.55rem 1rem;
}

/* ── Product Detail ── */

.web-product-detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  padding: clamp(24px, 4vw, 48px) clamp(16px, 4vw, 32px);
  max-width: var(--web-max-width);
  margin-inline: auto;
}

.web-detail-gallery {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.web-detail-main-img {
  width: 100%;
  max-width: 100%;
  border-radius: var(--web-radius);
  border: 1px solid var(--web-border);
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: var(--web-bg-alt);
  transition: border-color var(--web-transition);
}

.web-detail-main-img:hover {
  border-color: color-mix(in srgb, var(--web-primary) 30%, var(--web-border));
}

.web-detail-thumbs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
}

.web-detail-thumbs::-webkit-scrollbar {
  height: 4px;
}

.web-detail-thumb {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: var(--web-radius-sm);
  overflow: hidden;
  border: 2px solid var(--web-border);
  cursor: pointer;
  opacity: 0.55;
  transition: opacity var(--web-transition), border-color var(--web-transition), transform var(--web-transition);
  scroll-snap-align: start;
}

.web-detail-thumb:hover {
  opacity: 0.85;
  border-color: color-mix(in srgb, var(--web-primary) 50%, var(--web-border));
  transform: scale(1.05);
}

.web-detail-thumb.active {
  opacity: 1;
  border-color: var(--web-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--web-primary) 20%, transparent);
}

.web-detail-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.web-detail-info {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.web-detail-name {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  color: var(--web-text);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.web-detail-meta {
  font-size: 0.88rem;
  color: var(--web-text-muted);
  margin-bottom: 4px;
}

.web-detail-price {
  font-size: clamp(1.8rem, 4.5vw, 2.4rem);
  font-weight: 800;
  color: var(--web-primary);
  line-height: 1;
  letter-spacing: -0.02em;
}

.web-detail-wholesale {
  font-size: 0.9rem;
  color: var(--web-text-muted);
  margin-top: -6px;
}

.web-detail-stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--web-radius-sm);
  width: fit-content;
}

/* ── v6 (2026-05-08): Selector de variantes Shopify-style ── */
.web-variants-selector {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 20px 0;
}
.web-variant-option {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.web-variant-option-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--web-text, #1e293b);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.web-variant-option-values {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.web-variant-value {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 22px;
  border: 1.5px solid var(--web-border, #e2e8f0);
  background: var(--web-card, #fff);
  color: var(--web-text, #1e293b);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.9rem;
}
.web-variant-value:hover {
  border-color: var(--web-text, #1e293b);
}
.web-variant-value.active {
  background: var(--web-text, #1e293b);
  color: var(--web-card, #fff);
  border-color: var(--web-text, #1e293b);
}
.web-variant-value.web-variant-swatch {
  /* Swatches de color: cuadrado con color de fondo, texto invisible */
  width: 44px;
  min-width: 44px;
  padding: 0;
  border-radius: 50%;
  font-size: 0;
  border-width: 2px;
}
.web-variant-value.web-variant-swatch.active {
  outline: 2px solid var(--web-text, #1e293b);
  outline-offset: 2px;
}
.web-variant-value:disabled,
.web-variant-value.web-variant-out-of-stock {
  text-decoration: line-through;
  opacity: 0.5;
  cursor: not-allowed;
}

.web-detail-actions {
  margin: 20px 0;
}

@media (max-width: 480px) {
  .web-variant-value {
    padding: 9px 14px;
    font-size: 0.85rem;
  }
  .web-variant-value.web-variant-swatch {
    width: 40px;
    min-width: 40px;
    height: 40px;
  }
}

.web-detail-desc {
  font-size: 0.95rem;
  color: var(--web-text-muted);
  line-height: 1.75;
  border-top: 1px solid var(--web-border);
  padding-top: 20px;
  margin-top: 8px;
}

.web-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--web-primary);
  font-weight: 500;
  font-size: 0.92rem;
  margin-bottom: 1rem;
  transition: transform var(--web-transition);
}

.web-back-link:hover {
  transform: translateX(-4px);
  text-decoration: none;
}

/* ── Pagination ── */

.web-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.web-page-btn {
  min-width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid var(--web-border);
  border-radius: var(--web-radius-sm);
  background: var(--web-card);
  color: var(--web-text);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--web-transition);
}

.web-page-btn:hover:not(.web-page-active) {
  border-color: var(--web-primary);
  color: var(--web-primary);
  transform: translateY(-2px);
  box-shadow: var(--web-glow-primary);
}

.web-page-active {
  background: linear-gradient(135deg, var(--web-primary), color-mix(in srgb, var(--web-primary) 80%, #7c3aed));
  border-color: transparent;
  color: #ffffff;
  pointer-events: none;
  box-shadow: 0 2px 12px color-mix(in srgb, var(--web-primary) 30%, transparent);
}

.web-page-btn:disabled {
  opacity: 0.35;
  pointer-events: none;
}

/* ── Responsive: Products ── */

@media (min-width: 640px) {
  .web-products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .web-products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .web-product-detail {
    grid-template-columns: 1fr 1fr;
  }
  .web-detail-gallery {
    position: sticky;
    top: calc(var(--web-header-height) + 1.5rem);
    align-self: start;
  }
}

@media (min-width: 1024px) {
  .web-products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .web-product-detail {
    grid-template-columns: 5fr 4fr;
  }
}

@media (max-width: 768px) {
  .web-products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .web-product-detail {
    grid-template-columns: 1fr;
  }
  .web-filters {
    flex-wrap: wrap;
    gap: 8px;
  }
}

@media (max-width: 430px) {
  .web-filters {
    flex-direction: column;
  }
  .web-search,
  .web-select {
    flex-basis: 100%;
    width: 100%;
  }
}

@media print {
  .web-product-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ccc;
  }
  .web-products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  .web-filters,
  .web-pagination {
    display: none !important;
  }
}

/* ════════════════════════════════════════════════════════════════════════════
 * v6 (2026-05-08d) — Catalog & Product Detail JDM-style premium
 * Sidebar de categorías + breadcrumbs + galería vertical + qty selector +
 * productos relacionados. Aplica a TODOS los templates (vive en CSS común).
 * ════════════════════════════════════════════════════════════════════════════ */

/* ── Breadcrumbs ── */
.web-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--web-text-muted, #64748b);
  margin: 0 0 18px;
  padding: 12px 0;
}
.web-breadcrumbs a {
  color: var(--web-text-muted, #64748b);
  text-decoration: none;
  transition: color .15s;
}
.web-breadcrumbs a:hover {
  color: var(--web-primary, #2563eb);
}
.web-breadcrumbs-sep {
  color: var(--web-text-muted, #94a3b8);
  opacity: 0.6;
}
.web-breadcrumbs-current {
  color: var(--web-text, #1e293b);
  font-weight: 600;
}
.web-breadcrumbs-product {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Catalog layout: sidebar + content ── */
.web-catalog-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 16px;
}
.web-catalog-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
}
.web-catalog-mobile-toggle {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  margin-bottom: 14px;
  background: var(--web-card, var(--web-bg, #fff));
  border: 1px solid var(--web-border, #e2e8f0);
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--web-text);
  cursor: pointer;
}
.web-catalog-sidebar {
  position: sticky;
  top: calc(var(--web-header-height, 64px) + 12px);
  align-self: start;
}
.web-catalog-sidebar-inner {
  background: var(--web-card, var(--web-bg, #fff));
  border: 1px solid var(--web-border, #e2e8f0);
  border-radius: 14px;
  padding: 18px;
  max-height: calc(100vh - var(--web-header-height, 64px) - 24px);
  overflow-y: auto;
}
.web-sidebar-search-wrap {
  position: relative;
  margin-bottom: 18px;
}
.web-sidebar-search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--web-text-muted, #94a3b8);
  pointer-events: none;
}
.web-sidebar-search {
  width: 100%;
  padding: 10px 12px 10px 38px;
  background: var(--web-bg, #fff);
  border: 1px solid var(--web-border, #cbd5e1);
  border-radius: 10px;
  font-size: 0.92rem;
  color: var(--web-text);
  box-sizing: border-box;
}
.web-sidebar-block {
  margin-bottom: 18px;
}
.web-sidebar-title {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--web-text-muted, #64748b);
}
.web-sidebar-categories {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.web-sidebar-cat-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--web-text);
  transition: background .15s, color .15s;
}
.web-sidebar-cat-item:hover {
  background: color-mix(in srgb, var(--web-primary, #2563eb) 8%, transparent);
}
.web-sidebar-cat-item.is-active {
  background: var(--web-primary, #2563eb);
  color: var(--web-on-primary, #fff);
  font-weight: 600;
}
.web-sidebar-cat-name { flex: 1; }
.web-sidebar-cat-count {
  font-size: 0.78rem;
  opacity: 0.7;
}
.web-sidebar-cat-item.is-active .web-sidebar-cat-count {
  opacity: 0.85;
}
.web-sidebar-select {
  width: 100%;
  padding: 9px 12px;
  background: var(--web-bg, #fff);
  border: 1px solid var(--web-border, #cbd5e1);
  border-radius: 10px;
  font-size: 0.9rem;
  color: var(--web-text);
}

/* ── Catalog content (toolbar + grid) ── */
.web-catalog-content { min-width: 0; }
.web-catalog-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--web-border, #e2e8f0);
}
.web-catalog-toolbar-info {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.web-catalog-title {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--web-heading, var(--web-text));
}
.web-catalog-count {
  color: var(--web-text-muted, #64748b);
  font-size: 0.95rem;
}
.web-catalog-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.web-sort-select {
  padding: 8px 14px;
  background: var(--web-bg, #fff);
  border: 1px solid var(--web-border, #cbd5e1);
  border-radius: 10px;
  font-size: 0.88rem;
  color: var(--web-text);
  cursor: pointer;
}
.web-view-toggle {
  display: inline-flex;
  background: var(--web-bg-alt, #f1f5f9);
  border: 1px solid var(--web-border, #cbd5e1);
  border-radius: 10px;
  overflow: hidden;
}
.web-view-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 0;
  color: var(--web-text-muted, #94a3b8);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.web-view-btn.is-active,
.web-view-btn:hover {
  background: var(--web-primary, #2563eb);
  color: var(--web-on-primary, #fff);
}

/* ── Product detail v6 ── */
.web-detail-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 16px;
}
.web-product-detail-v6 {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr);
  gap: 36px;
  align-items: start;
}
.web-detail-gallery-v6 {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 14px;
  align-items: start;
}
.web-detail-thumbs-v6 {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 2px;
}
.web-detail-thumb-v6 {
  display: block;
  width: 80px;
  height: 80px;
  padding: 0;
  background: var(--web-card, var(--web-bg, #fff));
  border: 2px solid var(--web-border, #e2e8f0);
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .18s, transform .18s;
}
.web-detail-thumb-v6 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.web-detail-thumb-v6.is-active {
  border-color: var(--web-primary, #2563eb);
}
.web-detail-thumb-v6:hover {
  border-color: var(--web-primary, #2563eb);
  transform: translateY(-1px);
}
.web-detail-main-wrap {
  background: var(--web-card, var(--web-bg, #fff));
  border: 1px solid var(--web-border, #e2e8f0);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  max-height: 560px;
}
.web-detail-main-img-v6 {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.web-detail-main-placeholder {
  font-size: 4em;
  opacity: 0.3;
}

/* Info panel v6 */
.web-detail-info-v6 {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.web-detail-cat-badge {
  display: inline-block;
  align-self: flex-start;
  padding: 4px 12px;
  background: color-mix(in srgb, var(--web-primary, #2563eb) 12%, transparent);
  color: var(--web-primary, #2563eb);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 14px;
}
.web-detail-name-v6 {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--web-heading, var(--web-text));
}
.web-detail-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 10px 0;
  border-top: 1px solid var(--web-border, #e2e8f0);
  border-bottom: 1px solid var(--web-border, #e2e8f0);
  font-size: 0.88rem;
}
.web-detail-meta-label {
  color: var(--web-text-muted, #64748b);
  margin-right: 4px;
}
.web-detail-meta-value {
  color: var(--web-text);
  font-weight: 600;
}
.web-detail-short-v6 {
  color: var(--web-text);
  line-height: 1.6;
  margin: 8px 0;
  font-size: 0.96rem;
}
.web-detail-purchase {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  background: var(--web-bg-alt, var(--web-card, #f8fafc));
  border-radius: 12px;
  margin-top: 6px;
}
.web-detail-qty-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.web-detail-qty-label {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--web-text);
}
.web-detail-qty-controls {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--web-border, #cbd5e1);
  border-radius: 10px;
  background: var(--web-bg, #fff);
  overflow: hidden;
}
.web-detail-qty-btn {
  width: 38px;
  height: 38px;
  background: transparent;
  border: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--web-text);
  cursor: pointer;
  transition: background .15s;
}
.web-detail-qty-btn:hover {
  background: color-mix(in srgb, var(--web-primary, #2563eb) 8%, transparent);
}
.web-detail-qty-input {
  width: 56px;
  text-align: center;
  border: 0;
  border-left: 1px solid var(--web-border, #cbd5e1);
  border-right: 1px solid var(--web-border, #cbd5e1);
  background: transparent;
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--web-text);
  -moz-appearance: textfield;
}
.web-detail-qty-input::-webkit-outer-spin-button,
.web-detail-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.web-detail-cart-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 10px;
}

/* Description full-width section */
.web-detail-content-section {
  grid-column: 1 / -1;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 2px solid var(--web-border, #e2e8f0);
}
.web-detail-section-title {
  margin: 0 0 14px;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--web-heading, var(--web-text));
}
.web-detail-long-text {
  font-size: 0.96rem;
  line-height: 1.7;
  color: var(--web-text);
}
.web-detail-features-title {
  margin: 22px 0 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--web-heading, var(--web-text));
}
.web-detail-features-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 8px 18px;
}
.web-detail-features-list li {
  position: relative;
  padding: 6px 0 6px 26px;
  color: var(--web-text);
  line-height: 1.5;
  font-size: 0.92rem;
}
.web-detail-features-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 6px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--web-primary, #2563eb) 14%, transparent);
  color: var(--web-primary, #2563eb);
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
}

/* Productos relacionados */
.web-related-section {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 2px solid var(--web-border, #e2e8f0);
}
.web-related-title {
  margin: 0 0 18px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--web-heading, var(--web-text));
}
.web-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.web-related-card {
  display: flex;
  flex-direction: column;
  background: var(--web-card, var(--web-bg, #fff));
  border: 1px solid var(--web-border, #e2e8f0);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.web-related-card:hover {
  transform: translateY(-4px);
  border-color: var(--web-primary, #2563eb);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}
.web-related-img-wrap {
  aspect-ratio: 1 / 1;
  background: var(--web-bg-alt, #f8fafc);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.web-related-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
  box-sizing: border-box;
}
.web-related-img-placeholder {
  font-size: 2.4em;
  opacity: 0.3;
}
.web-related-info {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.web-related-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--web-text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.web-related-price {
  margin-top: auto;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--web-primary, #2563eb);
}

/* ── Responsive: tablet (≤1024px) ── */
@media (max-width: 1024px) {
  .web-catalog-layout {
    grid-template-columns: 220px 1fr;
    gap: 24px;
  }
  .web-product-detail-v6 {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .web-detail-name-v6 { font-size: 1.5rem; }
}

/* ── Responsive: mobile (≤768px) ── */
@media (max-width: 768px) {
  .web-catalog-section { padding: 16px 12px; }
  .web-catalog-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .web-catalog-mobile-toggle { display: flex; }
  .web-catalog-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 86%;
    max-width: 320px;
    height: 100dvh;
    z-index: 70;
    transform: translateX(-100%);
    transition: transform .25s ease-in-out;
    background: var(--web-bg, #fff);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.16);
  }
  .web-catalog-sidebar.is-open { transform: translateX(0); }
  .web-catalog-sidebar-inner {
    border: 0;
    border-radius: 0;
    height: 100%;
    max-height: none;
    padding: 64px 16px 24px;
  }
  .web-catalog-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .web-catalog-title { font-size: 1.3rem; }
  /* Detail mobile */
  .web-detail-gallery-v6 {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .web-detail-thumbs-v6 {
    flex-direction: row;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    order: 2;
    padding-bottom: 4px;
  }
  .web-detail-thumb-v6 {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
  }
  .web-detail-main-wrap { order: 1; }
  .web-detail-name-v6 { font-size: 1.3rem; }
  .web-detail-features-list { grid-template-columns: 1fr; }
  .web-related-grid { grid-template-columns: repeat(2, 1fr); }
}
