/* single-product.css */

.single-product-page .product-layout {
  display: flex;
  /* flex-direction: row-reverse; */
  gap: 15px;
  align-items: flex-start;
  /* margin-top: 24px; */
}

.single-product-page .product-info {
  /*flex: 1 1 420px;*/
  flex: 1 1;
  max-width: 460px;
}

pre {
    font-family: 'Vazirmatn';
}

.single-product-page .product-gallery {
  /* flex: 1 1 500px; */
  flex: 1 1;
  width: 100vw;
  margin-left: -12px;
  margin-right: -12px;
}

.single-product-page .product-image-wrapper {
  position: relative;
  /* border-radius: 15px; */
  border-bottom: 1px solid #eaeaea;
  overflow: hidden;
}

.single-product-page .product-main-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.single-product-page .product-image-actions {
  position: absolute;
  top: 16px;
  left: 16px; /* RTL: تصویر سمت چپ صفحه‌ست، آیکون‌ها بالا-چپِ خودِ تصویر */
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.single-product-page .img-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #eee;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}

/* وضعیت فعال: محصول در واچ‌لیست تخفیف کاربر است (#btn-notify)
   پس‌زمینه‌ی سبز پر + آیکون سفید، هم‌رنگ با --dnd-primary تم. */
.single-product-page .img-action-btn.is-active {
  background: var(--dnd-primary);
  border-color: var(--dnd-primary);
  color: #fff;
}

.single-product-page .img-action-btn.is-active:hover {
  background: var(--dnd-primary-dark);
  border-color: var(--dnd-primary-dark);
}

.single-product-page .img-action-btn.is-loading {
  pointer-events: none;
  opacity: 0.6;
}

.single-product-page .product-title {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 8px 0;
  font-size: 16px;
  font-weight: 700;
  text-align: right;
  padding: 15px 0;
}

.title-fa {
  line-height: 25px;
}

.product-category a {
  color: #19b16a;
  text-decoration: none;
}

.product-meta,
.product-brand {
  padding: 5px 10px;
  border-radius: 5px;
  border: 1px solid #f0f0f0;
  font-size: 14px;
  color: #707070;
}

.product-short-description {
  font-size: 14px;
  font-weight: 300;
}

.single-product-page .title-en {
  font-size: 0.85em;
  color: #777;
}

.product-card__price-regular {
  text-decoration: line-through;
  color: #999;
  font-size: 13px;
  display: inline;
  margin-inline-end: 6px;
}

.deleted-price svg {
  display: none;
}

.product-card__price-sale,
.product-card__price-normal {
  font-weight: 700;
  color: #1a1a1a;
  display: block;
  width: 100%;
}

span.badgeanddeletedprice {
    padding-bottom: 5px;
    display: block;
}

.product-card__price {
  direction: ltr;
  width: fit-content;
  font-size: 17px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

span.btn-text {
  font-size: 12px;
}

.badge--sale {
  border-radius: 0.75rem;
  background-color: #000;
  padding: 0px 15px;
  padding-top: 3px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  display: inline;
}

.single-product-page .btn-add-to-cart {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background-image: linear-gradient(268deg, #ff5d5d, #c01e2d);
  color: #fff;
}

.single-product-page a.btn-add-to-cart {
  width: 100%;
  text-decoration: none;
}

.single-product-page .btn-add-to-cart:disabled {
  cursor: not-allowed;
  opacity: 0.85;
}

.single-product-page .product-last-updated {
  padding-top: unset;
  border-top: unset;
  font-size: 0.8em;
  color: #475569;
  margin-top: unset;
  display: flex;
  justify-content: space-between;
}

.single-product-last-date {
  color: #19b16a;
}

.product-actions {
  background: #f8f8f8;
  padding: 15px;
  border-radius: 10px;
}

.price-and-addtocart-parent {
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  padding: 20px 12px;
  z-index: 400;
  border-top: 1px solid #f3f3f3;
  height: 90px;
}

/* ============ Quantity selector + Add to cart row ============ */

.add-to-cart-row {
  display: flex;
  gap: 5px;
  align-items: stretch;
  min-width: 55%;
}

.quantity-selector {
  display: flex;
  align-items: center;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  flex-shrink: 0;
}

.qty-btn {
  width: 25px;
  height: 100%;
  border: none;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: #444;
}

.qty-btn:active {
  background: #f2f2f2;
}

.qty-input {
  width: 25px;
  border: none;
  text-align: center;
  font-size: 14px;
  -moz-appearance: textfield;
  background: transparent;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Loading state on Add to cart button */

.btn-add-to-cart .btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: dandiran-spin 0.6s linear infinite;
}

.btn-add-to-cart.is-loading .btn-text {
  opacity: 0.6;
}

.btn-add-to-cart.is-loading .btn-spinner {
  display: inline-block;
}

@keyframes dandiran-spin {
  to {
    transform: rotate(360deg);
  }
}

.product-image-actions button {
    box-shadow: 0 0 #000, 0 0 #0000, 0 10px 15px -3px rgba(0, 0, 0, .1), 0 4px 6px -4px rgba(0, 0, 0, .1);
}

/* ============ Add-to-cart result modal (bottom sheet) ============ */

.cart-added-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 1000;
}

.cart-added-modal-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.cart-added-modal {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 24px 20px calc(20px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.25s ease;
  z-index: 1001;
  text-align: center;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.cart-added-modal.is-visible {
  transform: translateY(0);
}

.cart-added-modal__close {
  position: absolute;
  top: 12px;
  left: 16px;
  width: 30px;
  height: 30px;
  border: none;
  background: #f5f5f5;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: #666;
}

.cart-added-modal__icon {
  margin: 8px auto 12px;
  display: flex;
  justify-content: center;
}

.cart-added-modal__message {
  font-size: 15px;
  font-weight: 600;
  color: #222;
  margin-bottom: 18px;
}

.cart-added-modal__actions {
  display: flex;
  gap: 10px;
}

.cart-added-modal__btn {
  flex: 1;
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  display: inline-block;
}

.cart-added-modal__btn--primary {
  background: #19b16a;
  color: #fff;
}

.cart-added-modal__btn--secondary {
  background: #f0f0f0;
  color: #333;
}

.product-short-description {
  font-size: 14px;
  font-weight: 300;
  margin-top: 20px;
  padding: 20px;
  border-radius: 10px;
  border: 1px solid #f2f2f2;
}

.screen-reader-textt {
  margin-bottom: 12px;
  display: block;
  font-size: 15px;
  font-weight: 600;
}

.product-short-description p {
  padding: 10px 0;
  border-top: 1px solid #eee;
  color: #64748b;
}

@media (max-width: 768px) {
  .single-product-page .product-layout {
    flex-direction: column;
  }
}

/* ============ Sale countdown box ============ */

.product-sale-countdown {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1a1a1a;
  color: #fff;
  border-radius: 10px 10px 0 0;
  padding: 20px 16px;
  margin-bottom: 0;
  direction: rtl;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 90px;
  z-index: 400;
}

.product-sale-countdown__label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.product-sale-countdown__label svg {
  color: #ffcc33;
  flex-shrink: 0;
}

.product-sale-countdown__timer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-variant-numeric: tabular-nums;
  direction: ltr;
}

.product-sale-countdown .cd-unit {
  min-width: 26px;
  text-align: center;
  border: 1px solid #555;
  padding: 2px 10px;
  border-radius: 5px;
}

.product-sale-countdown .cd-value {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.product-sale-countdown .cd-sep {
  opacity: 0.45;
  font-size: 13px;
}

/* woocommerce styles  */

.woocommerce:where(body:not(.woocommerce-uses-block-theme))
  .woocommerce-breadcrumb
  a {
  text-decoration: none;
  color: #767676;
}

.woocommerce:where(body:not(.woocommerce-uses-block-theme))
  .woocommerce-breadcrumb {
  border-top: 1px solid #ededed;
  padding-top: 25px;
}

@media (max-width: 480px) {
  .product-sale-countdown {
    padding: 8px 12px;
  }

  .product-sale-countdown__label span {
    font-size: 12px;
  }

  .woocommerce:where(body:not(.woocommerce-uses-block-theme))
    .woocommerce-breadcrumb {
    font-size: 11px;
    color: #767676;
    width: 100vw;
    overflow: scroll;
    white-space: nowrap;
    text-decoration: none;
    margin-right: -12px;
    margin-bottom: 0;
    padding: 10px;
    padding-right: 15px;
    background: #f5f5f5;
    border-top: unset;
    padding-top: 10px;
  }
  
  
}

/***************************
*******desktop styles*******
***************************/
@media (min-width: 769px) {
  .single-product-page .product-gallery {
    flex: 1 1;
    width: unset;
    margin: unset;
  }

  .single-product-page .product-layout {
    margin-top: 24px;
  }

  .single-product-page .product-image-wrapper {
    border-radius: 15px;
    border: 1px solid #eaeaea;
  }
  .cart-added-modal {
    left: 50%;
    right: auto;
    bottom: 24px;
    width: 380px;
    transform: translate(-50%, 120%);
    border-radius: 16px;
  }

  .cart-added-modal.is-visible {
    transform: translate(-50%, 0);
  }

  .price-and-addtocart-parent {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    position: unset;
    background: unset;
    padding: 0;
    height: unset;
    border: unset;
  }

  span.btn-text {
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 7px;
  }

  .single-product-page .product-last-updated {
    padding-top: 8px;
    border-top: 1px solid #eee;
    margin-top: 6px;
  }

  .product-card__price {
    direction: ltr;
    width: fit-content;
    padding-bottom: 10px;
    font-size: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .badge--sale {
    border-radius: 0.75rem;
    background-color: #000;
    padding: 0px 15px;
    padding-top: 3px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    display: inline;
  }

  .qty-btn {
    width: 38px;
    border: none;
    background: transparent;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: #444;
  }

  .qty-input {
    width: 40px;
    border: none;
    text-align: center;
    font-size: 14px;
    -moz-appearance: textfield;
    background: transparent;
  }

  .product-sale-countdown {
    border-radius: 10px;
    padding: 20px 16px;
    margin-bottom: 14px;
    position: unset;
  }

  .add-to-cart-row {
    width: 100%;
  }
}


/* ===== Shipping methods info (single product) ===== */
.single-product-page .dnd-ship-info {
  margin: 12px 0;
  border: 1px solid var(--dnd-border);
  border-radius: var(--dnd-radius-md);
  background: var(--dnd-white);
  overflow: hidden;
}

.single-product-page .dnd-ship-info__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  font-weight: 600;
  color: var(--dnd-text);
  cursor: pointer;
  list-style: none;
}
.single-product-page .dnd-ship-info__summary::-webkit-details-marker {
  display: none;
}
.single-product-page .dnd-ship-info__summary::after {
  content: "›";
  transform: rotate(-90deg);
  margin-inline-start: 8px;
  transition: transform 0.2s;
}
.single-product-page .dnd-ship-info[open] .dnd-ship-info__summary::after {
  transform: rotate(90deg);
}

.single-product-page .dnd-ship-info__count {
  margin-inline-start: auto;
  font-size: 12px;
  font-weight: 400;
  color: var(--dnd-muted);
}

.single-product-page .dnd-ship-info__list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--dnd-border);
}

.single-product-page .dnd-ship-info__item {
  padding: 12px 14px;
  border-bottom: 1px solid var(--dnd-border);
}
.single-product-page .dnd-ship-info__item:last-child {
  border-bottom: 0;
}

.single-product-page .dnd-ship-info__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.single-product-page .dnd-ship-info__name {
  font-size: 14px;
  color: var(--dnd-text);
}
.single-product-page .dnd-ship-info__cost {
  font-size: 12px;
  color: var(--dnd-primary);
  background: var(--dnd-primary-soft);
  padding: 2px 10px;
  border-radius: var(--dnd-radius-pill);
  white-space: nowrap;
}

.single-product-page .dnd-ship-info__coverage {
  margin-top: 6px;
  font-size: 13px;
  color: var(--dnd-text);
}
.single-product-page .dnd-ship-info__meta {
  margin-top: 4px;
  font-size: 12px;
  color: var(--dnd-muted);
}


/* ===== Purchase points badge (single product) ===== */
.single-product-page .dnd-points-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
  padding: 10px 14px;
  background: linear-gradient(135deg, #fffaf0 0%, #fff3d1 100%);
  border: 1px solid #f3dfa2;
  border-radius: var(--dnd-radius-md);
  box-shadow: 0 2px 10px rgba(224, 161, 0, 0.1);
}

.single-product-page .dnd-points-badge__icon {
  flex-shrink: 0;
  display: inline-flex;
  filter: drop-shadow(0 2px 3px rgba(224, 161, 0, 0.35));
}

.single-product-page .dnd-points-badge__text {
  font-size: 13px;
  line-height: 1.8;
  color: var(--dnd-text);
}

.single-product-page .dnd-points-badge__value {
  font-weight: 700;
  color: #c98a00;
  white-space: nowrap;
}

.basalam-installment-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
    padding: 11px 22px;
    background: #fff;
    color: #ff5c35;
    border: 2px solid #ff5c35;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s;
}
.basalam-installment-btn img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    display: block;
}
.basalam-installment-btn:hover,
.basalam-installment-btn:focus {
    background: #fff4f1;
    color: #ff5c35;
    text-decoration: none;
}
