/* =========================================================
   TESSUTI CREATIVI - Shop + Product Cards UI
   Solo negozio, categorie e card prodotto. Non tocca carrello/checkout.
   ========================================================= */

:root{
  --tc-gold:#c2a165;
  --tc-gold-soft:#ead9b9;
  --tc-bordeaux:#67263a;
  --tc-bordeaux-dark:#4a1a28;
  --tc-ink:#241717;
  --tc-text:#604f48;
  --tc-muted:#907f73;
  --tc-cream:#fdfcfb;
  --tc-warm:#f6f0e8;
  --tc-paper:#fffaf2;
  --tc-white:#ffffff;
  --tc-border:rgba(63,34,27,.12);
  --tc-border-soft:rgba(63,34,27,.07);
  --tc-shadow-soft:0 10px 26px rgba(50,28,22,.055);
  --tc-shadow:0 22px 56px rgba(50,28,22,.095);
  --tc-radius:24px;
  --tc-radius-sm:16px;
  --tc-max:1180px;
}

body.post-type-archive-product,
body.tax-product_cat,
body.tax-product_tag{
  background:
    radial-gradient(circle at 14% 0%, rgba(194,161,101,.10), transparent 28%),
    linear-gradient(180deg, #fffdf9 0%, var(--tc-cream) 42%, var(--tc-warm) 100%);
}

body.post-type-archive-product .hero-section,
body.tax-product_cat .hero-section,
body.tax-product_tag .hero-section,
body.post-type-archive-product .page-header,
body.tax-product_cat .page-header,
body.tax-product_tag .page-header,
body.post-type-archive-product .entry-header,
body.tax-product_cat .entry-header,
body.tax-product_tag .entry-header,
body.post-type-archive-product .ct-page-title,
body.tax-product_cat .ct-page-title,
body.tax-product_tag .ct-page-title{
  display:none !important;
}

.tc-shop-page{
  width:min(var(--tc-max), calc(100% - 34px));
  margin:0 auto;
  padding:34px 0 76px;
  color:var(--tc-text);
}

.tc-shop-page *{
  box-sizing:border-box;
}

.tc-shop-intro{
  display:grid;
  grid-template-columns:minmax(0, 1fr) 335px;
  gap:26px;
  align-items:stretch;
  margin:0 0 20px;
}

.tc-shop-intro__copy,
.tc-shop-intro__help{
  background:rgba(255,255,255,.74);
  border:1px solid var(--tc-border-soft);
  border-radius:30px;
  box-shadow:var(--tc-shadow-soft);
}

.tc-shop-intro__copy{
  padding:34px clamp(24px, 4vw, 44px);
}

.tc-shop-kicker{
  display:block;
  margin:0 0 9px;
  font-family:Inter,system-ui,sans-serif;
  font-size:12px;
  font-weight:700;
  letter-spacing:.10em;
  color:var(--tc-bordeaux);
  text-transform:uppercase;
}

.tc-shop-intro h1{
  margin:0;
  color:var(--tc-ink);
  font-family:Cinzel, Georgia, serif;
  font-size:clamp(34px, 4vw, 62px);
  line-height:.98;
  letter-spacing:-.035em;
}

.tc-shop-text{
  max-width:760px;
  margin:18px 0 0;
  color:var(--tc-text);
  font-family:Inter,system-ui,sans-serif;
  font-size:15px;
  line-height:1.72;
}

.tc-shop-text p{
  margin:0;
}

.tc-shop-intro__help{
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:24px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.86), rgba(245,238,226,.76));
}

.tc-shop-intro__help small{
  display:block;
  margin:0 0 7px;
  color:var(--tc-muted);
  font-family:Inter,system-ui,sans-serif;
  font-size:12px;
  line-height:1.45;
}

.tc-shop-intro__help strong{
  display:block;
  margin:0 0 18px;
  color:var(--tc-bordeaux-dark);
  font-family:Cinzel, Georgia, serif;
  font-size:18px;
  line-height:1.28;
}

.tc-shop-intro__help a,
.tc-shop-empty__actions a,
.tc-product-card__action .button,
.tc-product-card__action a.button{
  display:inline-flex !important;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:12px 20px !important;
  border-radius:999px !important;
  border:1px solid var(--tc-bordeaux) !important;
  background:var(--tc-bordeaux) !important;
  color:#fff !important;
  font-family:Cinzel, Georgia, serif !important;
  font-size:12px !important;
  font-weight:700 !important;
  letter-spacing:.08em !important;
  line-height:1.1 !important;
  text-transform:uppercase !important;
  text-decoration:none !important;
  box-shadow:none !important;
  transition:background .22s ease, border-color .22s ease, color .22s ease, transform .22s ease, box-shadow .22s ease !important;
}

.tc-shop-intro__help a:hover,
.tc-shop-empty__actions a:hover,
.tc-product-card__action .button:hover,
.tc-product-card__action a.button:hover{
  background:var(--tc-bordeaux-dark) !important;
  border-color:var(--tc-bordeaux-dark) !important;
  color:var(--tc-gold-soft) !important;
  transform:translateY(-1px);
  box-shadow:0 14px 24px rgba(103,38,58,.16) !important;
}

.tc-shop-rail{
  display:flex;
  align-items:center;
  gap:10px;
  overflow-x:auto;
  padding:10px 0 20px;
  margin:0 0 14px;
  scrollbar-width:thin;
}

.tc-shop-rail a{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:9px 15px;
  border-radius:999px;
  border:1px solid var(--tc-border-soft);
  background:rgba(255,255,255,.74);
  color:var(--tc-bordeaux-dark);
  font-family:Cinzel, Georgia, serif;
  font-size:11px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  text-decoration:none;
  white-space:nowrap;
  box-shadow:0 8px 18px rgba(50,28,22,.035);
  transition:background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.tc-shop-rail a:hover,
.tc-shop-rail a.is-active{
  background:var(--tc-bordeaux);
  border-color:var(--tc-bordeaux);
  color:#fff;
  transform:translateY(-1px);
}

.tc-shop-bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin:4px 0 24px;
  padding:18px 20px;
  border:1px solid var(--tc-border-soft);
  border-radius:22px;
  background:rgba(255,255,255,.72);
  box-shadow:var(--tc-shadow-soft);
}

.tc-shop-bar__count,
.woocommerce .woocommerce-result-count{
  float:none !important;
  margin:0 !important;
  color:var(--tc-muted);
  font-family:Inter,system-ui,sans-serif;
  font-size:13px;
  font-weight:600;
  letter-spacing:.02em;
}

.tc-shop-bar__order,
.woocommerce .woocommerce-ordering{
  float:none !important;
  margin:0 !important;
}

.tc-shop-bar__order select,
.woocommerce .woocommerce-ordering select{
  min-height:42px;
  padding:0 42px 0 15px;
  border:1px solid var(--tc-border) !important;
  border-radius:999px !important;
  background:#fff !important;
  color:var(--tc-ink) !important;
  font-family:Inter,system-ui,sans-serif;
  font-size:13px;
  outline:none !important;
}

.tc-shop-products{
  margin:0;
}

.woocommerce .tc-shop-products ul.products,
.woocommerce-page .tc-shop-products ul.products,
.woocommerce ul.products{
  display:grid !important;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:24px;
  margin:0 !important;
  padding:0 !important;
}

.woocommerce .tc-shop-products ul.products::before,
.woocommerce .tc-shop-products ul.products::after,
.woocommerce ul.products::before,
.woocommerce ul.products::after{
  display:none !important;
  content:none !important;
}

.woocommerce ul.products li.product.tc-product-card,
.woocommerce-page ul.products li.product.tc-product-card{
  width:auto !important;
  float:none !important;
  clear:none !important;
  margin:0 !important;
  display:flex;
  flex-direction:column;
  min-width:0;
  border-radius:24px;
  overflow:hidden;
  border:1px solid var(--tc-border-soft);
  background:rgba(255,255,255,.82);
  box-shadow:var(--tc-shadow-soft);
  transition:transform .26s ease, box-shadow .26s ease, border-color .26s ease;
}

.woocommerce ul.products li.product.tc-product-card:hover{
  transform:translateY(-4px);
  border-color:rgba(194,161,101,.42);
  box-shadow:var(--tc-shadow);
}

.tc-product-card__image{
  position:relative;
  display:block;
  overflow:hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,1), rgba(246,241,233,.92));
  aspect-ratio:1 / 1;
  margin:12px 12px 0;
  border-radius:18px;
  border:1px solid rgba(63,34,27,.06);
  text-decoration:none;
}

.tc-product-card__img,
.woocommerce ul.products li.product.tc-product-card a img.tc-product-card__img{
  display:block !important;
  width:100% !important;
  height:100% !important;
  margin:0 !important;
  object-fit:cover;
  border-radius:0 !important;
  transition:transform .36s cubic-bezier(.16,1,.3,1);
}

.tc-product-card:hover .tc-product-card__img{
  transform:scale(1.035);
}

.tc-product-card__badges{
  position:absolute;
  left:10px;
  top:10px;
  z-index:3;
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

.tc-product-card__badges span{
  display:inline-flex;
  align-items:center;
  min-height:25px;
  padding:7px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.94);
  border:1px solid rgba(103,38,58,.12);
  color:var(--tc-bordeaux);
  font-family:Cinzel, Georgia, serif;
  font-size:10px;
  font-weight:800;
  letter-spacing:.07em;
  line-height:1;
  text-transform:uppercase;
  box-shadow:0 8px 16px rgba(50,28,22,.07);
}

.tc-product-card__body{
  display:flex;
  flex-direction:column;
  flex:1 1 auto;
  padding:16px 16px 18px;
}

.tc-product-card__cat{
  min-height:18px;
  margin:0 0 8px;
  color:var(--tc-gold);
  font-family:Inter,system-ui,sans-serif;
  font-size:11px;
  font-weight:800;
  letter-spacing:.12em;
  line-height:1.35;
  text-transform:uppercase;
}

.tc-product-card__cat a,
.tc-product-card__cat span{
  color:inherit;
  text-decoration:none;
}

.tc-product-card__title{
  margin:0 0 8px !important;
  padding:0 !important;
  font-family:Cinzel, Georgia, serif;
  font-size:clamp(17px, 1.5vw, 22px) !important;
  font-weight:700;
  letter-spacing:-.025em;
  line-height:1.12 !important;
  color:var(--tc-bordeaux-dark);
}

.tc-product-card__title a{
  color:inherit;
  text-decoration:none;
}

.tc-product-card__title a:hover{
  color:var(--tc-bordeaux);
}

.tc-product-card__desc{
  margin:0 0 16px;
  color:var(--tc-text);
  font-family:Inter,system-ui,sans-serif;
  font-size:13px;
  line-height:1.55;
}

.tc-product-card__bottom{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-top:auto;
}

.tc-product-card__price,
.woocommerce ul.products li.product .tc-product-card__price .price,
.woocommerce ul.products li.product .price{
  display:block;
  margin:0 !important;
  padding:0 !important;
  color:var(--tc-bordeaux) !important;
  font-family:Inter,system-ui,sans-serif;
  font-size:22px !important;
  font-weight:800 !important;
  line-height:1.15;
}

.tc-product-card__price del{
  margin-right:7px;
  color:var(--tc-muted) !important;
  opacity:.72;
  font-size:14px;
  font-weight:500;
}

.tc-product-card__price ins{
  text-decoration:none;
}

.tc-price-empty{
  color:var(--tc-muted);
  font-size:13px;
  font-weight:600;
}

.tc-product-card__action .button,
.tc-product-card__action a.button{
  width:100%;
}

.tc-product-card__action .added_to_cart{
  display:flex;
  justify-content:center;
  margin-top:9px;
  color:var(--tc-bordeaux);
  font-family:Inter,system-ui,sans-serif;
  font-size:12px;
  font-weight:700;
  text-decoration:none;
}

.tc-shop-pagination{
  margin:38px 0 0;
  display:flex;
  justify-content:center;
}

.woocommerce nav.woocommerce-pagination ul{
  display:flex;
  gap:8px;
  border:0 !important;
}

.woocommerce nav.woocommerce-pagination ul li{
  border:0 !important;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span{
  min-width:40px;
  min-height:40px;
  display:flex !important;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  border:1px solid var(--tc-border-soft);
  background:#fff;
  color:var(--tc-bordeaux);
  font-family:Inter,system-ui,sans-serif;
  font-size:13px;
  font-weight:700;
}

.woocommerce nav.woocommerce-pagination ul li span.current,
.woocommerce nav.woocommerce-pagination ul li a:hover{
  background:var(--tc-bordeaux);
  border-color:var(--tc-bordeaux);
  color:#fff;
}

.tc-shop-empty{
  margin:24px 0 0;
  padding:42px;
  border-radius:30px;
  border:1px solid var(--tc-border-soft);
  background:rgba(255,255,255,.78);
  box-shadow:var(--tc-shadow-soft);
  text-align:center;
}

.tc-shop-empty h2{
  margin:0 0 10px;
  color:var(--tc-bordeaux-dark);
  font-family:Cinzel, Georgia, serif;
  font-size:32px;
}

.tc-shop-empty p{
  max-width:620px;
  margin:0 auto 22px;
  color:var(--tc-text);
  font-family:Inter,system-ui,sans-serif;
  font-size:15px;
  line-height:1.7;
}

.tc-shop-empty__actions{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap;
}

/* Related/upsell products inherit the same card system */
.single-product .related.products ul.products,
.single-product .up-sells.upsells.products ul.products{
  display:grid !important;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:24px !important;
}

@media (max-width: 1100px){
  .tc-shop-intro{
    grid-template-columns:1fr;
  }

  .tc-shop-intro__help{
    max-width:none;
  }

  .woocommerce .tc-shop-products ul.products,
  .woocommerce-page .tc-shop-products ul.products,
  .woocommerce ul.products,
  .single-product .related.products ul.products,
  .single-product .up-sells.upsells.products ul.products{
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px){
  .tc-shop-page{
    width:min(100% - 24px, var(--tc-max));
    padding:22px 0 56px;
  }

  .tc-shop-intro{
    gap:14px;
    margin-bottom:14px;
  }

  .tc-shop-intro__copy,
  .tc-shop-intro__help{
    border-radius:22px;
    padding:22px;
  }

  .tc-shop-intro h1{
    font-size:34px;
  }

  .tc-shop-text{
    font-size:14px;
  }

  .tc-shop-rail{
    margin-left:-12px;
    margin-right:-12px;
    padding-left:12px;
    padding-right:12px;
  }

  .tc-shop-bar{
    align-items:stretch;
    flex-direction:column;
    gap:12px;
    padding:14px;
    border-radius:18px;
  }

  .tc-shop-bar__order select,
  .woocommerce .woocommerce-ordering select{
    width:100%;
  }

  .woocommerce .tc-shop-products ul.products,
  .woocommerce-page .tc-shop-products ul.products,
  .woocommerce ul.products,
  .single-product .related.products ul.products,
  .single-product .up-sells.upsells.products ul.products{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:14px !important;
  }

  .woocommerce ul.products li.product.tc-product-card,
  .woocommerce-page ul.products li.product.tc-product-card{
    border-radius:18px;
  }

  .tc-product-card__image{
    margin:8px 8px 0;
    border-radius:14px;
  }

  .tc-product-card__body{
    padding:12px 11px 13px;
  }

  .tc-product-card__cat{
    font-size:9px;
    margin-bottom:6px;
  }

  .tc-product-card__title{
    font-size:15px !important;
  }

  .tc-product-card__desc{
    display:none;
  }

  .tc-product-card__price,
  .woocommerce ul.products li.product .price{
    font-size:17px !important;
  }

  .tc-product-card__action .button,
  .tc-product-card__action a.button{
    min-height:40px;
    padding:10px 11px !important;
    font-size:10px !important;
    letter-spacing:.06em !important;
  }
}

@media (max-width: 390px){
  .woocommerce .tc-shop-products ul.products,
  .woocommerce-page .tc-shop-products ul.products,
  .woocommerce ul.products,
  .single-product .related.products ul.products,
  .single-product .up-sells.upsells.products ul.products{
    grid-template-columns:1fr;
  }
}

@media (prefers-reduced-motion: reduce){
  .tc-shop-page *,
  .tc-product-card,
  .tc-product-card__img{
    transition:none !important;
    transform:none !important;
  }
}
