/**
 * EverBella UltraCart Overrides + Product Page V2 Styles
 *
 * NOTE: This stylesheet needs to be enqueued in `header-product.php`
 * AFTER `product-styles.css` so its rules take precedence.
 *
 * Handles two concerns:
 *   1. Hides the UltraCart native UI when it is rendered inside
 *      `.uc-items-offscreen` (used only on Product Page V2). UltraCart is
 *      NOT hidden globally — other pages/templates still display it.
 *   2. Ships the full Shopify-style buy-box stylesheet from the mockup
 *      so `page-product-v2.php` renders correctly.
 */


/* ==========================================================================
   1. UltraCart hide (scoped to Product Page V2 buy box only)
   ========================================================================== */

.uc-items-offscreen {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  clip: rect(0 0 0 0);
}

/* Belt-and-suspenders: hide any UltraCart-rendered UI that might leak
   out of the hidden wrapper due to portals/scripts. Scope everything
   to descendants of `.uc-items-offscreen` so global UltraCart is untouched. */
.uc-items-offscreen .uc-item,
.uc-items-offscreen .uc-items,
.uc-items-offscreen .uc-item-selector,
.uc-items-offscreen .uc-item-price,
.uc-items-offscreen .uc-price,
.uc-items-offscreen .uc-add-to-cart,
.uc-items-offscreen .btn-uc-add,
.uc-items-offscreen .item-option,
.uc-items-offscreen article.uc-item {
  display: none !important;
  visibility: hidden !important;
}


/* ==========================================================================
   2. Structural styles for Product Page V2
   ========================================================================== */

#product-intro {
  padding-top: 120px;
  padding-bottom: 60px;
}

/* Sticky product image column on desktop, static on mobile */
@media (min-width: 992px) {
  .product-images-col {
    position: sticky;
    top: 100px;
  }
}

@media (max-width: 991px) {
  .product-images-col {
    position: relative;
  }
}

.buy-box-wrap {
  padding: 0 20px;
}


/* ==========================================================================
   3. Full mockup styles (from shopify-style-product-page/css/style.css)
   ========================================================================== */

/* Product form */

.product-form {
  display: block;
}

.product-form__error-message-wrapper:not([hidden]) {
  display: flex;
  align-items: flex-start;
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
}

.product-form__error-message-wrapper svg {
  flex-shrink: 0;
  width: 1.2rem;
  height: 1.2rem;
  margin-right: 0.7rem;
  margin-top: 0.5rem;
}

.product-form__buttons {
  display: flex;
  flex-wrap: wrap;
  grid-column-gap: 2rem;
  grid-row-gap: 2rem;
  justify-content: center;
}

/* Styles from page */
.subscription-tabs-wrapper {
  margin: 20px 0;
}

.subscription-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border: 2px solid #e5e5e5;
  border-radius: 8px;
  overflow: hidden;
}

.subscription-tab {
  flex: 1;
  padding: 10px 20px;
  background: #fff;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #666;
  transition: all 0.3s ease;
  position: relative;
}

.subscription-tab:first-child {
  border-right: 2px solid #e5e5e5;
}

.subscription-tab.active {
  background: #388841;
  color: #fff;
}

.subscription-tab:hover:not(.active) {
  background: #f9f9f9;
}

.subscription-content {
  display: none;
}

.subscription-content.active {
  display: block;
}

.subscription-single-bottle {
  border: 2px solid #388841;
  border-radius: 8px;
  padding: 16px;
  background: #F9FFF9;
  display: flex;
  align-items: center;
  gap: 16px;
}

.subscription-single-bottle .subscription-radio {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid #388841;
  border-radius: 50%;
  background: #388841;
  display: flex !important;
  align-items: center;
  justify-content: center;
  opacity: 1 !important;
  visibility: visible !important;
}

.subscription-single-bottle .subscription-radio i {
  color: #fff;
  font-size: 10px;
  line-height: 1;
}

.subscription-content-wrapper {
  flex: 1;
}

.subscription-badge {
  display: inline-block;
  padding: 4px 12px;
  background: #0c89ef;
  color: #fff;
  border-radius: 30px;
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.subscription-bottle-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.subscription-bottle-title {
  font-size: 18px;
  font-weight: 700;
  color: #2a1900;
}

.subscription-price {
  font-size: 22px;
  font-weight: 700;
  color: #388841;
}

.subscription-original-price {
  font-size: 16px;
  color: #999;
  text-decoration: line-through;
  margin-left: 8px;
}

.subscription-details {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
}

.subscription-details strong {
  color: #388841;
}

.subscription-frequency {
  margin-top: 8px;
  font-style: italic;
  color: #666;
}

.bottle-selector-wrapper {
  margin: 20px 0;
}

.bottle-selector-heading {
  font-size: 18px;
  font-weight: 600;
  color: #2a1900;
  text-align: left;
}

.bottle-options {
  display: flex;
  flex-direction: row;
  gap: 12px;
}

.bottle-option {
  width: 100%;
  position: relative;
  cursor: pointer;
  border: 2px solid #e5e5e5;
  border-radius: 8px;
  padding: 9px 13px;
  transition: all 0.3s ease;
  background: #fff;
  display: flex;
  align-items: start;
  gap: 16px;
  flex-direction: column;
}

.bottle-option:hover {
  border-color: #388841;
  box-shadow: 0 2px 8px rgba(56, 136, 65, 0.1);
}

.bottle-option.selected {
  border-color: #388841;
  background: #F9FFF9;
}

.bottle-option-radio {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid #999;
  border-radius: 50%;
  background: #fff;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.bottle-option:not(.selected) .bottle-option-radio {
  width: 16px;
  height: 16px;
  border-color: #ccc;
}

.bottle-option.selected .bottle-option-radio {
  border-color: #388841;
  background: #388841;
}

.bottle-option-radio::after {
  content: '✓';
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  opacity: 0;
  line-height: 1;
}

.bottle-option.selected .bottle-option-radio::after {
  opacity: 1;
}

.bottle-option-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bottle-badge {
  position: absolute;
  top: -10px;
  right: 10px;
  padding: 4px 9px;
  border-radius: 0px 4px 4px 4px;
  font-size: 11px;
  font-weight: 600;
  background: #6c757d;
  color: #fff;
  z-index: 1;
  text-transform: uppercase;
}

.bottle-badge:before {
  content: "";
  position: absolute;
  display: block;
  left: -12px;
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 0px solid transparent;
  border-right: 13px solid #4d545a;
  top: 0px;
}

.bottle-option.selected .bottle-badge {
  background: #fc7103;
}

.bottle-option.selected .bottle-badge.badge-best {
  background: #007bff;
}

.bottle-option.selected .bottle-badge.badge-best:before {
  border-right-color: #0c4c91;
}

.bottle-option.selected .bottle-badge.badge-popular:before {
  border-right-color: #a55211;
}

.bottle-quantity {
  font-size: 16px;
  font-weight: 700;
  color: #2a1900;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bottle-quantity-number {
  font-size: 16px;
  color: #2a1900;
}

.bottle-option:not(.selected) .bottle-quantity-number {
  color: #868686;
}

.bottle-number-highlight {
  font-size: 22px;
  color: #2a1900;
  transition: color 0.2s ease;
}

.bottle-option:not(.selected) .bottle-number-highlight {
  color: #868686;
}

.bottle-option.selected .bottle-number-highlight {
  color: #388841;
  font-weight: 700;
}

.bottle-savings {
  font-size: 14px;
  color: #666;
  font-weight: 600;
  flex-basis: 100%;
}

.bottle-option:not(.selected) .bottle-savings {
  color: #868686;
}

.bottle-supply {
  font-size: 14px;
  font-style: italic;
  line-height: 1.0em;
  font-weight: 400;
  margin-bottom: 0px;
  color: #666;
}

.bottle-pricing {
  flex-shrink: 0;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.bottle-price {
  font-size: 22px;
  font-weight: 700;
  color: #2a1900;
  line-height: 1;
}

.bottle-option:not(.selected) .bottle-price {
  color: #868686;
}

.bottle-compare-price {
  font-size: 16px;
  color: #999;
  text-decoration: line-through;
  line-height: 1;
}

.bottle-option:not(.selected) .bottle-compare-price {
  color: #b8b8b8;
}

.bottle-option.selected .bottle-compare-price {
  color: #bf0005;
}

.bottle-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 768px) {
  .bottle-options {
    display: flex;
    flex-direction: column;
  }
  .bottle-option {
    display: flex;
    align-items: center;
    flex-direction: row;
  }
  .bottle-pricing {
    align-items: flex-end;
  }
}

@media (max-width: 575px) {
  .bottle-options {
    display: flex;
    flex-direction: column;
  }
  .bottle-option {
    display: flex;
    align-items: center;
    flex-direction: row;
  }
  .bottle-pricing {
    align-items: flex-end;
  }
}

.product-info-accordion {
  border-top: 1px solid #e5e5e5;
}

.accordion-item {
  border-bottom: 1px solid #e5e5e5;
}

.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  list-style: none;
}

.accordion-header::-webkit-details-marker {
  display: none;
}

.accordion-icon {
  font-size: 20px;
  transition: transform 0.3s ease;
}

.accordion-item[open] .accordion-icon {
  transform: rotate(45deg);
}

.accordion-content {
  padding: 0 0 15px 0;
  color: #666;
  line-height: 1.6;
}

.price-crossout {
    font-size: 28px;
    font-weight: 400;
    color: rgb(191, 0, 5);
    text-decoration: line-through 2px;
}

.prod-price {
    font-size: 40px;
    line-height: 40px;
    color: #212227;
    font-weight: 700;
    position: relative;
}

.savings {
    font-size: 20px;
    font-weight: 700;
    color: #388841;
}

/* STRUCTURE ITEMS */
.section-product {
  padding-top: 150px;
}

#product-intro h1, .product-title {
  font-size: 40px;
  font-weight: 700;
  color: #212227;
  text-shadow: 0px 2px 2px rgba(255, 255, 255, 1.0);
  font-family: hero-new, "Helvetica-Neue", Helvetica, Arial, sans-serif;
  line-height: 1.0em;
}

.buy-box-title {
  margin-bottom: 10px;
}

.flavor {
  font-size: 16px;
  line-height: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 7px 15px;
  border-radius: 24px;
  box-shadow: 0px 2px 3px rgb(255 255 255);
  font-weight: 600;
  color: white !important;
  font-family: hero-new, "Helvetica-Neue", Helvetica, Arial, sans-serif;
  display: inline-block;
  margin-bottom: 15px !important;
}

.flavor-hairserum {
    background: linear-gradient(45deg, #11c584, #a399df);
    text-shadow: 0px 2px 2px rgba(0, 0, 0, 0.5);
}

.small-stars {
    font-size: 14px;
    font-weight: 700;
    color: #656565;
    margin-bottom: 7px;
    text-transform: uppercase;
}

p, li {
    font-size: 16px;
    line-height: 1.5;
    /*margin-bottom: 0;*/
    font-family: hero-new, "Helvetica-Neue", Helvetica, Arial, sans-serif;
}

.small-stars .fa-star {
    color: #fc9903;
    font-size: 18px;
}

.product-images {
}

.img-product {
  width: 400px;
  display: block;
  margin: 0px auto 40px;
  position: fixed;
}

@media (max-width: 991px) {
  .img-product {
    width: 400px;
    display: block;
    margin: 0px auto 40px;
    position: relative;
  }
}

.buy-box-wrap {
  padding: 0px 40px;
}

.btn-main, .btn-orange {
    background: #fd6300;
    padding: 20px 25px;
    border-radius: 40px;
    text-decoration: none;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
    line-height: 0.9em;
    white-space: normal;
    text-shadow: 0px 1px 2px rgba(0,0,0,0.5);
    color: white;
}

.btn-main {
    white-space: normal;
    display: inline-block;
    transition: all .15s ease;
    border: none;
}

.btn-orange {
    font-size: 24px;
}
