/* Kia-like product layout: photo | title/facts/جزئیات قیمت/cart side-by-side */
.bf-product-layout__row {
  --bf-product-gap: 1.25rem;
}

.bf-product-layout__gallery-card {
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #fff;
}

.bf-product-layout__gallery .gallery-container {
  padding: 0.75rem;
}

/* Square main photo plane (Kia-style) so the column keeps weight beside info */
.bf-product-layout__gallery #swiper-gallery {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f7f7f8;
  border-radius: 0.75rem;
  overflow: hidden;
}

.bf-product-layout__gallery #swiper-gallery .swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.bf-product-layout__gallery #swiper-gallery .item-icon,
.bf-product-layout__gallery #swiper-gallery img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.bf-product-layout__gallery #swiper-thumbs {
  margin-top: 0.65rem;
}

.bf-product-layout__photo-placeholder {
  width: 100%;
  height: 100%;
  min-height: 100%;
  background:
    linear-gradient(135deg, rgba(0, 0, 0, 0.03) 25%, transparent 25%) -12px 0 / 24px 24px,
    linear-gradient(225deg, rgba(0, 0, 0, 0.03) 25%, transparent 25%) -12px 0 / 24px 24px,
    linear-gradient(315deg, rgba(0, 0, 0, 0.03) 25%, transparent 25%) 0 0 / 24px 24px,
    linear-gradient(45deg, rgba(0, 0, 0, 0.03) 25%, transparent 25%) 0 0 / 24px 24px,
    #f3f4f6;
}

.bf-product-layout__info-inner {
  padding: 0.15rem 0.25rem 0.5rem;
}

/* Specs/description live outside the sticky gallery row */
.bf-product-layout__below {
  width: 100%;
  clear: both;
  position: relative;
  z-index: 0;
}

@media (min-width: 992px) {
  .bf-product-layout__row {
    display: flex;
    flex-wrap: wrap;
  }

  .bf-product-layout__gallery,
  .bf-product-layout__info {
    flex: 0 0 50%;
    max-width: 50%;
  }

  /* Sticky only while scrolling within the photo|info pair — not over specs below */
  .bf-product-layout__gallery {
    position: sticky;
    top: 1rem;
    align-self: flex-start;
    z-index: 1;
  }

  .bf-product-layout__info-inner {
    padding-inline: 0.35rem 0.75rem;
  }

  /* Keep add-to-cart calc/prices stacked in the info column (not a second split) */
  .bf-product-layout__info .add-to-cart-container .modal-body > .row > [class*="col-lg-6"] {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .bf-product-layout__info #pricesTable {
    font-size: 0.9rem;
  }
}

/* Product page enrichment — facts panel + clearer price hierarchy (no template fork) */
.bf-product-facts {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 12px;
  background: linear-gradient(180deg, #fafbfc 0%, #f4f6f8 100%);
}

.bf-product-facts__title {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1f2937;
}

.bf-product-facts__list {
  margin: 0;
  display: grid;
  gap: 0.45rem;
}

.bf-product-facts__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.35rem 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.06);
}

.bf-product-facts__row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.bf-product-facts__label {
  margin: 0;
  color: #6b7280;
  font-size: 0.86rem;
  font-weight: 500;
}

.bf-product-facts__value {
  margin: 0;
  color: #111827;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: left;
}

.bf-product-facts__link {
  color: var(--bfrontshop-brand-primary, #0071e3);
  text-decoration: none;
  font-weight: 600;
}

.bf-product-facts__link:hover,
.bf-product-facts__link:focus-visible {
  text-decoration: underline;
}

.product-show-box .price-container .price.fs-2 {
  letter-spacing: -0.02em;
}

.product-show-box .title.fs-5 {
  line-height: 1.45;
}

/* Kia-style gold catalog «جزئیات قیمت» (presentation-only) */
.bf-gold-price-breakdown {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border: 1px dashed rgba(0, 0, 0, 0.14);
  border-radius: 12px;
  background: #fff;
}

.bf-gold-price-breakdown__title {
  margin: 0 0 0.65rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1f2937;
}

.bf-gold-price-breakdown__list {
  margin: 0;
  display: grid;
  gap: 0;
}

.bf-gold-price-breakdown__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.4rem 0;
  border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
}

.bf-gold-price-breakdown__row--sep {
  margin-top: 0.35rem;
  padding-top: 0.65rem;
  border-top: 1px dashed rgba(0, 0, 0, 0.12);
}

.bf-gold-price-breakdown__row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.bf-gold-price-breakdown__label {
  margin: 0;
  color: #6b7280;
  font-size: 0.86rem;
  font-weight: 500;
}

.bf-gold-price-breakdown__value {
  margin: 0;
  color: #111827;
  font-size: 0.92rem;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.bf-gold-price-breakdown__row--emphasis .bf-gold-price-breakdown__label,
.bf-gold-price-breakdown__row--emphasis .bf-gold-price-breakdown__value {
  color: #111827;
  font-size: 1rem;
  font-weight: 700;
}

/* When breakdown is off, keep final price dominant in calc box */
#priceCalculationAlert.bf-price-final-only #calculatedWeightContainer,
#priceCalculationAlert.bf-price-final-only #calculatedFeePriceContainer {
  display: none !important;
}

#priceCalculationAlert.bf-price-final-only #calculatedTotalPriceContainer strong {
  font-size: 1.05rem;
}

@media (max-width: 575.98px) {
  .bf-product-facts {
    padding: 0.75rem 0.85rem;
  }

  .bf-product-facts__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
  }

  .bf-product-facts__value {
    text-align: right;
  }

  .bf-gold-price-breakdown {
    padding: 0.75rem 0.85rem;
  }

  .bf-gold-price-breakdown__row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
  }

  .bf-gold-price-breakdown__value {
    text-align: right;
    white-space: normal;
  }
}

/* Product share — single trigger + Bootstrap modal */
.bf-product-share {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px dashed rgba(0, 0, 0, 0.08);
}
.bf-product-share--compact {
  margin: 0;
  padding: 0;
  border: 0;
}

.bf-product-share__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.5rem;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-weight: 600;
}
.bf-product-share__trigger--icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--line, #e6eded);
  background: #fff;
  color: var(--ink, #1f2933);
  box-shadow: none;
  box-sizing: border-box;
}
.bf-product-share__trigger--icon:hover,
.bf-product-share__trigger--icon:focus-visible {
  background: rgba(229, 2, 31, 0.08);
  border-color: rgba(229, 2, 31, 0.35);
  color: var(--cd, #8e0c22);
  box-shadow: none;
  filter: none;
}

.bf-product-share__trigger-icon {
  display: inline-flex;
  line-height: 1;
}

.bf-product-share__trigger-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* —— Share modal shell —— */
.bf-product-share-modal .modal-dialog.bf-product-share-modal__dialog {
  max-width: 420px;
  margin: 1rem auto;
}
.bf-product-share-modal__content {
  border: 1px solid var(--line, #e6eded) !important;
  border-radius: 20px !important;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.14) !important;
  overflow: hidden;
  background: #fff;
}
.bf-product-share-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--line, #e6eded);
  direction: rtl;
}
.bf-product-share-modal__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink, #1f2933);
  line-height: 1.35;
}
.bf-product-share-modal__close {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--mut, #6b7785);
  cursor: pointer;
  padding: 0;
}
.bf-product-share-modal__close:hover,
.bf-product-share-modal__close:focus-visible {
  background: rgba(229, 2, 31, 0.08);
  color: var(--cd, #8e0c22);
  outline: none;
}
.bf-product-share-modal__body {
  padding: 16px 18px 18px;
}

/* —— Link + copy as one control —— */
.bf-product-share__link-block {
  margin: 0 0 18px;
}
.bf-product-share__link-label {
  display: block;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--mut, #6b7785);
  text-align: right;
}
.bf-product-share__link-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  direction: ltr;
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line, #e6eded);
  border-radius: 14px;
  background: #f7f9fb;
  overflow: hidden;
  box-sizing: border-box;
}
.bf-product-share__link-row:focus-within {
  border-color: rgba(229, 2, 31, 0.35);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(229, 2, 31, 0.08);
}
.bf-product-share__link-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 48px;
  margin: 0;
  padding: 0 14px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 12.5px;
  color: var(--ink, #1f2933);
  outline: none;
}
.bf-product-share__copy-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 48px;
  min-height: 48px;
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-inline-start: 1px solid var(--line, #e6eded);
  border-radius: 0;
  background: var(--c, #c4122f);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
}
.bf-product-share__copy-btn:hover,
.bf-product-share__copy-btn:focus-visible {
  background: color-mix(in srgb, var(--c, #c4122f) 82%, #000);
  color: #fff;
  outline: none;
}
.bf-product-share__copy-btn svg {
  width: 15px;
  height: 15px;
  display: block;
  flex: 0 0 auto;
  stroke: currentColor;
  fill: none;
}
.bf-product-share__toast {
  margin-top: 8px;
  min-height: 1.1rem;
  font-size: 12.5px;
  font-weight: 600;
  color: #047857;
  text-align: right;
}
.bf-product-share__toast[hidden] {
  display: none !important;
}

/* —— Platforms: one horizontal row —— */
.bf-product-share__platforms {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  margin: 0;
  padding: 14px 4px 2px 4px;
  border-top: 1px solid var(--line, #e6eded);
  direction: rtl;
}
.bf-product-share__platform {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 4px 0 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.bf-product-share__platform[hidden] {
  display: none !important;
}
.bf-product-share__platform:hover,
.bf-product-share__platform:focus-visible {
  text-decoration: none;
  color: inherit;
  outline: none;
}
.bf-product-share__platform-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  line-height: 1;
}
.bf-product-share__platform:hover .bf-product-share__platform-icon,
.bf-product-share__platform:focus-visible .bf-product-share__platform-icon {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.12);
}
.bf-product-share__platform-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}
.bf-product-share__platform-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--mut, #6b7785);
  text-align: center;
  line-height: 1.3;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bf-product-share__platform--telegram .bf-product-share__platform-icon {
  background: #229ed9;
  color: #fff;
}
.bf-product-share__platform--whatsapp .bf-product-share__platform-icon {
  background: #25d366;
  color: #fff;
}
.bf-product-share__platform--instagram .bf-product-share__platform-icon {
  background: linear-gradient(45deg, #f58529, #dd2a7b 50%, #8134af);
  color: #fff;
}
.bf-product-share__platform--x .bf-product-share__platform-icon {
  background: #111827;
  color: #fff;
}
.bf-product-share__platform--email .bf-product-share__platform-icon {
  background: #fff;
  color: #1f2933;
  border-color: var(--line, #e6eded);
}
.bf-product-share__platform--native .bf-product-share__platform-icon {
  background: rgba(229, 2, 31, 0.1);
  color: var(--cd, #8e0c22);
}

@media (max-width: 419.98px) {
  .bf-product-share-modal .modal-dialog.bf-product-share-modal__dialog {
    max-width: calc(100% - 24px);
  }
  .bf-product-share__copy-btn span {
    display: none;
  }
  .bf-product-share__copy-btn {
    padding: 0 14px;
  }
  .bf-product-share__platform-icon {
    width: 40px;
    height: 40px;
  }
  .bf-product-share__platform-icon svg {
    width: 18px;
    height: 18px;
  }
  .bf-product-share__platform-label {
    font-size: 10px;
  }
}
