/*
Theme Name: Keldor Wellness
Theme URI: https://keldorwellness.com
Author: Keldor Wellness
Description: Custom forest green, gold, and parchment WordPress & WooCommerce theme for Keldor Wellness with Live Cart Fragments & Branded Cart/Checkout.
Version: 1.3.0
Requires PHP: 8.4
Text Domain: keldor-wellness
*/

:root {
  --kw-green-dark: #14331e;
  --kw-green: #1b4328;
  --kw-green-light: #2b5e3b;
  --kw-gold: #b8984c;
  --kw-gold-light: #d6bc7c;
  --kw-cream: #f7f4ec;
  --kw-cream-dark: #ede7d7;
  --kw-text: #1f2922;
}

body {
  background-color: var(--kw-cream);
  color: var(--kw-text);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
}

h1, h2, h3, .font-serif {
  font-family: 'Cormorant Garamond', Georgia, serif;
}

/* ==========================================================================
   Cart Counter Pop Animation
   ========================================================================== */
@keyframes kwCartBump {
  0% { transform: scale(1); }
  40% { transform: scale(1.28); }
  100% { transform: scale(1); }
}

.kw-cart-bump {
  animation: kwCartBump 0.38s ease;
}

/* ==========================================================================
   Hero Slider Transitions
   ========================================================================== */
.kw-slide {
  display: none;
  animation: kwFadeIn 0.55s ease forwards;
}

.kw-slide.is-active {
  display: block;
}

@keyframes kwFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   WooCommerce Sale Badge Fix (Crisp Circle, Never Stretched Oval)
   ========================================================================== */
.woocommerce span.onsale,
.woocommerce ul.products li.product .onsale {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 3.5rem !important;
  height: 3.5rem !important;
  min-width: 3.5rem !important;
  min-height: 3.5rem !important;
  max-width: 3.5rem !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 9999px !important;
  background-color: var(--kw-gold) !important;
  color: var(--kw-green-dark) !important;
  font-weight: 800 !important;
  font-size: 0.72rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  line-height: 1 !important;
  top: 0.85rem !important;
  left: 0.85rem !important;
  right: auto !important;
  box-shadow: 0 4px 12px rgba(20, 51, 30, 0.2) !important;
  z-index: 10 !important;
}

/* ==========================================================================
   WooCommerce Cart Page (Both Block Cart & Classic Cart)
   ========================================================================== */
/* Block Cart Container & Cards */
.wp-block-woocommerce-cart {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
}

.wc-block-cart__main {
  background-color: var(--kw-cream) !important;
  border: 1.5px solid rgba(184, 152, 76, 0.45) !important;
  border-radius: 1.25rem !important;
  padding: 1.5rem !important;
}

.wc-block-cart-items__header th {
  color: var(--kw-green) !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  font-size: 0.75rem !important;
  letter-spacing: 0.08em !important;
  border-bottom: 1.5px solid rgba(184, 152, 76, 0.4) !important;
}

.wc-block-cart-item__image img {
  border-radius: 0.85rem !important;
  border: 1.5px solid rgba(184, 152, 76, 0.45) !important;
  background: #ffffff !important;
  padding: 0.25rem !important;
}

.wc-block-components-product-name {
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  font-size: 1.45rem !important;
  font-weight: 700 !important;
  color: var(--kw-green) !important;
  text-decoration: none !important;
}

.wc-block-components-product-badge.wc-block-components-sale-badge {
  background-color: var(--kw-cream-dark) !important;
  color: var(--kw-green) !important;
  border: 1px solid var(--kw-gold) !important;
  border-radius: 9999px !important;
  font-weight: 700 !important;
  font-size: 0.75rem !important;
  padding: 0.2rem 0.65rem !important;
}

/* Quantity Stepper Pill */
.wc-block-components-quantity-selector {
  border: 1.5px solid var(--kw-gold) !important;
  border-radius: 9999px !important;
  background-color: #ffffff !important;
  overflow: hidden !important;
}

.wc-block-components-quantity-selector__button {
  color: var(--kw-green) !important;
  font-weight: 700 !important;
}

.wc-block-components-quantity-selector__button:hover {
  background-color: var(--kw-cream) !important;
}

.wc-block-components-quantity-selector__input {
  color: var(--kw-green) !important;
  font-weight: 700 !important;
}

/* Remove Item Link */
.wc-block-cart-item__remove-link {
  color: #8c4a3c !important;
  font-weight: 600 !important;
  font-size: 0.8rem !important;
}

/* Order Summary Sidebar */
.wp-block-woocommerce-cart-order-summary-block {
  background-color: var(--kw-cream) !important;
  border: 1.5px solid rgba(184, 152, 76, 0.5) !important;
  border-radius: 1.25rem !important;
  padding: 1.5rem !important;
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  font-size: 1.65rem !important;
  font-weight: 700 !important;
  color: var(--kw-green) !important;
}

/* Proceed to Checkout & Place Order Buttons (Fixes Dark Grey Default Button) */
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button,
a.wc-block-components-button.wp-element-button.contained,
button.wc-block-components-button.wp-element-button.contained,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
  background-color: var(--kw-green) !important;
  color: #ffffff !important;
  border: 1.5px solid var(--kw-gold) !important;
  border-radius: 9999px !important;
  padding: 1rem 2rem !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  letter-spacing: 0.03em !important;
  box-shadow: 0 8px 20px rgba(27, 67, 40, 0.18) !important;
  transition: all 0.2s ease !important;
}

.wc-block-cart__submit-button:hover,
.wc-block-components-checkout-place-order-button:hover,
a.wc-block-components-button.wp-element-button.contained:hover,
button.wc-block-components-button.wp-element-button.contained:hover,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover {
  background-color: var(--kw-green-dark) !important;
  border-color: var(--kw-gold-light) !important;
  transform: translateY(-1px) !important;
}

/* Classic Cart Table Styling */
.woocommerce-cart table.cart {
  border: 1.5px solid rgba(184, 152, 76, 0.45) !important;
  border-radius: 1.25rem !important;
  overflow: hidden !important;
  background: var(--kw-cream) !important;
}

.woocommerce-cart table.cart th {
  background-color: var(--kw-green) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
  padding: 1rem !important;
}

.woocommerce-cart table.cart td {
  padding: 1.15rem 1rem !important;
  border-top: 1px solid rgba(184, 152, 76, 0.3) !important;
}

/* ==========================================================================
   WooCommerce Single Product & Storefront Cards
   ========================================================================== */
.woocommerce div.product .product_title {
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  font-size: 2.5rem !important;
  line-height: 1.15 !important;
  font-weight: 700 !important;
  color: var(--kw-green) !important;
  margin-bottom: 0.75rem !important;
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
  display: flex !important;
  align-items: baseline !important;
  gap: 0.75rem !important;
  font-size: 1.85rem !important;
  font-weight: 700 !important;
  color: var(--kw-green) !important;
  margin-bottom: 1.25rem !important;
  padding-bottom: 1rem !important;
  border-bottom: 1px solid rgba(184, 152, 76, 0.35) !important;
}

.woocommerce div.product p.price del,
.woocommerce div.product span.price del {
  font-size: 1.2rem !important;
  font-weight: 500 !important;
  color: #8c8578 !important;
  opacity: 0.85 !important;
}

.woocommerce div.product p.price ins,
.woocommerce div.product span.price ins {
  text-decoration: none !important;
  color: var(--kw-green) !important;
}

.woocommerce div.product .woocommerce-product-details__short-description {
  font-size: 0.975rem !important;
  line-height: 1.7 !important;
  color: #333d36 !important;
  margin-bottom: 1.5rem !important;
}

.woocommerce div.product .woocommerce-product-details__short-description p {
  margin-bottom: 0.85rem !important;
}

.woocommerce div.product .woocommerce-product-details__short-description ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0.75rem 0 1.25rem 0 !important;
  display: grid !important;
  gap: 0.6rem !important;
}

.woocommerce div.product .woocommerce-product-details__short-description ul li {
  position: relative;
  padding-left: 1.65rem;
  line-height: 1.6;
}

.woocommerce div.product .woocommerce-product-details__short-description ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--kw-gold);
  font-weight: 700;
}

.woocommerce div.product form.cart {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 0.85rem !important;
  margin: 1.5rem 0 !important;
  padding: 1.15rem !important;
  background-color: var(--kw-cream) !important;
  border: 1px solid rgba(184, 152, 76, 0.45) !important;
  border-radius: 1rem !important;
}

.woocommerce div.product form.cart div.quantity {
  margin: 0 !important;
}

.woocommerce .quantity .qty {
  width: 4.5rem !important;
  height: 3rem !important;
  border: 1.5px solid var(--kw-gold) !important;
  border-radius: 9999px !important;
  background-color: #ffffff !important;
  color: var(--kw-green) !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  text-align: center !important;
  padding: 0 0.5rem !important;
}

.woocommerce .quantity .qty:focus {
  outline: none !important;
  border-color: var(--kw-green) !important;
  box-shadow: 0 0 0 3px rgba(27, 67, 40, 0.15) !important;
}

.woocommerce #respond input#submit.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button {
  background-color: var(--kw-green) !important;
  color: #ffffff !important;
  border: 1.5px solid var(--kw-gold) !important;
  border-radius: 9999px !important;
  padding: 0.85rem 2.1rem !important;
  font-weight: 600 !important;
  font-size: 0.95rem !important;
  letter-spacing: 0.02em !important;
  transition: all 0.2s ease !important;
  cursor: pointer !important;
}

.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover {
  background-color: var(--kw-green-dark) !important;
  border-color: var(--kw-gold-light) !important;
  transform: translateY(-1px);
}

.woocommerce div.product .product_meta {
  padding-top: 1rem !important;
  border-top: 1px solid rgba(184, 152, 76, 0.3) !important;
  font-size: 0.875rem !important;
  color: #5c665f !important;
}

.woocommerce div.product .product_meta a {
  color: var(--kw-green) !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

.woocommerce div.product div.images .woocommerce-product-gallery__wrapper {
  border: 1.5px solid rgba(184, 152, 76, 0.45) !important;
  border-radius: 1.25rem !important;
  overflow: hidden !important;
  background: #ffffff !important;
}

.woocommerce div.product .woocommerce-tabs {
  margin-top: 2.5rem !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs {
  padding-left: 0 !important;
  margin-bottom: 1.75rem !important;
  border-bottom: 1px solid rgba(184, 152, 76, 0.45) !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
  background-color: var(--kw-cream) !important;
  border: 1px solid rgba(184, 152, 76, 0.45) !important;
  border-radius: 0.75rem 0.75rem 0 0 !important;
  margin-right: 0.35rem !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
  background-color: #ffffff !important;
  border-bottom-color: #ffffff !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
  color: var(--kw-green) !important;
  font-weight: 600 !important;
  padding: 0.75rem 1.35rem !important;
}

.woocommerce-Tabs-panel h2 {
  font-size: 1.75rem !important;
  font-weight: 700 !important;
  color: var(--kw-green) !important;
  margin-bottom: 1rem !important;
}

.woocommerce-Tabs-panel p {
  margin-bottom: 1rem !important;
  line-height: 1.75 !important;
  color: var(--kw-text) !important;
}

.woocommerce-Tabs-panel ul {
  list-style: none !important;
  padding-left: 0 !important;
  margin: 1rem 0 1.5rem 0 !important;
  display: grid !important;
  gap: 0.85rem !important;
}

.woocommerce-Tabs-panel ul li {
  position: relative;
  padding: 0.95rem 1.2rem 0.95rem 2.5rem;
  background-color: var(--kw-cream);
  border-left: 3.5px solid var(--kw-gold);
  border-radius: 0.65rem;
  line-height: 1.65;
}

.woocommerce-Tabs-panel ul li::before {
  content: "✓";
  position: absolute;
  left: 0.9rem;
  top: 0.95rem;
  color: var(--kw-green);
  font-weight: 700;
}

.woocommerce-Tabs-panel strong,
.woocommerce-product-details__short-description strong {
  color: var(--kw-green) !important;
}

/* Homepage & Shop Product Card */
.woocommerce ul.products {
  margin: 0 !important;
}

.woocommerce ul.products li.product {
  position: relative !important;
  background: #ffffff;
  border: 1px solid rgba(184, 152, 76, 0.4);
  border-radius: 1.25rem;
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 0 !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.woocommerce ul.products li.product:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(27, 67, 40, 0.08);
}

.woocommerce ul.products li.product img {
  border-radius: 0.85rem !important;
  margin-bottom: 1rem !important;
  max-height: 290px !important;
  width: auto !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  font-size: 1.55rem !important;
  font-weight: 700 !important;
  color: var(--kw-green) !important;
  padding: 0.25rem 0 0.5rem 0 !important;
}

.woocommerce ul.products li.product .price {
  color: var(--kw-green) !important;
  font-weight: 700 !important;
  font-size: 1.25rem !important;
  margin-bottom: 1rem !important;
}

.woocommerce ul.products li.product .price del {
  color: #8c8578 !important;
  font-size: 0.95rem !important;
  margin-right: 0.35rem !important;
}

.woocommerce ul.products li.product .price ins {
  text-decoration: none !important;
}

.woocommerce a.added_to_cart {
  display: inline-block !important;
  margin-left: 0.65rem !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  color: var(--kw-green) !important;
  text-decoration: underline !important;
}
