/* Course rows under «از کجا شروع کنم؟»: new courses, best sellers, packages and special offers. */
.home-shop.ye-home-shop {
	--ye-home-accent: var(--ye-accent);
	--ye-home-ink: var(--ye-ink);
	--ye-home-muted: var(--ye-muted);
	--ye-home-border: var(--ye-border);
	--ye-home-tint: var(--ye-tint);
	color: var(--ye-home-ink);
}
section.home-shop.ye-home-shop { margin: 0; padding: 0 0 8px; background: #fff; overflow: visible; }
section.home-shop.ye-home-shop::before,
section.home-shop.ye-home-shop::after { display: none; }
section.home-shop.ye-home-shop > .in { background: transparent; }
.ye-home-store > section + section { margin-top: 44px; }
.ye-home-store h2 { margin: 0; color: var(--ye-home-ink); font-size: 28px; line-height: 1.6; font-weight: var(--ye-w-heading); }
.ye-home-text-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--ye-home-accent); font-size: 17px; font-weight: var(--ye-w-semibold); text-decoration: none; white-space: nowrap; }
.ye-home-text-link:hover { color: var(--ye-accent-strong); text-decoration: underline; text-underline-offset: 5px; }
.ye-home-collection { scroll-margin-top: 24px; }
.ye-home-collection__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.ye-home-collection__header p { margin: 4px 0 0; color: var(--ye-home-muted); font-size: 17px; line-height: 1.8; }
.ye-home-collection__actions { display: flex; align-items: center; gap: 20px; }
.ye-home-rail-controls { display: flex; gap: 6px; }
.ye-home-rail-controls[hidden] { display: none; }
.ye-home-rail-controls button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--ye-home-border); border-radius: 12px; background: #fff; color: var(--ye-home-accent); font-size: 22px; cursor: pointer; }
.ye-home-rail-controls button:hover:enabled { background: var(--ye-home-tint); border-color: var(--ye-border-accent); }
.ye-home-rail-controls button:disabled { color: var(--ye-faint); background: #f7f5fa; cursor: default; }
/* Rail and cards are positioned so WooCommerce's absolutely positioned sale-price text
   (.screen-reader-text) stays inside the scrolling rail. Without it, the text of cards
   scrolled off to the left widened the whole page, and phones opened it on an empty white area. */
.ye-home-course-rail { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 4); gap: 16px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: 2px; padding: 4px 2px 18px; scrollbar-width: none; }
.ye-home-course-rail::-webkit-scrollbar { display: none; }
.ye-home-kicker { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 6px; padding: 2px 12px; border: 1px solid var(--ye-home-border); border-radius: 999px; background: #fff; color: var(--ye-home-accent); font-size: 14px; font-weight: var(--ye-w-semibold); line-height: 1.8; }

/* Course card: labels sit on the cover, so titles and prices line up across the rail. */
.ye-home-card { position: relative; min-width: 0; margin: 0; scroll-snap-align: start; border: 1px solid var(--ye-home-border); border-radius: 18px; background: #fff; overflow: hidden; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.ye-home-card:hover { border-color: var(--ye-border-accent); box-shadow: 0 12px 28px rgba(46, 31, 84, .10); transform: translateY(-2px); }
.ye-home-card__link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.ye-home-card__link:hover { color: inherit; text-decoration: none; }
.ye-home-card__cover { display: block; position: relative; aspect-ratio: 1.5; background: var(--ye-home-tint); overflow: hidden; }
.ye-home-card__cover img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.ye-home-card:hover .ye-home-card__cover img { transform: scale(1.03); }
.ye-home-card__body { display: flex; flex-direction: column; flex: 1; gap: 12px; min-width: 0; padding: 14px 16px 16px; }
.ye-home-card__badges { display: flex; flex-wrap: wrap; gap: 5px; }
.ye-home-card__cover .ye-home-card__badges { position: absolute; top: 10px; right: 10px; left: 10px; z-index: 1; }
.ye-home-card__badges > span { display: inline-block; max-width: 100%; padding: 1px 10px; border-radius: 999px; background: var(--ye-home-tint); color: var(--ye-accent-strong); font-size: 13px; font-weight: var(--ye-w-semibold); line-height: 1.8; overflow-wrap: anywhere; }
.ye-home-card__badges > .ye-home-card__badge--sale { background: #fde8f0; color: var(--ye-sale); }
.ye-home-card__cover .ye-home-card__badges > span { background: rgba(255, 255, 255, .94); box-shadow: 0 1px 4px rgba(42, 37, 51, .12); }
.ye-home-card__cover .ye-home-card__badges > .ye-home-card__badge--sale { background: #fbeef2; color: var(--ye-sale); }
.ye-home-card .ye-home-card__title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; min-height: 3.4em; margin: 0; color: var(--ye-home-ink); font-size: 18px; line-height: 1.7; font-weight: var(--ye-w-bold); text-align: right; unicode-bidi: plaintext; overflow-wrap: anywhere; }
.ye-home-card:hover .ye-home-card__title { color: var(--ye-home-accent); }
.ye-home-card__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid #f0ebf6; }
.ye-home-card__price { display: block; min-width: 0; color: var(--ye-home-accent); font-size: 17px; line-height: 1.6; font-weight: var(--ye-w-bold); }
.ye-home-card__price del { display: block; color: var(--ye-home-muted); font-size: 14px; font-weight: 500; }
.ye-home-card__price ins { display: block; color: var(--ye-home-accent); background: transparent; text-decoration: none; }
.ye-home-card__price small { font-size: 13px; }
.ye-home-card__unavailable { color: var(--ye-home-muted); font-size: 15px; font-weight: 600; }
.ye-home-card__action { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 12px; background: var(--ye-home-tint); color: var(--ye-home-accent); font-size: 20px; transition: background .15s ease, color .15s ease; }
.ye-home-card__action > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ye-home-card__link:hover .ye-home-card__action { background: var(--ye-home-accent); color: #fff; }
.ye-home-card__kind { display: flex; align-items: center; gap: 7px; min-width: 0; margin-bottom: -6px; color: var(--ye-home-muted); font-size: 13.5px; font-weight: 700; line-height: 1.7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ye-home-card__kind i { color: #a58bc9; font-size: 14px; }
.ye-home-card__kind--live { color: var(--ye-sale); }
.ye-home-card__kind--live i { color: #e0457b; }
.ye-home-card__rating { display: inline-flex; align-items: center; gap: 5px; color: #8a5a00; font-size: 13.5px; font-weight: var(--ye-w-semibold); line-height: 1.7; }
.ye-home-card__rating i { color: #f5a623; font-size: 14px; }
.ye-home-card__reviews { color: var(--ye-home-muted); font-weight: 600; }
.ye-home-card__save { position: absolute; bottom: 10px; right: 10px; z-index: 1; padding: 1px 10px; border-radius: 999px; background: #fbeef2; color: var(--ye-sale); font-size: 13px; font-weight: var(--ye-w-semibold); line-height: 1.8; box-shadow: 0 1px 4px rgba(42, 37, 51, .12); }

/* Best sellers: ranked rows on a tinted panel, like the library panel further down. */
.ye-home-bestsellers { padding: 28px; border: 1px solid var(--ye-home-border); border-radius: 24px; background: linear-gradient(135deg, var(--ye-tint) 0%, var(--ye-tint-soft) 55%, #fff 100%); }
.ye-home-bestsellers__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ye-home-card--compact { border-radius: 16px; }
.ye-home-card--compact .ye-home-card__link { display: grid; grid-template-columns: 166px minmax(0, 1fr); align-items: center; }
.ye-home-card--compact .ye-home-card__cover { margin: 10px 10px 10px 0; border-radius: 12px; }
.ye-home-card__rank { position: absolute; top: 8px; right: 8px; z-index: 1; display: grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 10px; background: var(--ye-home-accent); color: #fff; font-size: 15px; font-weight: var(--ye-w-bold); box-shadow: 0 4px 12px rgba(46, 31, 84, .3); }
.ye-home-card--compact .ye-home-card__body { justify-content: center; gap: 6px; padding: 12px 16px; }
.ye-home-card--compact .ye-home-card__title { min-height: 0; font-size: 16px; }
.ye-home-card--compact .ye-home-card__badges > span { padding: 0 8px; font-size: 12px; }
.ye-home-card--compact .ye-home-card__foot { align-items: center; padding-top: 2px; border-top: 0; }
.ye-home-card--compact .ye-home-card__price { font-size: 16px; }
.ye-home-card--compact .ye-home-card__price del { font-size: 13px; }
.ye-home-card--compact .ye-home-card__action { width: 36px; height: 36px; border-radius: 10px; font-size: 18px; }
.ye-home-card--compact .ye-home-card__kind { margin-bottom: -2px; font-size: 12.5px; }
.ye-home-card--compact .ye-home-card__rating { font-size: 12.5px; }
.ye-home-empty { padding: 24px; border: 1px solid var(--ye-home-border); border-radius: 16px; color: var(--ye-home-muted); font-size: 18px; line-height: 1.9; }

/* Packages: four best sellers side by side */
.ye-home-packages__grid { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ye-home-packages .ye-home-card .ye-home-card__title { font-size: 16.5px; }

/* Promoted courses */
.ye-home-promos__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ye-home-promo { display: flex; align-items: center; gap: 20px; padding: 14px; border: 1px solid var(--ye-home-border); border-radius: 18px; color: var(--ye-home-ink); background: linear-gradient(90deg, #fff 0%, var(--ye-tint-soft) 60%, var(--ye-home-tint) 100%); text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.ye-home-promo:hover { border-color: var(--ye-border-accent); box-shadow: 0 12px 28px rgba(46, 31, 84, .10); transform: translateY(-2px); color: var(--ye-home-ink); text-decoration: none; }
.ye-home-promo img { width: 44%; max-width: 220px; height: auto; aspect-ratio: 1.5; object-fit: cover; border-radius: 12px; }
.ye-home-promo > div { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; flex: 1; min-width: 0; }
.ye-home-promo__label { padding: 1px 10px; border-radius: 999px; background: #fde8f0; color: var(--ye-sale); font-size: 12px; font-weight: var(--ye-w-semibold); line-height: 1.8; }
.ye-home-promo h3 { margin: 0; font-size: 19px; line-height: 1.75; font-weight: var(--ye-w-bold); overflow-wrap: anywhere; }
.ye-home-promo__action { display: inline-flex; gap: 12px; align-items: center; min-height: 40px; padding: 4px 16px; border-radius: 12px; background: var(--ye-home-accent); color: #fff; font-size: 15px; font-weight: var(--ye-w-semibold); transition: background .15s ease; }
.ye-home-promo:hover .ye-home-promo__action { background: var(--ye-accent-strong); }
.ye-home-shop .home-physical-shop-section { margin-top: 48px; }
.ye-home-store a:focus-visible,
.ye-home-store button:focus-visible,
.ye-home-course-rail:focus-visible { outline: 3px solid var(--ye-accent); outline-offset: 3px; }
.ye-home-card__link:focus-visible { outline-offset: -3px; border-radius: 17px; }
@media (max-width: 1023px) {
	.ye-home-course-rail { grid-auto-columns: calc((100% - 32px) / 3); }
	.ye-home-card--compact .ye-home-card__link { grid-template-columns: 138px minmax(0, 1fr); }
}
@media (max-width: 991px) {
	.ye-home-packages__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.ye-home-store > section + section { margin-top: 32px; }
	.ye-home-store h2 { font-size: 22px; }
	.ye-home-collection__header { gap: 10px; margin-bottom: 12px; }
	.ye-home-collection__header p { font-size: 15px; }
	.ye-home-collection__actions { gap: 0; }
	.ye-home-text-link { font-size: 16px; gap: 6px; }
	.ye-home-rail-controls { display: none; }
	.ye-home-course-rail { grid-auto-columns: 73%; gap: 12px; }
	.ye-home-card__body { padding: 12px 14px; }
	.ye-home-card .ye-home-card__title { font-size: 17px; }
	.ye-home-card:hover,
	.ye-home-promo:hover { transform: none; }
	.ye-home-bestsellers { padding: 20px 14px 14px; border-radius: 20px; }
	.ye-home-bestsellers__grid,
	.ye-home-promos__grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
	.ye-home-card--compact .ye-home-card__link { grid-template-columns: 118px minmax(0, 1fr); }
	.ye-home-card--compact .ye-home-card__cover { margin: 8px 8px 8px 0; border-radius: 10px; }
	.ye-home-card--compact .ye-home-card__body { padding: 10px 12px; }
	.ye-home-card--compact .ye-home-card__title { font-size: 15px; }
	.ye-home-card--compact .ye-home-card__price { font-size: 15px; }
	.ye-home-card--compact .ye-home-card__action { width: 32px; height: 32px; }
	.ye-home-promo { padding: 10px; gap: 12px; border-radius: 16px; }
	.ye-home-promo img { width: 42%; }
	.ye-home-promo > div { gap: 6px; }
	.ye-home-promo h3 { font-size: 16px; line-height: 1.7; }
	.ye-home-promo__action { min-height: 36px; padding: 4px 12px; font-size: 14px; }
	/* Packages: a row to swipe, like the new courses above. */
	.ye-home-packages__grid { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 73%; gap: 12px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding: 0 15px; margin: 0 -15px; padding: 4px 15px 14px; scrollbar-width: none; }
	.ye-home-packages__grid::-webkit-scrollbar { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.ye-home-card { transition: none; }
}
