/* فاز ۳: ظاهر جدید فهرست و جزئیات محصول و پنل مشتری (بعد از store.css و account.css بارگذاری می‌شود) */
.btn-ghost { background: var(--white); color: var(--navy); border-color: var(--border); }
.btn-ghost:hover, .btn-ghost.is-on { border-color: var(--red); color: var(--red); }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.card-head h2 { margin: 0; }
.mini { display: block; width: 52px; height: 40px; object-fit: contain; background: var(--soft); border-radius: 8px; }

/* کارت محصول */
.product-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 14px; background: var(--white); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow); transition: box-shadow .15s, transform .15s; }
.product-card:hover { box-shadow: 0 8px 24px rgba(23, 38, 60, .12); }
.product-card .badge { inset-inline-start: 10px; inset-block-start: 10px; }
.badge-sale { background: var(--red); }
.wish { position: absolute; inset-block-start: 10px; inset-inline-end: 10px; z-index: 2; margin: 0; }
.wish-btn { display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: #7b8798; cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.wish-btn:hover, .wish-btn.is-on { color: var(--red); }
.wish-btn.is-on .icon { fill: var(--red); }
.product-thumb { aspect-ratio: 4 / 3; background: #fafbfd; margin: 0; }
.product-thumb img { width: 100%; height: 100%; object-fit: contain; }
.product-body { text-align: center; flex: 1; }
.product-name a:hover { color: var(--red); }
.old-price { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.product-actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.product-actions .btn { padding: 8px; font-size: 13px; }

/* فهرست محصولات */
.shop { display: grid; grid-template-columns: 270px 1fr; gap: 24px; align-items: start; }
.filter-box { background: var(--white); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; position: sticky; top: 88px; }
.filter-title { display: flex; align-items: center; gap: 8px; padding: 14px 16px; margin: 0; background: var(--soft); font-size: 15px; font-weight: 800; }
.filter-box form { padding-bottom: 16px; }
.filter-group { border: 0; border-bottom: 1px solid var(--border); margin: 0; padding: 14px 16px; }
.filter-group legend { padding: 0; font-weight: 800; font-size: 14px; margin-bottom: 8px; float: none; }
.filter-group:first-of-type { padding-top: 14px; }
.filter-group input[type=search], .range-row input { width: 100%; font: inherit; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; }
.check { display: flex; align-items: center; gap: 8px; padding-block: 3px; font-size: 13px; cursor: pointer; }
.check .count { color: var(--muted); margin-inline-start: auto; font-size: 12px; }
.range-row { display: flex; gap: 8px; }
.filter-box .btn-block { width: calc(100% - 32px); margin: 14px 16px 0; }
.clear-link { display: block; text-align: center; margin-top: 10px; font-size: 13px; color: var(--muted); }
.clear-link:hover { color: var(--red); }
.shop-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.shop-title { font-size: 20px; font-weight: 800; margin-inline-end: auto; }
.sort { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.sort select { font: inherit; padding: 7px 10px; border: 1px solid var(--border); border-radius: 10px; background: var(--white); color: var(--navy); }
.view-toggle { display: flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.view-toggle button { display: grid; place-items: center; width: 38px; height: 36px; border: 0; background: var(--white); color: var(--muted); cursor: pointer; }
.view-toggle button.is-on { background: var(--red); color: var(--white); }
.filter-toggle { display: none; }
.product-grid-3 { grid-template-columns: repeat(3, 1fr); }
.product-grid.is-list { grid-template-columns: 1fr; }
.product-grid.is-list .product-card { flex-direction: row; align-items: center; gap: 18px; }
.product-grid.is-list .product-thumb { width: 220px; flex: none; }
.product-grid.is-list .product-body { text-align: start; }
.product-grid.is-list .product-actions { width: 210px; flex: none; margin: 0; }
.shop-count { margin-top: 18px; color: var(--muted); font-size: 13px; }

/* جزئیات محصول */
.pd { display: grid; grid-template-columns: 1.1fr 1fr; gap: 36px; align-items: start; margin-bottom: 36px; }
.pd-title { font-size: clamp(24px, 3vw, 34px); font-weight: 800; line-height: 1.4; margin-block: 4px 10px; }
.pd-lead { margin-block: 12px; color: #475467; font-size: 16px; }
.pd-price { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-block: 16px; }
.pd-price strong { color: var(--red); font-size: 30px; font-weight: 800; }
.pd-price strong small { font-size: 15px; font-weight: 500; }
.pd-price s { color: var(--muted); }
.off { background: var(--red); color: var(--white); padding: 2px 12px; border-radius: 8px; font-weight: 700; font-size: 14px; }
.spec-tiles { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--soft); border-radius: 14px; margin-block: 18px; }
.spec-tiles li { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 6px; text-align: center; font-size: 12px; color: var(--muted); }
.spec-tiles li + li { border-inline-start: 1px solid var(--border); }
.spec-tiles .icon { color: var(--navy); }
.spec-tiles strong { color: var(--navy); font-size: 13px; }
.buy-row { display: flex; gap: 12px; align-items: stretch; margin-top: 14px; flex-wrap: wrap; }
.buy-row > form { display: contents; }
.buy-row .btn-lg { flex: 1; min-width: 200px; }
.buy-secondary .btn, .buy-secondary form { flex: 1; }
.buy-secondary .btn { width: 100%; }
.qty { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.qty button { width: 42px; border: 0; background: var(--white); font-size: 20px; cursor: pointer; color: var(--navy); }
.qty button:hover { background: var(--soft); }
.qty input { width: 56px; text-align: center; border: 0; border-inline: 1px solid var(--border); font: inherit; font-weight: 700; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.gallery-main { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; background: #fafbfd; border: 1px solid var(--border); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-main .badge { z-index: 2; }
.g-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(23, 38, 60, .85); color: var(--white); cursor: pointer; display: grid; place-items: center; }
.g-prev { inset-inline-start: 12px; } .g-next { inset-inline-end: 12px; }
.g-prev .icon { transform: scaleX(-1); }
.gallery-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 12px; }
.thumb { padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: #fafbfd; cursor: pointer; aspect-ratio: 4 / 3; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.is-on { border-color: var(--red); }
.tabs { margin-bottom: 36px; }
.tab-list { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tab-list button { border: 0; background: none; font: inherit; font-weight: 700; padding: 12px 22px; cursor: pointer; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; }
.tab-list button.is-on { color: var(--navy); border-bottom-color: var(--red); }
.tab-panel { padding-block: 22px; line-height: 2; }
.tab-panel[hidden] { display: none; }
.tab-panel h3 { margin-block: 14px 4px; }
.related .section-head { margin-bottom: 16px; }

/* پنل مشتری */
.account-layout { grid-template-columns: 270px 1fr; gap: 24px; }
.acc-side { background: var(--navy); color: #cfd8e6; border-radius: 16px; padding: 22px 14px; position: sticky; top: 88px; }
.acc-user { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-bottom: 18px; text-align: center; }
.acc-user strong { color: var(--white); font-size: 16px; } .acc-user small { color: #93a4bd; }
.avatar { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%; margin-bottom: 8px; background: linear-gradient(135deg, var(--red), #a4121f); color: var(--white); font-size: 34px; font-weight: 800; border: 3px solid rgba(255, 255, 255, .85); }
.acc-nav { display: flex; flex-direction: column; gap: 4px; }
.acc-nav a, .acc-nav button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 11px 14px; border: 0; border-radius: 10px; background: none; color: #cfd8e6; font: inherit; cursor: pointer; text-align: start; }
.acc-nav a:hover, .acc-nav button:hover { background: #24385a; color: var(--white); }
.acc-nav a.is-active { background: var(--red); color: var(--white); }
.nav-count { margin-inline-start: auto; background: var(--red); color: var(--white); border-radius: 999px; font-size: 11px; min-width: 22px; text-align: center; }
.acc-hero { display: flex; align-items: center; min-height: 190px; padding: 28px 34px; border-radius: 16px; color: var(--white); background: linear-gradient(110deg, #0f1b2d 0%, #24385a 60%, #8c1420 140%); }
.acc-hero h1 { font-size: 28px; font-weight: 800; margin-bottom: 6px; }
.acc-hero p { color: #d5dce8; margin-bottom: 18px; }
.acc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-block: 18px; }
.acc-stat { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; background: var(--white); border: 1px solid var(--border); border-radius: 14px; }
.acc-stat:hover { border-color: var(--red); }
.acc-stat .icon { color: var(--red); } .acc-stat span { color: var(--muted); font-size: 13px; }
.acc-stat strong { font-size: 24px; color: var(--navy); } .acc-stat small { color: var(--red); font-size: 12px; }
.acc-cols { display: grid; grid-template-columns: 1.7fr 1fr; gap: 16px; align-items: start; }
.acc-cols .card, .account-body .card { margin-top: 0; margin-bottom: 18px; }
.info-list { display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; margin: 8px 0 0; }
.info-list dt { color: var(--muted); font-size: 13px; } .info-list dd { margin: 0; font-weight: 600; }
.st { display: inline-block; padding: 2px 12px; border-radius: 8px; font-size: 12px; font-weight: 700; background: var(--soft); color: var(--muted); white-space: nowrap; }
.st-pending { background: #fff4e5; color: #b54708; } .st-confirmed { background: #e7f0ff; color: #1d4ed8; } .st-preparing { background: #f1e8ff; color: #6d28d9; }
.st-shipped { background: #e0f5fb; color: #0e7490; } .st-delivered { background: #e8f7ee; color: #14803c; } .st-cancelled { background: #fdeaec; color: #a4121f; }

@media (max-width: 1100px) { .product-grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 960px) {
    .shop, .pd, .account-layout, .acc-cols { grid-template-columns: 1fr; }
    .filter-toggle { display: inline-flex; }
    .filter-box { display: none; position: static; } .filter-box.is-open { display: block; }
    .acc-side { position: static; }
    .acc-nav { flex-direction: row; flex-wrap: wrap; } .acc-nav a, .acc-nav button { width: auto; flex: 1 1 45%; }
    .acc-stats { grid-template-columns: 1fr; }
    .product-grid.is-list .product-card { flex-direction: column; } .product-grid.is-list .product-thumb, .product-grid.is-list .product-actions { width: 100%; }
}
@media (max-width: 560px) {
    .product-grid-3 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .spec-tiles { grid-template-columns: repeat(2, 1fr); } .spec-tiles li:nth-child(3) { border-inline-start: 0; } .spec-tiles li:nth-child(n+3) { border-top: 1px solid var(--border); }
    .product-actions .btn { font-size: 12px; padding: 7px 4px; }
    .acc-hero { padding: 22px; } .acc-hero h1 { font-size: 22px; }
}

/* موجودی و اسلایدر */
.stock { color: #14803c; font-weight: 700; margin-block: 6px; }
.stock::before { content: "● "; } .stock.is-out { color: #a4121f; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.slider { position: relative; overflow: hidden; margin-bottom: 8px; background: var(--navy); }
.slide { position: relative; display: none; min-height: 260px; background-size: cover; background-position: center; align-items: center; }
.slide.is-on { display: flex; }
.slide::before { content: ""; position: absolute; inset: 0; background: linear-gradient(270deg, rgba(15, 27, 45, .75), rgba(15, 27, 45, .1)); }
.slide-in { position: relative; color: var(--white); padding-block: 40px; }
.slide-in h2 { font-size: clamp(24px, 4vw, 40px); font-weight: 800; margin-bottom: 8px; }
.slide-in p { margin-bottom: 18px; color: #e3e8ef; }
.dots { position: absolute; bottom: 12px; inset-inline: 0; display: flex; justify-content: center; gap: 8px; }
.dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .55); cursor: pointer; padding: 0; }
.dots button.is-on { background: var(--red); }
