/* --------------------------------------------------------------------------
   PRODUCT INFO CARD STYLING (PRODUCT DETAIL PAGE)
   -------------------------------------------------------------------------- */

/* Typography */
.product-detail__info,
.product-detail__info *,
.product-form__main,
.product-form__main * {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Outer Container (Border wrapping with 8px padding) */
.product-detail__info-outer {
  border: 1px solid color-mix(in srgb, #44372d, transparent 86%);
  border-radius: 4px;
  padding: 8px;
  background-color: #f5f1e8;
  position: relative;
  box-sizing: border-box;
}

/* Inner Container */
.product-detail__info {
  background-color: #EEEBE0;
  border: none;
  border-radius: 4px;
  padding: 16px 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: 16px;
  column-gap: 16px;
  align-items: center;
  box-sizing: border-box;
  box-shadow: none;
}

.product-detail__info-group,
.product-form__main {
  background-color: #f6f2eb;
  border: 1px solid #d5cebf;
  border-radius: 16px;
  padding: 24px 20px;
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: 16px;
  column-gap: 16px;
  align-items: center;
  box-sizing: border-box;
  box-shadow: none;
}

/* Sold Out Badge */
.product-info__sold-out-badge {
  position: absolute;
  top: 2%;
  right: -12%;
  background-color: #F2F2F2;
  color: #000000;
  font-size: 16px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 6px;
  transform: rotate(-10deg);
  z-index: 10;
  pointer-events: none;
  line-height: 1.2;
}

/* Desktop 1/3 (Left) & 2/3 (Right) Column Layout (Only on screens larger than iPad Pro) */
@media (min-width: 1025px) {

  .product-detail__main[data-desktop-direction="row"] .product-detail__info-outer,
  .product-detail[data-desktop-direction="row"] .product-detail__info-outer {
    --detail-col-width: 33.333%;
    width: calc(33.333% - (var(--detail-main-column-gap, 36px) * 0.67));
    flex: 0 0 calc(33.333% - (var(--detail-main-column-gap, 36px) * 0.67));
    max-width: 33.333%;
  }

  .product-detail__main[data-desktop-direction="row"] .product-detail__media-group,
  .product-detail[data-desktop-direction="row"] .product-detail__media-group {
    --detail-col-width: 66.666%;
    width: calc(66.666% - (var(--detail-main-column-gap, 36px) * 0.33));
    flex: 0 0 calc(66.666% - (var(--detail-main-column-gap, 36px) * 0.33));
    max-width: 66.666%;
  }
}

/* Vertical Stack Layout for Mobile up to iPad Pro (max-width: 1024px)
   Product Media Group ON TOP, Product Info BELOW */
@media (max-width: 1024px) {

  .product-detail__main,
  .product-detail,
  theme-product-main {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .product-detail__media-group,
  .product-detail__media-gallery,
  .media-gallery__sticky-wrapper {
    order: -1;
    position: relative;
    top: auto;
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
  }

  .product-detail__info-outer {
    order: 1;
    position: relative;
    top: auto;
    width: 100%;
    max-width: 100%;
    padding: 6px;
    border-radius: 20px;
  }

  .product-detail__info {
    position: relative;
    top: auto;
    width: 100%;
    max-width: 100%;
    padding: 20px 16px;
    border-radius: 16px;
  }
}

/* Default blocks span 100% full width */
.product-detail__info>* {
  grid-column: 1 / -1;
}

/* Title / Heading */
.product-detail__title,
.product-detail__heading,
.product-detail__heading .title-font-bold,
.product-title,
.product-title.h4 {
  font-size: 32px;
  font-weight: 800;
  color: #000000;
  line-height: 1.5;
  margin: 16px 0;
  padding: 0;
}

/* Short Description reset padding & enforce left alignment */
.product-description,
.product-description-wrapper,
.product-description *,
.product-description__text,
.product-description__text * {
  padding: 0;
  margin: 16px 0;
  color: #44372D;
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
}

/* Size Accordion Full-Width Section Divider Lines */
.product-detail__variant-picker,
.product-options__accordion-item,
.product-detail__info .variant-picker__group {
  border-top: 1px solid color-mix(in srgb, #44372d, transparent 88%);
  border-bottom: 1px solid color-mix(in srgb, #44372d, transparent 88%);
  padding: 16px 24px;
  margin-left: -24px;
  margin-right: -24px;
  margin-top: 8px;
  margin-bottom: 8px;
}

@media (max-width: 959px) {

  .product-detail__variant-picker,
  .product-options__accordion-item,
  .product-detail__info .variant-picker__group {
    padding-left: 16px;
    padding-right: 16px;
    margin-left: -16px;
    margin-right: -16px;
  }
}

/* Price & Quantity Selector Row Layout */
.product-detail__price {
  grid-column: 1 / 2;
  margin: 0;
  padding: 0;
  display: flex;
}

.product-detail__price .product-price {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

/* SALE STATE: Vertical layout when on sale (Sale price on top, original price on bottom) */
.product-detail__info .product-detail__price .product-price:has(.product-price__origin),
.product-detail__info .product-detail__price:has(.product-price__origin) .product-price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
}

/* Top Price (Sale Price) - RED & BOLD */
.product-detail__info .product-detail__price .product-price:has(.product-price__origin) .product-price__sale,
.product-detail__info .product-detail__price .product-price__sale:has(~ .product-price__origin) {
  color: #ff5053;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
  order: 1;
}

/* Bottom Price (Original / Compare-at Price) - Crossed out, NOT BOLD, muted color */
.product-detail__info .product-detail__price .product-price__origin {
  color: #7a6e63;
  font-size: 16px;
  font-weight: 400;
  text-decoration: line-through;
  line-height: 1.2;
  order: 2;
  margin: 0;
}

.product-detail__quantity-selector {
  grid-column: 2 / 3;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: flex-end;
}

/* Quantity Selector Container & Icon Buttons */
.product-detail__quantity-selector theme-input-number::before,
.product-detail__quantity-selector theme-input-number::after,
.quantity-selector__input::before,
.quantity-selector__input::after {
  display: none;
  box-shadow: none;
  border: none;
}

.product-detail__quantity-selector button[name="minus"],
.product-detail__quantity-selector button[name="plus"],
.product-detail__info theme-input-number button[name="minus"],
.product-detail__info theme-input-number button[name="plus"],
theme-input-number[data-border-style="none"] button[name="minus"],
theme-input-number[data-border-style="none"] button[name="plus"] {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  background-color: #e3ded4;
  color: #44372d;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.product-detail__quantity-selector button svg,
.product-detail__info theme-input-number button svg,
theme-input-number[data-border-style="none"] button .icon {
  background-color: transparent;
  border-radius: 0;
  padding: 0;
  width: 14px;
  height: 14px;
  color: #44372d;
  stroke: #44372d;
  fill: none;
}

.product-detail__quantity-selector button svg path,
.product-detail__info theme-input-number button svg path,
theme-input-number[data-border-style="none"] button .icon path {
  stroke: #44372d;
}

.product-detail__quantity-selector button[name="minus"]:hover:not(:disabled),
.product-detail__quantity-selector button[name="plus"]:hover:not(:disabled),
.product-detail__info theme-input-number button[name="minus"]:hover:not(:disabled),
.product-detail__info theme-input-number button[name="plus"]:hover:not(:disabled) {
  background-color: #d6cebf;
}

.product-detail__quantity-selector button[name="minus"]:disabled,
.product-detail__quantity-selector button[name="plus"]:disabled,
.product-detail__info theme-input-number button[name="minus"]:disabled,
.product-detail__info theme-input-number button[name="plus"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.product-detail__quantity-selector input[type="number"],
.product-detail__info theme-input-number input[type="number"] {
  width: 32px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #3c3228;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
}

/* Hide text labels & error messages in quantity selector */
.product-detail__quantity-selector .body3.title-font-bold,
.product-detail__quantity-selector .form-label,
.product-detail__quantity-selector label,
.form__error-message.hidden,
.product-detail__info .form__error-message.hidden,
.form__error-message:empty {
  display: none;
}

/* Buy Buttons Styling (Add to Cart & Buy Now) */
.product-detail__buy-buttons {
  grid-column: 1 / -1;
  width: 100%;
  margin-top: 8px;
}

.product-detail__buy-buttons button[name="add"],
.product-detail__buy-buttons .button--secondary,
.product-detail__buy-buttons .add-to-cart {
  position: relative;
  overflow: hidden;
  background-color: #538bf6;
  color: #ffffff;
  border-radius: 4px;
  height: 56px;
  font-size: 16px;
  font-weight: 400;
  border: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
  box-shadow: none;
  z-index: 1;
  transition: color 0.6s cubic-bezier(0.25, 1, 0.4, 1);
}

/* Ensure content sits above sweep fill animation layer */
.product-detail__buy-buttons button[name="add"] *,
.product-detail__buy-buttons .button--secondary *,
.product-detail__buy-buttons .add-to-cart * {
  position: relative;
  z-index: 2;
  transition: color 0.6s cubic-bezier(0.25, 1, 0.4, 1), fill 0.6s cubic-bezier(0.25, 1, 0.4, 1), stroke 0.6s cubic-bezier(0.25, 1, 0.4, 1);
}

/* Arched Vertical Wipe Fill Layer (Middle is higher as it rises up) */
.product-detail__buy-buttons button[name="add"]::before,
.product-detail__buy-buttons .button--secondary::before,
.product-detail__buy-buttons .add-to-cart::before {
  content: "";
  position: absolute;
  top: 0;
  left: -20%;
  width: 140%;
  height: 180%;
  background-color: #ffffff;
  border-radius: 50% 50% 0 0 / 60% 60% 0 0;
  transform: translateY(100%);
  transition: transform 0.7s cubic-bezier(0.25, 1, 0.4, 1);
  z-index: 1;
}

/* Hover state: Arched layer slides up with middle leading the way */
.product-detail__buy-buttons button[name="add"]:hover::before,
.product-detail__buy-buttons .button--secondary:hover::before,
.product-detail__buy-buttons .add-to-cart:hover::before {
  transform: translateY(-20%);
}

.product-detail__buy-buttons button[name="add"]:hover,
.product-detail__buy-buttons .button--secondary:hover,
.product-detail__buy-buttons .add-to-cart:hover,
.product-detail__buy-buttons button[name="add"]:hover *,
.product-detail__buy-buttons .button--secondary:hover *,
.product-detail__buy-buttons .add-to-cart:hover * {
  color: #000000;
}

.product-detail__buy-buttons button[name="add"]:hover svg,
.product-detail__buy-buttons .button--secondary:hover svg,
.product-detail__buy-buttons .add-to-cart:hover svg {
  color: #000000;
  fill: #000000;
  stroke: #000000;
}

.product-detail__buy-buttons .pay-button-buy-now,
.product-detail__buy-buttons .pay-button-common-item,
.product-detail__buy-buttons .btn-primary,
.product-detail__buy-buttons .shopify-payment-button__button,
.product-detail__buy-buttons theme-payment-button button,
.product-detail__buy-buttons .button--payment {
  background-color: #5c2bf5;
  color: #ffffff;
  border-radius: 4px;
  height: 56px;
  font-size: 16px;
  font-weight: 700;
  border: none;
  width: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.product-detail__buy-buttons .pay-button-buy-now:hover,
.product-detail__buy-buttons .pay-button-common-item:hover,
.product-detail__buy-buttons .btn-primary:hover,
.product-detail__buy-buttons .shopify-payment-button__button:hover,
.product-detail__buy-buttons theme-payment-button button:hover,
.product-detail__buy-buttons .button--payment:hover {
  background-color: #421bb8;
  color: #fff;
}

.product-detail__buy-buttons .pay-button-buy-now-text {
  font-size: 16px;
}

/* Stock Inventory Status */
.product-inventory,
.product-inventory-status__text {
  font-size: 14px;
  font-weight: 500;
  color: #44372d;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}

/* Ask a Question / Accordion Item */
.product-detail__additional {
  border: 1px solid rgba(68, 55, 45, 0.14);
  border-radius: 12px;
  background-color: #f7f3ed;
  overflow: hidden;
  margin: 8px 0;
}

.product-detail__additional .additional__trigger {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: #000000;
}

/* Share Block Styling (Single Horizontal Row + Animated Ring + Native Share) */
.product-detail__info .product-detail__share-wrapper,
.product-detail__share-wrapper {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin: 12px 0;
  width: 100%;
  box-sizing: border-box;
}

.product-detail__share-label {
  font-size: 16px;
  font-weight: 500;
  opacity: .6;
  color: #44372D;
  line-height: 1.5;
  flex-shrink: 0;
}

.product-detail__share-copy-btn {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: #3c3228;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.product-detail__share-btn-svg {
  width: 40px;
  height: 40px;
  overflow: visible;
  display: block;
}

/* Product Detail Share Buttons Animated Circle Draw Effect */
.product-detail__share-copy-btn,
.product-detail__share-wrapper .social-media-share__media {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #3c3228;
  cursor: pointer;
  transition: transform 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.product-detail__share-copy-btn .button-social__circle,
.product-detail__share-wrapper .social-media-share__media .button-social__circle {
  position: absolute;
  inset: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  overflow: visible;
  pointer-events: none;
}

.product-detail__share-copy-btn .button-social__circle circle,
.product-detail__share-wrapper .social-media-share__media .button-social__circle circle {
  stroke-dashoffset: 360;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-detail__share-copy-btn:hover .button-social__circle circle,
.product-detail__share-wrapper .social-media-share__media:hover .button-social__circle circle {
  stroke-dashoffset: 0;
}

.product-detail__share-wrapper .social-media-share {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.product-detail__share-wrapper .social-media-share__icon {
  width: 18px;
  height: 18px;
  color: currentColor;
  position: relative;
  z-index: 2;
}

/* Responsive adjustments for Mobile & Tablet (NO !important used) */
@media (max-width: 767px) {
  .product-detail__share-wrapper {
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }

  .product-detail__share-label {
    font-size: 14px;
  }

  .product-detail__share-btn-svg {
    width: 36px;
    height: 36px;
  }

  .product-detail__additional .additional__trigger {
    padding: 12px 14px;
    font-size: 14px;
  }

  .ask-question-card {
    padding: 14px 18px;
    font-size: 15px;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .product-detail__share-wrapper {
    gap: 10px;
  }
}