/* ==========================================================================
   La Catena – Product Cards CSS v1.4.0
   Author: Ronaldo Di Cocco — https://www.ronaldodicocco.net
   Griglia: 4 colonne desktop → 3 tablet → 2 mobile → 1 smartphone piccolo
   ========================================================================== */

:root {
  --lc-orange:       #FF6600;
  --lc-orange-dark:  #d94f00;
  --lc-black:        #111111;
  --lc-white:        #ffffff;
  --lc-shadow:       0 2px 10px rgba(0,0,0,.07);
  --lc-shadow-hover: 0 6px 24px rgba(255,102,0,.18);
  --lc-transition:   .22s ease;
}

/* ── Griglia 4 colonne ───────────────────────────────────────────────────── */
body ul.products,
.woocommerce ul.products,
.woocommerce-page ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
}

/* ── <li> card ───────────────────────────────────────────────────────────── */
body ul.products li.product.lc-card,
.woocommerce ul.products li.product.lc-card,
.woocommerce-page ul.products li.product.lc-card {
  background: var(--lc-white) !important;
  border-radius: 6px !important;
  box-shadow: var(--lc-shadow) !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  width: auto !important;
  float: none !important;
  transition: transform var(--lc-transition), box-shadow var(--lc-transition);
}

body ul.products li.product.lc-card:hover,
.woocommerce ul.products li.product.lc-card:hover {
  transform: translateY(-4px) !important;
  box-shadow: var(--lc-shadow-hover) !important;
}

/* ── Badge ───────────────────────────────────────────────────────────────── */
body ul.products li.product.lc-card .lc-badge {
  position: absolute !important;
  top: 10px !important;
  left: 10px !important;
  right: auto !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
  padding: 3px 9px !important;
  border-radius: 3px !important;
  z-index: 4 !important;
  line-height: 1.4 !important;
  pointer-events: none !important;
  margin: 0 !important;
  width: auto !important;
}
body ul.products li.product.lc-card .lc-badge--sale { background: var(--lc-orange) !important; color: #fff !important; }
body ul.products li.product.lc-card .lc-badge--out  { background: #999 !important;             color: #fff !important; }
body ul.products li.product.lc-card span.onsale      { display: none !important; }

/* ── Tag categoria ───────────────────────────────────────────────────────── */
body ul.products li.product.lc-card .lc-cat {
  position: absolute !important;
  top: 10px !important;
  right: 10px !important;
  left: auto !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  letter-spacing: .08em !important;
  text-transform: uppercase !important;
  background: rgba(0,0,0,.65) !important;
  color: #fff !important;
  padding: 3px 7px !important;
  border-radius: 3px !important;
  z-index: 4 !important;
  pointer-events: none !important;
  max-width: 110px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  margin: 0 !important;
}

/* ── Link wrapper ────────────────────────────────────────────────────────── */
body ul.products li.product.lc-card a.lc-card__link {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  text-decoration: none !important;
  color: inherit !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: none !important;
  box-shadow: none !important;
}
body ul.products li.product.lc-card a.lc-card__link:hover {
  text-decoration: none !important;
  color: inherit !important;
  box-shadow: none !important;
}

/* ── Immagine ────────────────────────────────────────────────────────────── */
body ul.products li.product.lc-card .lc-card__img {
  aspect-ratio: 1 / 1 !important;
  overflow: hidden !important;
  background: #fafafa !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
body ul.products li.product.lc-card .lc-card__img img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  padding: 12px !important;
  transition: transform .35s ease !important;
  display: block !important;
  margin: 0 !important;
  border-radius: 0 !important;
}
body ul.products li.product.lc-card:hover .lc-card__img img {
  transform: scale(1.06) !important;
}

/* ── Body testo ──────────────────────────────────────────────────────────── */
body ul.products li.product.lc-card .lc-card__body {
  padding: 12px 14px 14px !important;
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
  margin: 0 !important;
}
body ul.products li.product.lc-card .lc-card__name {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: var(--lc-black) !important;
  line-height: 1.38 !important;
  display: -webkit-box !important;
  -webkit-line-clamp: 3 !important;
  -webkit-box-orient: vertical !important;
  overflow: hidden !important;
  flex: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
}

/* ── Prezzi ──────────────────────────────────────────────────────────────── */
body ul.products li.product.lc-card .lc-card__price {
  margin-top: auto !important;
  padding-top: 4px !important;
}
body ul.products li.product.lc-card .lc-price-orig {
  display: block !important;
  font-size: 11px !important;
  color: #aaa !important;
  text-decoration: line-through !important;
  line-height: 1 !important;
  margin-bottom: 2px !important;
  font-weight: 400 !important;
}
body ul.products li.product.lc-card .lc-price-sale {
  display: block !important;
  font-size: 17px !important;
  font-weight: 900 !important;
  color: var(--lc-orange) !important;
  line-height: 1.1 !important;
  margin: 0 !important;
}
body ul.products li.product.lc-card .lc-price-single {
  display: block !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: var(--lc-black) !important;
  margin: 0 !important;
}
body ul.products li.product.lc-card .price,
body ul.products li.product.lc-card .price ins,
body ul.products li.product.lc-card .price del { display: none !important; }

/* ── Pulsante Acquista ───────────────────────────────────────────────────── */
body ul.products li.product.lc-card a.lc-btn,
.woocommerce ul.products li.product.lc-card a.lc-btn,
.woocommerce-page ul.products li.product.lc-card a.lc-btn {
  display: block !important;
  background: var(--lc-orange) !important;
  color: #fff !important;
  text-align: center !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: .07em !important;
  text-transform: uppercase !important;
  padding: 10px 12px !important;
  text-decoration: none !important;
  border: none !important;
  border-radius: 0 0 6px 6px !important;
  width: 100% !important;
  cursor: pointer !important;
  transition: background var(--lc-transition) !important;
  box-shadow: none !important;
  line-height: 1.3 !important;
  margin: 0 !important;
  flex-shrink: 0 !important;
}
body ul.products li.product.lc-card a.lc-btn:hover:not(.lc-btn--out),
.woocommerce ul.products li.product.lc-card a.lc-btn:hover:not(.lc-btn--out) {
  background: var(--lc-orange-dark) !important;
  color: #fff !important;
  text-decoration: none !important;
}
body ul.products li.product.lc-card a.lc-btn.lc-btn--out,
.woocommerce ul.products li.product.lc-card a.lc-btn.lc-btn--out {
  background: #ccc !important;
  color: #888 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}
body ul.products li.product.lc-card a.lc-btn.loading { opacity: .7 !important; pointer-events: none !important; }
body ul.products li.product.lc-card a.lc-btn.added   { background: #2e7d32 !important; }

/* ── Responsive ──────────────────────────────────────────────────────────── */

/* 3 colonne — tablet portrait */
@media (max-width: 960px) {
  body ul.products,
  .woocommerce ul.products,
  .woocommerce-page ul.products {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

/* 2 colonne — smartphone */
@media (max-width: 600px) {
  body ul.products,
  .woocommerce ul.products,
  .woocommerce-page ul.products {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  body ul.products li.product.lc-card .lc-card__name { font-size: 11px !important; }
  body ul.products li.product.lc-card .lc-price-sale { font-size: 14px !important; }
  body ul.products li.product.lc-card .lc-cat        { display: none !important; }
}

/* 1 colonna — smartphone piccolo */
@media (max-width: 360px) {
  body ul.products,
  .woocommerce ul.products,
  .woocommerce-page ul.products {
    grid-template-columns: 1fr !important;
  }
}

/* ── Correlati / Upsell (pagina singola) ─────────────────────────────────── */
body .related  ul.products,
body .up-sells ul.products { grid-template-columns: repeat(4, 1fr) !important; }

@media (max-width: 960px) {
  body .related  ul.products,
  body .up-sells ul.products { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 600px) {
  body .related  ul.products,
  body .up-sells ul.products { grid-template-columns: repeat(2, 1fr) !important; }
}
