/* ===== PRODUCT PAGE ===== */
.product-page { max-width: 80rem; margin: 0 auto; padding: 1rem; }

/* Breadcrumb */
.product-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.375rem;
    font-size: 0.8125rem;
    color: #9ca3af;
    margin-bottom: 1.25rem;
}
.product-breadcrumb a { color: #6b7280; text-decoration: none; }
.product-breadcrumb a:hover { color: #e0457b; }
.product-breadcrumb .current { color: #374151; }

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Gallery */
.gallery-wrap { position: relative; }
.gallery-main {
    background: #f9fafb;
    border-radius: 1rem;
    overflow: hidden;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-in;
    margin-bottom: 0.75rem;
    border: 1px solid #f3f4f6;
    position: relative;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
    transition: opacity .2s ease;
}
.gallery-main:hover img { opacity: .94; }
.gallery-main__hint { position:absolute;left:14px;bottom:14px;background:rgba(32,51,76,.82);color:#fff;border-radius:10px;padding:7px 10px;font-size:11px;font-weight:700;backdrop-filter:blur(5px);pointer-events:none; }
.gallery-main:focus-visible { outline:3px solid rgba(224,69,123,.3); outline-offset:3px; }

/* Product image lightbox */
.product-lightbox { display:none; position:fixed; inset:0; z-index:10050; padding:70px 72px 30px; background:rgba(12,20,33,.94); align-items:center; justify-content:center; box-sizing:border-box; }
.product-lightbox.is-open { display:flex; }
.product-lightbox__top { position:absolute; z-index:4; top:18px; right:20px; left:20px; display:flex; align-items:center; justify-content:space-between; color:#fff; }
.product-lightbox__counter { min-width:65px;text-align:center;padding:7px 12px;border-radius:999px;background:rgba(255,255,255,.12);font-size:12px;direction:rtl; }
.product-lightbox__close,.product-lightbox__nav { border:1px solid rgba(255,255,255,.22);background:rgba(255,255,255,.12);color:#fff;display:grid;place-items:center;cursor:pointer;transition:background .2s,transform .2s; }
.product-lightbox__close { width:44px;height:44px;border-radius:50%;font-size:18px; }
.product-lightbox__close:hover,.product-lightbox__nav:hover { background:rgba(255,255,255,.25); }
.product-lightbox__nav { position:absolute;top:50%;transform:translateY(-50%);width:48px;height:48px;border-radius:50%;font-size:28px;z-index:2; }
.product-lightbox__nav:hover { transform:translateY(-50%) scale(1.06); }
.product-lightbox__nav--prev { right:18px; }.product-lightbox__nav--next { left:18px; }
.product-lightbox__stage { width:100%;height:100%;display:flex;align-items:center;justify-content:center;min-width:0;min-height:0; }
.product-lightbox__stage img { display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:10px;user-select:none; }
@media(max-width:680px){.product-lightbox{padding:62px 10px 70px}.product-lightbox__top{top:10px;right:10px;left:10px}.product-lightbox__nav{top:auto;bottom:12px;width:46px;height:46px}.product-lightbox__nav--prev{right:18px}.product-lightbox__nav--next{left:18px}.gallery-main__hint{left:10px;bottom:10px;padding:6px 8px;font-size:10px}}
.gallery-thumbs { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.25rem; scrollbar-width: none; }
.gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumb {
    flex-shrink: 0;
    width: 4rem;
    height: 4rem;
    border-radius: 0.5rem;
    overflow: hidden;
    border: 2px solid transparent;
    background: #f9fafb;
    cursor: pointer;
    transition: border-color 0.15s;
    padding: 0;
}
.gallery-thumb:hover, .gallery-thumb.active { border-color: #e0457b; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 0.25rem; }

/* Info Panel */
.product-info { display: flex; flex-direction: column; gap: 1rem; }

.product-brands { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.product-brand-tag {
    font-size: 0.75rem;
    color: #e0457b;
    border: 1px solid rgba(224,69,123,0.3);
    padding: 0.2rem 0.75rem;
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.15s;
}
.product-brand-tag:hover { background: #e0457b; color: #fff; }

.product-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.5;
    margin: 0;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
    color: #6b7280;
}
.rating-stars { color: #fbbf24; letter-spacing: 0.1em; }

/* Product sharing */
.product-share { border:1px solid #d9eee9; background:linear-gradient(135deg,#f5fffc 0%,#fff8fb 100%); border-radius:1rem; padding:.8rem; }
.product-share__heading { display:flex;align-items:center;justify-content:space-between;color:#334155;margin-bottom:.7rem; }
.product-share__heading h2 { margin:0;font-size:.9rem;font-weight:800;color:#26364d; }
.product-share__heading p { margin:.15rem 0 0;font-size:.7rem;color:#84909e; }
.product-share__heading svg { color:#e0457b;flex:none; }
.product-share__actions { display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.4rem; }
.product-share__button { min-width:0;min-height:38px;border:1px solid #e5e7eb;border-radius:.7rem;background:#fff;color:#475569;text-decoration:none;display:flex;align-items:center;justify-content:center;gap:.3rem;font-family:inherit;font-size:.72rem;font-weight:700;cursor:pointer;padding:.35rem;transition:transform .15s,border-color .15s,box-shadow .15s; }
.product-share__button:hover { transform:translateY(-1px);border-color:#cbd5e1;box-shadow:0 5px 14px rgba(30,50,70,.07); }
.product-share__button span { width:21px;height:21px;border-radius:50%;display:grid;place-items:center;color:#fff;font-size:.7rem;line-height:1; }
.product-share__button span img { display:block;width:13px;height:13px;object-fit:contain;filter:brightness(0) invert(1); }
.product-share__button.is-telegram span { background:#279bd3; }.product-share__button.is-whatsapp span { background:#25b966; }
.product-share__button.is-bale span { background:#35a8aa; }.product-share__button.is-eitaa span { background:#f08a34; }.product-share__button.is-more span { background:#738198; }
.product-share__short { margin-top:.65rem;padding-top:.6rem;border-top:1px dashed #dbe7e5; }
.product-share__short label { display:block;font-size:.68rem;color:#64748b;margin-bottom:.3rem; }
.product-share__copy-row { display:flex;direction:ltr;gap:.35rem; }
.product-share__copy-row input { min-width:0;flex:1;height:35px;border:1px solid #dce5e7;border-radius:.55rem;background:rgba(255,255,255,.8);padding:0 .65rem;color:#536071;font:500 .73rem monospace;text-align:left; }
.product-share__copy-row button { flex:none;border:0;border-radius:.55rem;background:#e0457b;color:#fff;padding:0 .8rem;font-family:inherit;font-size:.72rem;font-weight:700;cursor:pointer; }
.product-share__status { display:block;min-height:1rem;margin-top:.2rem;color:#0f9f72;font-size:.67rem;text-align:left; }
@media(max-width:560px){.product-share__actions{grid-template-columns:repeat(3,minmax(0,1fr))}.product-share__button{min-height:42px;font-size:.75rem}.product-share__copy-row input{font-size:.68rem}}

.product-summary {
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.75;
    border-right: 3px solid #fce7f3;
    padding-right: 0.75rem;
}
.product-summary--rich p { margin:0 0 .75rem; }
.product-summary--rich p:last-child { margin-bottom:0; }
.product-summary--rich ul,.product-summary--rich ol { margin:.5rem 0 .75rem; padding-right:1.25rem; }
.product-summary--rich li { margin:.25rem 0; }
.product-summary--rich br { display:block; content:""; margin-top:.3rem; }

/* Price Box */
.price-box {
    background: #f9fafb;
    border-radius: 0.875rem;
    padding: 1rem;
    border: 1px solid #f3f4f6;
}
.price-old {
    font-size: 0.875rem;
    color: #9ca3af;
    text-decoration: line-through;
}
.price-discount-badge {
    display: inline-block;
    background: #ef4444;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
}
.price-main {
    font-size: 1.625rem;
    font-weight: 800;
    color: #111827;
    line-height: 1.2;
}
.price-out { font-size: 1.125rem; font-weight: 600; color: #9ca3af; }
.price-cashback { display: none; }

/* Stock */
.stock-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}
.stock-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    flex-shrink: 0;
}
.stock-dot.green { background: #22c55e; }
.stock-dot.red   { background: #ef4444; }
.stock-in  { color: #16a34a; font-weight: 500; }
.stock-out { color: #ef4444; font-weight: 500; }
.stock-low { color: #f97316; font-size: 0.75rem; }

/* Quantity & Cart */
.cart-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.qty-selector {
    display: inline-flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}
.qty-btn {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border: 1.5px solid #e5e7eb;
    cursor: pointer;
    font-size: 1.25rem;
    color: #374151;
    transition: background 0.12s, color 0.12s;
    border-radius: 0;
    line-height: 1;
    font-family: inherit;
}
.qty-btn:first-child { border-radius: 0.5rem 0 0 0.5rem; }
.qty-btn:last-child  { border-radius: 0 0.5rem 0.5rem 0; }
.qty-btn:hover { background: #e0457b; color: #fff; border-color: #e0457b; }
.qty-input {
    width: 3rem;
    height: 2.5rem;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    border-top: 1.5px solid #e5e7eb;
    border-bottom: 1.5px solid #e5e7eb;
    border-left: none;
    border-right: none;
    outline: none;
    font-family: inherit;
    background: #fff;
    color: #111827;
    -moz-appearance: textfield;
    padding: 0;
    vertical-align: middle;
}
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.btn-cart {
    flex: 1;
    min-height: 2.75rem;
    background: #e0457b;
    color: #fff;
    border: none;
    border-radius: 0.625rem;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.15s, transform 0.1s;
    font-family: inherit;
}
.btn-cart { touch-action:manipulation; -webkit-tap-highlight-color:transparent; }
.btn-cart:hover { background: #c73d6e; }
.btn-cart:active { transform: scale(0.98); }
.btn-cart:disabled { background: #9ca3af; cursor: not-allowed; }

.btn-wishlist {
    min-height: 2.75rem;
    padding: 0 1rem;
    background: none;
    border: 1px solid #e5e7eb;
    border-radius: 0.625rem;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    transition: all 0.15s;
    white-space: nowrap;
    font-family: inherit;
}
.btn-wishlist:hover { border-color: #e0457b; color: #e0457b; }
.btn-wishlist.active { color: #e0457b; border-color: #e0457b; background: #fef2f7; }

/* Trust Badges */
.trust-badges {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding: 0.75rem 0;
    scrollbar-width: none;
    border-top: 1px solid #f3f4f6;
    border-bottom: 1px solid #f3f4f6;
}
.trust-badges::-webkit-scrollbar { display: none; }
.trust-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.375rem;
    flex-shrink: 0;
    min-width: 5.5rem;
    font-size: 0.6875rem;
    color: #374151;
    text-align: center;
    padding: 0.5rem 0.25rem;
    border-radius: 0.5rem;
    transition: background 0.15s;
}
.trust-badge:hover { background: #f9fafb; }
.trust-badge svg { flex-shrink: 0; }

/* عنوان موبایل */
.product-title-mobile {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.5;
    margin: 0 0 0.75rem 0;
    display: block;
}
.product-title-desktop { display: none; }

/* Mobile fixes */
@media (max-width: 767px) {
    /* صفحه محصول CTA اختصاصی دارد؛ دکمه شناور عمومی سبد روی آن نیفتد. */
    #sticky-cart, .sticky-cart { display: none !important; }
    .cart-row { flex-wrap: nowrap; }
    .btn-cart { min-height: 3rem; font-size: 1rem; }
    .qty-selector { flex-shrink: 0; }
    .price-main { font-size: 1.375rem; }
    .product-info { gap: 0.875rem; }
    .trust-badges { gap: 0.5rem; }
    .trust-badge { min-width: 4.5rem; font-size: 0.625rem; }
}

/* Sticky CTA Mobile */
.sticky-cta {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding: 0.75rem 1rem;
    z-index: 900;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
}
.sticky-cta .price-mini { font-size: 0.9375rem; font-weight: 700; color: #111827; flex: 1; }
.sticky-cta .btn-cart { flex: none; padding: 0 1.5rem; }

/* Tabs */
.product-tabs-wrap { background: #fff; border-radius: 0.875rem; border: 1px solid #e5e7eb; overflow: hidden; margin-bottom: 2rem; }
.product-tabs-nav { display: flex; border-bottom: 1px solid #e5e7eb; overflow-x: auto; scrollbar-width: none; }
.product-tabs-nav::-webkit-scrollbar { display: none; }
.tab-btn {
    padding: 0.875rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.15s, border-color 0.15s;
    font-family: inherit;
}
.tab-btn:hover { color: #e0457b; }
.tab-btn.active { color: #e0457b; border-bottom-color: #e0457b; }
.tab-content { display: none; padding: 1.5rem; }
.tab-content.active { display: block; }

/* Stock Alert */
.stock-alert-box {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 0.75rem;
    padding: 1rem;
}

/* Related */
.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

/* Desktop */
@media (min-width: 768px) {
    .product-title-mobile { display: none; }
    .product-title-desktop { display: block; }
    .product-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
    .gallery-wrap { position: sticky; top: 5rem; }
    .product-title { font-size: 1.375rem; }
    .sticky-cta { display: none; }
    .related-grid { grid-template-columns: repeat(4, 1fr); }
}
/* ===== CASHBACK BANNER ===== */
.price-cashback { display: none; } /* قدیمی - مخفی */

.bw-cashback-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #bbf7d0;
    border-right: 4px solid #16a34a;
    border-radius: 14px;
    padding: 14px 16px;
    margin: 16px 0;
    box-shadow: 0 2px 8px rgba(22,163,74,.08);
}
.bw-cashback-icon {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, #16a34a, #15803d);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(22,163,74,.35);
}
.bw-cashback-icon svg { width: 24px; height: 24px; }
.bw-cashback-content { flex: 1; min-width: 0; }
.bw-cashback-title {
    font-size: 13px;
    font-weight: 700;
    color: #15803d;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.bw-cashback-title::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #16a34a;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.bw-cashback-desc { font-size: 13px; color: #166534; line-height: 1.7; }
.bw-cashback-desc strong { color: #15803d; font-weight: 700; font-size: 14px; }
.bw-cashback-amount {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #16a34a;
    color: #fff;
    border-radius: 10px;
    padding: 8px 12px;
    min-width: 52px;
    box-shadow: 0 2px 6px rgba(22,163,74,.3);
}
.bw-cashback-amount-num { font-size: 20px; font-weight: 800; line-height: 1; }
.bw-cashback-amount-label { font-size: 10px; opacity: .85; margin-top: 2px; }
