/* Shared product language: quiet surfaces, clear price hierarchy, six photo-led forms. */
.apc { --apc-surface:#fff; --apc-ink:#20282b; --apc-muted:#757f83; --apc-soft:#f3f5f4; --apc-line:#e9eeec; --apc-page:#f6f7f8; --apc-radius:28px; color:var(--apc-ink); margin:32px 0; font-family:inherit; }
.apc *, .apc *::before, .apc *::after { box-sizing:border-box; }
.apc a { color:inherit; text-decoration:none; }
.apc button, .apc a { -webkit-tap-highlight-color:transparent; }
.apc__heading { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:0 6px; }
.apc__heading h2 { font-size:clamp(17px,2vw,22px); font-weight:700; line-height:1.7; font-family:inherit; margin:0; }
.apc__tools { display:flex; align-items:center; gap:7px; flex-shrink:0; }
.apc__all { font-size:12px; margin-left:12px; white-space:nowrap; }
.apc__all span { display:inline-block; margin-right:7px; }
.apc .apc__nav { display:grid; place-items:center; width:38px; height:38px; border:1px solid var(--apc-line); border-radius:50%; background:var(--apc-surface); color:var(--apc-ink); padding:0; cursor:pointer; transition:background .2s,transform .2s; }
.apc__nav svg { width:17px; height:17px; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.apc .apc__nav:disabled { opacity:.28; cursor:default; }
.apc .apc__nav[hidden] { display:none; }
.apc :is(a,button,[tabindex]):focus-visible { outline:2px solid var(--color-primary,#28796e); outline-offset:4px; }
.apc__track { display:flex; align-items:stretch; gap:20px; overflow-x:auto; overscroll-behavior-x:contain; scroll-snap-type:x mandatory; scrollbar-width:none; padding:22px 6px 30px; scroll-padding-inline:6px; }
.apc__track::-webkit-scrollbar { display:none; }
.apc__card { position:relative; flex:0 0 clamp(248px,22vw,292px); min-width:0; display:flex; flex-direction:column; background:var(--apc-surface); border:1px solid var(--apc-line); border-radius:var(--apc-radius); padding:8px; scroll-snap-align:start; box-shadow:0 8px 20px -14px #182b3029; isolation:isolate; }
.apc__photo { position:relative; display:block; width:100%; aspect-ratio:1; flex-shrink:0; border-radius:21px; overflow:hidden; background:var(--apc-soft); }
.apc__photo img { display:block; width:100%; height:100%; object-fit:cover; transition:transform .5s cubic-bezier(.2,.7,.2,1); }
.apc__badges { position:absolute; top:19px; left:19px; right:19px; z-index:2; display:flex; justify-content:flex-end; gap:5px; pointer-events:none; }
.apc__sale, .apc__unavailable { padding:5px 9px; border-radius:99px; font-size:10px; line-height:1.5; font-weight:600; background:#edf7ef; color:#24633c; box-shadow:0 2px 8px #14251e08; }
.apc__unavailable { background:#edf0f0; color:#515f64; }
.apc__body { display:flex; flex-direction:column; flex:1; padding:15px 10px 10px; min-width:0; }
.apc__copy { min-width:0; }
.apc__title { margin:0; font-size:15px; font-weight:700; line-height:1.75; }
.apc__title a { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; }
.apc__description { color:var(--apc-muted); font-size:11px; line-height:1.85; margin:7px 0 0; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; overflow-wrap:anywhere; }
.apc__rating { position:absolute; top:19px; right:19px; z-index:2; display:flex; align-items:center; gap:4px; font-size:10px; line-height:1.5; padding:5px 8px; border-radius:99px; background:#ffffffeb; color:#34413d; direction:ltr; }
.apc__rating > span { color:#ae8031; font-size:11px; }
.apc__footer { margin-top:auto; padding-top:17px; display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:9px; }
.apc__price { display:flex; flex-direction:column; gap:2px; min-width:0; max-width:100%; }
.apc__price del { color:var(--apc-muted); font-size:10px; line-height:1.6; text-decoration:line-through; text-decoration-thickness:1px; }
.apc__amount { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px; line-height:1.65; font-size:14px; font-weight:700; }
.apc__amount b { font-size:15px; font-weight:750; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.apc__currency { font-size:9px; font-weight:400; color:var(--apc-muted); }
.apc__stock-text { font-size:11px; color:var(--apc-muted); }
.apc__buy { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:42px; padding:9px 12px; border:1px solid transparent; border-radius:99px; background:var(--apc-soft); font-size:10px; line-height:1.5; font-weight:600; white-space:nowrap; transition:background .2s,box-shadow .2s; }
.apc__buy svg { width:20px; height:20px; stroke:currentColor; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; flex-shrink:0; }
.apc--2 .apc__buy svg, .apc--3 .apc__buy svg, .apc--4 .apc__buy svg, .apc--6 .apc__buy svg { display:none; }
.apc__empty { color:var(--apc-muted); text-align:center; padding:30px; border:1px dashed var(--apc-line); border-radius:22px; }
.apc__track:empty { display:none; }
/* 11: a real transparent cutout, with the action nested in the curved corner. */
.apc--1 .apc__card { background:none; border:0; box-shadow:none; }
.apc--1 .apc__card::before { content:""; position:absolute; z-index:-1; inset:0; background:var(--apc-surface); border:1px solid var(--apc-line); border-radius:28px 28px 28px 65px; box-shadow:0 8px 20px -14px #182b3029; }
@supports(mask:radial-gradient(circle,#000,transparent)) {
 .apc--1 .apc__card::before { mask:radial-gradient(circle at 23px calc(100% - 25px),transparent 33px,#000 34px); }
}
.apc--1 .apc__body { padding-bottom:13px; }
.apc--1 .apc__footer { padding-left:53px; min-height:60px; }
.apc--1 .apc__buy { position:absolute; bottom:0; left:0; width:48px; height:53px; border-radius:18px; background:var(--apc-surface); border:1px solid var(--apc-line); padding:0; box-shadow:0 5px 10px -6px #172e3030; }
.apc--1 .apc__buy span, .apc--5 .apc__buy span { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
/* 12: a portrait arch; keep the shoulder of the card open and the text compact. */
.apc--2 .apc__card { padding-top:0; border-radius:32px; }
.apc--2 .apc__photo { width:84%; align-self:center; aspect-ratio:1/1.1; border-radius:0 0 150px 150px; }
.apc--2 .apc__badges { top:14px; left:calc(8% + 13px); }
.apc--2 .apc__rating { top:14px; right:calc(8% + 13px); }
.apc--2 .apc__body { padding:17px 15px 14px; }
/* 13: floating frosted panel, with a restrained tint and a fine glass edge. */
.apc--3 .apc__card { padding:0; min-height:420px; overflow:hidden; border:0; background:#83928b; }
.apc--3 .apc__photo, .apc--6 .apc__photo { position:absolute; inset:0; width:100%; height:100%; border-radius:inherit; aspect-ratio:auto; }
.apc--3 .apc__photo::after { content:""; position:absolute; inset:35% 0 0; background:linear-gradient(transparent,#172b2b55); pointer-events:none; }
.apc--3 .apc__body { flex:0 0 auto; margin:auto 9px 9px; padding:16px; border-radius:21px; border:1px solid #ffffff3b; color:#fff; background:#273b36a8; -webkit-backdrop-filter:blur(14px) saturate(.9); backdrop-filter:blur(14px) saturate(.9); box-shadow:0 4px 18px #10242012; z-index:1; }
.apc--3 .apc__card::before { content:""; display:block; flex:1 0 218px; pointer-events:none; }
.apc--3 .apc__description, .apc--3 .apc__price del, .apc--3 .apc__stock-text, .apc--3 .apc__currency { color:#edf2ef; }
.apc--3 .apc__buy { color:#28332f; background:#fffffff2; }
.apc--3 .apc__footer { padding-top:14px; }
.apc--3 .apc__rating { position:static; align-self:flex-start; margin-top:8px; padding:0; background:none; color:#edf2ef; }
.apc--3 .apc__rating > span { color:#e5b26a; }
/* 14: the plain white reference, balanced photo and quiet pill action. */
.apc--4 .apc__card { border-radius:30px; }
.apc--4 .apc__body { padding:16px 12px 12px; }
.apc--4 .apc__copy { padding-bottom:15px; }
.apc--4 .apc__footer { border-top:1px solid var(--apc-line); margin-top:auto; padding-top:12px; }
/* 15: text flows above the photo, so long Persian titles never collide. */
.apc--5 .apc__card { display:grid; grid-template-columns:minmax(0,1fr); align-content:start; align-self:flex-start; padding:8px; }
.apc--5 .apc__photo { grid-row:2; grid-column:1; aspect-ratio:1.2/1; }
.apc--5 .apc__photo::after { content:""; position:absolute; inset:25% 0 0; background:linear-gradient(transparent,#13201dcc); pointer-events:none; }
.apc--5 .apc__body { display:contents; }
.apc--5 .apc__copy { grid-row:1; grid-column:1; padding:12px 12px 17px; }
.apc--5 .apc__badges { position:relative; grid-row:2; grid-column:1; align-self:start; top:auto; right:auto; left:auto; margin:12px; }
.apc--5 .apc__rating { display:none; }
.apc--5 .apc__footer { grid-row:2; grid-column:1; position:relative; align-self:end; z-index:1; color:#fff; margin:0; padding:16px; flex-wrap:nowrap; gap:12px; flex-direction:row-reverse; }
.apc--5 .apc__price { flex:1; }
.apc--5 .apc__price del, .apc--5 .apc__stock-text, .apc--5 .apc__currency { color:#edf2ef; }
.apc--5 .apc__buy { flex:0 0 44px; color:#fff; background:#18221e99; border:1px solid #ffffff52; -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); border-radius:50%; width:44px; height:44px; padding:0; }
/* 16: the photographic reference, price capsule above and broad action below. */
.apc--6 .apc__card { min-height:452px; border:0; padding:0; overflow:hidden; border-radius:30px; background:#718383; }
.apc--6 .apc__card::before { content:""; display:block; flex:1 0 258px; pointer-events:none; }
.apc--6 .apc__card::after { content:""; position:absolute; z-index:0; inset:30% 0 0; background:linear-gradient(transparent,#12282acc 62%,#102123fa); pointer-events:none; }
.apc--6 .apc__body { flex:0 0 auto; padding:16px 20px 20px; color:#fff; z-index:1; }
.apc--6 .apc__description { color:#e3ebea; }
.apc--6 .apc__price { position:absolute; top:16px; right:16px; max-width:calc(100% - 112px); border-radius:18px; padding:9px 13px; background:#ffffffed; color:#20332e; -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); }
.apc--6 .apc__price del, .apc--6 .apc__stock-text { color:#61706a; }
.apc--6 .apc__currency { color:#586c63; }
.apc--6 .apc__badges { top:20px; left:16px; right:auto; max-width:72px; }
.apc--6 .apc__rating { position:static; padding:0; background:none; color:#e9f0ec; align-self:flex-start; margin-top:9px; font-size:11px; }
.apc--6 .apc__rating > span { color:#e5b26a; }
.apc--6 .apc__buy { background:#fff; color:#25372e; width:100%; min-height:44px; font-size:11px; }
.apc--6 .apc__footer { width:100%; padding-top:14px; }
@media(hover:hover) {
 .apc__card:hover .apc__photo img { transform:scale(1.035); }
 .apc__buy:hover { box-shadow:inset 0 0 0 1px #71847d4d; }
 .apc__all:hover { text-decoration:underline; text-underline-offset:5px; }
 .apc .apc__nav:not(:disabled):hover { background:var(--apc-soft); transform:translateY(-1px); }
}
.dark .apc { --apc-surface:#1c232b; --apc-ink:#f0f2f4; --apc-muted:#afb8c2; --apc-soft:#29323b; --apc-line:#35404a; --apc-page:#111827; }
@media(max-width:767px) {
 .apc { margin:24px 0; }
 .apc__heading { gap:8px; align-items:center; }
 .apc__heading h2 { font-size:17px; }
 .apc__tools { gap:4px; flex-wrap:nowrap; justify-content:flex-end; }
 .apc__all { margin-left:3px; font-size:11px; }
 .apc .apc__nav { width:34px; height:34px; }
 .apc__track { gap:16px; padding-top:18px; }
 .apc__card { flex-basis:clamp(232px,74vw,286px); }
 .apc__title { font-size:14px; }
}
@media(prefers-reduced-motion:reduce) { .apc *, .apc *::before, .apc *::after { transition:none !important; scroll-behavior:auto !important; } }
/* Reuse the exact same cards within the parent's archive grid. */
[data-apc-archive-grid] { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,232px),1fr)) !important; gap:22px !important; align-items:stretch; }
[data-apc-archive-grid].grid-cols-1 { grid-template-columns:minmax(0,1fr) !important; }
.apc.apc-archive-item { margin:0; min-width:0; display:flex; --apc-page:#fff; }
.apc-archive-item .apc__card { width:100%; flex:1 1 auto; min-width:0; }
.apc-archive-item.apc--5 { align-self:start; }
.apc-archive-item .apc__buy:not([href]), .apc-archive-item .apc__buy[href=""] { pointer-events:none; }
[data-apc-archive-grid].grid-cols-1 > .apc-archive-item { width:100%; max-width:380px; justify-self:center; }
.dark .apc.apc-archive-item { --apc-page:#0b1018; }
@media(max-width:479px) {
 [data-apc-archive-grid] { grid-template-columns:minmax(0,1fr) !important; }
 .apc.apc-archive-item { width:100%; max-width:340px; justify-self:center; }
}

.apc__title{display:flex;align-items:center;gap:10px;min-width:0}.apc__section-icon{display:grid;place-items:center;width:28px;height:28px;flex:none;color:inherit}.apc__section-icon[hidden]{display:none}.apc__section-icon svg{width:100%;height:100%;max-width:28px;max-height:28px}
