/* =====================================================
   Woo Split Variations + YITH Addons (ONE FORM)
   Target: single product form.cart
   Layout: Left card = variations | Right card = YITH addons
   Bottom: Add to Cart (full width)
===================================================== */

:root{
  --wsvy-gap: 28px;
  --wsvy-card-bg: #fff;
  --wsvy-card-radius: 12px;
  --wsvy-card-shadow: 0 6px 20px rgba(0,0,0,.06);
  --wsvy-border: #d9d9d9;
  --wsvy-text: #111;
}

/* Wrapper created by JS */
.wsvy-grid{
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: var(--wsvy-gap);
  align-items: start;
}

/* Cards */
.wsvy-left,
.wsvy-right{
  background: var(--wsvy-card-bg);
  border-radius: var(--wsvy-card-radius);
  box-shadow: var(--wsvy-card-shadow);
  padding: 24px;
}

/* Ensure variations table doesn't fight grid */
.wsvy-left table.variations{
  width: 100% !important;
  border: 0 !important;
  margin: 0 !important;
}

/* Stack each attribute row nicely */
.wsvy-left table.variations tr{
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 0;
  margin: 0 0 16px 0;
  border: 0;
}

/* Remove grey patches / hover backgrounds from theme/table styles */
.wsvy-left table.variations th,
.wsvy-left table.variations td{
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
}
.wsvy-left table.variations th.label,
.wsvy-left table.variations td.label{
  background: transparent !important;
}

/* Labels */
.wsvy-left table.variations label{
  color: #000 !important;
  font-weight: 700 !important;
  font-size: 14px;
  line-height: 1.2;
  display: block;
  margin: 0 0 6px 0;
}

/* Selects full width */
.wsvy-left table.variations select{
  width: 100% !important;
  max-width: 100% !important;
  min-height: 42px;
  border-radius: 10px;
  box-sizing: border-box;
}

/* "Clear" link */
.wsvy-left .reset_variations,
.wsvy-left .woocommerce-reset-variations{
  font-size: 12px;
  margin-top: 6px;
  display: inline-block;
}

/* Right card - YITH container */
.wsvy-right .yith-wapo-container{
  width: 100% !important;
  margin: 0 !important;
}

/* YITH headings (if any) */
.wsvy-right .yith-wapo-option-title,
.wsvy-right .yith-wapo-option .label,
.wsvy-right .yith-wapo-option label{
  color: #000 !important;
  font-weight: 700 !important;
}

/* Force YITH blocks to behave like single column and full width */
.wsvy-right .yith-wapo-option,
.wsvy-right .yith-wapo-option *{
  max-width: 100% !important;
  box-sizing: border-box;
}
.wsvy-right .yith-wapo-option{
  width: 100% !important;
  display: block !important;
}

/* Upload area full width */
.wsvy-right .yith-wapo-ajax-uploader,
.wsvy-right .yith-wapo-upload-area,
.wsvy-right .yith-wapo-upload{
  width: 100% !important;
  max-width: 100% !important;
}

/* Notes / textarea full width + visible border */
.wsvy-right textarea,
.wsvy-right textarea.yith-wapo-option-value,
.wsvy-right textarea[id^="yith-wapo-"]{
  width: 100% !important;
  max-width: 100% !important;
  min-height: 160px;
  border: 2px solid #111 !important;
  border-radius: 10px !important;
  padding: 12px !important;
  box-sizing: border-box;
}

/* Hide YITH "total options" table/box if it shows (optional) */
.yith-wapo-total-options-table{
  display: none !important;
}

/* Bottom area */
.wsvy-bottom{
  grid-column: 1 / -1;
  margin-top: 10px;
}

/* Variation price box, keep on right side above button if present */
.wsvy-right .woocommerce-variation-price,
.wsvy-right .woocommerce-variation.single_variation{
  margin-top: 14px;
}

/* Add to cart button full width and pill */
.wsvy-bottom .single_add_to_cart_button{
  width: 100% !important;
  min-height: 54px;
  border-radius: 999px !important;
  font-weight: 700;
}

/* Quantity input (often not needed when quantity is a variation) */
form.cart .quantity{
  display: none !important;
}

/* Mobile stack */
@media (max-width: 768px){
  .wsvy-grid{
    grid-template-columns: 1fr;
  }
  .wsvy-bottom{
    grid-column: 1 / -1;
  }
}
