/*
 * Crush Theme — WooCommerce (shop archive, category, single product).
 * Priceless storefront: orders go through the inquiry modal. Palette mirrors
 * the site's product carousel (spc-) section.
 */
.cwc-archive, .cwc-single, .cwc-related {
	direction: rtl;
	font-family: 'IranBakh', 'IRANSansX', 'IRANSans', 'Vazirmatn', 'Shabnam', Tahoma, sans-serif;
	color: #334155;
	background: #f8fafc;
}
.cwc-container { width: min(1200px, 92%); margin-inline: auto; }

/* ---------- Archive head ---------- */
.cwc-archive { padding: clamp(34px, 5vw, 70px) 0 clamp(48px, 7vw, 90px); }
.cwc-archive__head { text-align: center; max-width: 720px; margin: 0 auto clamp(28px, 4vw, 48px); }
.cwc-archive__badge {
	display: inline-block; font-size: .8rem; font-weight: 700; color: #c99617;
	background: #fff4cf; padding: 7px 16px; border-radius: 999px; margin-bottom: 14px;
}
.cwc-archive__title { margin: 0 0 12px; font-size: clamp(1.5rem, 3.4vw, 2.2rem); font-weight: 800; color: #0f1b3d; line-height: 1.4; }
.cwc-archive__desc { margin: 0; color: #64748b; line-height: 2; font-size: .98rem; }

/* ---------- Product grid + card (shop / related) ---------- */
.cwc-grid {
	display: grid; gap: clamp(14px, 2vw, 24px);
	grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 1024px) { .cwc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px)  { .cwc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 460px)  { .cwc-grid { grid-template-columns: 1fr; } }

/* هم‌خانواده با کارت‌های کاروسل صفحهٔ اصلی (.spc-card) — همان بردر، سایه، هاور و اورلی. */
.cwc-card {
	display: flex; flex-direction: column; background: #fff;
	border: 1px solid #e8e8e8; border-radius: 20px; overflow: hidden;
	box-shadow: 0 4px 16px rgba(0,0,0,.03);
	transition: transform .32s ease, box-shadow .32s ease, border-color .32s ease;
}
.cwc-card:hover { transform: translateY(-5px); box-shadow: 0 14px 34px rgba(0,0,0,.09); border-color: #f0c24b; }
.cwc-card__media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #f3f4f6; }
.cwc-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .42s ease; }
.cwc-card:hover .cwc-card__media img { transform: scale(1.05); }
.cwc-card__cat {
	position: absolute; inset-inline-start: 12px; inset-block-start: 12px;
	font-size: .72rem; font-weight: 700; color: #fff; background: #f7a91b; padding: 5px 12px; border-radius: 8px;
	box-shadow: 0 4px 13px rgba(247,169,27,.26);
}
.cwc-card__overlay {
	position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
	background: linear-gradient(to top, rgba(0,0,0,.18), rgba(0,0,0,.02));
	opacity: 0; visibility: hidden; transition: opacity .28s ease, visibility .28s ease;
}
.cwc-card:hover .cwc-card__overlay { opacity: 1; visibility: visible; }
.cwc-card__overlay-btn {
	display: inline-flex; align-items: center; gap: 7px;
	background: #f7a91b; color: #fff; font-weight: 700; font-size: .85rem;
	padding: 9px 16px; border-radius: 9px;
	box-shadow: 0 7px 22px rgba(247,169,27,.38);
}
.cwc-card__eye { font-size: 12px; line-height: 1; }
.cwc-card__body { display: flex; flex-direction: column; gap: 8px; padding: 16px 16px 18px; flex: 1; }
.cwc-card__title { margin: 0; font-size: 1rem; font-weight: 800; line-height: 1.7; }
.cwc-card__title a {
	color: #0f1b3d; text-decoration: none;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cwc-card__title a:hover { color: #c99216; }
.cwc-card__desc {
	margin: 0; font-size: .85rem; color: #6f7686; line-height: 1.9;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cwc-card__btn {
	margin-top: auto; display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
	font-size: .85rem; font-weight: 700; color: #c99216; text-decoration: none;
}
.cwc-card__btn svg { width: 16px; height: 16px; transition: transform .3s ease; }
.cwc-card:hover .cwc-card__btn svg { transform: translateX(-4px); }
.cwc-card:hover .cwc-card__title a { color: #c99216; }

/*
 * Reveal کارت‌ها با animation انجام می‌شود، نه transition: کلاس crush-reveal
 * روی transition المان (با تأخیر پلکانی) می‌نشیند و اگر همان برنده شود، هاور
 * کارت تا ۴۲۰ms کند می‌شود. این‌جا ترنزیشن را برای هاور پس می‌گیریم و ظاهرشدن
 * پلکانی را به یک keyframe با animation-delay می‌سپاریم (fill: backwards تا بعد
 * از پایان انیمیشن، transform برای هاور آزاد بماند).
 */
.cwc-card.crush-reveal {
	transition: transform .32s ease, box-shadow .32s ease, border-color .32s ease;
	transition-delay: 0ms;
}
.cwc-card.crush-reveal.is-in {
	animation: cwc-card-in .6s cubic-bezier(.22, 1, .36, 1) backwards;
	animation-delay: var(--crush-reveal-delay, 0ms);
}
@keyframes cwc-card-in {
	from { opacity: 0; transform: translateY(28px); }
	to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
	.cwc-card.crush-reveal.is-in { animation: none; }
}

/* تاچ: اورلی مخصوص هاور پنهان می‌ماند، هاورِ چسبنده خنثی و لمس بازخورد فشردن می‌گیرد. */
@media (hover: none) {
	.cwc-card__overlay { display: none; }
	.cwc-card:hover { transform: none; box-shadow: 0 4px 16px rgba(0,0,0,.03); border-color: #e8e8e8; }
	.cwc-card:hover .cwc-card__media img { transform: none; }
	.cwc-card:hover .cwc-card__title a { color: #0f1b3d; }
	.cwc-card:active { transform: scale(.98); transition-duration: .15s; }
}
.cwc-empty { text-align: center; color: #94a3b8; padding: 40px 0; }

/* ---------- Pagination (shared with blog) ---------- */
.cwc-pagination { margin-top: clamp(28px, 4vw, 46px); display: flex; justify-content: center; }
.cwc-pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px;
	margin: 0 4px; padding: 0 10px; border-radius: 12px; border: 1px solid #e2e8f0;
	background: #fff; color: #0f172a; text-decoration: none; font-weight: 700; transition: all .25s ease;
}
.cwc-pagination .page-numbers:hover { border-color: #EA8F09; color: #c99216; }
.cwc-pagination .page-numbers.current { background: #EA8F09; border-color: #EA8F09; color: #fff; }

/* ============================================================
 *  SINGLE PRODUCT
 * ============================================================ */
.cwc-single { padding: clamp(20px, 3vw, 36px) 0 clamp(40px, 6vw, 80px); }
.cwc-breadcrumb { font-size: .82rem; color: #94a3b8; margin-bottom: 20px; }
.cwc-breadcrumb a { color: #64748b; text-decoration: none; }
.cwc-breadcrumb a:hover { color: #c99216; }

.cwc-top {
	display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 52px);
	align-items: start; background: #fff; border: 1px solid #eef2f6; border-radius: 24px;
	padding: clamp(18px, 3vw, 34px);
}
@media (max-width: 900px) { .cwc-top { grid-template-columns: 1fr; } }

.cwc-gallery { position: relative; }
.cwc-gallery .woocommerce-product-gallery { max-width: 100%; }
.cwc-gallery img { border-radius: 16px; }
.cwc-gallery .flex-control-thumbs { display: flex; gap: 10px; padding: 12px 0 0; margin: 0; list-style: none; }
.cwc-gallery .flex-control-thumbs li { width: 72px; }
.cwc-gallery .flex-control-thumbs img { border-radius: 10px; cursor: pointer; opacity: .6; transition: opacity .25s ease; }
.cwc-gallery .flex-control-thumbs img.flex-active,
.cwc-gallery .flex-control-thumbs img:hover { opacity: 1; }

.cwc-summary { display: flex; flex-direction: column; }
.cwc-summary__cat {
	display: inline-block; align-self: flex-start; font-size: .78rem; font-weight: 700;
	color: #c99617; background: #fff4cf; padding: 6px 14px; border-radius: 999px; margin-bottom: 14px;
}
.cwc-title { margin: 0 0 16px; font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; color: #0f1b3d; line-height: 1.5; }
.cwc-short { color: #475569; font-size: 1rem; line-height: 2.1; margin-bottom: 20px; }
.cwc-short ul { padding-inline-start: 1.2em; margin: 0; }
.cwc-short li { margin-bottom: .5em; }

.cwc-facts { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: 4px 0 24px; }
.cwc-fact { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: #475569; }
.cwc-fact strong { color: #0f172a; font-weight: 700; }
.cwc-fact svg { width: 18px; height: 18px; color: #EA8F09; }
.cwc-instock { color: #16a34a; font-weight: 700; }
.cwc-outstock { color: #dc2626; font-weight: 700; }

.crush-order-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	background: linear-gradient(135deg, #F5A623 0%, #EA8F09 55%, #D97F06 100%); color: #fff;
	border: none; border-radius: 14px; padding: 16px 34px; font-family: inherit; font-weight: 800;
	font-size: 1.05rem; cursor: pointer; align-self: flex-start;
	box-shadow: 0 14px 30px rgba(234,143,9,.34); transition: transform .2s ease, box-shadow .2s ease;
}
.crush-order-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(234,143,9,.42); }
.crush-order-btn svg { width: 22px; height: 22px; }

/* ---------- Details / description / attributes ---------- */
.cwc-details { margin-top: clamp(28px, 4vw, 48px); background: #fff; border: 1px solid #eef2f6; border-radius: 24px; padding: clamp(20px, 3.4vw, 40px); }
.cwc-details__title { margin: 0 0 18px; font-size: 1.4rem; font-weight: 800; color: #0f1b3d; padding-bottom: 12px; border-bottom: 2px solid #f1f5f9; }
.cwc-content { font-size: 1.02rem; line-height: 2.1; color: #334155; }
.cwc-content > * { margin: 0 0 1.1em; }
.cwc-content h2, .cwc-content h3, .cwc-content h4 { color: #0f1b3d; font-weight: 800; margin: 1.3em 0 .5em; line-height: 1.6; }
.cwc-content h2 { font-size: 1.4rem; } .cwc-content h3 { font-size: 1.18rem; } .cwc-content h4 { font-size: 1.05rem; }
.cwc-content ul, .cwc-content ol { padding-inline-start: 1.4em; }
.cwc-content li { margin-bottom: .5em; }
.cwc-content img { max-width: 100%; height: auto; border-radius: 12px; }
.cwc-content table {
	width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: .95rem;
	border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden;
}
.cwc-content th, .cwc-content td { padding: 12px 14px; border-bottom: 1px solid #e2e8f0; text-align: right; }
.cwc-content th { background: #f8fafc; font-weight: 800; color: #0f1b3d; }
.cwc-content tr:last-child td { border-bottom: none; }

.cwc-attributes { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: .95rem; border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden; }
.cwc-attributes th, .cwc-attributes td { padding: 12px 14px; border-bottom: 1px solid #e2e8f0; text-align: right; }
.cwc-attributes th { background: #f8fafc; font-weight: 800; color: #0f1b3d; width: 34%; }
.cwc-attributes tr:last-child th, .cwc-attributes tr:last-child td { border-bottom: none; }

/* ---------- Related ---------- */
.cwc-related { padding: clamp(30px, 5vw, 64px) 0; }
.cwc-related__title { margin: 0 0 clamp(20px, 3vw, 34px); font-size: clamp(1.3rem, 2.6vw, 1.8rem); font-weight: 800; color: #0f1b3d; }
.cwc-related .cwc-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .cwc-related .cwc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 860px)  { .cwc-related .cwc-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 620px)  { .cwc-related .cwc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
