﻿/* ================= 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;
    }
}
:root{
  --green-50:#f1f8f4;   /* پس‌زمینه کارت ها */
  --green-100:#e3f2eb;  /* مرز روشن */
  --green-500:#2e7d32;  /* سبز برند/تأکید */
  --ink-700:#1f2937;
}

.section{
  background: var(--green-50);
  border: 1px solid var(--green-100);
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 6px 18px rgba(0,0,0,.04);
  margin-top: 18px;
}
.section h3{
  margin: 0 0 10px;
  font-size: 16px;
  color: var(--ink-700);
}

/* مزایا به صورت چک‌مارک */
.benefits{ list-style: none; padding: 0; margin: 0; }
.benefits li{
  position: relative;
  padding: 8px 10px 8px 26px;
  margin: 4px 0;
}
.benefits li::before{
  content: "✓";
  position: absolute;
  left: 8px;
  top: 8px;
  font-weight: 700;
  color: var(--green-500);
}

/* FAQ جمع‌شونده شکیل */
.faq details{
  background: #fff;
  border-radius: 12px;
  margin: 8px 0;
  border: 1px solid var(--green-100);
}
.faq summary{
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 600;
}
.faq p{ padding: 0 14px 12px; margin: 0; }

/* باکس محصولات مرتبط (کارت تصویری) */
.related-cards{
  list-style:none; padding:0; margin:6px 0 0;
  display:grid; gap:12px;
  grid-template-columns: repeat(auto-fill, minmax(200px,1fr));
}
.related-cards .rel{
  display:block; background:#fff; border:1px solid var(--green-100);
  border-radius:14px; padding:10px; text-decoration:none; color:inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}
.related-cards .rel:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,.08);
}
.related-cards img{ width:100%; height:auto; border-radius:10px; display:block; }
.related-cards .t{ display:block; margin-top:8px; font-weight:600; }
.related-cards .p{ display:block; margin-top:4px; color:#374151; font-size:14px; }

/* بج موجود/ناموجود شکیل‌تر */
.badge{
  background: #e8f5e9; color: var(--green-500);
  padding: 3px 10px; border-radius:999px; font-size:12px; border:1px solid var(--green-100);
}
/* ردیف اکشن خرید */
#product-page .buy-row{
  display:flex;
  align-items:center;
  gap:10px;
  margin: 4px 0 16px;
}
/* --- Buy row layout --- */
#product-page .buy-row{
  display:flex; align-items:center; gap:10px; margin:6px 0 16px;
}

/* --- Green CTA Button (overrides any older pink style) --- */
#product-page .add-to-cart.btn{
  display:inline-flex; align-items:center; gap:10px;
  padding:12px 18px; border:0; border-radius:12px;
  background:#22c55e; color:#fff; font-weight:800;
  cursor:pointer; box-shadow:0 10px 28px rgba(0,0,0,.06);
  transition:transform .06s, box-shadow .2s, background .2s;
}
#product-page .add-to-cart.btn:hover{ transform:translateY(-1px); }
#product-page .add-to-cart.btn:active{ transform:translateY(0); box-shadow:0 6px 18px rgba(0,0,0,.08); }
#product-page .add-to-cart.btn:focus-visible{
  outline:2px solid rgba(34,197,94,.5); outline-offset:2px;
}
#product-page .add-to-cart.btn:disabled{
  background:#9ca3af; cursor:default; box-shadow:none; opacity:.9;
}

/* icon + label */
#product-page .add-to-cart.btn .ic{ width:18px; height:18px; }
#product-page .add-to-cart.btn .lbl{ line-height:1; }

/* اختیاری: روی موبایل تمام‌عرض شود */
@media (max-width:700px){
  #product-page .add-to-cart.btn{ width:100%; justify-content:center; }
}
/* --- Buy row: خنثی کردن ظاهر کارت و ساخت دکمه سبز تمیز --- */
#product-page .buy-row.square-card{
  display:flex;
  align-items:center;
  gap:10px;
  margin:8px 0 12px;
  background:transparent !important;
  border:0 !important;
  padding:0 !important;
  box-shadow:none !important;
}

#product-page .buy-row.square-card .add-to-cart{
  width:auto !important;
  height:auto !important;
  white-space:nowrap;
  padding:12px 18px !important;
  border-radius:12px !important;
  background:#22c55e !important; /* سبز */
  color:#fff !important;
  font-weight:800;
  font-size:14px !important;
  line-height:1 !important;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 10px 28px rgba(0,0,0,.06);
  transition:transform .06s, box-shadow .2s;
}
#product-page .buy-row.square-card .add-to-cart:hover{
  transform:translateY(-1px);
}
#product-page .buy-row.square-card .add-to-cart:disabled{
  background:#9ca3af !important;
  box-shadow:none !important;
  cursor:default;
}

/* فاصلهٔ معقول‌تر قبل از سکشن بعدی */
#product-page .section{ margin-top:16px; }
