
body.tys-product-experience {
  background: #f4f0e7;
}

body.tys-product-experience .site-main,
body.tys-product-experience .content-area,
body.tys-product-experience .ct-container {
  max-width: none !important;
}

body.tys-product-experience div.product {
  width: min(calc(100% - 48px), 1380px);
  margin: 26px auto 0;
}

body.tys-product-experience div.product .woocommerce-product-gallery {
  width: 54% !important;
}

body.tys-product-experience div.product .summary {
  width: 41% !important;
  padding: 34px;
  border: 1px solid #dfd8cb;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(0,0,0,.08);
}

body.tys-sticky-summary-enabled div.product .summary {
  position: sticky;
  top: 24px;
}

body.tys-product-experience .woocommerce-product-gallery__wrapper {
  overflow: hidden;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(0,0,0,.08);
}

body.tys-product-experience .product_title {
  margin-bottom: 13px;
  font-size: clamp(36px,4vw,58px);
  line-height: 1.02;
  letter-spacing: -.04em;
}

body.tys-product-experience .summary .price {
  margin: 0 0 20px;
  color: #842b35;
  font-size: 30px;
  font-weight: 900;
}

body.tys-product-experience .woocommerce-product-details__short-description {
  color: #5f5f5f;
  font-size: 16px;
  line-height: 1.7;
}

.tys-product-offer {
  display: flex;
  gap: 14px;
  margin: 22px 0;
  padding: 18px;
  border: 1px solid #d8b65d;
  border-radius: 16px;
  background: #fbf7eb;
}

.tys-product-offer-icon {
  font-size: 24px;
}

.tys-product-offer strong {
  display: block;
  color: #17191d;
  font-size: 16px;
}

.tys-product-offer p {
  margin: 6px 0 10px;
  color: #666;
  font-size: 14px;
}

.tys-product-offer a {
  color: #842b35;
  font-weight: 800;
}

body.tys-product-experience .single_add_to_cart_button {
  min-height: 58px;
  border-radius: 999px !important;
  background: linear-gradient(135deg,#ebcf86,#cda34c) !important;
  color: #17191d !important;
  font-size: 16px !important;
  font-weight: 900 !important;
}

.tys-purchase-extras {
  margin-top: 12px;
}

.tys-buy-now {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #17191d;
  font-weight: 900;
}

.tys-dispatch-message,
.tys-low-stock {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f7f3ea;
  font-size: 14px;
  font-weight: 800;
}

.tys-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: #3d8b4e;
}

.tys-low-stock {
  color: #842b35;
  background: #f7eaea;
}

.tys-coupon-module {
  margin-top: 14px;
}

.tys-coupon-toggle {
  border: 0;
  padding: 0;
  color: #842b35;
  background: transparent;
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
}

.tys-coupon-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.tys-coupon-form input {
  flex: 1;
  min-width: 0;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid #d8d1c5;
  border-radius: 12px;
  background: #faf8f4;
}

.tys-coupon-form button {
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 12px;
  background: #cda34c;
  color: #17191d;
  font-weight: 900;
}

.tys-coupon-result {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 800;
}

.tys-trust-strip {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #e5ded2;
}

.tys-trust-strip span {
  text-align: center;
  color: #555;
  font-size: 12px;
  font-weight: 800;
}

.tys-product-benefits,
.tys-product-info-grid {
  clear: both;
  width: min(calc(100% - 48px), 1380px);
  margin: 44px auto 0;
}

.tys-product-benefits {
  display: grid;
  grid-template-columns: repeat(4,1fr);
  overflow: hidden;
  border: 1px solid #e0d9cd;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(0,0,0,.06);
}

.tys-product-benefits article {
  padding: 24px;
  text-align: center;
  border-right: 1px solid #ece5da;
}

.tys-product-benefits article:last-child {
  border-right: 0;
}

.tys-benefit-icon {
  display: block;
  margin-bottom: 8px;
  color: #cda34c;
  font-size: 24px;
}

.tys-product-benefits strong {
  display: block;
  color: #17191d;
}

.tys-product-benefits p {
  margin: 6px 0 0;
  color: #666;
  font-size: 13px;
  line-height: 1.5;
}

.tys-product-info-grid {
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 20px;
}

.tys-product-info-grid article {
  padding: 26px;
  border: 1px solid #e0d9cd;
  border-radius: 20px;
  background: #fff;
}

.tys-product-info-grid h3 {
  margin-top: 0;
}

.tys-product-info-grid p {
  margin-bottom: 0;
  color: #666;
  line-height: 1.7;
}

.tys-mobile-sticky-cart {
  display: none;
}

@media (max-width: 1024px) {
  body.tys-product-experience div.product .woocommerce-product-gallery,
  body.tys-product-experience div.product .summary {
    width: 100% !important;
    float: none !important;
  }

  body.tys-product-experience div.product .summary {
    position: static !important;
    margin-top: 26px !important;
  }

  .tys-product-benefits {
    grid-template-columns: repeat(2,1fr);
  }

  .tys-product-benefits article:nth-child(2) {
    border-right: 0;
  }
}

@media (max-width: 760px) {
  body.tys-product-experience div.product,
  .tys-product-benefits,
  .tys-product-info-grid {
    width: calc(100% - 24px);
  }

  body.tys-product-experience div.product .summary {
    padding: 24px;
  }

  .tys-product-benefits,
  .tys-product-info-grid {
    grid-template-columns: 1fr;
  }

  .tys-product-benefits article {
    border-right: 0;
    border-bottom: 1px solid #ece5da;
  }

  .tys-product-benefits article:last-child {
    border-bottom: 0;
  }

  .tys-trust-strip {
    grid-template-columns: 1fr;
  }

  .tys-mobile-sticky-cart {
    position: fixed;
    z-index: 9999;
    right: 10px;
    bottom: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 14px 40px rgba(0,0,0,.22);
  }

  .tys-mobile-sticky-cart strong,
  .tys-mobile-sticky-cart small {
    display: block;
  }

  .tys-mobile-sticky-cart button {
    min-height: 48px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: #cda34c;
    color: #17191d;
    font-weight: 900;
  }
}


/* =========================================================
   v2.4 — controlled desktop scale
   ========================================================= */

body.tys-product-experience {
  --tys-product-width: 1220px;
  --tys-product-image-height: 760px;
  --tys-product-gallery-width: 50%;
  --tys-product-summary-width: 46%;
}

body.tys-product-layout-compact {
  --tys-product-width: 1080px;
  --tys-product-image-height: 640px;
  --tys-product-gallery-width: 49%;
  --tys-product-summary-width: 47%;
}

body.tys-product-layout-balanced {
  --tys-product-width: 1220px;
  --tys-product-image-height: 760px;
  --tys-product-gallery-width: 50%;
  --tys-product-summary-width: 46%;
}

body.tys-product-layout-large {
  --tys-product-width: 1360px;
  --tys-product-image-height: 880px;
  --tys-product-gallery-width: 52%;
  --tys-product-summary-width: 44%;
}

/* Keep the primary area at a sensible desktop scale */
body.tys-product-experience div.product {
  width: min(calc(100% - 48px), var(--tys-product-width)) !important;
}

body.tys-product-experience div.product .woocommerce-product-gallery {
  width: var(--tys-product-gallery-width) !important;
}

body.tys-product-experience div.product .summary {
  width: var(--tys-product-summary-width) !important;
  padding: 28px !important;
}

/* Stop the main image from becoming taller than the viewport */
body.tys-product-experience .woocommerce-product-gallery__wrapper,
body.tys-product-experience .woocommerce-product-gallery__image {
  max-height: var(--tys-product-image-height) !important;
}

body.tys-product-experience .woocommerce-product-gallery__image a,
body.tys-product-experience .woocommerce-product-gallery__image img {
  display: block !important;
  width: 100% !important;
  max-height: var(--tys-product-image-height) !important;
}

body.tys-product-experience .woocommerce-product-gallery__image img {
  height: auto !important;
  object-fit: contain !important;
}

/* More proportionate typography at normal browser zoom */
body.tys-product-experience .product_title {
  font-size: clamp(34px, 3.2vw, 50px) !important;
}

body.tys-product-experience .summary .price {
  font-size: 28px !important;
}

body.tys-product-experience .woocommerce-product-details__short-description {
  font-size: 15px !important;
}

/* Supporting sections follow the chosen page width */
body.tys-product-experience .tys-product-benefits,
body.tys-product-experience .tys-product-info-grid,
body.tys-product-experience .woocommerce-tabs,
body.tys-product-experience .related.products,
body.tys-product-experience .upsells.products {
  width: min(calc(100% - 48px), var(--tys-product-width)) !important;
}

/* Reduce the feeling of a very long, stretched first screen */
body.tys-product-experience .tys-product-offer {
  margin: 18px 0 !important;
  padding: 16px !important;
}

body.tys-product-experience .tys-purchase-extras {
  margin-top: 10px !important;
}

@media (max-width: 1024px) {
  body.tys-product-experience {
    --tys-product-image-height: none;
  }

  body.tys-product-experience .woocommerce-product-gallery__wrapper,
  body.tys-product-experience .woocommerce-product-gallery__image,
  body.tys-product-experience .woocommerce-product-gallery__image a,
  body.tys-product-experience .woocommerce-product-gallery__image img {
    max-height: none !important;
  }
}


/* =========================================================
   v2.5 — quantity control, tighter scale and vertical cleanup
   ========================================================= */

/* Remove Blocksy's empty top spacing above single products */
body.tys-product-experience #main,
body.tys-product-experience .site-main,
body.tys-product-experience .content-area,
body.tys-product-experience .site-content,
body.tys-product-experience .ct-container,
body.tys-product-experience [class*="ct-container"] {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body.tys-product-experience div.product {
  margin-top: 12px !important;
}

/* Smaller, more practical desktop scale */
body.tys-product-layout-compact {
  --tys-product-width: 1020px !important;
  --tys-product-image-height: 590px !important;
  --tys-product-gallery-width: 48% !important;
  --tys-product-summary-width: 48% !important;
}

body.tys-product-layout-balanced {
  --tys-product-width: 1140px !important;
  --tys-product-image-height: 680px !important;
  --tys-product-gallery-width: 49% !important;
  --tys-product-summary-width: 47% !important;
}

body.tys-product-layout-large {
  --tys-product-width: 1260px !important;
  --tys-product-image-height: 780px !important;
  --tys-product-gallery-width: 50% !important;
  --tys-product-summary-width: 46% !important;
}

body.tys-product-experience div.product .summary {
  padding: 24px !important;
}

body.tys-product-experience .product_title {
  font-size: clamp(32px, 2.8vw, 44px) !important;
}

body.tys-product-experience .summary .price {
  font-size: 26px !important;
}

/* Rebuilt quantity selector */
body.tys-product-experience form.cart .quantity.tys-quantity-ready {
  display: grid !important;
  grid-template-columns: 42px 58px 42px !important;
  align-items: stretch !important;
  width: 142px !important;
  min-width: 142px !important;
  height: 52px !important;
  overflow: hidden !important;
  border: 1px solid #d8d1c5 !important;
  border-radius: 14px !important;
  background: #faf8f4 !important;
}

body.tys-product-experience form.cart .quantity.tys-quantity-ready .tys-qty-minus,
body.tys-product-experience form.cart .quantity.tys-quantity-ready .tys-qty-plus {
  width: 42px !important;
  min-width: 42px !important;
  height: 52px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #30435f !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 24px !important;
  font-weight: 500 !important;
  cursor: pointer;
}

body.tys-product-experience form.cart .quantity.tys-quantity-ready input.qty {
  display: block !important;
  width: 58px !important;
  min-width: 58px !important;
  height: 52px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-right: 1px solid #e3ddd3 !important;
  border-left: 1px solid #e3ddd3 !important;
  border-radius: 0 !important;
  color: #17191d !important;
  background: #ffffff !important;
  box-shadow: none !important;
  font-size: 17px !important;
  font-weight: 900 !important;
  text-align: center !important;
  opacity: 1 !important;
  -webkit-text-fill-color: #17191d !important;
  appearance: textfield !important;
}

body.tys-product-experience form.cart .quantity.tys-quantity-ready input.qty::-webkit-outer-spin-button,
body.tys-product-experience form.cart .quantity.tys-quantity-ready input.qty::-webkit-inner-spin-button {
  margin: 0;
  appearance: none;
}

/* Align quantity and Add to cart cleanly */
body.tys-product-experience form.cart {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

body.tys-product-experience form.cart .single_add_to_cart_button {
  flex: 1 1 auto !important;
  min-width: 190px !important;
  height: 52px !important;
  min-height: 52px !important;
}

/* Put breathing room before tabs/description */
body.tys-product-experience .woocommerce-tabs {
  clear: both !important;
  margin-top: 46px !important;
}

body.tys-product-experience .tys-product-info-grid + .woocommerce-tabs,
body.tys-product-experience .tys-product-benefits + .woocommerce-tabs {
  margin-top: 36px !important;
}

/* Supporting content no longer feels detached */
body.tys-product-experience .tys-product-benefits,
body.tys-product-experience .tys-product-info-grid {
  margin-top: 34px !important;
}

@media (max-width: 760px) {
  body.tys-product-experience div.product {
    margin-top: 8px !important;
  }

  body.tys-product-experience form.cart {
    display: grid !important;
    grid-template-columns: 142px minmax(0, 1fr) !important;
  }

  body.tys-product-experience form.cart .single_add_to_cart_button {
    min-width: 0 !important;
  }
}

body.tys-product-experience .woocommerce-product-gallery .flex-control-thumbs img{cursor:pointer;}


/* =========================================================
   v3.0 — true variation image swatches
   ========================================================= */

body.tys-product-experience .tys-variation-select-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

body.tys-product-experience .tys-variation-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 10px;
  width: 100%;
  margin-top: 4px;
}

body.tys-product-experience .tys-variation-swatch {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 5px;
  min-width: 0;
  margin: 0;
  padding: 5px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 0 0 1px #ddd6ca;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

body.tys-product-experience .tys-variation-swatch:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px #c8b26b, 0 8px 18px rgba(18, 25, 36, .08);
}

body.tys-product-experience .tys-variation-swatch.is-selected {
  border-color: #cfa843;
  box-shadow: 0 0 0 2px rgba(207, 168, 67, .22);
}

body.tys-product-experience .tys-variation-swatch img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
}

body.tys-product-experience .tys-variation-swatch span {
  display: block;
  padding: 2px 1px 1px;
  color: #17243a;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

/* Hide only the small gallery thumbnails when proper variation swatches exist. */
body.tys-product-experience.tys-has-variation-swatches
.woocommerce-product-gallery .flex-control-thumbs {
  display: none !important;
}

body.tys-product-experience.tys-has-variation-swatches
.woocommerce-product-gallery {
  margin-bottom: 0 !important;
}

@media (max-width: 760px) {
  body.tys-product-experience .tys-variation-swatches {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  body.tys-product-experience .tys-variation-swatch {
    padding: 4px;
  }
}


/* =========================================================
   v3.1 — complete variation grid and Blocksy gallery cleanup
   ========================================================= */

body.tys-product-experience .tys-variation-swatch.is-disabled {
  opacity: .42;
  cursor: not-allowed;
  filter: grayscale(.45);
}

body.tys-product-experience .tys-variation-swatch.is-disabled:hover {
  transform: none;
  box-shadow: 0 0 0 1px #ddd6ca;
}

/* Hide Blocksy/WooCommerce thumbnail navigation when true swatches exist */
body.tys-product-experience.tys-has-variation-swatches .flex-control-nav,
body.tys-product-experience.tys-has-variation-swatches .flex-control-thumbs,
body.tys-product-experience.tys-has-variation-swatches .woocommerce-product-gallery__wrapper + ol,
body.tys-product-experience.tys-has-variation-swatches .ct-product-gallery-container .flex-control-nav,
body.tys-product-experience.tys-has-variation-swatches .ct-product-gallery-container .flex-control-thumbs,
body.tys-product-experience.tys-has-variation-swatches [class*="gallery"] [class*="thumbs"] {
  display: none !important;
}

/* Allow a larger complete grid without clipping */
body.tys-product-experience .variations,
body.tys-product-experience .variations tbody,
body.tys-product-experience .variations tr,
body.tys-product-experience .variations td {
  overflow: visible !important;
  max-height: none !important;
}

body.tys-product-experience .tys-variation-swatches {
  max-height: none !important;
  overflow: visible !important;
}


/* =========================================================
   v3.2 — consistent purchase-button widths
   ========================================================= */

body.tys-product-experience form.cart {
  width: 100% !important;
}

body.tys-product-experience form.cart .single_add_to_cart_button {
  flex: 1 1 0 !important;
  width: auto !important;
  max-width: none !important;
}

body.tys-product-experience .tys-buy-now,
body.tys-product-experience .single_add_to_cart_button,
body.tys-product-experience .added_to_cart.wc-forward {
  box-sizing: border-box !important;
}

body.tys-product-experience .tys-buy-now {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  max-width: none !important;
}

body.tys-product-experience .added_to_cart.wc-forward {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  margin-top: 10px !important;
}

/* Quantity + Add to cart row always spans the same width as Buy Now */
body.tys-product-experience .summary form.cart {
  display: grid !important;
  grid-template-columns: 142px minmax(0, 1fr) !important;
  gap: 12px !important;
}

body.tys-product-experience .summary form.cart .single_add_to_cart_button {
  width: 100% !important;
  min-width: 0 !important;
}

@media (max-width: 520px) {
  body.tys-product-experience .summary form.cart {
    grid-template-columns: 124px minmax(0, 1fr) !important;
  }
}


/* =========================================================
   v3.3 — stable stacked purchase controls
   ========================================================= */

/* Use a vertical purchase layout so WooCommerce's View cart link
   cannot squeeze the Add to cart button into a narrow column. */
body.tys-product-experience .summary form.cart {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 12px !important;
  width: 100% !important;
}

/* Keep the quantity selector compact and aligned left. */
body.tys-product-experience .summary form.cart .quantity {
  flex: 0 0 auto !important;
  align-self: flex-start !important;
}

/* Full-width purchase buttons with no vertical text wrapping. */
body.tys-product-experience .summary form.cart .single_add_to_cart_button,
body.tys-product-experience .summary .added_to_cart.wc-forward,
body.tys-product-experience .summary .tys-buy-now {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 54px !important;
  margin: 0 !important;
  padding: 14px 20px !important;
  white-space: nowrap !important;
  writing-mode: horizontal-tb !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  line-height: 1.2 !important;
  box-sizing: border-box !important;
}

/* WooCommerce may insert View cart inside or immediately after the form. */
body.tys-product-experience .summary form.cart .added_to_cart.wc-forward {
  order: 3;
  background: #eef1f5 !important;
  color: #344761 !important;
  border-radius: 8px !important;
  text-decoration: none !important;
}

/* Restore Add to cart above View cart after AJAX add. */
body.tys-product-experience .summary form.cart .single_add_to_cart_button {
  order: 2;
}

body.tys-product-experience .summary form.cart .quantity {
  order: 1;
}

/* Remove older grid behaviour at all breakpoints. */
@media (max-width: 760px), (min-width: 761px) {
  body.tys-product-experience .summary form.cart {
    grid-template-columns: none !important;
  }
}
