/* =========================================================
   DRM Custom Garage — shop.css (versione premium 2026)
   ========================================================= */


/* ========== HERO ========== */
.page-hero {
  padding: calc(var(--header-h) + 60px) 24px 50px;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.page-hero .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 12px;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  margin-bottom: 14px;
  line-height: 1.15;
}

.page-hero p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}


/* ========== FILTRI CATEGORIA ========== */
.shop-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 0 24px 28px;
  max-width: 1200px;
  margin: 0 auto;
}

.shop-filter {
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  transition: all 0.22s ease;
  cursor: pointer;
  background: transparent;
  font-family: inherit;
  line-height: 1.2;
}

.shop-filter:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.04);
}

.shop-filter:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.shop-filter.is-active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 43, 43, 0.28);
}


/* ========== GRIGLIA PRODOTTI ========== */
.shop-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 100px;
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}

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

@media (min-width: 1000px) {
  .shop-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Card prodotto */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius, 14px);
  overflow: hidden;
  transition:
    border-color 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease,
    opacity 0.28s ease,
    visibility 0.28s ease;
  display: flex;
  flex-direction: column;
  opacity: 1;
  visibility: visible;
}

.product-card.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: scale(0.97);
  pointer-events: none;
}

.product-card:hover {
  border-color: rgba(255, 43, 43, 0.42);
  transform: translateY(-6px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.14);
}

.product-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-elevated);
  overflow: hidden;
}

.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.product-card:hover .product-media img {
  transform: scale(1.05);
}

.no-image {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.9rem;
  background: var(--bg-elevated);
}

.product-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.product-body h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 8px;
}

.product-price {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
}

.product-stock {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}

.product-stock.low {
  color: #e74c3c;
  font-weight: 500;
}


/* ========== CTA FINALE ========== */
.shop-bottom-cta {
  text-align: center;
  margin: 10px 0 60px;
  padding: 0 24px;
}


/* ========== STATO VUOTO ========== */
.shop-empty {
  max-width: 1200px;
  margin: 0 auto 80px;
  padding: 60px 24px;
  text-align: center;
}

.shop-empty-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.shop-empty-text {
  color: var(--muted);
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.shop-empty-reset {
  min-width: 140px;
}


/* ========== RESPONSIVE MOBILE ========== */
@media (max-width: 600px) {
  .shop-grid {
    gap: 16px;
    padding: 0 16px 80px;
  }

  .shop-filters {
    gap: 6px;
    padding: 0 14px 20px;
  }

  .shop-filter {
    font-size: 0.75rem;
    padding: 7px 14px;
  }

  .page-hero {
    padding: calc(var(--header-h) + 40px) 20px 36px;
  }

  .product-body {
    padding: 16px;
  }

  .product-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .product-footer .btn {
    width: 100%;
    text-align: center;
  }
}


/* Accessibilità */
@media (prefers-reduced-motion: reduce) {
  .product-card,
  .product-media img {
    transition: none !important;
    animation: none !important;
  }
}