@charset "UTF-8";
/* bestSellerMedia.xhtml â€” same layout as "top-performers" in newshanik-v3lNext (sidebar + content card,
   podium for the top 3, ranked list, growth list, mobile group switcher). */

.tp-root {
	--tp-rose: #f43f5e;
	--tp-pink: #ec4899;
	--tp-grad: linear-gradient(to left, #f43f5e, #ec4899);
	--tp-grad-br: linear-gradient(135deg, #fb7185, #ec4899);
	--tp-border: #e7e5e4;
	--tp-card: #ffffff;
	--tp-muted: #f4f4f5;
	--tp-muted-fg: #71717a;
	--tp-fg: #1c1917;
	box-sizing: border-box;
	min-height: 60vh;
	padding-bottom: 32px;
	background: linear-gradient(to bottom, #eef8f8, #ffffff 420px);
	color: var(--tp-fg);
	direction: rtl;
	font-family: inherit;
}

.tp-root *,
.tp-root *::before,
.tp-root *::after {
	box-sizing: border-box;
}

.tp-ic {
	width: 16px;
	height: 16px;
	flex: none;
}

.tp-ic-sm {
	width: 14px;
	height: 14px;
}

/* ---------- Hero ---------- */
.tp-hero {
	position: relative;
	width: 100%;
	overflow: hidden;
}

.tp-hero-img,
.tp-hero .swiper-slide img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: cover;
}

.tp-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 2;
	pointer-events: none;
	background: linear-gradient(to top, #fff 0%, rgba(255, 255, 255, .6) 2%, rgba(255, 255, 255, 0) 5%);
}

.tp-hero .swiper-pagination {
	bottom: 10px !important;
	z-index: 3;
}

.tp-hero .swiper-pagination-bullet-active {
	background: var(--tp-pink);
}

/* ---------- Layout ---------- */
.tp-main {
	display: flex;
	gap: 24px;
	width: 100%;
	max-width: 1760px;
	margin: 0 auto;
	padding: 24px 48px;
}

.tp-col {
	flex: 1 1 auto;
	min-width: 0;
}

.tp-card {
	padding: 24px;
	border: 1px solid var(--tp-border);
	border-radius: 24px;
	background: rgba(255, 255, 255, .6);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
	backdrop-filter: blur(8px);
}

/* Only the active view (and its filters) is visible. */
.tp-view,
.tp-toolbar,
.tp-note {
	display: none;
}

.tp-root[data-tab="sales"] .tp-view[data-view="sales"],
.tp-root[data-tab="orders"] .tp-view[data-view="orders"],
.tp-root[data-tab="active"] .tp-view[data-view="active"],
.tp-root[data-tab="income"] .tp-view[data-view="income"],
.tp-root[data-tab="growthSales"] .tp-view[data-view="growthSales"],
.tp-root[data-tab="ranks"] .tp-view[data-view="ranks"] {
	display: block;
}

.tp-root[data-group="growth"] .tp-toolbar,
.tp-root[data-group="ranks"] .tp-toolbar {
	display: flex;
}

.tp-root[data-group="growth"] .tp-note {
	display: block;
}

.tp-root:not([data-group="growth"]) .tp-tb-growth {
	display: none;
}

/* ---------- Sidebar (desktop) ---------- */
.tp-sidebar {
	flex: 0 0 288px;
	width: 288px;
	align-self: flex-start;
	position: sticky;
	top: 90px;
	padding: 16px;
	border: 1px solid var(--tp-border);
	border-radius: 24px;
	background: rgba(255, 255, 255, .8);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
	backdrop-filter: blur(8px);
}

.tp-side-title {
	padding: 12px 8px 4px;
	color: var(--tp-muted-fg);
	font-size: 11px;
}

.tp-side-btn {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin: 0 0 4px;
	padding: 10px 12px;
	border: 0;
	border-radius: 16px;
	background: transparent;
	color: rgba(28, 25, 23, .8);
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	text-align: right;
	cursor: pointer;
	transition: background .15s, color .15s;
}

.tp-side-btn:hover {
	background: var(--tp-muted);
}

.tp-side-btn .tp-ic {
	opacity: .8;
}

.tp-side-btn.is-active {
	background: var(--tp-grad);
	color: #fff;
	box-shadow: 0 4px 10px rgba(236, 72, 153, .25);
}

/* ---------- Chips + group switcher (mobile/tablet) ---------- */
.tp-chips,
.tp-groupnav {
	display: none;
}

.tp-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 12px;
	border: 0;
	border-radius: 12px;
	background: transparent;
	color: var(--tp-muted-fg);
	font: inherit;
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
}

.tp-chip.is-active {
	background: var(--tp-grad);
	color: #fff;
	box-shadow: 0 2px 6px rgba(236, 72, 153, .25);
}

.tp-gn {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 4px 8px;
	border: 0;
	background: transparent;
	color: var(--tp-muted-fg);
	font: inherit;
	font-size: 11px;
	cursor: pointer;
}

.tp-gn-ic {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--tp-muted);
	transition: background .15s, color .15s;
}

.tp-gn.is-active {
	color: var(--tp-fg);
	font-weight: 700;
}

.tp-gn.is-active .tp-gn-ic {
	background: var(--tp-grad-br);
	color: #fff;
	box-shadow: 0 2px 6px rgba(236, 72, 153, .3);
}

/* ---------- Section header ---------- */
.tp-sh {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
	padding: 12px 16px;
	border: 1px solid var(--tp-border);
	border-radius: 16px;
	background: linear-gradient(to left, rgba(244, 63, 94, .05), rgba(236, 72, 153, .05));
}

.tp-sh-title {
	display: flex;
	flex-direction: row-reverse;
	align-items: center;
	gap: 8px;
}

.tp-sh-title h2 {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.7;
	text-align: right;
}

.tp-sh-icon {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--tp-grad-br);
	color: #fff;
	box-shadow: 0 2px 6px rgba(236, 72, 153, .3);
}

/* Period filter (month / season / year) */
.tp-period-filter {
	display: inline-flex;
	padding: 2px;
	border: 1px solid var(--tp-border);
	border-radius: 12px;
	background: var(--tp-card);
}

.tp-pf {
	padding: 6px 12px;
	border: 0;
	border-radius: 9px;
	background: transparent;
	color: var(--tp-muted-fg);
	font: inherit;
	font-size: 11px;
	font-weight: 700;
	cursor: pointer;
}

.tp-pf:hover {
	background: var(--tp-muted);
}

.tp-pf.is-active {
	background: var(--tp-grad);
	color: #fff;
	box-shadow: 0 2px 6px rgba(236, 72, 153, .25);
}

.tp-period {
	display: none;
}

.tp-view[data-period="month"] .tp-period[data-period="month"],
.tp-view[data-period="season"] .tp-period[data-period="season"],
.tp-view[data-period="year"] .tp-period[data-period="year"] {
	display: block;
}

/* ---------- Podium (top 3) ---------- */
.tp-podium {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
	padding-top: 18px;
}

.tp-podium:empty,
.tp-podium:not(:has(.tp-podium-card)) {
	display: none;
}

.tp-podium-card {
	position: relative;
	padding: 24px;
	border-radius: 24px;
	color: #fff;
	text-align: center;
	box-shadow: 0 10px 20px rgba(0, 0, 0, .08);
}

.tp-podium-1 { background: linear-gradient(to bottom, #fbbf24, #fb923c); }
.tp-podium-2 { background: linear-gradient(to bottom, #cbd5e1, #94a3b8); }
.tp-podium-3 { background: linear-gradient(to bottom, #fdba74, #fb7185); }

.tp-podium-badge {
	position: absolute;
	top: -16px;
	left: 50%;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	color: #fff;
	transform: translateX(-50%);
	box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}

.tp-podium-1 .tp-podium-badge { background: #f59e0b; }
.tp-podium-2 .tp-podium-badge { background: #14b8a6; }
.tp-podium-3 .tp-podium-badge { background: #f97316; }

.tp-pb {
	display: none;
}

.tp-podium-1 .tp-pb-1,
.tp-podium-2 .tp-pb-2,
.tp-podium-3 .tp-pb-3 {
	display: grid;
}

.tp-podium-avatar {
	display: grid;
	place-items: center;
	width: 80px;
	height: 80px;
	margin: 12px auto 0;
	border: 4px solid rgba(255, 255, 255, .7);
	border-radius: 50%;
	background: rgba(255, 255, 255, .95);
	color: var(--tp-rose);
	font-size: 20px;
	font-weight: 800;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
	overflow: hidden;
}

.tp-podium-label {
	margin-top: 12px;
	color: rgba(255, 255, 255, .85);
	font-size: 11px;
}

.tp-podium-name {
	margin-top: 4px;
	font-weight: 700;
	line-height: 1.7;
}

.tp-podium-value {
	display: inline-block;
	margin-top: 12px;
	padding: 4px 16px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .85);
	color: var(--tp-fg);
	font-size: 12px;
	font-weight: 700;
	direction: rtl;
}

.tp-podium-value small {
	margin-inline-start: 4px;
	color: var(--tp-muted-fg);
	font-size: 10px;
	font-weight: 400;
}

/* ---------- Ranked list (4th onwards) and growth list ---------- */
.tp-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: 300px;
	margin-top: 16px;
	overflow: auto;
}

.tp-list:empty,
.tp-list:not(:has(.tp-row)) {
	display: none;
}

.tp-growth {
	gap: 10px;
	margin-top: 0;
}

.tp-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	border: 1px solid var(--tp-border);
	border-radius: 16px;
	background: var(--tp-card);
}

.tp-growth .tp-row {
	padding: 12px;
}

.tp-row-top {
	border-color: #fcd34d;
	background: linear-gradient(to left, #fef3c7, #fff);
}

.tp-rank-no {
	display: grid;
	flex: none;
	place-items: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--tp-muted);
	color: var(--tp-muted-fg);
	font-size: 11px;
	font-weight: 700;
}

.tp-avatar {
	display: grid;
	flex: none;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #ccfbf1;
	color: #0f766e;
	font-size: 11px;
	font-weight: 700;
}

.tp-row-top .tp-avatar {
	background: #ffe4e6;
	color: #e11d48;
}

.tp-row-name {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 14px;
	font-weight: 500;
	text-align: right;
}

.tp-row-value {
	flex: none;
	font-size: 12px;
	font-weight: 700;
	white-space: nowrap;
}

.tp-row-value small {
	color: var(--tp-muted-fg);
	font-weight: 400;
}

.tp-row-main {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: flex-start;
	min-width: 0;
	text-align: right;
}

.tp-row-main .tp-row-name {
	font-weight: 700;
}

.tp-rank-pill {
	display: inline-block;
	margin-top: 2px;
	padding: 2px 8px;
	border-radius: 999px;
	background: #fce7f3;
	color: #db2777;
	font-size: 10px;
}

.tp-rank-pill:empty {
	display: none;
}

.tp-grow-pill {
	display: inline-flex;
	flex: none;
	align-items: center;
	gap: 4px;
	padding: 4px 12px;
	border-radius: 999px;
	background: #d1fae5;
	color: #047857;
	font-size: 11px;
	font-weight: 700;
}

.tp-top-crown {
	display: grid;
	flex: none;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: linear-gradient(135deg, #fbbf24, #f59e0b);
	color: #fff;
	box-shadow: 0 2px 6px rgba(245, 158, 11, .35);
}

/* ---------- Empty state ---------- */
.tp-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 40px 0;
	border: 1px dashed var(--tp-border);
	border-radius: 16px;
	background: rgba(255, 255, 255, .4);
	color: var(--tp-muted-fg);
	font-size: 12px;
}

.tp-empty .tp-ic {
	width: 24px;
	height: 24px;
}

/* ---------- Growth / rank filters ---------- */
.tp-toolbar {
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 12px;
	padding: 10px 12px;
	border: 1px solid var(--tp-border);
	border-radius: 16px;
	background: var(--tp-card);
}

.tp-toolbar-label {
	margin-inline-end: auto;
	color: var(--tp-muted-fg);
	font-size: 12px;
	font-weight: 700;
}

.tp-tb-field {
	min-width: 130px;
}

.tp-root .tp-toolbar .ui-selectonemenu,
.tp-root .tp-rank-filters .ui-selectonemenu {
	display: flex !important;
	align-items: center;
	width: 100% !important;
	min-width: 130px;
	height: 36px;
	padding: 0 12px 0 32px !important;
	border: 1px solid var(--tp-border) !important;
	border-radius: 12px !important;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat left 10px center / 14px !important;
	box-shadow: none !important;
}

.tp-root .tp-toolbar .ui-selectonemenu-label,
.tp-root .tp-rank-filters .ui-selectonemenu-label {
	width: 100% !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	color: var(--tp-fg) !important;
	font-size: 12px !important;
	font-weight: 700;
	line-height: 34px;
	text-align: right;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tp-root .tp-toolbar .ui-selectonemenu-trigger,
.tp-root .tp-rank-filters .ui-selectonemenu-trigger,
.tp-root .tp-toolbar .ui-selectonemenu::after,
.tp-root .tp-rank-filters .ui-selectonemenu::after,
.tp-root .tp-toolbar .ui-selectonemenu::before,
.tp-root .tp-rank-filters .ui-selectonemenu::before {
	display: none !important;
}

.tp-root .tp-toolbar .ui-selectonemenu.ui-state-focus,
.tp-root .tp-rank-filters .ui-selectonemenu.ui-state-focus {
	border-color: var(--tp-pink) !important;
	box-shadow: 0 0 0 3px rgba(236, 72, 153, .15) !important;
}

.ui-selectonemenu-panel.tp-ddl-panel {
	direction: rtl;
	border: 1px solid #e7e5e4 !important;
	border-radius: 12px !important;
	padding: 4px !important;
	background: #fff !important;
	box-shadow: 0 12px 28px rgba(0, 0, 0, .12) !important;
}

.ui-selectonemenu-panel.tp-ddl-panel .ui-selectonemenu-item {
	margin: 0 !important;
	padding: 8px 10px !important;
	border: 0 !important;
	border-radius: 8px !important;
	background: transparent !important;
	color: #1c1917 !important;
	font-size: 12px !important;
	text-align: right !important;
}

.ui-selectonemenu-panel.tp-ddl-panel .ui-selectonemenu-item.ui-state-highlight,
.ui-selectonemenu-panel.tp-ddl-panel .ui-selectonemenu-item:hover {
	background: #fdf2f8 !important;
	color: #be185d !important;
}

.tp-note {
	margin: 0 0 12px;
	color: #047857;
	font-size: 12px;
	font-weight: 700;
	text-align: right;
}

/* ---------- Rank archive ---------- */
.tp-archive {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 16px;
}

.tp-archive:not(:has(.tp-archive-card)) {
	display: none;
}

.tp-archive-card {
	display: flex;
	flex-direction: column;
	border: 1px solid var(--tp-border);
	border-radius: 20px;
	background: var(--tp-card);
	color: var(--tp-fg) !important;
	text-decoration: none !important;
	overflow: hidden;
	transition: transform .15s, box-shadow .15s;
}

.tp-archive-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 22px rgba(0, 0, 0, .08);
}

.tp-archive-card img {
	display: block;
	width: 100%;
	height: auto;
}

.tp-archive-caption {
	padding: 10px 12px;
	font-size: 13px;
	font-weight: 700;
	text-align: right;
}

.tp-archive-caption:empty {
	display: none;
}

.tp-root button:focus-visible,
.tp-root a:focus-visible {
	outline: 2px solid var(--tp-pink);
	outline-offset: 2px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
	.tp-main {
		padding: 16px 32px;
	}

	.tp-sidebar {
		display: none;
	}

	.tp-groupnav {
		position: sticky;
		top: 0;
		z-index: 20;
		display: flex;
		justify-content: space-between;
		margin: 12px 12px 0;
		padding: 8px;
		border: 1px solid var(--tp-border);
		border-radius: 24px;
		background: rgba(255, 255, 255, .95);
		box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
		backdrop-filter: blur(8px);
	}

	.tp-root[data-group="sellers"] .tp-chips,
	.tp-root[data-group="growth"] .tp-chips {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 8px;
		margin-bottom: 16px;
		padding: 8px;
		border: 1px solid var(--tp-border);
		border-radius: 16px;
		background: var(--tp-card);
	}

	.tp-root[data-group="sellers"] .tp-chip:not([data-group="sellers"]),
	.tp-root[data-group="growth"] .tp-chip:not([data-group="growth"]) {
		display: none;
	}
}

@media (max-width: 767px) {
	.tp-main {
		padding: 16px;
	}

	.tp-card {
		padding: 16px;
		border-radius: 20px;
	}

	.tp-sh-title h2 {
		font-size: 14px;
	}

	.tp-podium {
		grid-template-columns: minmax(0, 1fr);
		gap: 22px;
	}

	.tp-tb-field {
		flex: 1 1 120px;
	}

	.tp-toolbar-label {
		flex: 1 1 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tp-archive-card {
		transition: none;
	}
}

/* ---------- Ranks view ---------- */
.tp-rank-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tp-root .tp-rank-filters .ui-selectonemenu {
	flex: 0 0 150px;
	width: 150px !important;
	min-width: 0;
}

.tp-rank-card {
	margin-bottom: 16px;
	padding: 16px;
	border: 1px solid var(--tp-border);
	border-radius: 20px;
	background: var(--tp-card);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

.tp-rank-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
}

.tp-rank-card-title {
	font-size: 15px;
	font-weight: 800;
	color: var(--tp-fg);
}

.tp-rank-card-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	color: #fff;
	background: var(--tp-grad-br);
}

.tp-rank-card-icon .tp-ic { width: 20px; height: 20px; }
.tp-rank-rahbar { background: linear-gradient(135deg, #fbbf24, #d97706); }
.tp-rank-bonyangozar { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.tp-rank-morabiMomtaz { background: linear-gradient(135deg, #38bdf8, #0284c7); }
.tp-rank-morabiTalai { background: linear-gradient(135deg, #fcd34d, #f59e0b); }
.tp-rank-all { background: var(--tp-grad-br); }

.tp-people {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 8px;
}

.tp-person {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border-radius: 14px;
	background: #f0fdfa;
	font-size: 13px;
	font-weight: 700;
	color: var(--tp-fg);
	min-width: 0;
}

.tp-person > span:last-child {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tp-avatar-img {
	object-fit: cover;
	padding: 0;
}

.tp-sh-sub {
	margin-top: 24px;
}

.tp-gallery {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	padding-bottom: 8px;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
}

.tp-gallery-item {
	flex: 0 0 auto;
	width: 260px;
	border-radius: 16px;
	overflow: hidden;
	border: 1px solid var(--tp-border);
	scroll-snap-align: start;
	transition: transform .2s ease;
}

.tp-gallery-item:hover { transform: translateY(-2px); }

.tp-gallery-item img {
	display: block;
	width: 100%;
	height: 160px;
	object-fit: cover;
}

@media (max-width: 640px) {
	.tp-rank-filters { width: 100%; }
	.tp-root .tp-rank-filters .ui-selectonemenu { flex: 1 1 30%; width: auto !important; min-width: 0; }
	.tp-people { grid-template-columns: 1fr; }
	.tp-gallery-item { width: 200px; }
	.tp-gallery-item img { height: 125px; }
}
