/**
 * WooCommerce → Theme Integration Overrides
 *
 * Purpose:
 * Make WooCommerce variation dropdowns look 100% on-brand
 * without replacing native WooCommerce logic.
 *
 * File:
 * /wp-content/themes/tlicious/assets/css/woocommerce-overrides.css
 */

/* Ensure variation select matches theme form controls */
/* ============================
   WooCommerce Theme Neutralizer
   ============================ */

/* ============================
   WooCommerce Hard Visual Reset
   ============================ */

/* Kill Woo background + color bleed */
body.woocommerce,
body.woocommerce-page,
.woocommerce-page #content,
.woocommerce-page .site,
.woocommerce-page .site-content {
    background-color: transparent;
    color: inherit;
}

/* Buttons */
body.woocommerce a.button,
body.woocommerce button.button,
body.woocommerce input.button,
body.woocommerce #respond input#submit {
    background-color: #ddae71;
    border-color: #ddae71;
    color: #000;
    box-shadow: none;
}

body.woocommerce a.button:hover,
body.woocommerce button.button:hover,
body.woocommerce input.button:hover {
    background-color: #000;
    color: #fff;
}

/* Notices */
body.woocommerce .woocommerce-message,
body.woocommerce .woocommerce-info,
body.woocommerce .woocommerce-error {
    background-color: #111;
    border-left: 4px solid #ddae71;
    color: #fff;
}

/* Variation select styling */
.woocommerce div.product form.cart .variations select {
  font-family: inherit;
  font-weight: 300;
  background-color: #fff;
}

/* Dark mode compatibility */
.dark .woocommerce div.product form.cart .variations select {
  background-color: transparent;
  color: #fff;
}

/* Improve spacing consistency inside product panels */
.woocommerce div.product form.cart .variations {
  margin-bottom: 1.5rem;
}

/* Remove unnecessary label column spacing (already handled by theme) */
.woocommerce div.product form.cart .variations td {
  padding: 0;
}

/**
 * Quantity + Add to Cart layout control
 */

/* Default: inline (desktop & tablet) */
.woocommerce div.product form.cart {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

/* Remove bottom margin from quantity (handled by flex gap) */
.woocommerce div.product form.cart .quantity {
  margin-bottom: 0;
}

/* Mobile: stack quantity above atC button */
@media (max-width: 767px) {
  .woocommerce div.product form.cart {
    flex-direction: column;
    align-items: stretch;
  }

  .woocommerce div.product form.cart .quantity {
    width: 100%;
  }

  .woocommerce div.product form.cart button {
    width: 100%;
  }
}

/**
 * Low stock badge styling
 */
.tlicious-badge-low {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #282b2e;
    background-color: #ddae71; /* beige primary */
    border-radius: 2px;
    line-height: 1.2;
}
/* Dark mode variant */
.bg-dark .tlicious-badge-low {
    color: #212326;
}


/**
 * Variation UX refinement
 */

/* Make variation block feel intentional */
.woocommerce div.product form.cart .variations {
  margin-bottom: 2rem;
}

/* Slight emphasis on the variation select */
.woocommerce div.product form.cart .variations select {
  font-weight: 400;
  cursor: pointer;
}

/**
 * Disabled add-to-cart clarity (before variation selected)
 */
.woocommerce div.product form.cart button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/**
 * Visual feedback when variation is selected
 */
.woocommerce div.product form.cart .variations select:not([value=""]) {
  border-color: #ddae71;
}

/**
 * Sticky Add to Cart – Mobile UX
 */
#sticky-atc {
  display: block;
}

#sticky-atc[hidden] {
  display: none;
}

.sticky-atc-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.sticky-atc-actions {
  display: flex;
  gap: 0.75rem;
}

.sticky-atc-qty {
  max-width: 80px;
}

/* Button fills remaining space */
.sticky-atc-trigger {
  flex: 1;
}

/* Mobile only safeguard */
@media (min-width: 992px) {
  #sticky-atc {
    display: none !important;
  }
}

/**
 * Sticky variation label
 */
.sticky-atc-variation {
  line-height: 1.2;
}

/* Microcopy adjustments*/
.product-microcopy {
  line-height: 1.4;
}

/* Disable pointer for unavailable buttons */
.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}