/* ============================================
   WAVES SURF SHOP — Componentes reutilizables
   Galoper Branding · 2025
   Extraído desde catalogo.html y contacto.html
   ============================================ */


/* ============================================
   1. FILTROS DEL CATÁLOGO
   ============================================ */
.filter-section {
  position: sticky;
  top: 68px;
  z-index: 40;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
}

.filter-inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.filter-separator {
  width: 1px;
  height: 20px;
  background: var(--border-mid);
  margin: 0 0.25rem;
  flex-shrink: 0;
}

.filter-count {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

/* Búsqueda */
.search-wrap {
  position: relative;
  flex-shrink: 0;
}

.search-input {
  padding: 0.48rem 1rem 0.48rem 2.25rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r-full);
  font-family: var(--font-body);
  font-size: 0.82rem;
  background: var(--bg-card);
  color: var(--text);
  outline: none;
  width: 180px;
  transition: border-color var(--ease), width var(--ease);
}

.search-input:focus {
  border-color: var(--ocean);
  width: 220px;
}

.search-icon {
  position: absolute;
  left: 0.7rem;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  pointer-events: none;
}


/* ============================================
   2. CARDS DE PRODUCTO
   ============================================ */
.producto-card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
  display: flex;
  flex-direction: column;
}

.producto-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-mid);
}

.producto-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--ocean-pale);
}

.producto-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.producto-card:hover .producto-img img {
  transform: scale(1.04);
}

.producto-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--ocean-pale) 0%, var(--sand) 100%);
}

.producto-img-placeholder svg {
  width: 48px;
  height: 48px;
  color: var(--ocean);
  opacity: 0.4;
}

.producto-destino-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: var(--r-full);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.badge-mancora {
  background: rgba(10, 126, 164, 0.18);
  color: #0A7EA4;
  border: 1px solid rgba(10, 126, 164, 0.25);
}

.badge-paracas {
  background: rgba(180, 130, 70, 0.18);
  color: #8B6010;
  border: 1px solid rgba(180, 130, 70, 0.3);
}

.badge-personalizado {
  background: rgba(42, 52, 64, 0.15);
  color: var(--deep);
  border: 1px solid rgba(42, 52, 64, 0.2);
}

.producto-body {
  padding: 1.1rem 1.2rem 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.producto-cat {
  font-family: var(--font-display);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 0.3rem;
}

.producto-nombre {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--deep);
  margin-bottom: 0.45rem;
  line-height: 1.25;
}

.producto-nombre a {
  color: inherit;
  text-decoration: none;
  transition: color var(--ease);
}

.producto-nombre a:hover {
  color: var(--ocean);
}

.producto-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 0.85rem;
  flex: 1;
}

.producto-tallas {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 0.85rem;
}

.talla-chip {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--border-mid);
  border-radius: 4px;
  color: var(--text-muted);
}

.producto-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
  gap: 0.5rem;
}

.producto-moq {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.producto-moq strong {
  font-weight: 600;
  color: var(--text);
  display: block;
  font-size: 0.82rem;
}

.btn-pedir {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0.45rem 0.9rem;
  background: var(--deep);
  color: var(--white);
  border-radius: var(--r-full);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  transition: background var(--ease), transform var(--ease);
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
}

.btn-pedir:hover {
  background: var(--ocean);
  transform: translateY(-1px);
}

/* Empty state */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 5rem 1rem;
  color: var(--text-muted);
}

.empty-state svg {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  opacity: 0.3;
}

.empty-state strong {
  display: block;
  font-family: var(--font-display);
  color: var(--text);
}

.empty-state p {
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* CTA Banner */
.cta-pedido-banner {
  background: var(--sand);
  border-radius: var(--r-lg);
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  border: 1px solid var(--sand-dark);
}

.cta-pedido-banner p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}


/* ============================================
   3. CANALES DE CONTACTO
   ============================================ */
.canal {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  margin-bottom: 0.75rem;
  transition: border-color var(--ease), box-shadow var(--ease);
  text-decoration: none;
  color: inherit;
}

.canal:hover {
  border-color: var(--ocean);
  box-shadow: var(--shadow-xs);
}

.canal-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.canal-icon svg {
  width: 20px;
  height: 20px;
}

.canal-icon-wa   { background: #E8FBF0; color: #25D366; }
.canal-icon-ig   { background: #FDE8F6; color: #C13584; }
.canal-icon-mail { background: var(--ocean-pale); color: var(--ocean); }

.canal-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 0.2rem;
}

.canal-valor {
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.3;
}

.canal-nota {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}


/* ============================================
   4. HORARIO
   ============================================ */
.horario-box {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: var(--r-lg);
  background: var(--sand);
  border: 1px solid var(--sand-dark);
}

.horario-box .label {
  display: block;
  margin-bottom: 0.5rem;
}

.horario-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.horario-item:last-child {
  border-bottom: none;
}

.horario-item strong {
  font-weight: 500;
  color: var(--text);
}


/* ============================================
   5. FORM CARD + SECCIONES
   ============================================ */
.form-card {
  background: var(--bg-card);
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
}

.form-section-title {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ocean);
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
  margin-top: 1.75rem;
}

.form-section-title:first-child {
  margin-top: 0;
}

/* Selector de destino visual */
.destino-selector {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.destino-opt {
  position: relative;
}

.destino-opt input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.destino-opt label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 0.85rem 0.5rem;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  cursor: pointer;
  text-align: center;
  transition: all var(--ease);
}

.destino-opt label:hover {
  border-color: var(--ocean);
}

.destino-opt input:checked + label {
  border-color: var(--ocean);
  background: var(--ocean-pale);
}

.destino-opt-nombre {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--deep);
}

.destino-opt-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.destino-opt-emoji {
  font-size: 1.4rem;
  line-height: 1;
}

/* Selector de categorías */
.categoria-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.categoria-opt {
  position: relative;
}

.categoria-opt input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.categoria-opt label {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border-radius: var(--r-full);
  border: 1.5px solid var(--border);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--ease);
}

.categoria-opt label:hover {
  border-color: var(--ocean);
  color: var(--ocean);
}

.categoria-opt input:checked + label {
  background: var(--deep);
  border-color: var(--deep);
  color: var(--white);
}

/* Botón submit */
.btn-submit {
  width: 100%;
  padding: 1rem;
  background: var(--deep);
  color: var(--white);
  border: none;
  border-radius: var(--r-full);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 1.5rem;
}

.btn-submit:hover {
  background: var(--ocean);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(10, 126, 164, 0.3);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Mensajes de estado */
.form-status {
  display: none;
  padding: 1rem 1.25rem;
  border-radius: var(--r-md);
  margin-top: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
}

.form-status.success {
  display: block;
  background: #E8FBF0;
  color: #1a7a40;
  border: 1px solid #a3e6c0;
}

.form-status.error {
  display: block;
  background: #FDE8E8;
  color: #9b2020;
  border: 1px solid #f5c0c0;
}

.form-footer-note {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-light);
}


/* ============================================
   6. FICHA DE PRODUCTO (producto.html)
   ============================================ */
.producto-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-lg);
  align-items: start;
  padding: calc(68px + 3rem) 0 var(--sp-xl);
}

.producto-visual {
  position: sticky;
  top: calc(68px + 1.5rem);
}

.producto-img-main {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--ocean-pale) 0%, var(--sand) 100%);
}

.producto-img-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.producto-img-main .producto-destino-badge {
  top: 1rem;
  left: 1rem;
  font-size: 0.72rem;
  padding: 0.3rem 0.8rem;
}

.producto-img-placeholder-lg {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--ocean);
}

.producto-img-placeholder-lg svg {
  width: 64px;
  height: 64px;
  opacity: 0.3;
}

.producto-img-placeholder-lg span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.producto-info-panel {
  padding-top: 0;
}

.producto-nombre-detail {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  font-weight: 800;
  color: var(--deep);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0.5rem 0 1rem;
}

.producto-desc-detail {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
}

.spec-section {
  margin-bottom: 1.4rem;
}

.spec-label {
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.55rem;
  display: block;
}

.tallas-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.talla-chip-lg {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.8rem;
  border: 1.5px solid var(--border-mid);
  border-radius: var(--r-md);
  color: var(--text);
  background: var(--white);
}

.colores-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.color-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0.25rem 0.65rem;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  background: var(--white);
}

.color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ocean);
  flex-shrink: 0;
}

.moq-box-detail {
  background: var(--sand);
  border: 1px solid var(--sand-dark);
  border-radius: var(--r-lg);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.moq-icon {
  width: 38px;
  height: 38px;
  background: var(--white);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}

.moq-icon svg {
  width: 18px;
  height: 18px;
  color: var(--ocean);
}

.moq-text strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--deep);
  line-height: 1.3;
}

.moq-text span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 1.75rem;
}

.tag-item {
  display: inline-block;
  background: var(--ocean-pale);
  color: var(--ocean);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: var(--r-full);
}

.producto-ctas {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--ease);
}

.breadcrumb a:hover {
  color: var(--ocean);
}

.breadcrumb svg {
  width: 12px;
  height: 12px;
  opacity: 0.4;
  flex-shrink: 0;
}

.breadcrumb span {
  color: var(--text);
  font-weight: 500;
}

/* Loading skeleton */
.skeleton-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-lg);
  padding: calc(68px + 3rem) 0 var(--sp-xl);
}

.skeleton {
  background: linear-gradient(
    90deg,
    var(--border) 25%,
    rgba(42, 52, 64, 0.05) 50%,
    var(--border) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--r-md);
}

@keyframes shimmer {
  0%   { background-position:  200% 0; }
  100% { background-position: -200% 0; }
}

/* Error 404 */
.error-404 {
  text-align: center;
  padding: calc(68px + 5rem) var(--gutter) var(--sp-xl);
  max-width: 480px;
  margin: 0 auto;
}

.error-404 svg {
  width: 72px;
  height: 72px;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}


/* ============================================
   7. RESPONSIVE — Componentes
   ============================================ */
@media (max-width: 960px) {
  .producto-layout,
  .skeleton-layout {
    grid-template-columns: 1fr;
    padding-top: calc(68px + 2rem);
  }

  .producto-visual {
    position: static;
  }

  .destino-selector {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .form-card {
    padding: 1.5rem;
    border-radius: var(--r-lg);
  }

  .destino-selector {
    grid-template-columns: 1fr 1fr;
  }

  .cta-pedido-banner {
    flex-direction: column;
    text-align: center;
  }

  .filter-count {
    display: none;
  }

  .search-input {
    width: 140px;
  }

  .search-input:focus {
    width: 160px;
  }

  .producto-ctas {
    flex-direction: column;
  }

  .producto-ctas .btn {
    justify-content: center;
  }
}
