/* HEMPCITY Frontend v6.5.4 — Step 1: cart reset, card action cleanup, taxonomy tiles */

/* Remove Astra's floating on-image shopping bag. The primary CTA remains the single cart action. */
body.woocommerce .ast-on-card-button,
body.woocommerce .ast-card-action-tooltip,
body.woocommerce .astra-shop-thumbnail-wrap > .ast-on-card-button,
body.woocommerce .astra-shop-thumbnail-wrap .ahfb-svg-iconset,
body.woocommerce .astra-shop-thumbnail-wrap .ast-icon.icon-bag,
body.woocommerce .wc-block-components-product-button__button svg,
body.woocommerce .wc-block-grid__product-add-to-cart .wc-block-components-product-button__button svg {
  display: none !important;
}
body.woocommerce ul.products li.product .button,
body.woocommerce .wc-block-grid__product-add-to-cart .wp-block-button__link,
body.woocommerce .wc-block-components-product-button__button {
  padding-inline: 22px !important;
  justify-content: center !important;
}

/* CART — reset the broken table emulation from v6.5.3 and use native Woo Blocks structure. */
body.woocommerce-cart .site-content,
body.woocommerce-cart .ast-container,
body.woocommerce-cart .content-area,
body.woocommerce-cart .site-main,
body.woocommerce-cart article,
body.woocommerce-cart .entry-content {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding-inline: 0 !important;
}
body.woocommerce-cart .entry-content > .wp-block-woocommerce-cart {
  width: min(100% - 48px, 1360px) !important;
  max-width: 1360px !important;
  margin: 0 auto !important;
  padding: 72px 0 110px !important;
}
body.woocommerce-cart .wc-block-cart .wc-block-components-sidebar-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 380px !important;
  gap: 32px !important;
  align-items: start !important;
  width: 100% !important;
}
body.woocommerce-cart .wc-block-cart__main,
body.woocommerce-cart .wc-block-cart__sidebar {
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
body.woocommerce-cart .wc-block-cart__sidebar {
  position: sticky !important;
  top: 126px !important;
  border: 1px solid #e3e1db !important;
  background: #f6f5f2 !important;
}
body.woocommerce-cart table.wc-block-cart-items {
  display: table !important;
  width: 100% !important;
  table-layout: auto !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border: 1px solid #e3e1db !important;
  background: #fff !important;
}
body.woocommerce-cart .wc-block-cart-items thead {
  display: table-header-group !important;
  background: #f6f5f2 !important;
}
body.woocommerce-cart .wc-block-cart-items thead tr,
body.woocommerce-cart .wc-block-cart-items tbody,
body.woocommerce-cart .wc-block-cart-items__row {
  display: table-row-group !important;
}
body.woocommerce-cart .wc-block-cart-items thead tr,
body.woocommerce-cart .wc-block-cart-items__row {
  display: table-row !important;
}
body.woocommerce-cart .wc-block-cart-item__image,
body.woocommerce-cart .wc-block-cart-item__product,
body.woocommerce-cart .wc-block-cart-item__total {
  display: table-cell !important;
  position: static !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  padding: 28px 20px !important;
  vertical-align: middle !important;
  border-bottom: 1px solid #e3e1db !important;
}
body.woocommerce-cart .wc-block-cart-item__image { width: 150px !important; }
body.woocommerce-cart .wc-block-cart-item__total { width: 130px !important; text-align: right !important; }
body.woocommerce-cart .wc-block-cart-items__row:last-child > td { border-bottom: 0 !important; }
body.woocommerce-cart .wc-block-cart-item__image img {
  display: block !important;
  width: 116px !important;
  height: 116px !important;
  margin: 0 auto !important;
  object-fit: contain !important;
}
body.woocommerce-cart .wc-block-components-product-name {
  display: block !important;
  max-width: 680px !important;
  font-size: 19px !important;
  line-height: 1.3 !important;
  font-weight: 760 !important;
  word-break: normal !important;
  overflow-wrap: break-word !important;
  white-space: normal !important;
}
body.woocommerce-cart .wc-block-components-product-metadata {
  max-width: 620px !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  color: #686864 !important;
}
body.woocommerce-cart .wc-block-components-quantity-selector { margin-top: 16px !important; }
body.woocommerce-cart .wc-block-cart__sidebar > * { padding-inline: 30px !important; }
body.woocommerce-cart .wc-block-cart__submit { padding: 0 30px 30px !important; }
body.woocommerce-cart .wc-block-cart__submit-button {
  min-height: 60px !important;
  background: #111 !important;
  color: #fff !important;
  border: 1px solid #111 !important;
  border-radius: 0 !important;
  font-weight: 760 !important;
}
body.woocommerce-cart .hc-cart-recommendations,
body.woocommerce-cart .wp-block-woocommerce-cart-cross-sells-block {
  width: min(100% - 48px, 1360px) !important;
  max-width: 1360px !important;
  margin: 0 auto !important;
  padding: 0 0 100px !important;
}

/* Child category grids: ensure newly-created Grinder groups read as a clear editorial tile system. */
body.tax-product_cat.term-grinder .products.columns-4:has(li.product-category) {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 24px !important;
}
body.tax-product_cat.term-grinder li.product-category {
  min-height: 260px !important;
  background: #111 !important;
  border: 0 !important;
  color: #fff !important;
}
body.tax-product_cat.term-grinder li.product-category a { color: #fff !important; }
body.tax-product_cat.term-grinder li.product-category img { display: none !important; }
body.tax-product_cat.term-grinder li.product-category .woocommerce-loop-category__title {
  display: flex !important;
  min-height: 260px !important;
  align-items: flex-end !important;
  margin: 0 !important;
  padding: 28px !important;
  color: #fff !important;
  font-size: 25px !important;
  line-height: 1.1 !important;
}

@media (max-width: 980px) {
  body.woocommerce-cart .wc-block-cart .wc-block-components-sidebar-layout { grid-template-columns: 1fr !important; }
  body.woocommerce-cart .wc-block-cart__sidebar { position: static !important; }
  body.tax-product_cat.term-grinder .products.columns-4:has(li.product-category) { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
}
@media (max-width: 680px) {
  body.woocommerce-cart .entry-content > .wp-block-woocommerce-cart { width: min(100% - 28px, 1360px) !important; padding-top: 42px !important; }
  body.woocommerce-cart table.wc-block-cart-items,
  body.woocommerce-cart .wc-block-cart-items tbody,
  body.woocommerce-cart .wc-block-cart-items__row { display: block !important; }
  body.woocommerce-cart .wc-block-cart-items thead { display: none !important; }
  body.woocommerce-cart .wc-block-cart-items__row { padding: 20px !important; border-bottom: 1px solid #e3e1db !important; }
  body.woocommerce-cart .wc-block-cart-item__image,
  body.woocommerce-cart .wc-block-cart-item__product,
  body.woocommerce-cart .wc-block-cart-item__total { display: block !important; width: 100% !important; padding: 0 !important; border: 0 !important; text-align: left !important; }
  body.woocommerce-cart .wc-block-cart-item__image img { width: 100px !important; height: 100px !important; margin: 0 0 18px !important; }
  body.woocommerce-cart .wc-block-cart-item__total { margin-top: 14px !important; }
  body.tax-product_cat.term-grinder .products.columns-4:has(li.product-category) { grid-template-columns: 1fr !important; }
}
