/* MuscelBond Single Product Page (PDP) — Modeled on HF_Shopify_Theme PayDay PDP */

.single-product .main-page-wrapper {
  background: #ffffff !important;
}

/* Clean Breadcrumbs — wrap without horizontal scrollbar on mobile */
.single-product .woocommerce-breadcrumb,
.single-product .wd-breadcrumbs {
  white-space: normal !important;
  overflow-x: visible !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
}

/* Gallery Card & Thumbnail / Slider Fix */
.single-product .woocommerce-product-gallery,
.single-product .wd-single-gallery {
  background: #ffffff;
  border: 1px solid #f2d5d4;
  border-radius: 18px;
  padding: 10px;
  overflow: visible;
}

.single-product .woocommerce-product-gallery .wd-carousel {
  overflow: hidden !important;
  touch-action: pan-y !important;
  user-select: none;
}

.single-product .woocommerce-product-gallery .wd-carousel-wrap {
  display: flex !important;
  touch-action: pan-y !important;
}

.single-product .woocommerce-product-gallery .wd-carousel-item img {
  user-select: none;
  -webkit-user-drag: none;
}

/* Always keep prev/next arrows accessible & visible on gallery */
.single-product .wd-gallery-images .wd-nav-arrows .wd-btn-arrow {
  z-index: 15 !important;
  pointer-events: auto !important;
  opacity: 0.92 !important;
  background: rgba(255, 255, 255, 0.9) !important;
  color: #071a38 !important;
  border: 1px solid rgba(7, 26, 56, 0.16) !important;
  border-radius: 50% !important;
  width: 36px !important;
  height: 36px !important;
  box-shadow: 0 3px 10px rgba(7, 26, 56, 0.14) !important;
}

/* Thumbnail Rail: clickable, never collapsed, active border instead of fading */
.single-product .wd-gallery-thumb .wd-carousel-item {
  pointer-events: auto !important;
  cursor: pointer !important;
  opacity: 0.72 !important;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.single-product .wd-gallery-thumb .wd-carousel-item:hover {
  opacity: 1 !important;
}

.single-product .wd-gallery-thumb .wd-carousel-item.wd-thumb-active,
.single-product .wd-gallery-thumb .wd-carousel-item.mb-thumb-active {
  opacity: 1 !important;
}

.single-product .wd-gallery-thumb .wd-carousel-item img {
  border-radius: 10px !important;
  border: 2px solid transparent !important;
  background: #ffffff;
  object-fit: contain !important;
}

.single-product .wd-gallery-thumb .wd-carousel-item.wd-thumb-active img,
.single-product .wd-gallery-thumb .wd-carousel-item.mb-thumb-active img {
  border-color: #e53935 !important;
  box-shadow: 0 2px 8px rgba(229, 57, 53, 0.22);
}

@media (max-width: 1024px) {
  .single-product .wd-gallery-thumb {
    width: 100% !important;
    position: relative !important;
    height: auto !important;
  }
  .single-product .wd-gallery-thumb .wd-carousel-inner {
    position: relative !important;
    inset: auto !important;
  }
  .single-product .wd-gallery-thumb .wd-carousel {
    height: auto !important;
    touch-action: pan-x !important;
  }
  .single-product .wd-gallery-thumb .wd-carousel-wrap {
    flex-direction: row !important;
  }
  .single-product .wd-gallery-thumb .wd-carousel-item {
    width: auto !important;
    height: 68px !important;
  }
  .single-product .wd-gallery-thumb .wd-carousel-item img {
    height: 64px !important;
    width: 64px !important;
    margin-bottom: 0 !important;
  }
}

/* Compact Elementor summary spacing (kill 20px dead air between title, rating, price) */
.single-product .elementor-element-6caccea {
  --widgets-spacing: 8px 8px !important;
  --widgets-spacing-row: 8px !important;
}

.single-product .elementor-element-6caccea > .elementor-widget {
  margin-bottom: 0 !important;
}

.single-product .elementor-element-6caccea .wd-wc-notices:has(.woocommerce-notices-wrapper:empty) {
  display: none !important;
}

/* Title & Clean HealthFarm Rating Row */
.single-product .product_title,
.single-product h1.wd-entities-title {
  font-family: var(--mb-font-body, 'Outfit', sans-serif) !important;
  font-size: clamp(20px, 2.4vw, 26px) !important;
  font-weight: 800 !important;
  line-height: 1.24 !important;
  color: #071a38 !important;
  margin: 0 0 2px !important;
}

.mb-hf-rating-row {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
  margin: 2px 0;
  padding: 0;
  background: transparent;
  border: none;
  line-height: 1.2;
}

.mb-hf-rating-stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.mb-hf-rating-score {
  font-size: 13px;
  font-weight: 700;
  color: #071a38;
  white-space: nowrap;
}

.mb-hf-rating-link {
  font-size: 13px;
  font-weight: 500;
  color: #435a75 !important;
  text-decoration: underline !important;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.mb-hf-rating-link:hover {
  color: #e53935 !important;
}

/* HealthFarm Unified Price Card */
.mb-hf-price-card {
  margin: 4px 0 6px !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  text-align: left;
  width: 100%;
  font-family: var(--mb-font-body, 'Outfit', sans-serif);
}

.mb-hf-price-main-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.mb-hf-price-sale {
  font-size: 28px;
  font-weight: 800;
  color: #071a38;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.mb-hf-price-compare {
  font-size: 16px;
  text-decoration: line-through;
  color: #7d91aa;
  font-weight: 500;
}

.mb-hf-price-discount {
  font-size: 12px;
  font-weight: 800;
  background: #e5161b;
  color: #ffffff;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  line-height: 1;
  white-space: nowrap;
}

.mb-hf-price-tax {
  font-size: 12.5px;
  color: #435a75;
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .mb-hf-price-main-row { gap: 6px 8px; }
  .mb-hf-price-sale { font-size: 24px; }
  .mb-hf-price-compare { font-size: 14px; }
  .mb-hf-price-discount { font-size: 11px; padding: 3px 8px; }
  .mb-hf-price-tax { font-size: 11px; }
}

/* Suppress duplicate WooCommerce variation price box when variation is active */
.single-product .woocommerce-variation-price {
  display: none !important;
}

/* Swatch Pills & HealthFarm Flavour Image Grid + Weight Cards */
.single-product .variations_form table.variations,
.single-product .variations_form table.variations tbody,
.single-product .variations_form table.variations tr,
.single-product .variations_form table.variations th,
.single-product .variations_form table.variations td {
  display: block !important;
  width: 100% !important;
  border: none !important;
  padding: 0 !important;
  text-align: left !important;
}

.single-product .variations_form table.variations tr {
  margin-bottom: 14px !important;
}

.single-product .variations_form table.variations th.label {
  display: none !important; /* Replaced by HealthFarm stepped legend */
}

.single-product .variations_form td.value.mb-hf-enhanced .wd-swatches-product,
.single-product .variations_form td.value.mb-hf-enhanced select,
.single-product .variations_form td.value.mb-hf-enhanced .wd-reset-var {
  display: none !important;
}

.mb-hf-var-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-family: var(--mb-font-body, 'Outfit', sans-serif);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #071a38;
  margin-bottom: 9px;
}

.mb-hf-var-step {
  color: #e53935;
  font-weight: 800;
}

.mb-hf-var-selected {
  font-weight: 700;
  color: #435a75;
  text-transform: none;
  letter-spacing: 0;
}

/* HealthFarm Flavour Grid Cards */
.mb-hf-flavor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  width: 100%;
}

@media (min-width: 750px) {
  .mb-hf-flavor-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }
}

.mb-hf-flavor-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 8px 6px 9px;
  border-radius: 11px;
  border: 1.5px solid rgba(7, 26, 56, 0.14);
  background: #ffffff;
  color: #071a38;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 2px 6px rgba(7, 26, 56, 0.04);
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
  min-width: 0;
}

.mb-hf-flavor-card:hover {
  border-color: #e53935;
}

.mb-hf-flavor-card.is-selected {
  border: 2px solid #e53935;
  background: #fff5f5;
  box-shadow: 0 3px 12px rgba(229, 57, 53, 0.16);
  transform: scale(1.02);
}

.mb-hf-flavor-check {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #ffffff;
  color: #e53935;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(7, 26, 56, 0.15);
  opacity: 0;
  transform: scale(0.5);
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.mb-hf-flavor-card.is-selected .mb-hf-flavor-check {
  opacity: 1;
  transform: scale(1);
}

.mb-hf-flavor-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  border-radius: 50%;
  display: block;
  margin: 0 auto 6px;
  background: #f8fafd;
}

@media (min-width: 750px) {
  .mb-hf-flavor-img {
    width: 58px;
    height: 58px;
  }
}

.mb-hf-flavor-name {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  color: #071a38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

/* HealthFarm Weight Variant Cards */
.mb-hf-weight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  padding-top: 4px;
}

@media (min-width: 750px) {
  .mb-hf-weight-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
}

.mb-hf-weight-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 11px 8px;
  border-radius: 10px;
  border: 1.5px solid #f2b4b2;
  background: #ffffff;
  color: #071a38;
  cursor: pointer;
  transition: all 0.18s ease;
  min-width: 0;
}

.mb-hf-weight-card.is-selected {
  border: 2px solid #e53935;
  background: #fff5f5;
  box-shadow: 2px 2px 0 #e53935;
}

.mb-hf-weight-badge {
  position: absolute;
  top: -8px;
  right: 6px;
  background: #ffd870;
  color: #071a38;
  border: 1px solid #071a38;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.mb-hf-weight-title {
  font-size: 14px;
  font-weight: 800;
  color: #071a38;
  line-height: 1.2;
}

.mb-hf-weight-pricing {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  margin-top: 3px;
}

.mb-hf-weight-price {
  font-size: 13px;
  font-weight: 800;
  color: #c62828;
}

.mb-hf-weight-mrp {
  font-size: 11px;
  color: #6b7d6e;
  text-decoration: line-through;
}

/* Hide noisy demo clutter on PDP */
.single-product .wd-single-visitor-counter,
.single-product .wd-visitor-count,
.single-product .wd-compare-btn {
  display: none !important;
}

/* Add to Cart Button */
.single-product .single_add_to_cart_button {
  min-height: 48px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, #e53935 0%, #c62828 100%) !important;
  color: #ffffff !important;
  border: 1.5px solid #071a38 !important;
  box-shadow: 3px 3px 0 #071a38 !important;
  font-family: var(--mb-font-body, 'Outfit', sans-serif) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
}

/* =========================================================
   HealthFarm MEGA DEAL Unified Offers Widget
   ========================================================= */
.mb-md-widget {
  background: #fff5f5;
  border: 1.5px solid #f5d0cf;
  border-radius: 18px;
  padding: 13px 14px;
  margin: 14px 0 16px;
  font-family: var(--mb-font-body, 'Outfit', sans-serif);
}

.mb-md-widget__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 11px;
  flex-wrap: wrap;
}

.mb-md-widget__left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mb-md-sticker {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #b91c1c 0%, #e53935 60%, #7f1d1d 100%);
  color: #ffffff;
  padding: 3px 8px;
  border-radius: 6px;
  transform: rotate(-7deg);
  border: 1.5px solid #ffffff;
  box-shadow: 0 3px 8px rgba(185, 28, 28, 0.3);
  line-height: 0.95;
  font-family: var(--mb-font-display, 'Anton', sans-serif);
  letter-spacing: 0.05em;
}

.mb-md-sticker__mega { font-size: 10px; }
.mb-md-sticker__deal { font-size: 12px; }

.mb-md-widget__headline {
  font-size: 16px;
  font-weight: 800;
  color: #071a38;
}

.mb-md-widget__price {
  font-size: 20px;
  font-weight: 800;
  color: #071a38;
  border-bottom: 2.5px solid #e53935;
}

.mb-md-widget__save-pill {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #86efac;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
}

.mb-md-offers-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

@media (max-width: 520px) {
  .mb-md-offers-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .mb-md-plus {
    display: none;
  }
}

.mb-md-offer-card {
  background: #ffffff;
  border: 1px solid #f2d5d4;
  border-radius: 12px;
  padding: 8px 10px;
}

.mb-md-offer-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12px;
  color: #071a38;
  margin-bottom: 3px;
}

.mb-md-offer-card__sub {
  font-size: 11px;
  color: #435a75;
  line-height: 1.3;
}

.mb-md-copy-btn {
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid #e53935;
  background: #fff5f5;
  color: #c62828;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
}

.mb-md-offer-tag {
  font-size: 9px;
  font-weight: 800;
  background: #eafaf3;
  color: #15803d;
  padding: 2px 6px;
  border-radius: 999px;
}

.mb-md-plus {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #f2b4b2;
  color: #e53935;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* =========================================================
   HealthFarm "Our Promise" Block & Modals
   ========================================================= */
.mb-promise-block {
  margin: 14px 0 18px;
  font-family: var(--mb-font-body, 'Outfit', sans-serif);
}

.mb-promise-heading {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #071a38;
  margin: 0 0 8px;
}

.mb-promise-container {
  display: flex;
  align-items: center;
  background: #f8fafd;
  border: 1px solid #dce4ef;
  border-radius: 14px;
  padding: 10px 8px;
}

.mb-promise-item {
  flex: 1 1 0%;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 8px;
  cursor: pointer;
  color: #071a38;
  font-size: 12.5px;
  font-weight: 700;
}

.mb-promise-icon {
  color: #e53935;
  display: inline-flex;
}

.mb-promise-divider {
  width: 1px;
  height: 28px;
  background: #dce4ef;
}

.mb-pdp-modal {
  position: fixed;
  inset: 0;
  z-index: 100010;
  background: rgba(7, 26, 56, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.mb-pdp-modal[hidden] {
  display: none !important;
}

.mb-pdp-modal__card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border: 1.5px solid #071a38;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 4px 4px 0 #071a38;
}

.mb-pdp-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.mb-pdp-modal__head h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #071a38;
}

.mb-pdp-modal__close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #dce4ef;
  background: #f8fafd;
  color: #071a38;
  font-size: 18px;
  cursor: pointer;
}

.mb-pdp-modal__text {
  font-size: 13.5px;
  line-height: 1.55;
  color: #435a75;
  margin: 0;
}

.mb-pdp-modal__specs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mb-pdp-modal__specs li {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid #eef2f7;
  font-size: 13px;
}

/* =========================================================
   Mobile Sticky Add-to-Cart Bar on PDP
   ========================================================= */
.mb-pdp-sticky-atc {
  display: none;
}

@media (max-width: 989px) {
  .mb-pdp-sticky-atc {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9985;
    background: #ffffff;
    border-top: 2px solid #071a38;
    padding: 10px 14px calc(env(safe-area-inset-bottom, 0px) + 10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    box-shadow: 0 -8px 24px rgba(7, 26, 56, 0.14);
  }

  .mb-pdp-sticky-atc__price {
    display: flex;
    align-items: baseline;
    gap: 6px;
  }

  .mb-pdp-sticky-atc__now {
    font-size: 20px;
    font-weight: 800;
    color: #071a38;
  }

  .mb-pdp-sticky-atc__mrp {
    font-size: 12px;
    color: #6b7d6e;
  }

  .mb-pdp-sticky-atc__btn {
    flex: 1 1 auto;
    max-width: 220px;
  }
}
