/* PRZ SCOPED CATALOG: هدر، body و پس‌زمینه فقط از jewelry-r5.css پیروی می‌کنند. */
/* فونت از همان jewelry-r5.css اصلی به ارث می‌رسد. */

#catalog-shell{
    color-scheme: dark;
    --background: #121212;
    --panel: #0f0f0f;
    --gold: #d4af37;
    --text: #eaecef;
    --muted: #848e9c;
    --line: rgba(212, 175, 55, .18);
}
:where(#catalog-shell) *{ box-sizing: border-box; }

:where(#catalog-shell) [hidden]{ display: none !important; }
:where(#catalog-shell) a{ color: inherit; text-decoration: none; }
:where(#catalog-shell) button,
:where(#catalog-shell) summary,
:where(#catalog-shell) a{ -webkit-tap-highlight-color: transparent; }
:where(#catalog-shell) button{ font: inherit; color: inherit; cursor: pointer; }
:where(#catalog-shell) button:disabled{ opacity: .32; cursor: default; }
:where(#catalog-shell) button,
:where(#catalog-shell) a,
:where(#catalog-shell) summary{ touch-action: manipulation; }
:where(#catalog-shell) img{ display: block; max-width: 100%; }
:where(#catalog-shell) svg{ width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; flex-shrink: 0; }
:where(#catalog-shell) h1,
:where(#catalog-shell) h2,
:where(#catalog-shell) h3,
:where(#catalog-shell) p,
:where(#catalog-shell) figure{ margin: 0; }
:where(#catalog-shell) :is(a, button, summary, [tabindex]):focus-visible{ outline: 2px solid var(--gold); outline-offset: 5px; border-radius: 5px; }
:where(#catalog-shell) #skip-to-products{ position: fixed; inset-block-start: -80px; inset-inline-start: 16px; padding: 12px 20px; background: var(--gold); color: #171810; z-index: 100; }
:where(#catalog-shell) #skip-to-products:focus{ inset-block-start: 12px; }
:where(#catalog-shell) #catalog-notice{ display: flex; justify-content: center; gap: 14px; padding: 7px 16px; background: rgba(212, 175, 55, .08); border-bottom: 1px solid rgba(212, 175, 55, .14); color: #d4af37; font-size: 11px; letter-spacing: .1px; }
:where(#catalog-shell) #catalog-notice > span{ color: #bfc1b5; }
:where(#catalog-shell) #jewelry-catalog,
:where(#catalog-shell) #catalog-footer{ width: min(1240px, calc(100% - 64px)); margin-inline: auto; }
:where(#catalog-shell) #catalog-breadcrumb{ display: flex; align-items: center; gap: 12px; padding-block: 23px 0; font-size: 12px; color: var(--muted); }
:where(#catalog-shell) #catalog-breadcrumb > span:last-child{ color: #dddcd0; }
:where(#catalog-shell) #catalog-intro{ display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; padding: 18px 0 30px; }
:where(#catalog-shell) [data-role="eyebrow"]{ display: flex; align-items: center; gap: 9px; font-size: 11px; color: var(--gold); letter-spacing: .2px; }
:where(#catalog-shell) [data-role="eyebrow"] > span{ width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
:where(#catalog-shell) #catalog-intro h1{ margin-block: 15px 10px; font-size: clamp(36px, 4.4vw, 61px); font-weight: 550; line-height: 1.45; letter-spacing: -1.6px; }
:where(#catalog-shell) #catalog-intro [data-role="lead"]{ font-size: 19px; color: #e0ded2; margin-bottom: 12px; }
:where(#catalog-shell) #catalog-intro > :is(div,section[data-container]) > p:last-of-type{ max-width: 530px; color: var(--muted); font-size: 14px; line-height: 2; }
:where(#catalog-shell) #catalog-intro > :is(div,section[data-container]) > a{ display: inline-flex; align-items: center; gap: 20px; margin-top: 23px; padding: 10px 0; border-bottom: 1px solid #827354; color: var(--gold); font-size: 13px; }
:where(#catalog-shell) #catalog-intro > figure{ position: relative; min-width: 0; background: radial-gradient(ellipse at 50% 45%, rgba(212, 175, 55, .18) 0, rgba(10, 10, 10, .82) 55%, rgba(18, 18, 18, .15) 76%); }
:where(#catalog-shell) #catalog-intro > figure > img{ width: 100%; height: 288px; object-fit: contain; }
:where(#catalog-shell) #catalog-intro figcaption{ display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 30px; color: #a9ac9e; }
:where(#catalog-shell) #catalog-intro figcaption span{ font: 9px/1.5 Georgia, serif; letter-spacing: 2px; direction: ltr; }
:where(#catalog-shell) #catalog-intro figcaption strong{ font-size: 11px; font-weight: 400; }

/* دسته‌ها لینک واقعی هستند؛ حرکت بین آن‌ها به اجرای JS نیاز ندارد. */
:where(#catalog-shell) #catalog-categories{ display: flex; gap: 12px; padding: 16px 0 26px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #494b3f transparent; }
:where(#catalog-shell) #catalog-categories > a{ display: flex; align-items: center; justify-content: center; gap: 8px; flex: 1 0 135px; min-height: 62px; padding: 8px 12px; background: rgba(255, 255, 255, .02); border: 1px solid var(--line); border-radius: 12px; font-size: 13px; white-space: nowrap; }
:where(#catalog-shell) #catalog-categories img{ width: 44px; height: 36px; object-fit: contain; }
:where(#catalog-shell) #catalog-categories a[aria-current="page"]{ background: rgba(212, 175, 55, .1); border-color: #d4af37; color: #f0cf67; }
:where(#catalog-shell) [data-role="section-heading"]{ display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
:where(#catalog-shell) [data-role="section-heading"] h2{ margin-top: 5px; font-size: clamp(20px, 2.4vw, 29px); font-weight: 550; line-height: 1.6; }
:where(#catalog-shell) [data-role="section-heading"] h2 span{ color: var(--gold); }
:where(#catalog-shell) [data-role="section-heading"] > :is(div,section[data-container]) > p:last-child:not([data-role]){ color: var(--muted); font-size: 12px; margin-top: 5px; }
:where(#catalog-shell) #catalog-offers{ margin-top: 10px; padding: 28px 24px 16px; background: rgba(10, 10, 10, .82); border: 1px solid rgba(212, 175, 55, .18); border-radius: 20px; backdrop-filter: blur(8px); }
:where(#catalog-shell) #offer-controls{ display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
:where(#catalog-shell) #offer-controls > button{ display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 1px solid rgba(212, 175, 55, .24); border-radius: 50%; background: rgba(212, 175, 55, .07); color: #dcc795; }
:where(#catalog-shell) #offer-controls > button[data-action="autoplay"]{ width: auto; padding: 0 14px; border-radius: 24px; font-size: 11px; }
:where(#catalog-shell) #offer-controls > button[aria-pressed="true"]{ background: #38352a; }

/* در RTL مقدار scrollLeft منفی می‌شود؛ ترتیب HTML همان ترتیب خواندن است. */
:where(#catalog-shell) #offer-track{ display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 3.35); gap: 18px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: #4e503e transparent; padding: 2px 2px 14px; align-items: start; cursor: grab; touch-action: pan-x pan-y; }
:where(#catalog-shell) #offer-track > article{ scroll-snap-align: start; }
:where(#catalog-shell) #offer-track[data-dragging="true"]{ cursor: grabbing; scroll-snap-type: none; user-select: none; }
:where(#catalog-shell) #offer-track::-webkit-scrollbar{ height: 4px; }
:where(#catalog-shell) #offer-track::-webkit-scrollbar-thumb{ background: #4e503e; border-radius: 10px; }
:where(#catalog-shell) #offer-hint{ text-align: center; margin-top: 10px; color: #a6aa99; font-size: 11px; }
/* اعلان فقط برای جابه‌جایی دستی؛ حرکت خودکار صفحه‌خوان را شلوغ نمی‌کند. */
:where(#catalog-shell) #offer-status{ position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:where(#catalog-shell) [data-role="product"]{ min-width: 0; background: rgba(10, 10, 10, .86); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; backdrop-filter: blur(8px); }
:where(#catalog-shell) [data-role="product"] > figure{ position: relative; background: radial-gradient(ellipse at 50% 42%, rgba(212, 175, 55, .18), rgba(10, 10, 10, .82) 72%); overflow: hidden; }
:where(#catalog-shell) [data-role="product"] > figure > img{ width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: contain; user-select: none; -webkit-user-drag: none; }
:where(#catalog-shell) [data-role="offer-badge"],
:where(#catalog-shell) [data-role="new-badge"]{ position: absolute; top: 13px; right: 13px; padding: 4px 10px; border: 1px solid #7e6e49; background: #252419e8; border-radius: 6px; color: #ead29e; font-size: 10px; }
:where(#catalog-shell) [data-role="new-badge"]{ color: #c5cdb7; border-color: #626c56; background: #21281de8; }
:where(#catalog-shell) [data-role="product-content"]{ padding: 18px 18px 0; }
:where(#catalog-shell) [data-role="product-meta"]{ display: flex; justify-content: space-between; gap: 7px; color: var(--muted); font-size: 10px; }
:where(#catalog-shell) [data-role="product"] h3{ margin: 10px 0 12px; font-size: 16px; font-weight: 500; line-height: 1.7; }
:where(#catalog-shell) [data-role="product-price"]{ display: flex; flex-direction: column; justify-content: flex-end; min-height: 55px; padding-bottom: 17px; gap: 2px; font-variant-numeric: tabular-nums; }
:where(#catalog-shell) [data-role="product-price"] del{ color: #9fa194; font-size: 11px; text-decoration-color: #858777; }
:where(#catalog-shell) [data-role="product-price"] strong{ color: #e7d3a4; font-size: 19px; font-weight: 500; }
:where(#catalog-shell) [data-role="product-price"] small{ color: #bdbdad; font-size: 10px; font-weight: 400; }
:where(#catalog-shell) [data-role="product-details"]{ border-top: 1px solid var(--line); }
:where(#catalog-shell) [data-role="product-details"] summary{ display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 49px; list-style: none; cursor: pointer; color: #d0d2c5; font-size: 11px; }
:where(#catalog-shell) [data-role="product-details"] summary::-webkit-details-marker{ display: none; }
:where(#catalog-shell) [data-role="product-details"] summary svg{ width: 15px; height: 15px; }
:where(#catalog-shell) [data-role="product-details"][open] summary svg{ transform: rotate(-90deg); }
:where(#catalog-shell) [data-role="product-details"] dl{ margin: 0; }
:where(#catalog-shell) [data-role="product-details"] dl > :is(div,section[data-container]){ display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 11px; }
:where(#catalog-shell) [data-role="product-details"] dt{ color: var(--muted); }
:where(#catalog-shell) [data-role="product-details"] dd{ margin: 0; }
:where(#catalog-shell) [data-role="product-details"] > p{ margin: 12px 0 18px; font-size: 11px; color: var(--muted); }
:where(#catalog-shell) #catalog-products{ margin-top: 52px; scroll-margin-top: 130px; }
:where(#catalog-shell) [data-role="count"]{ padding: 6px 14px; border: 1px solid var(--line); border-radius: 25px; color: #b8bcae; font-size: 12px; }
:where(#catalog-shell) #product-grid{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
:where(#catalog-shell) #product-grid [data-role="product-content"]{ padding: 20px 22px 0; }
:where(#catalog-shell) #product-grid [data-role="product"] h3{ font-size: 17px; }
:where(#catalog-shell) #product-grid [data-role="product-price"] strong{ font-size: 21px; }
:where(#catalog-shell) #catalog-assistance{ display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 48px; padding: 30px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
:where(#catalog-shell) #catalog-assistance h2{ font-size: 20px; font-weight: 500; margin-bottom: 6px; }
:where(#catalog-shell) #catalog-assistance p{ color: var(--muted); font-size: 12px; }
:where(#catalog-shell) #catalog-assistance > a{ display: flex; align-items: center; justify-content: center; gap: 18px; flex-shrink: 0; min-height: 46px; padding: 8px 21px; color: #1c2116; background: var(--gold); border-radius: 9px; font-size: 12px; }
:where(#catalog-shell) #catalog-footer{ display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-block: 28px 40px; font-size: 12px; }
:where(#catalog-shell) #catalog-footer p span{ display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
:where(#catalog-shell) #catalog-footer > a{ display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; }
@media (hover: hover) {
    :where(#catalog-shell) #catalog-footer > a:hover{ color: var(--gold); }
    :where(#catalog-shell) #catalog-categories > a:hover{ border-color: #a28b60; }
    :where(#catalog-shell) #offer-controls > button:not(:disabled):hover{ border-color: var(--gold); background: #38392b; }
    :where(#catalog-shell) [data-role="product"]:hover{ border-color: #777052; }
    :where(#catalog-shell) [data-role="product-details"] summary:hover{ color: var(--gold); }
}
@media (prefers-reduced-motion: no-preference) {
    :where(#catalog-shell) [data-role="product"],
:where(#catalog-shell) #catalog-categories > a,
:where(#catalog-shell) #offer-controls > button{ transition: border-color .2s ease, background-color .2s ease; }
}
/* تبلت: ستون‌های کوچک‌تر و بخش بالایی کم‌ارتفاع‌تر می‌شود. */
@media (max-width: 1000px) {
    :where(#catalog-shell) #catalog-intro{ gap: 24px; grid-template-columns: 1.2fr 1fr; }
    :where(#catalog-shell) #catalog-intro > figure > img{ height: 246px; }
    :where(#catalog-shell) #catalog-intro figcaption{ padding: 0 10px; }
    :where(#catalog-shell) #catalog-intro figcaption span{ display: none; }
    :where(#catalog-shell) #catalog-categories > a{ flex-basis: 128px; }
    :where(#catalog-shell) #offer-track{ grid-auto-columns: calc((100% - 24px) / 2.35); gap: 16px; }
    :where(#catalog-shell) #product-grid{ gap: 16px; }
    :where(#catalog-shell) #product-grid [data-role="product-content"]{ padding: 16px 14px 0; }
    :where(#catalog-shell) #product-grid [data-role="product"] h3{ font-size: 15px; }
    :where(#catalog-shell) #product-grid [data-role="product-price"] strong{ font-size: 17px; }
}
/* موبایل و تبلت باریک: کارت‌های عادی دو ستون، تخفیف‌ها با ادامه قابل مشاهده. */
@media (max-width: 700px) {
    :where(#catalog-shell) #jewelry-catalog,
:where(#catalog-shell) #catalog-footer{ width: calc(100% - 32px); }
    :where(#catalog-shell) #catalog-breadcrumb{ padding-top: 18px; font-size: 10px; }
    :where(#catalog-shell) #catalog-intro{ gap: 16px; padding-block: 26px 22px; grid-template-columns: 1fr; }
    :where(#catalog-shell) #catalog-intro h1{ font-size: 39px; letter-spacing: -1px; }
    :where(#catalog-shell) #catalog-intro [data-role="lead"]{ font-size: 16px; }
    :where(#catalog-shell) #catalog-intro > :is(div,section[data-container]) > p:last-of-type{ font-size: 12px; }
    :where(#catalog-shell) #catalog-intro > figure{ display: none; }
    :where(#catalog-shell) #catalog-intro > :is(div,section[data-container]) > a{ margin-top: 12px; }
    :where(#catalog-shell) #catalog-categories{ gap: 8px; padding-block: 7px 20px; }
    :where(#catalog-shell) #catalog-categories > a{ flex: 0 0 104px; flex-direction: column; gap: 3px; min-height: 78px; font-size: 11px; padding: 6px 8px; }
    :where(#catalog-shell) #catalog-categories img{ height: 32px; }
    :where(#catalog-shell) #catalog-offers{ padding: 20px 14px 13px; border-radius: 16px; }
    :where(#catalog-shell) #catalog-offers [data-role="section-heading"]{ align-items: flex-start; flex-direction: column; gap: 16px; }
    :where(#catalog-shell) [data-role="section-heading"]{ margin-bottom: 18px; }
    :where(#catalog-shell) [data-role="section-heading"] h2{ font-size: 21px; }
    :where(#catalog-shell) #offer-controls{ width: 100%; justify-content: flex-end; }
    :where(#catalog-shell) #offer-controls > button[data-action="autoplay"]{ margin-inline-end: auto; }
    :where(#catalog-shell) #offer-track{ grid-auto-columns: calc((100% - 12px) / 1.23); gap: 12px; }
    :where(#catalog-shell) #offer-hint{ font-size: 10px; }
    :where(#catalog-shell) [data-role="product-content"]{ padding: 15px 15px 0; }
    :where(#catalog-shell) #product-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    :where(#catalog-shell) #product-grid [data-role="product-content"]{ padding: 12px 11px 0; }
    :where(#catalog-shell) #product-grid [data-role="product-meta"]{ flex-wrap: wrap; gap: 2px 8px; font-size: 9px; }
    :where(#catalog-shell) #product-grid [data-role="product"] h3{ font-size: 13px; margin-block: 8px; min-height: 44px; }
    :where(#catalog-shell) #product-grid [data-role="product-price"]{ min-height: 45px; padding-bottom: 12px; }
    :where(#catalog-shell) #product-grid [data-role="product-price"] strong{ font-size: 15px; }
    :where(#catalog-shell) #product-grid [data-role="product-price"] small{ font-size: 9px; }
    :where(#catalog-shell) #product-grid [data-role="new-badge"]{ top: 8px; right: 8px; padding: 2px 7px; font-size: 9px; }
    :where(#catalog-shell) #catalog-products{ margin-top: 34px; }
    :where(#catalog-shell) #catalog-assistance{ align-items: flex-start; flex-direction: column; margin-top: 32px; padding-block: 24px; gap: 18px; }
    :where(#catalog-shell) #catalog-assistance h2{ font-size: 18px; }
    :where(#catalog-shell) #catalog-footer{ align-items: flex-start; padding-block: 24px; }
}
@media (max-width: 360px) {
    :where(#catalog-shell) #catalog-notice{ gap: 8px; font-size: 9px; }
    :where(#catalog-shell) #catalog-intro h1{ font-size: 34px; }
    :where(#catalog-shell) #product-grid{ gap: 8px; }
    :where(#catalog-shell) #product-grid [data-role="product-content"]{ padding-inline: 9px; }
    :where(#catalog-shell) #product-grid [data-role="product-price"] strong{ font-size: 13px; }
    :where(#catalog-shell) #catalog-footer{ flex-direction: column; }
}

#catalog-shell { font-size: 15px; line-height: 1.8; }
