/* Sticky container for Action Form */
.liv-product-sticky {
  position: -webkit-sticky; /* Safari support */
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%; /* ensures full card height */
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}


/* Add to Cart inside sticky */
.liv-product-sticky .form-actions {
  margin-top: 30px;
}

.liv-product-sticky .form-actions button,
.liv-product-sticky .form-actions input[type=submit] {
  display: block;
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 8px;
  background: #5c7d62;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  text-align: center;
  transition: background 0.3s ease;
}

.liv-product-sticky .form-actions button:hover,
.liv-product-sticky .form-actions input[type=submit]:hover {
  background: #4a6450;
}

/* Titles */
.liv-product-title {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 10px;
}
.liv-product-desc {
  font-size: 15px;
  color: #555;
  margin-bottom: 15px;
}
.liv-product-price {
  font-size: 22px;
  font-weight: 600;
  color: #111;
  margin-bottom: 20px;
}
.liv-price-note {
  font-size: 14px;
  color: #777;
  margin-left: 8px;
}

/* Selector blocks */
.liv-selector {
  margin-bottom: 20px;
}
.liv-label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
}
.liv-button-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Generic buttons */
.liv-btn {
  border: 1px solid #ccc;
  background: #f9f9f9;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.liv-btn:hover {
  border-color: #5c7d62;
  background: #eef5f0;
}

/* Quantity group */
.liv-quantity {
  display: flex;
  align-items: center;
  gap: 5px;
}
.liv-btn-qty {
  width: 36px;
  height: 36px;
  text-align: center;
  font-size: 18px;
  line-height: 1;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #f9f9f9;
  cursor: pointer;
  transition: all 0.3s ease;
}
.liv-btn-qty:hover {
  background: #eef5f0;
  border-color: #5c7d62;
}
.liv-qty-input {
  width: 50px;
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 5px;
}
.liv-qty-note {
  display: block;
  font-size: 13px;
  color: #888;
  margin-top: 5px;
}

/* Add to Cart */
.liv-btn-primary {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 8px;
  background: #5c7d62;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  margin-top: 20px;
  transition: background 0.3s ease;
}
.liv-btn-primary:hover {
  background: #4a6450;
}

/* Owl Carousel controls */
.liv-owl-carousel .owl-nav button {
  position: absolute;
  top: 40%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
}
.liv-owl-carousel .owl-prev { left: -20px; }
.liv-owl-carousel .owl-next { right: -20px; }

/* Keep the real checkbox in the DOM but offscreen (still associated with the label) 
.liv-btn-flavor .checkbox-inline input[type="checkbox"]{
  position: absolute;
  left: -9999px;
}
*/

/* Hide real checkbox but keep it clickable */
.liv-btn-flavor input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Style the label as the button */
/* Flavor buttons */
/* Label as button */
.liv-btn-flavor .checkbox-inline label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 10px 18px;
  border: 1px solid #ccc;
  border-radius: 10px;
  background: #f9f9f9;
  color: #111;
  cursor: pointer;
  margin: 0 10px 10px 0;
  font-weight: 500;
  transition: background .2s, border-color .2s, color .2s;
}

.liv-btn-flavor .checkbox-inline label:hover {
  background: #f0f0f0;
  border-color: #999;
}

/* Selected states (classes added by JS) */
.liv-btn-flavor .checkbox-inline label.is-selected.is-lemon {
  background: #FFD700;
  border-color: #FFD700;
  color: #111;
}
.liv-btn-flavor .checkbox-inline label.is-selected.is-mint {
  background: #2F4F4F;
  border-color: #2F4F4F;
  color: #fff;
}

/* Force parent to allow sticky */
.righthalfsection {
  align-self: flex-start;
}

/* Price Options container */
.liv-price-options {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 10px;
}

/* --------- Radio Boxes ------- */

/* Hide default radio circles */
.liv-radio input[type="radio"] {
  display: none !important;
}

/* ===============================
   Radio Box Styles (Purchase Option)
   =============================== */

/* Common card wrapper */
/* Radio Box Wrapper */
.liv-radio-card {
  width: 100%;             /* take full available width of parent */
  max-width: 640px;        /* wider cap for desktop */
  margin: 0 auto 18px;     /* center + spacing */
  border: 2px solid #ccc;
  border-radius: 12px;
  background: #fff;
  padding: 22px 40px;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  box-sizing: border-box;
}

/* Keep both cards aligned */
.liv-radio {
  display: flex;
  justify-content: left;
}

/* Radio circle inside card */
.liv-radio-card::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 20px;
  width: 18px;
  height: 18px;
  border: 2px solid #5c7d62;
  border-radius: 50%;
  background: #fff;
  transition: all 0.3s ease;
}

/* Active radio circle */
.liv-radio input[type="radio"]:checked + span .liv-radio-card::before {
  background: #5c7d62;
  box-shadow: inset 0 0 0 4px #fff;
}

/* Selected state */
.liv-radio input[type="radio"]:checked + span .liv-radio-card {
  border-color: #5c7d62;
  background: #f7faf8;
  box-shadow: 0 0 0 2px rgba(92, 125, 98, 0.15);
}

/* Hover state */
.liv-radio-card:hover {
  border-color: #5c7d62;
  box-shadow: 0 2px 8px rgba(92, 125, 98, 0.25);
}

/* ======================================
   Subscribe & Save (detailed card)
   ====================================== */
.liv-radio-savebox {
  margin-left: 40px; /* space for radio circle */
}

.liv-radio-savebox h3 {
  color: #2f6139;       /* deep green */
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
}

.liv-radio-savebox h5 {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin: 0 0 10px;
}

.liv-radio-savebox ul {
  margin: 0 0 12px 20px;
  padding: 0;
  font-size: 14px;
  color: #444;
  line-height: 1.6;
  list-style: disc;
  text-align: left;
}

.liv-radio-savebox li {
  margin-bottom: 4px;
}

.liv-radio-savebox .liv-radio-price {
  font-size: 18px;
  font-weight: 700;
  margin-top: 6px;
}

.liv-radio-savebox .liv-old-price {
  font-size: 14px;
  color: #999;
  text-decoration: line-through;
  margin-left: 6px;
}

/* ======================================
   One Time Buy (simpler card)
   ====================================== */
.liv-radio-title {
  margin-left: 40px;
  font-size: 16px;
  font-weight: 700;
  color: #222;
  text-align: center;
}

.liv-radio-simple {
  margin-left: 40px;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  margin-top: 6px;
}


/* Force radio buttons into vertical stack */
.liv-price-options .radio-as-buttons {
  display: block !important;
  width: 100%;
}

/* Make each radio card fill width and stack */
.liv-price-options .liv-radio {
  display: block !important;
  width: 100%;
  margin-bottom: 18px;
}

/* OR divider */
.radio-boxes-buttons-words {
  display: flex !important;
  align-items: center;
  justify-content: center;
  margin: 20px 0;
  font-size: 14px;
  font-weight: 600;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 1px;
  width: 100%;
}

/* Lines left and right of OR */
.radio-boxes-buttons-words::before,
.radio-boxes-buttons-words::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #ddd;
  margin: 0 12px;
}

/* One Time Buy radio card adjustments */
.liv-radio-card {
  display: flex;
  flex-direction: column;   /* default column for complex layouts */
  justify-content: center;
}

.liv-radio-card.simple-option {
  flex-direction: row;      /* for single-line options like One Time Buy */
  align-items: center;
  justify-content: space-between;
}

/* Main slider images */
.liv-owl-carousel img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* Hover zoom effect */
.liv-owl-carousel img:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 28px rgba(0,0,0,0.18);
}

/* Nav arrows */
.liv-owl-carousel .owl-nav button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 22px;
  line-height: 1;
  transition: background 0.3s ease;
}

.liv-owl-carousel .owl-nav button:hover {
  background: #5c7d62; /* LIV green */
}

.liv-owl-carousel .owl-prev { left: -15px; }
.liv-owl-carousel .owl-next { right: -15px; }

/* Thumbnails row */
.liv-owl-thumbs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

/* Thumb images */
.liv-owl-thumbs img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.3s ease, transform 0.2s ease;
}

.liv-owl-thumbs img:hover {
  border-color: #aaa;
  transform: scale(1.08);
}

.liv-owl-thumbs img.active {
  border-color: #5c7d62; /* LIV brand green */
}

/* Ensure the left pane can be a positioning context for the fallback */
#dnn_LeftHalfPane { position: relative; }

/* Preferred path: if sticky ever works, keep it */
#dnn_LeftHalfPane .liv-image-sticky {
  position: sticky;
  top: 20px;
}

/* Safety: don't try sticky on small screens */
@media (max-width: 767.98px) {
  #dnn_LeftHalfPane .liv-image-sticky {
    position: static;
    top: auto;
  }
}

/* ===========================
   Sticky Product Image Panel
   =========================== */

/* Sticky states controlled by JS */
.liv-image-sticky {
  width: 100%;
  transition: top .15s ease;
}
.liv-image-sticky.is-fixed {
  position: fixed;
  top: 20px;       /* vertical gap */
  z-index: 10;
}
.liv-image-sticky.is-bottom {
  position: absolute;
}
/* Disable sticky on small screens */
@media (max-width: 768px) {
  .liv-image-sticky,
  .liv-image-sticky.is-fixed,
  .liv-image-sticky.is-bottom {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
  }
}

/* --------------------------------
   Mobile optimization
-------------------------------- */

/* Responsive adjustments */
@media (max-width: 768px) {
  .liv-radio-card {
    width: 95%;        /* nearly full width on tablets */
    padding: 18px 20px;
  }
}
@media (max-width: 480px) {
  .liv-radio-card {
    width: 100%;       /* full width on mobile */
    padding: 16px 18px;
  }
}

@media (max-width: 768px) {
  .liv-product-sticky {
    position: static; /* stop sticky on small screens */
    padding-bottom: 120px; /* leave room for fixed button */
  }

  /* Fix button to bottom of viewport */
  .liv-product-sticky .form-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    border-radius: 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 999;
  }

  .liv-product-sticky .form-actions button,
  .liv-product-sticky .form-actions input[type=submit] {
    border-radius: 0;
    width: 100%;
    padding: 18px;
    font-size: 18px;
  }
}