/* ============================================================
   Tam Tam Street — Production fixes
   CSS leggero e finale per shop, immagini e contrasto Dokan.
   Non sostituisce style.css: corregge solo i punti produttivi rimasti.
============================================================ */

:root {
  --tt-surface: #0b0b0f;
  --tt-surface-2: #111116;
  --tt-surface-3: #17171d;
  --tt-text: #ffffff;
  --tt-text-soft: #d7d7df;
  --tt-text-muted: #9b9baa;
  --tt-line: rgba(255,255,255,0.10);
  --tt-line-strong: rgba(255,255,255,0.18);
  --tt-accent: #3b2cff;
  --tt-radius: 22px;
}

/* 1. Immagini prodotto: mostra l'oggetto intero, senza crop aggressivo. */
.woocommerce ul.products li.product a.product-link,
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link,
body.dokan-store ul.products li.product a.product-link,
body.dokan-store ul.products li.product a.woocommerce-LoopProduct-link {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  background: radial-gradient(circle at center, rgba(255,255,255,0.08), rgba(255,255,255,0.025)) !important;
  border-radius: 18px !important;
  overflow: hidden !important;
}

.woocommerce ul.products li.product img,
body.dokan-store ul.products li.product img,
.woocommerce div.product div.images img {
  width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  display: block !important;
  background: transparent !important;
}

.woocommerce div.product div.images,
.woocommerce div.product div.images .woocommerce-product-gallery__image {
  background: #0f0f14 !important;
  border-radius: 22px !important;
  overflow: hidden !important;
}

.woocommerce div.product div.images .woocommerce-product-gallery__image a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: clamp(320px, 46vw, 560px) !important;
}

/* 2. Card shop/timebox: stessa altezza, stessi spazi, bottone allineato. */
.woocommerce ul.products,
.woocommerce-page ul.products,
.tt-market-section-products ul.products,
.shop-timebox,
.tt-shop-timebox {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
  gap: 28px !important;
  align-items: stretch !important;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.tt-market-section-products ul.products li.product,
.shop-timebox .product,
.tt-shop-timebox .product {
  float: none !important;
  width: 100% !important;
  min-height: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
  margin: 0 !important;
  padding: 18px !important;
  background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.025)) !important;
  border: 1px solid var(--tt-line) !important;
  border-radius: var(--tt-radius) !important;
  color: var(--tt-text) !important;
  box-shadow: 0 18px 45px rgba(0,0,0,0.26) !important;
  overflow: hidden !important;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce-page ul.products li.product .woocommerce-loop-product__title,
.tt-market-section-products ul.products li.product .woocommerce-loop-product__title {
  min-height: 48px !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--tt-text) !important;
  font-size: 1.02rem !important;
  line-height: 1.28 !important;
  font-weight: 750 !important;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title a,
.woocommerce-page ul.products li.product .woocommerce-loop-product__title a {
  color: inherit !important;
}

.woocommerce ul.products li.product .price,
.woocommerce-page ul.products li.product .price,
.tt-market-section-products ul.products li.product .price {
  min-height: 28px !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #ffffff !important;
  font-weight: 800 !important;
}

.woocommerce ul.products li.product .add-to-cart,
.woocommerce-page ul.products li.product .add-to-cart,
.woocommerce ul.products li.product .button,
.woocommerce-page ul.products li.product .button {
  margin-top: auto !important;
}

.woocommerce ul.products li.product .button,
.woocommerce-page ul.products li.product .button,
.woocommerce ul.products li.product a.button,
.woocommerce-page ul.products li.product a.button {
  width: 100% !important;
  min-height: 46px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 14px !important;
  background: #ffffff !important;
  color: #050507 !important;
  border: 1px solid #ffffff !important;
  font-weight: 850 !important;
  box-shadow: none !important;
}

.woocommerce ul.products li.product .button:hover,
.woocommerce-page ul.products li.product .button:hover,
.woocommerce ul.products li.product a.button:hover,
.woocommerce-page ul.products li.product a.button:hover {
  background: var(--tt-accent) !important;
  border-color: var(--tt-accent) !important;
  color: #ffffff !important;
}

/* 3. Toolbar shop coerente con tema dark. */
.tt-market-section,
.tt-market-toolbar,
.woocommerce-products-header {
  color: var(--tt-text) !important;
}

.tt-market-section__subtitle,
.woocommerce-result-count {
  color: var(--tt-text-soft) !important;
}

.tt-market-category-filter select,
.woocommerce-ordering select,
.woocommerce-product-search input.search-field {
  background: #111116 !important;
  color: #ffffff !important;
  border: 1px solid var(--tt-line-strong) !important;
  border-radius: 14px !important;
}

.woocommerce-product-search button,
.tt-market-toolbar button {
  background: #ffffff !important;
  color: #050507 !important;
  border: 1px solid #ffffff !important;
  border-radius: 14px !important;
  font-weight: 800 !important;
}

/* 4. Dokan: contrasto operativo chiaro, ma header/footer restano dark. */
body.dokan-dashboard .dokan-dashboard-content,
body.dokan-dashboard .dokan-dash-sidebar,
body.dokan-store .dokan-single-store,
body.dokan-store .dokan-store-wrap,
body.dokan-store .dokan-store-page-wrap {
  color: #111827 !important;
}

body.dokan-dashboard .dokan-dashboard-content input,
body.dokan-dashboard .dokan-dashboard-content textarea,
body.dokan-dashboard .dokan-dashboard-content select,
body.dokan-store input,
body.dokan-store textarea,
body.dokan-store select {
  background: #ffffff !important;
  color: #111827 !important;
  border-color: rgba(17,24,39,0.18) !important;
}

body.dokan-dashboard .dokan-dashboard-content input::placeholder,
body.dokan-dashboard .dokan-dashboard-content textarea::placeholder,
body.dokan-store input::placeholder,
body.dokan-store textarea::placeholder {
  color: #6b7280 !important;
}

body.dokan-dashboard .dokan-dashboard-content .dokan-btn,
body.dokan-dashboard .dokan-dashboard-content button,
body.dokan-dashboard .dokan-dashboard-content input[type="submit"] {
  color: #ffffff !important;
}

body.dokan-dashboard .dokan-dashboard-content .dokan-btn:hover,
body.dokan-dashboard .dokan-dashboard-content button:hover,
body.dokan-dashboard .dokan-dashboard-content input[type="submit"]:hover {
  color: #111827 !important;
}

/* 5. Mobile: card leggibili e immagini intere anche su schermi stretti. */
@media (max-width: 760px) {
  .woocommerce ul.products,
  .woocommerce-page ul.products,
  .tt-market-section-products ul.products,
  .shop-timebox,
  .tt-shop-timebox {
    grid-template-columns: 1fr !important;
    gap: 22px !important;
  }

  .woocommerce ul.products li.product,
  .woocommerce-page ul.products li.product {
    padding: 16px !important;
  }
}
