﻿/* ==========================================================================
   Tienda online y tarifas
   ========================================================================== */
.hero--compact {
  min-height: 50vh;
  padding-bottom: 3rem;
  align-items: center;
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 2px solid var(--arena);
}
.btn-secondary:hover {
  background: var(--bg-muted);
}

.btn-sm {
  padding: 0.4rem 0;
  font-size: 0.85rem;
}

.notice {
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}
.notice--info {
  background: #e8f4fc;
  border-left: 4px solid #2c7a9c;
  color: #1a4a61;
}
.notice--info h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}
.notice--info p {
  margin: 0 0 0.75rem;
}
.notice--info p:last-child {
  margin-bottom: 0;
}

.notice--success {
  background: #2e9e4f;
  border-left: 4px solid #1e7a38;
  color: #ffffff;
  font-weight: 700;
  font-size: 1.05rem;
}
.notice--success a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Tienda landing */
.store-intro {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 4rem;
}
.store-intro__text .section-title {
  text-align: left;
  margin-left: 0;
}
.store-intro__text p {
  color: #555;
  font-size: 1.05rem;
}
.steps-list {
  padding-left: 1.2rem;
  margin: 1.5rem 0;
  color: #555;
}
.steps-list li {
  margin-bottom: 0.75rem;
}
.store-intro__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}
.store-intro__image {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.store-intro__image img {
  width: 100%;
  height: auto;
}

.store-conditions {
  background: var(--bg-muted);
  padding: 3rem;
  border-radius: var(--radius);
}
.conditions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.condition-card {
  background: var(--bg);
  padding: 1.75rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
}
.condition-card__icon {
  display: block;
  font-size: 2rem;
  margin-bottom: 0.75rem;
}
.condition-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}
.condition-card p {
  margin: 0;
  color: var(--rojo);
  font-weight: 700;
  font-size: 1.05rem;
}
.store-conditions__cta {
  text-align: center;
}

/* Catálogo */
.catalog-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2.5rem;
  align-items: start;
}

.catalog-sidebar h2 {
  font-size: 1.1rem;
  margin: 0 0 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.category-toggle {
  display: none;
  width: 100%;
  margin-bottom: 1rem;
}

.category-cart {
  display: none;
}

.category-menu {
  background: var(--bg-muted);
  border-radius: var(--radius);
  padding: 1.25rem;
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  max-height: calc(100vh - var(--header-h) - 2rem);
  overflow-y: auto;
}

.category-list,
.category-list-sub {
  list-style: none;
  margin: 0;
  padding: 0;
}

.category-list > li {
  margin-bottom: 0.25rem;
}

.category-link,
.category-link-sub {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.category-link:hover,
.category-link-sub:hover {
  background: rgba(0, 0, 0, 0.04);
}

.category-link.active,
.category-link-sub.active {
  background: var(--rojo);
  color: var(--text-light);
}

.category-link-sub {
  font-size: 0.92rem;
  padding-left: 1.25rem;
  color: #555;
}

.category-list-sub {
  margin: 0.25rem 0 0.5rem;
  border-left: 2px solid var(--arena);
  margin-left: 0.75rem;
}

.catalog-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.catalog-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.catalog-count {
  color: #777;
  font-size: 0.95rem;
  margin: 0;
}

.product-grid--catalog {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.product-card--catalog {
  display: flex;
  flex-direction: column;
}

.product-card--catalog .product-image {
  aspect-ratio: 4 / 3;
  background: #fff;
  overflow: hidden;
}

.product-card--catalog .product-image img {
  object-fit: contain;
  object-position: center;
  background: #fff;
  padding: 6px;
}

.product-image--link {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
}

.product-card--catalog .product-image.product-image--link {
  background: #fff;
}

.product-image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-muted);
  color: var(--arena-dark);
  font-size: 3rem;
  font-weight: 800;
}

.product-desc {
  color: #666;
  font-size: 0.9rem;
  margin: 0 0 0.75rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: auto;
}

.product-modal {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  max-width: 600px;
  width: 92%;
  box-shadow: var(--shadow-lg);
}

.product-modal::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

.product-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #eee;
}

.product-modal__header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.product-modal__close {
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  color: #555;
}

.product-modal__body {
  padding: 1.5rem;
  max-height: 60vh;
  overflow-y: auto;
}

/* Tarifas */
.rates-page__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: start;
}

.rates-page__list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.rate-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
  background: var(--bg-muted);
  padding: 1.5rem;
  border-radius: var(--radius);
}

.rate-item__name {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
}

.rate-item__desc {
  margin: 0;
  color: #666;
  font-size: 0.95rem;
}

.rate-item__price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--rojo);
  white-space: nowrap;
}

.rates-page__notes {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
}

.formula {
  background: var(--bg);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
}

/* Tarifas - pestañas */
.rates-tabs {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin: 2rem auto 0;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e5e0d5;
}
.rates-tab {
  appearance: none;
  border: 2px solid #e5e0d5;
  background: var(--bg);
  color: var(--text);
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s,
    transform 0.15s;
}
.rates-tab:hover {
  border-color: var(--arena);
  transform: translateY(-1px);
}
.rates-tab[aria-selected="true"],
.rates-tab.rates-tab--active {
  background: var(--rojo);
  border-color: var(--rojo);
  color: var(--text-light);
  box-shadow: 0 6px 18px rgba(185, 56, 42, 0.25);
}
.rates-panel[hidden] {
  display: none !important;
}

/* Responsive */
@media (max-width: 900px) {
  .store-intro,
  .catalog-layout,
  .rates-page__inner {
    grid-template-columns: 1fr;
  }

  .store-intro__image {
    order: -1;
  }

  .conditions-grid {
    grid-template-columns: 1fr;
  }

  .hero--catalog {
    padding-top: 3.25rem;
  }

  .category-bar {
    position: static;
    width: 100%;
    display: flex;
    z-index: 90;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  }

  .category-bar.is-sticky {
    position: fixed;
    top: var(--header-h);
    left: 0;
  }

  .category-toggle,
  .category-cart {
    display: inline-flex;
    flex: 1 1 50%;
    width: auto;
    height: 3.25rem;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-radius: 0;
  }

  .category-cart {
    border-left: 2px solid #9e2e21;
    white-space: nowrap;
  }

  .category-toggle:hover,
  .category-cart:hover {
    transform: none;
  }

  .category-menu {
    display: none;
    position: fixed;
    top: calc(var(--header-h) + 3.25rem);
    left: 0;
    right: 0;
    max-height: calc(100vh - var(--header-h) - 4.25rem);
    max-height: calc(100svh - var(--header-h) - 4.25rem);
    margin-bottom: 0;
    border-radius: 0;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    z-index: 89;
  }

  .category-menu.open {
    display: block;
  }

  .catalog-layout.sticky-bar {
    padding-top: calc(3.25rem + 1rem);
  }

  .rates-page__notes {
    position: static;
  }
}

.image-modal {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  max-width: 90vw;
  max-height: 90vh;
  background: transparent;
  box-shadow: var(--shadow-lg);
  overflow: visible;
}

.image-modal::backdrop {
  background: rgba(0, 0, 0, 0.85);
}

.image-modal img {
  display: block;
  max-width: 85vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  border-radius: var(--radius);
}

.image-modal__close {
  position: absolute;
  top: -48px;
  right: 0;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 2rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.image-modal__close:hover {
  background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 560px) {
  .rate-item {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .product-grid--catalog {
    grid-template-columns: 1fr 1fr;
  }

  .image-modal__close {
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    font-size: 1.6rem;
  }
}
