/* ===== 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;
}
.gallery-main { position: relative; overflow: hidden; cursor: crosshair; }
.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
    transition: none;
}
.magnifier-lens {
    display: none;
    position: absolute;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    width: 180px;
    height: 180px;
    pointer-events: none;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    z-index: 10;
    background-repeat: no-repeat;
    background-color: #fff;
    cursor: crosshair;
}
.gallery-main:hover .magnifier-lens { display: block; }
.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-summary {
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.75;
    border-right: 3px solid #fce7f3;
    padding-right: 0.75rem;
}

/* 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: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) {
    .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; }
