/* ============================================================
   Bytes Yatra – archive.css
   Category / archive page specific styles.
   ============================================================ */

/* Category hero */
.by-cat-hero {
	background: var(--by-dark-bg);
	color: #fff;
	padding: 60px 0;
	margin-bottom: 32px;
}
.by-cat-hero__parent {
	display: inline-block;
	font-size: .8rem;
	text-transform: uppercase;
	letter-spacing: .1em;
	color: rgba(255,255,255,.6);
	margin-bottom: 8px;
}
.by-cat-hero__title {
	font-family: var(--by-font-heading);
	font-size: clamp(2rem, 4vw, 3.5rem);
	font-weight: 800;
	margin: 0 0 12px;
}
.by-cat-hero__description {
	color: rgba(255,255,255,.75);
	max-width: 640px;
	font-size: 1.05rem;
	margin: 0 0 24px;
}
.by-cat-hero__stats {
	display: flex;
	gap: 32px;
}
.by-cat-hero__stat-number {
	display: block;
	font-size: 2rem;
	font-weight: 800;
	color: var(--by-primary);
}
.by-cat-hero__stat-label {
	font-size: .8rem;
	text-transform: uppercase;
	letter-spacing: .08em;
	color: rgba(255,255,255,.6);
}

/* Subcategory pills */
.by-subcat-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 24px;
}
.by-subcat-pill {
	display: inline-block;
	padding: 6px 18px;
	border-radius: 24px;
	border: 1px solid var(--by-border);
	color: var(--by-text);
	text-decoration: none;
	font-size: .85rem;
	font-weight: 500;
	transition: all .2s;
}
.by-subcat-pill:hover,
.by-subcat-pill--active {
	background: var(--by-primary);
	color: #fff;
	border-color: var(--by-primary);
}

/* Toolbar */
.by-toolbar {
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 24px;
	padding: 16px;
	background: var(--by-surface);
	border: 1px solid var(--by-border);
	border-radius: 12px;
}
.by-toolbar__search { flex: 1; min-width: 200px; }
.by-toolbar__search-input {
	width: 100%;
	padding: 8px 16px;
	border: 1px solid var(--by-border);
	border-radius: 8px;
	background: var(--by-bg);
	color: var(--by-text);
	font-size: .9rem;
}
.by-toolbar__controls {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}
.by-sort-btns, .by-view-btns {
	display: flex;
	gap: 4px;
}
.by-sort-btn, .by-view-btn {
	padding: 6px 14px;
	border: 1px solid var(--by-border);
	border-radius: 6px;
	background: var(--by-bg);
	color: var(--by-text);
	font-size: .82rem;
	font-weight: 500;
	cursor: pointer;
	transition: all .2s;
}
.by-sort-btn--active,
.by-sort-btn:hover,
.by-view-btn--active,
.by-view-btn:hover {
	background: var(--by-primary);
	color: #fff;
	border-color: var(--by-primary);
}
.by-filters-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 16px;
	border: 1px solid var(--by-primary);
	border-radius: 6px;
	background: transparent;
	color: var(--by-primary);
	font-size: .85rem;
	font-weight: 600;
	cursor: pointer;
	transition: all .2s;
}
.by-filters-btn:hover { background: var(--by-primary); color: #fff; }
.by-filters-btn__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 20px;
	height: 20px;
	background: var(--by-primary);
	color: #fff;
	border-radius: 10px;
	font-size: .7rem;
	font-weight: 700;
	padding: 0 4px;
}
.by-filters-btn:hover .by-filters-btn__count { background: #fff; color: var(--by-primary); }

/* Category layout */
.by-cat-layout {
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: 32px;
	align-items: start;
}

/* Filter sidebar */
.by-filter-sidebar {
	background: var(--by-surface);
	border: 1px solid var(--by-border);
	border-radius: 12px;
	overflow: hidden;
	position: sticky;
	top: 100px;
}
.by-filter-sidebar__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: var(--by-dark-bg);
	color: #fff;
	padding: 16px 20px;
}
.by-filter-sidebar__title { font-weight: 700; margin: 0; font-size: 1rem; }
.by-filter-sidebar__clear {
	background: none;
	border: none;
	color: rgba(255,255,255,.7);
	font-size: .8rem;
	cursor: pointer;
	padding: 0;
}
.by-filter-sidebar__clear:hover { color: #fff; }
.by-filter-sidebar__close { display: none; }
.by-active-filters { padding: 0 16px; }
.by-active-filter-pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: rgba(198,40,40,.1);
	color: var(--by-primary);
	border: none;
	border-radius: 20px;
	padding: 3px 10px;
	font-size: .78rem;
	font-weight: 600;
	cursor: pointer;
	margin: 8px 4px 0 0;
}
.by-active-filter-pill:hover { background: var(--by-primary); color: #fff; }

/* Filter groups */
.by-filter-group { border-bottom: 1px solid var(--by-border); }
.by-filter-group:last-child { border-bottom: none; }
.by-filter-group__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 14px 20px;
	background: none;
	border: none;
	color: var(--by-text);
	font-weight: 600;
	font-size: .9rem;
	cursor: pointer;
	text-align: left;
}
.by-filter-group__toggle:hover { color: var(--by-primary); }
.by-filter-group__chevron { transition: transform .2s; flex-shrink: 0; }
.by-filter-group__toggle[aria-expanded="false"] .by-filter-group__chevron { transform: rotate(-90deg); }
.by-filter-group__items { padding: 0 20px 12px; }
.by-filter-group__items--collapsed { display: none; }
.by-filter-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 6px 0;
	cursor: pointer;
	font-size: .87rem;
}
.by-filter-item:hover { color: var(--by-primary); }
.by-filter-item__checkbox {
	width: 16px;
	height: 16px;
	accent-color: var(--by-primary);
	cursor: pointer;
	flex-shrink: 0;
}
.by-filter-item__checkbox:checked + .by-filter-item__label { color: var(--by-primary); font-weight: 600; }

/* Posts grid states */
.by-posts-loading {
	display: flex;
	justify-content: center;
	padding: 40px;
}
.by-spinner {
	width: 40px;
	height: 40px;
	border: 3px solid var(--by-border);
	border-top-color: var(--by-primary);
	border-radius: 50%;
	animation: by-spin .7s linear infinite;
}
@keyframes by-spin { to { transform: rotate(360deg); } }

/* List view */
.by-card-grid--list { grid-template-columns: 1fr !important; }
.by-card-grid--list .by-card {
	display: grid;
	grid-template-columns: 200px 1fr;
}
.by-card-grid--list .by-card__img-wrap {
	height: 140px;
}

/* Archive header */
.by-archive-header { margin-bottom: 32px; padding-bottom: 16px; border-bottom: 2px solid var(--by-primary); }
.by-archive-header__title { font-family: var(--by-font-heading); font-size: 2rem; font-weight: 800; margin: 0 0 8px; }
.by-archive-header__description { color: var(--by-text-muted); margin: 0; }

/* 404 page */
.by-404 { padding: 80px 0; text-align: center; }
.by-404__code { display: block; font-size: 8rem; font-weight: 900; color: var(--by-primary); opacity: .15; line-height: 1; }
.by-404__title { font-family: var(--by-font-heading); font-size: 2rem; font-weight: 800; margin-top: -40px; }
.by-404__message { color: var(--by-text-muted); margin: 12px auto 32px; max-width: 400px; }
.by-404__search { margin-top: 24px; max-width: 400px; margin-inline: auto; }

/* Responsive */
@media ( max-width: 900px ) {
	.by-cat-layout { grid-template-columns: 1fr; }
	.by-filter-sidebar {
		position: fixed;
		top: 0;
		left: -100%;
		width: 300px;
		height: 100vh;
		z-index: 500;
		border-radius: 0;
		overflow-y: auto;
		transition: left .3s ease;
	}
	.by-filter-sidebar--open { left: 0; }
	.by-filter-sidebar__close {
		display: block;
		position: absolute;
		top: 14px;
		right: 16px;
		background: none;
		border: none;
		color: rgba(255,255,255,.7);
		font-size: 1.5rem;
		cursor: pointer;
	}
	.by-toolbar .by-sort-btns { display: none; }
}
@media ( max-width: 640px ) {
	.by-cat-hero { padding: 40px 0; }
	.by-toolbar { gap: 8px; }
}
