/* Brand extension onto the WooCommerce templates (shop/product/cart/checkout/my-account).
   The redesigned pages (home/about/press/contact) use a cream/forest-green/terracotta palette and
   Fraunces/Work Sans type via ct-pages.css, but the actual purchase path still rendered in stock
   Divi/WooCommerce styling (Montserrat headings, default WooCommerce red sale badges/buttons) --
   the look changed jarringly right where a visitor decides to buy. Same tokens as ct-pages.css,
   applied here via body-class scoping so it never touches the custom ct-home/ct-page templates.
   !important matches the precedent already set in ct-pages.css's .ct-add-cart rule -- Divi injects
   its own dynamic CSS for WooCommerce buttons/prices and otherwise wins on load order. */

body.woocommerce-shop,
body.single-product,
body.woocommerce-cart,
body.woocommerce-checkout,
body.woocommerce-account {
  background: #F8F2E6 !important;
}
body.woocommerce-shop #main-content,
body.single-product #main-content,
body.woocommerce-cart #main-content,
body.woocommerce-checkout #main-content,
body.woocommerce-account #main-content {
  font-family: 'Work Sans', system-ui, sans-serif;
  color: #2B241E;
}
body.woocommerce-shop #main-content h1,
body.woocommerce-shop #main-content h2,
body.woocommerce-shop #main-content h3,
body.single-product #main-content h1,
body.single-product #main-content h2,
body.single-product #main-content h3,
body.woocommerce-cart #main-content h1,
body.woocommerce-cart #main-content h2,
body.woocommerce-cart #main-content h3,
body.woocommerce-checkout #main-content h1,
body.woocommerce-checkout #main-content h2,
body.woocommerce-checkout #main-content h3,
body.woocommerce-account #main-content h1,
body.woocommerce-account #main-content h2,
body.woocommerce-account #main-content h3 {
  font-family: 'Fraunces', Georgia, serif !important;
  font-weight: 500 !important;
  color: #2B241E !important;
}

/* Shop/category grid cards + related/up-sell product cards on the PDP */
body.woocommerce-shop ul.products li.product,
body.single-product .related.products ul.products li.product,
body.single-product .up-sells ul.products li.product {
  background: #FFFFFF;
  border: 1px solid #E6D9C2;
  border-radius: 6px;
  padding: 16px !important;
  margin-bottom: 24px;
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
body.woocommerce-shop ul.products li.product:hover,
body.single-product .related.products ul.products li.product:hover,
body.single-product .up-sells ul.products li.product:hover {
  box-shadow: 0 8px 24px rgba(43,36,30,0.12);
  transform: translateY(-3px);
  border-color: #D9BE7C;
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: 'Fraunces', Georgia, serif !important;
  color: #2B241E !important;
  font-size: 17px !important;
  font-weight: 500 !important;
}
.woocommerce ul.products li.product span.onsale,
.woocommerce div.product span.onsale {
  background: #B4592E !important;
  color: #FFFFFF !important;
  font-family: 'Work Sans', sans-serif !important;
  font-weight: 600 !important;
  box-shadow: none !important;
}
/* Divi's per-page cached CSS (wp-content/et-cache/<page-id>/et-core-unified-*.min.css) sets its own
   !important price color with high selector specificity -- matched here rather than fought, same
   lesson as the existing ct-wc-notice-fix comment above in functions.php. */
.woocommerce ul.products li.product .price,
.woocommerce ul.products li.product .price ins,
.woocommerce div.product .summary .price,
.woocommerce div.product .summary .price ins,
.woocommerce .related.products ul.products li.product .price,
.woocommerce .up-sells ul.products li.product .price,
/* Single-product page is a Divi Theme Builder template (et_pb_wc_price module) -- no .summary
   wrapper exists there at all, it's a bare p.price, which the rules above never matched. */
.woocommerce div.product p.price,
.woocommerce div.product p.price ins {
  color: #B4592E !important;
  font-weight: 600 !important;
  text-decoration: none;
}
.woocommerce ul.products li.product .price del,
.woocommerce div.product .summary .price del,
.woocommerce div.product p.price del {
  color: #9C8F7E !important;
  opacity: 0.8;
}

/* Add to cart -- shop grid, related products, up-sells, and the single-product buy button */
.woocommerce a.button.product_type_simple,
.woocommerce a.add_to_cart_button,
.woocommerce .single_add_to_cart_button,
/* The single-product page is rendered via a Divi Theme Builder template, not the classic
   WooCommerce template -- its et_pb_wc_add_to_cart module injects its own inline !important
   button color with #page-container in the selector (effectively ID-level specificity), so a
   plain class selector above loses regardless of source order. Match that specificity tier. */
#page-container .et_pb_wc_add_to_cart .single_add_to_cart_button.button.alt {
  background: #2E4F3C !important;
  color: #F8F2E6 !important;
  border: none !important;
  border-radius: 4px !important;
  font-family: 'Work Sans', sans-serif !important;
  font-weight: 600 !important;
  transition: background-color 0.15s ease;
}
.woocommerce a.button.product_type_simple:hover,
.woocommerce a.add_to_cart_button:hover,
.woocommerce .single_add_to_cart_button:hover,
#page-container .et_pb_wc_add_to_cart .single_add_to_cart_button.button.alt:hover {
  background: #22392B !important;
}

/* Single product page */
body.single-product .product_title {
  font-family: 'Fraunces', Georgia, serif !important;
  color: #2B241E !important;
}
body.single-product .summary .price,
body.single-product .summary .price ins {
  color: #B4592E !important;
}
body.single-product .et_pb_tabs_controls li.et_pb_tab_active a,
body.single-product .woocommerce-tabs ul.tabs li.active a {
  color: #B4592E !important;
  border-bottom-color: #B4592E !important;
}
body.single-product .related.products h2,
body.single-product .up-sells h2 {
  font-family: 'Fraunces', Georgia, serif !important;
  color: #2B241E !important;
}

/* Cart */
body.woocommerce-cart table.cart th {
  font-family: 'Work Sans', sans-serif !important;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
  color: #8A4A26 !important;
  border-bottom: 2px solid #E6D9C2 !important;
}
body.woocommerce-cart .cart_totals {
  background: #F3EADA !important;
  border: 1px solid #E6D9C2 !important;
  border-radius: 8px;
  padding: 20px !important;
}
body.woocommerce-cart .cart_totals h2 {
  font-family: 'Fraunces', Georgia, serif !important;
}
body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
body.woocommerce-checkout #place_order {
  background: #B4592E !important;
  color: #FFFFFF !important;
  border-radius: 4px !important;
  font-family: 'Work Sans', sans-serif !important;
  font-weight: 600 !important;
}
body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover,
body.woocommerce-checkout #place_order:hover {
  background: #9A4A24 !important;
}

/* Checkout */
body.woocommerce-checkout #order_review_heading,
body.woocommerce-checkout #customer_details h3 {
  font-family: 'Fraunces', Georgia, serif !important;
  color: #2B241E !important;
}
body.woocommerce-checkout .woocommerce-input-wrapper input:focus,
body.woocommerce-checkout .woocommerce-input-wrapper select:focus,
body.woocommerce-checkout .woocommerce-input-wrapper textarea:focus {
  outline: 2px solid #2E4F3C;
  outline-offset: 1px;
}

/* My Account login/forms */
body.woocommerce-account .woocommerce-form-login .button,
body.woocommerce-account .woocommerce-form-register .button {
  background: #B4592E !important;
  color: #FFFFFF !important;
  border: none !important;
  border-radius: 4px !important;
  font-family: 'Work Sans', sans-serif !important;
  font-weight: 600 !important;
}
body.woocommerce-account .woocommerce-form-login .button:hover,
body.woocommerce-account .woocommerce-form-register .button:hover {
  background: #9A4A24 !important;
}
