﻿/* ================= product.css (scoped, no-conflict) ================ */
/* متغیرهای اختصاصی همین فایل با پیشوند p */
:root {
    --pmaxw: 1120px;
    --pradius: 18px;
    --pshadow: 0 10px 28px rgba(0,0,0,.06);
    --pborder: #eee;
    --pmuted: #666;
    --pprimary: #0f172a;
    --paccent: #0ea5e9;
    --pgreen: #22c55e;
    --pbg: #fafafa;
}

/* فقط داخل #product-page استایل می‌زنیم؛ سراغ هدر/هیرو/سبد/پاپ‌آپ نمی‌رویم */
#product-page {
    max-width: var(--pmaxw);
    margin: 22px auto;
    padding: 0 16px
}

    #product-page .breadcrumb {
        color: #3b82f6;
        margin: 12px 0
    }

        #product-page .breadcrumb a {
            color: #3b82f6;
            text-decoration: none
        }

        #product-page .breadcrumb span {
            color: #111
        }

    /* لایه‌بندی محصول */
    #product-page article[itemscope][itemtype="https://schema.org/Product"] {
        display: grid;
        grid-template-columns: 1.05fr 1fr;
        gap: 28px;
        align-items: start;
    }

    /* ستون تصویر */
    #product-page .media {
        position: sticky;
        top: 100px
    }

        #product-page .media .main {
            width: 100%;
            height: auto;
            border-radius: var(--pradius);
            background: #fff;
            box-shadow: var(--pshadow);
        }

    #product-page .thumbs {
        display: flex;
        gap: 10px;
        margin-top: 10px;
        flex-wrap: wrap
    }

        #product-page .thumbs img {
            width: 78px;
            height: 78px;
            object-fit: cover;
            border-radius: 12px;
            border: 1px solid var(--pborder);
            cursor: pointer;
            background: #fff;
        }

    /* ستون اطلاعات */
    #product-page .title {
        font-size: 30px;
        font-weight: 900;
        line-height: 1.8;
        margin: 6px 0 8px;
        color: var(--pprimary);
    }

        #product-page .title em {
            font-style: normal;
            color: var(--paccent)
        }

    #product-page .sub {
        color: var(--pmuted);
        margin-bottom: 8px
    }

    #product-page .price-row {
        display: flex;
        gap: 14px;
        align-items: baseline;
        margin: 8px 0 14px
    }

    #product-page .price {
        font-size: 24px;
        font-weight: 800;
        color: #111
    }

    #product-page .badge {
        background: #ecfeff;
        border: 1px solid #a5f3fc;
        padding: 2px 10px;
        border-radius: 999px;
        font-size: 12px;
        color: #0369a1;
    }

    #product-page .meta {
        margin: 12px 0 18px;
        color: #1f2937;
        list-style: none;
        padding: 0
    }

        #product-page .meta li {
            margin: 6px 0;
            position: relative;
            padding-right: 14px
        }

            #product-page .meta li::before {
                content: '';
                position: absolute;
                right: 0;
                top: .7em;
                width: 8px;
                height: 8px;
                border-radius: 50%;
                background: var(--paccent);
            }

    /* دکمه افزودن به سبد فقط همین‌جا */
    #product-page .add-to-cart.btn {
        display: inline-block;
        padding: 12px 18px;
        border-radius: 12px;
        background: var(--pgreen);
        color: #fff;
        font-weight: 800;
        border: 0;
        cursor: pointer;
        transition: transform .06s, box-shadow .2s;
        box-shadow: var(--pshadow);
    }

        #product-page .add-to-cart.btn:hover {
            transform: translateY(-1px)
        }

    /* سکشن‌ها */
    #product-page .section {
        margin-top: 22px;
        background: var(--pbg);
        border: 1px solid var(--pborder);
        border-radius: 16px;
        padding: 16px
    }

        #product-page .section h3 {
            margin: 0 0 10px;
            font-size: 18px;
            color: var(--pprimary)
        }

    /* جدول مشخصات و FAQ */
    #product-page .specs {
        width: 100%;
        border-collapse: collapse
    }

        #product-page .specs th, #product-page .specs td {
            border-bottom: 1px dashed var(--pborder);
            padding: 10px;
            text-align: start
        }

        #product-page .specs th {
            color: #444;
            width: 34%
        }

    #product-page .faq details {
        border-bottom: 1px dashed var(--pborder);
        padding: 10px 0
    }

    #product-page .faq summary {
        cursor: pointer;
        font-weight: 700
    }

/* موبایل */
@media (max-width:960px) {
    #product-page article[itemscope][itemtype="https://schema.org/Product"] {
        grid-template-columns: 1fr
    }

    #product-page .media {
        position: static
    }
}
/* استایل دکمه در صفحهٔ محصول */
#product-page .add-to-cart {
    background: #ff6e8c;
    color: #fff;
    border: 0;
    border-radius: 12px;
    padding: 12px 18px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 28px rgba(0,0,0,.06);
    transition: transform .06s, box-shadow .2s;
}

    #product-page .add-to-cart:hover {
        transform: translateY(-1px);
    }

    #product-page .add-to-cart:disabled {
        opacity: .7;
        cursor: default;
    }

/* --- Hero title bubble only on product pages (product.css is loaded only here) --- */
.hero-header .hero-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
}

/* قرص عنوان روی بنر */
.hero-header .hero-title {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 999px;
    background: rgba(255, 208, 192, .92); /* نزدیک به رنگ پس‌زمینه دسته‌ها */
    color: #fff;
    line-height: 1.4;
    box-shadow: 0 6px 18px rgba(0,0,0,.08);
    backdrop-filter: blur(2px);
}

/* زیرعنوان حجم/میل (اختیاری) */
.hero-header .hero-desc {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.86);
    color: #1f2937;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(0,0,0,.04);
}

@media (max-width: 700px) {
    .hero-header .hero-title {
        font-size: 22px;
        padding: 8px 14px;
    }

    .hero-header .hero-desc {
        font-size: 13px;
        padding: 5px 10px;
    }
}
