/**
 * WooCommerce catalog styles — shared card contract for React + PHP renderers.
 */

.tmt-wc-shell {
  min-height: 100vh;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
}

.tmt-wc-shell .tmt-wc-header a.tmt-wc-brand-logo-link img.tmt-wc-brand-logo,
.tmt-wc-shell footer a.tmt-wc-brand-logo-link img.tmt-wc-brand-logo,
.woocommerce-page .tmt-wc-shell .tmt-wc-header a.tmt-wc-brand-logo-link img.tmt-wc-brand-logo,
.woocommerce-page .tmt-wc-shell footer a.tmt-wc-brand-logo-link img.tmt-wc-brand-logo {
  display: block;
  width: auto;
  max-width: 9rem;
  height: 2rem;
  max-height: 2rem;
  object-fit: contain;
}

@media (min-width: 768px) {
  .tmt-wc-shell .tmt-wc-header a.tmt-wc-brand-logo-link img.tmt-wc-brand-logo {
    max-width: 11rem;
    height: 2.5rem;
    max-height: 2.5rem;
  }

  .tmt-wc-shell footer a.tmt-wc-brand-logo-link img.tmt-wc-brand-logo {
    max-width: 12rem;
    height: 3rem;
    max-height: 3rem;
  }
}

.tmt-wc-main,
.tmt-wc-content {
  min-height: 40vh;
}

.tmt-wc-mobile-panel:not(.hidden) {
  display: block;
}

.tmt-wc-mobile-close.hidden,
.tmt-wc-mobile-open.hidden {
  display: none;
}

.woocommerce .products {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 640px) {
  .woocommerce .products.columns-2,
  .woocommerce .products.columns-3,
  .woocommerce .products.columns-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 56rem;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 1024px) {
  .woocommerce .products.columns-3,
  .woocommerce .products.columns-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
  }
}

.woocommerce ul.products li.product,
.tmt-product-card-wrap {
  width: 100%;
  margin: 0;
  padding: 0;
  float: none;
}

.tmt-product-card,
.tmt-product-card-wrap .tmt-product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: hsl(var(--card));
  overflow: hidden;
}

.tmt-product-card__media-link {
  text-decoration: none;
}

.tmt-product-card__cta,
.tmt-view-book-button {
  text-decoration: none;
}

.woocommerce nav.woocommerce-pagination {
  margin-top: 3rem;
  text-align: center;
}

.woocommerce nav.woocommerce-pagination ul {
  display: inline-flex;
  gap: 0.5rem;
  border: 0;
}

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

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border: 1px solid hsl(var(--border));
  border-radius: 0.125rem;
  color: hsl(var(--foreground));
  background: hsl(var(--card));
}

.woocommerce nav.woocommerce-pagination ul li span.current {
  background: hsl(var(--brand-red));
  color: hsl(var(--brand-cream));
  border-color: hsl(var(--brand-red));
}

.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering {
  margin-bottom: 1.5rem;
}

.woocommerce .woocommerce-ordering select {
  border: 1px solid hsl(var(--border));
  border-radius: 0.125rem;
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  padding: 0.5rem 0.75rem;
}

.woocommerce div.product {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 1024px) {
  .woocommerce div.product {
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 4rem;
  }

  .woocommerce div.product div.images {
    grid-column: span 7 / span 7;
  }

  .woocommerce div.product div.summary {
    grid-column: span 5 / span 5;
    position: sticky;
    top: 7rem;
  }
}

.woocommerce div.product .product_title {
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 0.95;
  font-size: clamp(1.875rem, 4vw, 3rem);
}

.woocommerce div.product p.price {
  font-family: inherit;
  font-size: 2.25rem;
  color: hsl(var(--foreground));
}

.woocommerce div.product .woocommerce-product-details__short-description {
  font-family: inherit;
  color: hsl(var(--muted-foreground));
  line-height: 1.7;
}

.woocommerce div.product .external-product .single_add_to_cart_button,
.woocommerce div.product .external-product a.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 1rem 1.5rem;
  border-radius: 0.125rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 14px;
  font-weight: 600;
  background-color: hsl(var(--brand-red));
  color: hsl(var(--brand-cream));
  border: 0;
}

.woocommerce .woocommerce-info,
.woocommerce .woocommerce-message,
.woocommerce .woocommerce-error {
  border-radius: 0.125rem;
}

.woocommerce .woocommerce-info {
  border-top-color: hsl(var(--gold));
}

.woocommerce .return-to-shop .button,
.woocommerce a.button,
.woocommerce button.button {
  border-radius: 0.125rem;
}

.woocommerce .products .tmt-view-book-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.125rem;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 14px;
  font-weight: 600;
  background-color: hsl(var(--brand-red));
  color: hsl(var(--brand-cream));
}

.woocommerce .woocommerce-breadcrumb {
  margin-bottom: 1.5rem;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}

.woocommerce .woocommerce-breadcrumb a {
  color: hsl(var(--muted-foreground));
}

.woocommerce .woocommerce-breadcrumb a:hover {
  color: hsl(var(--foreground));
}

.woocommerce .onsale {
  background: hsl(var(--brand-red));
  color: hsl(var(--brand-cream));
  border-radius: 0.125rem;
  min-height: auto;
  min-width: auto;
  line-height: 1.2;
  padding: 0.375rem 0.75rem;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.woocommerce .stock {
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.woocommerce .stock.out-of-stock {
  color: hsl(var(--bronze));
}

.tmt-wc-content .woocommerce-info,
.tmt-wc-content .woocommerce-message,
.tmt-wc-content .woocommerce-error,
.tmt-wc-content .woocommerce-notices-wrapper .woocommerce-info {
  border-radius: 0.125rem;
  border-top: 3px solid hsl(var(--gold));
  background: hsl(var(--card));
  color: hsl(var(--foreground));
  padding: 1rem 1.25rem;
}

.tmt-wc-content .woocommerce-info::before,
.tmt-wc-content .woocommerce-message::before {
  color: hsl(var(--gold));
}

.tmt-wc-content .woocommerce-no-products-found .woocommerce-info {
  margin: 0;
  text-align: center;
}

.woocommerce-page .tmt-app-root:empty {
  display: none;
}
