/*==================================================
  PRODUCT PAGE v2 — scoped under .pp
  One grid for everything: 7 / 5 columns, equal-height cards
===================================================*/
.pp {
    --pp-primary: var(--primary, #0fc756);
    --pp-ink: #1b2430;
    --pp-text: #5d6877;
    --pp-mute: #98a2b0;
    --pp-line: #e8ecf1;
    --pp-soft: #f4f6f9;
    --pp-red: #ef4056;
    --pp-green: #12a15f;
    --pp-radius: 20px;
    --pp-gap: 24px;
    --pp-shadow: 0 14px 34px -24px rgba(27, 36, 48, .35);
    color: var(--pp-text);
    padding: 22px 0 60px;
}
.pp *, .pp *::before, .pp *::after { box-sizing: border-box; }
.pp :where(ul, ol) { list-style: none; margin: 0; padding: 0; }
.pp :where(h1, h2, h3, p) { margin: 0; }
.pp a { text-decoration: none; }
.pp button { font-family: inherit; }

/* ---------- Shared card + row ---------- */
.pp-card {
    background: #fff;
    border: 1px solid var(--pp-line);
    border-radius: var(--pp-radius);
    box-shadow: var(--pp-shadow);
}
.pp-row {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    gap: var(--pp-gap);
    align-items: stretch;
}
.pp-row + .pp-row { margin-top: var(--pp-gap); }
/* مهم: بدون این، آیتم گرید با محتوای عریض (مثلاً کلی thumbnail) از ستون بیرون می‌زند */
.pp-row > * { min-width: 0; }

/* ---------- Breadcrumb ---------- */
.pp-crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 10px;
    margin-bottom: 20px;
    font-size: 13.5px;
}
.pp-crumbs li { display: flex; align-items: center; gap: 10px; color: var(--pp-mute); }
.pp-crumbs li + li::before { content: "›"; font-size: 17px; line-height: 1; color: #c3cad4; }
.pp-crumbs a { color: var(--pp-text); transition: color .2s; }
.pp-crumbs a:hover { color: var(--pp-primary); }
.pp-crumbs li:last-child { color: var(--pp-ink); max-width: 420px; }
.pp-crumbs li:last-child > span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}

/* ---------- Gallery card ---------- */
.pp-gal {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.pp-gal { isolation: isolate; }   /* z-index های داخل گالری بیرون نمی‌زنند و زیر منوی هدر می‌مانند */

.pp-stage {
    position: relative;
    flex: 1 1 auto;
    min-height: 400px;
    overflow: hidden;
    border-radius: 14px;
    background: #fff;
    cursor: zoom-in;
}
.pp-stage img {
    /* The <img> shrinks to the picture itself (centered), so border-radius rounds the real picture corners. */
    position: absolute;
    inset: 10px;
    margin: auto;
    width: auto;
    height: auto;
    max-width: calc(100% - 20px);
    max-height: calc(100% - 20px);
    object-fit: contain;
    border-radius: 8px;
    transition: opacity .25s ease;
    user-select: none;
    -webkit-user-drag: none;
}
.pp-stage img.is-loading { opacity: 0; }

.pp-badges {
    position: absolute;
    top: 8px;
    inset-inline-start: 8px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: none;
}
.pp-badge {
    padding: 5px 11px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
}
.pp-badge.new { background: var(--pp-green); }
.pp-badge.off { background: var(--pp-red); }

.pp-zoom-hint {
    position: absolute;
    top: 8px;
    inset-inline-end: 8px;
    z-index: 2;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--pp-line);
    color: var(--pp-ink);
    pointer-events: none;
}
.pp-zoom-hint svg { width: 18px; height: 18px; }

.pp-count {
    position: absolute;
    bottom: 8px;
    inset-inline-end: 8px;
    z-index: 2;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12.5px;
    color: #fff;
    background: rgba(27, 36, 48, .72);
    direction: ltr;
    unicode-bidi: isolate;
    pointer-events: none;
}

.pp-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 40px;
    height: 40px;
    margin-top: -20px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--pp-line);
    border-radius: 50%;
    background: #fff;
    color: var(--pp-ink);
    cursor: pointer;
    opacity: 0;
    transition: opacity .2s, background .2s, color .2s;
}
.pp-arrow svg { width: 18px; height: 18px; }
.pp-arrow.prev { right: 10px; }
.pp-arrow.next { left: 10px; }
.pp-arrow:hover { background: var(--pp-primary); border-color: var(--pp-primary); color: #fff; }
.pp-stage:hover .pp-arrow { opacity: 1; }
@media (hover: none) { .pp-arrow { opacity: 1; } }

.pp-thumbs-wrap {
    position: relative;
    flex: 0 0 auto;
    min-width: 0;
    width: 100%;
}
.pp-thumbs {
    display: flex;
    gap: 10px;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 3px;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
}
.pp-thumbs::-webkit-scrollbar { display: none; }
.pp-thumbs.is-dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
.pp-thumbs.is-dragging .pp-thumb { pointer-events: none; }
.pp-thumb {
    flex: 0 0 auto;
    width: 74px;
    height: 74px;
    padding: 0;
    background: #fff;
    border: 2px solid var(--pp-line);
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    scroll-snap-align: center;
    transition: border-color .2s, opacity .2s;
}
.pp-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 5px; display: block; pointer-events: none; }
.pp-thumb:hover { border-color: #c5cbd3; }
.pp-thumb.is-active { border-color: var(--pp-primary); }

/* دکمه‌های جابه‌جایی نوار thumbnail (فقط وقتی عکس‌ها بیشتر از جا باشند) */
.pp-tnav {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 30px;
    height: 30px;
    margin-top: -15px;
    padding: 0;
    display: none;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--pp-line);
    border-radius: 50%;
    background: #fff;
    color: var(--pp-ink);
    box-shadow: 0 4px 12px -4px rgba(27, 36, 48, .35);
    cursor: pointer;
    transition: opacity .2s, background .2s, color .2s;
}
.pp-tnav svg { width: 15px; height: 15px; }
.pp-tnav.prev { right: 4px; }
.pp-tnav.next { left: 4px; }
.pp-tnav:hover { background: var(--pp-primary); border-color: var(--pp-primary); color: #fff; }
.pp-thumbs-wrap.has-overflow .pp-tnav { display: flex; }
.pp-thumbs-wrap.at-start .pp-tnav.prev,
.pp-thumbs-wrap.at-end .pp-tnav.next { opacity: 0; pointer-events: none; }
/* محو شدن لبه‌ها به‌عنوان نشانه‌ی «ادامه دارد» */
.pp-thumbs-wrap.has-overflow::before,
.pp-thumbs-wrap.has-overflow::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 1;
    width: 34px;
    pointer-events: none;
    transition: opacity .2s;
}
.pp-thumbs-wrap.has-overflow::before { right: 0; background: linear-gradient(to left, #fff 15%, rgba(255,255,255,0)); }
.pp-thumbs-wrap.has-overflow::after  { left: 0;  background: linear-gradient(to right, #fff 15%, rgba(255,255,255,0)); }
.pp-thumbs-wrap.at-start::before,
.pp-thumbs-wrap.at-end::after { opacity: 0; }
@media (hover: none) { .pp-tnav { display: none !important; } }

/* ---------- Info card ---------- */
.pp-info { padding: 30px; display: flex; flex-direction: column; }

.pp-cat {
    align-self: flex-start;
    margin-bottom: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12.5px;
    color: var(--pp-primary);
    background: color-mix(in srgb, var(--pp-primary) 10%, #fff);
}
.pp-title { font-size: 23px; font-weight: 700; line-height: 1.75; color: var(--pp-ink); overflow-wrap: anywhere; }

.pp-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 22px;
    margin-top: 6px;
    font-size: 13.5px;
    color: var(--pp-mute);
}
.pp-meta b { font-weight: 500; color: var(--pp-text); }

.pp-price {
    margin-top: 22px;
    padding: 18px 20px;
    border-radius: 16px;
    background: linear-gradient(135deg,
    color-mix(in srgb, var(--pp-primary) 9%, #fff),
    color-mix(in srgb, var(--pp-primary) 3%, #fff));
    border: 1px solid color-mix(in srgb, var(--pp-primary) 18%, #fff);
}
.pp-price-top { display: flex; align-items: center; gap: 10px; min-height: 22px; }
.pp-price-old { font-size: 15px; color: var(--pp-mute); text-decoration: line-through; }
.pp-price-off {
    padding: 2px 9px;
    border-radius: 7px;
    font-size: 12.5px;
    font-weight: 700;
    color: #fff;
    background: var(--pp-red);
}
.pp-price-now {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 8px;
    margin-top: 4px;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.4;
    color: var(--pp-ink);
}
.pp-price-now > span { white-space: nowrap; }
.pp-price-now small { font-size: 14px; font-weight: 500; color: var(--pp-text); }

.pp-stock {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 16px;
    font-size: 13.5px;
    font-weight: 500;
}
.pp-stock::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 18%, transparent);
}
.pp-stock.in { color: var(--pp-green); }
.pp-stock.out { color: var(--pp-red); }

.pp-buy { margin-top: 20px; scroll-margin-top: 90px; }

/* دکمه‌های علاقه‌مندی/مقایسه (در Blade کامنت شده‌اند) */
.pp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.pp-ghost {
    flex: 1 1 110px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 14px;
    border-radius: 12px;
    font-size: 14px;
    color: var(--pp-text);
    background: #fff;
    border: 1px solid var(--pp-line);
    transition: color .2s, border-color .2s;
}
.pp-ghost:hover { color: var(--pp-primary); border-color: var(--pp-primary); }

.pp-more { margin-top: 24px; padding-top: 22px; border-top: 1px dashed var(--pp-line); }
.pp-short { font-size: 14.5px; line-height: 2.05; }
.pp-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 10px;
    margin-top: 16px;
}
.pp-more > :first-child { margin-top: 0; }
.pp-fact { padding: 11px 14px; border-radius: 12px; background: var(--pp-soft); }
.pp-fact span { display: block; font-size: 12px; color: var(--pp-mute); }
.pp-fact b { display: block; margin-top: 2px; font-size: 14px; font-weight: 600; color: var(--pp-ink); }

.pp-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.pp-tags > span { font-size: 13.5px; color: var(--pp-mute); }
.pp-tags a {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--pp-text);
    background: var(--pp-soft);
    transition: background .2s, color .2s;
}
.pp-tags a:hover { background: var(--pp-primary); color: #fff; }

/* ---------- Panels (details / reviews) ---------- */
.pp-panel { padding: 30px; }
.pp-h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 700;
    color: var(--pp-ink);
}
.pp-h2::before { content: ""; width: 5px; height: 22px; border-radius: 4px; background: var(--pp-primary); }
.pp-h2-count { font-size: 14px; font-weight: 500; color: var(--pp-mute); }

.pp-content {
    font-size: 15px;
    line-height: 2.1;
    color: var(--pp-text);
    overflow-wrap: anywhere;
}
.pp-content p { margin: 0 0 14px; }
.pp-content :where(h2, h3, h4, h5) { margin: 28px 0 10px; font-weight: 700; line-height: 1.8; color: var(--pp-ink); }
.pp-content h2 { font-size: 19px; padding-inline-start: 12px; border-inline-start: 4px solid var(--pp-primary); }
.pp-content h3 { font-size: 17px; }
.pp-content :where(h4, h5) { font-size: 15.5px; }
.pp-content :where(strong, b) { font-weight: 700; color: var(--pp-ink); }
.pp-content a { color: var(--pp-primary); text-decoration: underline; text-underline-offset: 4px; }
.pp-content ul { list-style: disc; margin: 14px 0; padding-inline-start: 24px; }
.pp-content ol { list-style: decimal; margin: 14px 0; padding-inline-start: 24px; }
.pp-content li { margin-bottom: 6px; padding-inline-start: 4px; }
.pp-content li::marker { color: var(--pp-primary); }
.pp-content blockquote {
    margin: 18px 0;
    padding: 14px 18px;
    border-inline-start: 4px solid var(--pp-primary);
    border-radius: 12px;
    background: var(--pp-soft);
    color: var(--pp-ink);
}
.pp-content blockquote > :last-child { margin-bottom: 0; }
.pp-content hr { margin: 24px 0; border: 0; border-top: 1px dashed var(--pp-line); }
.pp-content img { display: block; max-width: 100%; height: auto; margin: 14px auto; border-radius: 12px; }
.pp-content :where(iframe, video) { display: block; max-width: 100%; margin: 14px auto; border: 0; border-radius: 12px; }
.pp-content table { display: block; width: 100%; max-width: 100%; margin: 16px 0; overflow-x: auto; border-collapse: collapse; font-size: 14px; }
.pp-content :where(th, td) { padding: 10px 14px; border: 1px solid var(--pp-line); text-align: right; }
.pp-content th { font-weight: 600; color: var(--pp-ink); background: var(--pp-soft); }
.pp-content > :first-child { margin-top: 0; }
.pp-content > :last-child { margin-bottom: 0; }

.pp-spec { width: 100%; border-collapse: separate; border-spacing: 0 8px; }
.pp-spec th, .pp-spec td { padding: 12px 16px; font-size: 14px; text-align: right; background: var(--pp-soft); }
.pp-spec th { width: 42%; font-weight: 500; color: var(--pp-text); border-radius: 0 10px 10px 0; }
.pp-spec td { font-weight: 600; color: var(--pp-ink); border-radius: 10px 0 0 10px; }

/* ---------- Long content preview (description + features) ----------
   The preview has a fixed height with a fade at the bottom, so nothing can stretch the page.
   The full text opens in a modal (no layout shift at all). */
.pp-clamp-box { position: relative; }
.pp-clamp-box::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 96px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 90%);
    pointer-events: none;
}
.pp-clamp-box.is-short::after { display: none; }

/* Description preview: fixed max height (change 280px to taste). Short texts show in full, no fade, no button. */
.pp-desc .pp-clamp-box { max-height: 280px; overflow: hidden; }
.pp-desc .pp-clamp-box.is-short { max-height: none; overflow: visible; }

.pp-row--full { grid-template-columns: minmax(0, 1fr); }

/* Features: full-width card, two columns on desktop */
.pp-feat-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.pp-feat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 16px;
    border-radius: 12px;
    background: var(--pp-soft);
    font-size: 14px;
    line-height: 1.8;
}
.pp-feat-item span { flex: 0 0 auto; max-width: 45%; font-weight: 500; color: var(--pp-text); }
.pp-feat-item b { flex: 1 1 auto; min-width: 0; font-weight: 600; text-align: end; color: var(--pp-ink); overflow-wrap: anywhere; }
.pp-feat .pp-clamp-box::after { height: 60px; }
@media (max-width: 767px) { .pp-feat-list { grid-template-columns: minmax(0, 1fr); } }
.pp-modal-body .pp-feat-list { grid-template-columns: minmax(0, 1fr); }
.pp-feat-body { overflow: hidden; }
.pp-feat.is-collapsible .pp-feat-body { max-height: 130px; } /* fallback; JS sets the exact height of 4 rows */

.pp-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 8px auto 0;
    padding: 4px 4px 4px 2px;
    border: 0;
    background: none;
    font-size: 14px;
    font-weight: 700;
    color: var(--pp-primary);
    cursor: pointer;
}
.pp-more-btn[hidden] { visibility: hidden; }   /* keeps its space, so the layout never jumps */
.pp-more-btn i {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--pp-primary) 12%, #fff);
    transition: background .2s, color .2s, transform .2s;
}
.pp-more-btn svg { width: 15px; height: 15px; }
.pp-more-btn:hover i { background: var(--pp-primary); color: #fff; transform: translateX(-3px); }
.pp-desc, .pp-spec-card { text-align: start; }
.pp-more-wrap { display: flex; justify-content: center; }

/* ---------- Modal ---------- */
.pp-modal {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(14, 18, 25, .55);
    backdrop-filter: blur(3px);
}
.pp-modal.is-open { display: flex; }
.pp-modal-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 760px;
    max-height: min(86vh, 780px);
    overflow: hidden;
    background: #fff;
    border-radius: var(--pp-radius);
    box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .55);
    animation: ppModalIn .22s ease;
}
.pp-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--pp-line);
}
.pp-modal-head h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 700;
    color: var(--pp-ink);
}
.pp-modal-head h3::before { content: ""; width: 5px; height: 20px; border-radius: 4px; background: var(--pp-primary); }
.pp-modal-close {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--pp-line);
    border-radius: 50%;
    background: #fff;
    color: var(--pp-ink);
    cursor: pointer;
    transition: color .2s, border-color .2s;
}
.pp-modal-close:hover { color: var(--pp-primary); border-color: var(--pp-primary); }
.pp-modal-close svg { width: 18px; height: 18px; }
.pp-modal-body { padding: 20px 22px 26px; overflow-y: auto; overscroll-behavior: contain; }
@keyframes ppModalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 767px) {
    .pp-modal { align-items: flex-end; padding: 0; }
    .pp-modal-panel { max-width: none; max-height: 88vh; border-radius: 20px 20px 0 0; }
}

/* ---------- Reviews ---------- */
.pp-review { padding: 20px 0; border-bottom: 1px solid var(--pp-line); }
.pp-review:first-of-type { padding-top: 0; }
.pp-review:last-child { padding-bottom: 0; border-bottom: 0; }
.pp-review-top { display: flex; align-items: center; gap: 12px; }
.pp-avatar {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 17px;
    font-weight: 700;
    color: var(--pp-primary);
    background: color-mix(in srgb, var(--pp-primary) 12%, #fff);
}
.pp-review-who { flex: 1; line-height: 1.6; }
.pp-review-who b { display: block; font-size: 14.5px; color: var(--pp-ink); }
.pp-review-who small { font-size: 12.5px; color: var(--pp-mute); }
.pp-review-body { margin-top: 12px; font-size: 14.5px; line-height: 2; }

.pp-stars { display: inline-flex; gap: 2px; }
.pp-stars i { display: block; width: 17px; height: 17px; color: #d9dee5; }
.pp-stars i.is-on { color: #f5b301; }
.pp-stars svg { display: block; width: 100%; height: 100%; fill: currentColor; }

.pp-empty { padding: 34px 10px; text-align: center; }
.pp-empty-ic {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--pp-primary);
    background: color-mix(in srgb, var(--pp-primary) 10%, #fff);
}
.pp-empty-ic svg { width: 30px; height: 30px; }
.pp-empty b { display: block; font-size: 16px; color: var(--pp-ink); }
.pp-empty p { margin-top: 6px; font-size: 14px; color: var(--pp-mute); }

.pp-form-row { margin-bottom: 16px; }
.pp-form-label { display: block; margin-bottom: 8px; font-size: 13.5px; font-weight: 500; color: var(--pp-ink); }
.pp-input {
    display: block;
    width: 100%;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 14px;
    color: var(--pp-ink);
    background: var(--pp-soft);
    border: 1px solid transparent;
    border-radius: 12px;
    outline: none;
    resize: vertical;
    transition: border-color .2s, background .2s;
}
.pp-input:focus { background: #fff; border-color: var(--pp-primary); }

/* ستاره‌ها: ترتیب DOM از ۵ به ۱؛ با row-reverse در RTL از راست ۱ تا ۵ دیده می‌شود */
.pp-rate { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.pp-rate input { position: absolute; opacity: 0; pointer-events: none; }
.pp-rate label { display: block; width: 28px; height: 28px; margin: 0; color: #d9dee5; cursor: pointer; transition: color .15s, transform .15s; }
.pp-rate label:hover { transform: scale(1.12); }
.pp-rate svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.pp-rate input:checked ~ label,
.pp-rate label:hover,
.pp-rate label:hover ~ label { color: #f5b301; }
.pp-rate input:focus-visible + label { outline: 2px solid var(--pp-primary); outline-offset: 2px; border-radius: 4px; }

.pp-submit {
    width: 100%;
    padding: 13px;
    border: 0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: var(--pp-primary);
    cursor: pointer;
    transition: filter .2s;
}
.pp-submit:hover { filter: brightness(.94); }

/* ---------- Related ---------- */
.pp-rel { margin-top: 56px; }
.pp-rel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.pp-rel-head h2 { font-size: 21px; font-weight: 700; color: var(--pp-ink); }
.pp-rel-head a { font-size: 14px; color: var(--pp-primary); }

.pp-rel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.pp-rc {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--pp-line);
    border-radius: 18px;
    overflow: hidden;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}
.pp-rc:hover { transform: translateY(-4px); box-shadow: var(--pp-shadow); border-color: transparent; }
.pp-rc-img { position: relative; display: block; aspect-ratio: 1 / 1; background: #fff; }
.pp-rc-img img { width: 100%; height: 100%; object-fit: contain; padding: 14px; display: block; }
.pp-rc-off {
    position: absolute;
    top: 10px;
    inset-inline-start: 10px;
    padding: 3px 9px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: var(--pp-red);
}
.pp-rc-body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 4px 14px 14px; }
.pp-rc-name {
    min-height: 46px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.65;
    color: var(--pp-ink);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    overflow-wrap: anywhere;
}
.pp-rc-name:hover { color: var(--pp-primary); }
.pp-rc-price { margin-top: auto; line-height: 1.7; }
.pp-rc-price del { display: block; font-size: 12.5px; color: var(--pp-mute); }
.pp-rc-price b { font-size: 15px; font-weight: 700; color: var(--pp-ink); }
.pp-rc-price small { font-size: 12px; color: var(--pp-text); }

/* ---------- Lightbox ---------- */
.pp-lb {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(14, 18, 25, .92);
}
.pp-lb.is-open { display: flex; }
.pp-lb img { max-width: 92vw; max-height: 88vh; object-fit: contain; border-radius: 10px; background: #fff; }
.pp-lb-btn {
    position: absolute;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    cursor: pointer;
    transition: background .2s;
}
.pp-lb-btn:hover { background: rgba(255, 255, 255, .28); }
.pp-lb-btn svg { width: 22px; height: 22px; }
.pp-lb-close { top: 18px; left: 18px; }
.pp-lb-prev { right: 18px; top: 50%; margin-top: -23px; }
.pp-lb-next { left: 18px; top: 50%; margin-top: -23px; }

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
    .pp { --pp-gap: 18px; }
    .pp-row { grid-template-columns: minmax(0, 1fr); }
    .pp-stage { flex: none; min-height: 0; aspect-ratio: 1 / 1; }

}

@media (max-width: 767px) {
    .pp-gal { padding: 12px; }
    .pp-thumb { width: 64px; height: 64px; border-radius: 12px; }
    .pp-info, .pp-panel { padding: 20px; }
    .pp-title { font-size: 20px; }
    .pp-price-now { font-size: 25px; }
    .pp-rel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .pp-lb-prev, .pp-lb-next { display: none; }
}

/* دکمه‌ی «انتخاب سایز» در کارت محصولات مرتبط */
.pp-rc-choose {
    display: flex; align-items: center; justify-content: center;
    height: 40px; margin-top: 10px; font-size: 13px; font-weight: 800;
    color: var(--pp-primary); background: #fff;
    border: 1.5px solid var(--pp-primary); border-radius: 12px;
    transition: background .2s, color .2s;
}
.pp-rc-choose:hover { color: #fff; background: var(--pp-primary); }
.pp-buy .product-add {
    background: var(--pp-primary);
    border-color: var(--pp-primary);
    color: #fff;
}
.pp-buy .product-add:hover:not(:disabled) {
    filter: brightness(.95);
}