/**
 * Hindustan Art — WooCommerce archive / category / tag / shop punch-up
 * Brand: white · vermillion #C41E3A · gold #c9a227 · Cormorant Garamond
 * Layout energy only — original HA styles, not a Vibecrafts copy.
 * Version: 1.0.0
 */

/* —— 1) Archive hero band —— */
body.woocommerce-archive .hero-section,
body.tax-product_cat .hero-section,
body.tax-product_tag .hero-section,
body.post-type-archive-product .hero-section,
body.woocommerce-shop .hero-section,
[data-prefix="woo_categories"] .hero-section,
.ct-page-title-container {
  position: relative !important;
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
  min-height: clamp(190px, 30vw, 240px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background:
    linear-gradient(
      165deg,
      #ffffff 0%,
      #fff5f2 32%,
      rgba(196, 30, 58, 0.085) 68%,
      #fff8f0 100%
    ) !important;
  background-color: #fff8f6 !important;
  border-bottom: 2px solid #c9a227 !important;
  box-shadow: inset 0 -1px 0 rgba(201, 162, 39, 0.35) !important;
  --container-padding: 0 !important;
  box-sizing: border-box !important;
}

body.woocommerce-archive .hero-section .entry-header,
body.tax-product_cat .hero-section .entry-header,
body.tax-product_tag .hero-section .entry-header,
body.post-type-archive-product .hero-section .entry-header,
[data-prefix="woo_categories"] .hero-section .entry-header {
  width: 100% !important;
  max-width: 1100px !important;
  margin: 0 auto !important;
  padding: 1.75rem 1.15rem 1.85rem !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

@media (min-width: 1000px) {
  body.woocommerce-archive .hero-section,
  body.tax-product_cat .hero-section,
  body.tax-product_tag .hero-section,
  body.post-type-archive-product .hero-section,
  [data-prefix="woo_categories"] .hero-section {
    min-height: 240px !important;
  }
  body.woocommerce-archive .hero-section .entry-header,
  body.tax-product_cat .hero-section .entry-header,
  body.tax-product_tag .hero-section .entry-header,
  body.post-type-archive-product .hero-section .entry-header,
  [data-prefix="woo_categories"] .hero-section .entry-header {
    padding: 2.4rem 2rem 2.5rem !important;
  }
}

/* Large Cormorant title */
body.woocommerce-archive .hero-section .page-title,
body.tax-product_cat .hero-section .page-title,
body.tax-product_tag .hero-section .page-title,
body.post-type-archive-product .hero-section .page-title,
[data-prefix="woo_categories"] .hero-section .page-title,
.ct-container .page-title {
  font-family: "Cormorant Garamond", Georgia, serif !important;
  font-weight: 500 !important;
  font-size: clamp(2rem, 6.5vw, 3.15rem) !important;
  line-height: 1.15 !important;
  letter-spacing: 0.02em !important;
  color: #C41E3A !important;
  margin: 0 0 0.55rem !important;
  text-align: center !important;
}

/* Gold lotus / dot divider under title (CSS only) */
body.woocommerce-archive .hero-section .page-title::after,
body.tax-product_cat .hero-section .page-title::after,
body.tax-product_tag .hero-section .page-title::after,
body.post-type-archive-product .hero-section .page-title::after,
[data-prefix="woo_categories"] .hero-section .page-title::after {
  content: "" !important;
  display: block !important;
  width: 2.75rem !important;
  height: 0.55rem !important;
  margin: 0.65rem auto 0 !important;
  background:
    radial-gradient(circle at 50% 50%, #c9a227 0 2.5px, transparent 2.8px),
    radial-gradient(circle at 18% 50%, #c9a227 0 1.6px, transparent 1.9px),
    radial-gradient(circle at 82% 50%, #c9a227 0 1.6px, transparent 1.9px);
  background-repeat: no-repeat;
  background-position: center;
}

/* Optional subtitle from term description */
.ha-archive-subtitle,
body.woocommerce-archive .page-description,
body.tax-product_cat .page-description,
body.tax-product_tag .page-description,
body.post-type-archive-product .page-description {
  font-family: "Cormorant Garamond", Georgia, serif !important;
  font-size: clamp(0.95rem, 2.4vw, 1.15rem) !important;
  line-height: 1.45 !important;
  color: #5a4a45 !important;
  max-width: 36em !important;
  margin: 0.55rem auto 0 !important;
  text-align: center !important;
  font-weight: 400 !important;
  font-style: italic !important;
}

.ha-archive-subtitle p,
body.woocommerce-archive .page-description p {
  margin: 0 !important;
}

/* Breadcrumbs — tighter, vermillion links */
body.woocommerce-archive .ct-breadcrumbs,
body.tax-product_cat .ct-breadcrumbs,
body.tax-product_tag .ct-breadcrumbs,
body.post-type-archive-product .ct-breadcrumbs,
body.woocommerce-archive .woocommerce-breadcrumb,
body.tax-product_cat .woocommerce-breadcrumb {
  font-size: 0.72rem !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  margin: 0 0 0.65rem !important;
  padding: 0 !important;
  line-height: 1.3 !important;
  justify-content: center !important;
  text-align: center !important;
  color: #8a7a72 !important;
}

body.woocommerce-archive .ct-breadcrumbs a,
body.tax-product_cat .ct-breadcrumbs a,
body.tax-product_tag .ct-breadcrumbs a,
body.post-type-archive-product .ct-breadcrumbs a,
body.woocommerce-archive .woocommerce-breadcrumb a,
body.tax-product_cat .woocommerce-breadcrumb a {
  color: #C41E3A !important;
  text-decoration: none !important;
  font-weight: 500 !important;
}

body.woocommerce-archive .ct-breadcrumbs a:hover,
body.tax-product_cat .ct-breadcrumbs a:hover {
  color: #c9a227 !important;
}

/* Listing top bar polish */
.woo-listing-top {
  margin-top: 1.1rem !important;
  margin-bottom: 0.85rem !important;
  align-items: center !important;
}

.woo-listing-top .woocommerce-result-count {
  color: #C41E3A !important;
  font-family: "Cormorant Garamond", Georgia, serif !important;
  letter-spacing: 0.04em !important;
}

/* —— 2) Product cards on archives —— */
body.woocommerce-archive ul.products li.product,
body.tax-product_cat ul.products li.product,
body.tax-product_tag ul.products li.product,
body.post-type-archive-product ul.products li.product,
body.woocommerce ul.products li.product {
  background: #ffffff !important;
  border: 1px solid #c9a227 !important;
  border-radius: 4px !important;
  box-shadow: 0 8px 22px -8px rgba(80, 40, 30, 0.16) !important;
  padding: 0.65rem !important;
  transition: box-shadow 0.2s ease, transform 0.2s ease !important;
}

body.woocommerce-archive ul.products li.product:hover,
body.tax-product_cat ul.products li.product:hover,
body.woocommerce ul.products li.product:hover {
  box-shadow: 0 12px 28px -8px rgba(80, 40, 30, 0.22) !important;
  transform: translateY(-2px);
}

/* Square-ish image area on white ground */
body.woocommerce-archive ul.products li.product figure,
body.tax-product_cat ul.products li.product figure,
body.woocommerce ul.products li.product figure {
  background: #ffffff !important;
  margin: 0 0 0.65rem !important;
  border-radius: 2px !important;
  overflow: hidden !important;
}

body.woocommerce-archive ul.products li.product .ct-media-container,
body.tax-product_cat ul.products li.product .ct-media-container,
body.woocommerce ul.products li.product .ct-media-container {
  background: #ffffff !important;
  aspect-ratio: 1 / 1 !important;
}

body.woocommerce-archive ul.products li.product img,
body.tax-product_cat ul.products li.product img,
body.woocommerce ul.products li.product img {
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  width: 100% !important;
  background: #ffffff !important;
}

/* Vermillion titles, gold prices */
body.woocommerce-archive ul.products li.product .woocommerce-loop-product__title,
body.tax-product_cat ul.products li.product .woocommerce-loop-product__title,
body.woocommerce ul.products li.product .woocommerce-loop-product__title,
body.woocommerce-archive ul.products li.product .ct-woo-card-title,
body.woocommerce ul.products li.product .woocommerce-loop-product__title a {
  color: #C41E3A !important;
  font-family: "Cormorant Garamond", Georgia, serif !important;
  font-weight: 500 !important;
  font-size: clamp(0.9rem, 2.5vw, 1.05rem) !important;
  line-height: 1.3 !important;
}

body.woocommerce-archive ul.products li.product .price,
body.tax-product_cat ul.products li.product .price,
body.woocommerce ul.products li.product .price,
body.woocommerce ul.products li.product .price .amount,
body.woocommerce ul.products li.product .price ins,
body.woocommerce ul.products li.product .price ins .amount {
  color: #c9a227 !important;
  font-weight: 600 !important;
  font-family: "Cormorant Garamond", Georgia, serif !important;
}

body.woocommerce ul.products li.product .price del,
body.woocommerce ul.products li.product .price del .amount {
  color: #9a8a82 !important;
  opacity: 0.85;
}

/* —— 3) Mobile 2-col fit (fix container-width bug) —— */
@media (max-width: 999px) {
  body.woocommerce-archive,
  body.tax-product_cat,
  body.tax-product_tag,
  body.post-type-archive-product {
    --theme-container-width: 100% !important;
    --theme-normal-container-max-width: 100% !important;
    --theme-container-edge-spacing: 100% !important;
  }

  body.woocommerce-archive .ct-container,
  body.tax-product_cat .ct-container,
  body.tax-product_tag .ct-container,
  body.post-type-archive-product .ct-container,
  body.woocommerce-archive .ct-container-narrow,
  body.tax-product_cat .ct-container-narrow {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding-left: 10px !important;
    padding-right: 10px !important;
    box-sizing: border-box !important;
  }

  body.woocommerce-archive ul.products,
  body.tax-product_cat ul.products,
  body.tax-product_tag ul.products,
  body.post-type-archive-product ul.products,
  body.woocommerce ul.products.columns-2,
  body.woocommerce ul.products {
    --shop-columns: repeat(2, minmax(0, 1fr)) !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 0 1.25rem !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  body.woocommerce-archive ul.products li.product,
  body.tax-product_cat ul.products li.product,
  body.woocommerce ul.products li.product {
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    float: none !important;
  }
}

@media (min-width: 1000px) {
  body.woocommerce-archive ul.products,
  body.tax-product_cat ul.products,
  body.post-type-archive-product ul.products {
    gap: 1.15rem !important;
  }
}

/* Avoid double term description (ours + Blocksy native) */
.hero-section .ha-archive-subtitle + .page-description {
  display: none !important;
}
