/**
 * Category Templates Stylesheet
 * VDCafeteras Theme - Coffee Maker Affiliate Site
 */

/* ========================================
   Category Hero Section - Base Styles
   ======================================== */

.category-hero {
	padding: 60px 20px;
	color: white;
	text-align: center;
	position: relative;
	overflow: hidden;
}

.category-hero::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: -1;
}

.category-hero .container {
	max-width: 1200px;
	margin: 0 auto;
	position: relative;
	z-index: 1;
}

.category-hero__icon {
	font-size: 48px;
	display: block;
	margin-bottom: 20px;
	animation: float 3s ease-in-out infinite;
}

@keyframes float {
	0%, 100% {
		transform: translateY(0px);
	}
	50% {
		transform: translateY(-10px);
	}
}

.category-hero__title {
	font-size: 48px;
	font-weight: 700;
	margin: 0 0 15px 0;
	letter-spacing: -0.5px;
}

.category-hero__desc {
	font-size: 18px;
	margin: 0 0 40px 0;
	max-width: 600px;
	margin-left: auto;
	margin-right: auto;
	line-height: 1.6;
	opacity: 0.95;
}

/* ========================================
   Category Hero Variants
   ======================================== */

.category-hero--cafeteras {
	background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-dark) 100%);
}

.category-hero--marcas {
	background: linear-gradient(135deg, var(--color-dark) 0%, #1A0F0A 100%);
}

.category-hero--comparativas {
	background: linear-gradient(to right, var(--color-dark) 0%, var(--color-primary) 50%, var(--color-dark) 100%);
}

.category-hero--comparativas .category-hero__content-left {
	float: left;
	width: 50%;
	text-align: right;
	padding-right: 20px;
}

.category-hero--comparativas .category-hero__content-right {
	float: right;
	width: 50%;
	text-align: left;
	padding-left: 20px;
}

.category-hero--comparativas .container::after {
	content: '';
	display: table;
	clear: both;
}

.category-hero--molinos {
	background: linear-gradient(135deg, var(--color-gold) 0%, #8B6914 100%);
	color: var(--color-text);
}

.category-hero--molinos .category-hero__title,
.category-hero--molinos .category-hero__desc {
	color: var(--color-text);
}

.category-hero--metodos {
	background: linear-gradient(135deg, #4A7C59 0%, #2D5E40 100%);
}

.category-hero--accesorios {
	background: linear-gradient(135deg, #2E7D9A 0%, #1A5470 100%);
}

.category-hero--mantenimiento {
	background: linear-gradient(135deg, #455A64 0%, #263238 100%);
}

.category-hero--guias {
	background: linear-gradient(135deg, #8B6914 0%, var(--color-primary) 100%);
}

/* ========================================
   Filter Tabs
   ======================================== */

.category-filter-tabs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
	margin-top: 30px;
}

.filter-tab {
	padding: 10px 20px;
	background: rgba(255, 255, 255, 0.15);
	border: 2px solid rgba(255, 255, 255, 0.3);
	color: white;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	border-radius: 24px;
	transition: all 0.3s ease;
	white-space: nowrap;
}

.filter-tab:hover {
	background: rgba(255, 255, 255, 0.25);
	border-color: rgba(255, 255, 255, 0.5);
	transform: translateY(-2px);
}

.filter-tab--active {
	background: var(--color-gold);
	border-color: var(--color-gold);
	color: var(--color-text);
}

/* ========================================
   Category Page Layout
   ======================================== */

.category-page-wrap {
	display: flex;
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 20px;
	gap: 40px;
}

.category-main {
	flex: 1;
	min-width: 0;
}

.category-sidebar {
	width: 300px;
	flex-shrink: 0;
}

/* ========================================
   Posts Header (Count + Sort)
   ======================================== */

.posts-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 40px;
	padding: 20px 0;
	border-bottom: 2px solid var(--color-cream);
}

.posts-count {
	font-size: 16px;
	font-weight: 600;
	color: var(--color-primary);
}

.sort-options {
	display: flex;
	gap: 10px;
}

.sort-dropdown {
	padding: 10px 15px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 14px;
	background: white;
	cursor: pointer;
	color: var(--color-text);
	transition: border-color 0.3s ease;
}

.sort-dropdown:hover,
.sort-dropdown:focus {
	border-color: var(--color-primary);
	outline: none;
}

/* ========================================
   Articles Grid
   ======================================== */

.articles-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 30px;
	margin-bottom: 40px;
}

.articles-grid--2col {
	grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
}

.articles-grid--3col {
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* ========================================
   Article Card
   ======================================== */

.article-card {
	background: white;
	border: 1px solid #f0f0f0;
	border-radius: 12px;
	overflow: hidden;
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
	height: 100%;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.article-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
	border-color: var(--color-gold);
}

.article-card__image {
	position: relative;
	overflow: hidden;
	height: 240px;
	background: var(--color-cream);
}

.article-card__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.article-card:hover .article-card__image img {
	transform: scale(1.05);
}

.article-card__image a {
	display: block;
	width: 100%;
	height: 100%;
}

.article-card__rating,
.article-card__difficulty,
.article-card__badge {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
}

.rating-stars {
	background: var(--color-amazon);
	color: white;
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
}

.difficulty-badge,
.guide-badge {
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.difficulty-badge--basico {
	background: #4CAF50;
	color: white;
}

.difficulty-badge--intermedio {
	background: #FF9800;
	color: white;
}

.difficulty-badge--avanzado {
	background: #F44336;
	color: white;
}

.guide-badge {
	background: var(--color-primary);
	color: white;
}

.article-card__content {
	padding: 24px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.article-card__categories {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--color-gold);
	margin-bottom: 12px;
}

.article-card__title {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 12px 0;
	line-height: 1.4;
}

.article-card__title a {
	color: var(--color-text);
	text-decoration: none;
	transition: color 0.3s ease;
}

.article-card__title a:hover {
	color: var(--color-primary);
}

.article-card__excerpt {
	font-size: 14px;
	line-height: 1.6;
	color: #666;
	margin: 0 0 16px 0;
	flex-grow: 1;
}

.article-card__meta {
	display: flex;
	gap: 16px;
	font-size: 12px;
	color: #999;
	margin-bottom: 16px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--color-cream);
}

.meta-date::before {
	content: '📅 ';
}

.meta-reading-time::before {
	content: '⏱️ ';
}

.article-card .btn--small {
	margin-top: auto;
}

/* ========================================
   Comparison Cards
   ======================================== */

.article-card--comparison {
	grid-column: span 1;
}

.article-card__comparison-images {
	position: relative;
	height: 240px;
	display: flex;
	align-items: center;
	background: linear-gradient(to right, var(--color-cream) 50%, #f5f5f5 50%);
	overflow: hidden;
}

.comparison-image {
	width: 50%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.comparison-image img {
	width: 90%;
	height: 90%;
	object-fit: contain;
	transition: transform 0.3s ease;
}

.article-card:hover .comparison-image img {
	transform: scale(1.1);
}

.comparison-separator {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	font-size: 18px;
	font-weight: 700;
	color: var(--color-primary);
	background: white;
	padding: 8px 12px;
	border-radius: 50%;
	border: 3px solid var(--color-primary);
	z-index: 3;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ========================================
   Sidebar Widgets
   ======================================== */

.sidebar-widget {
	background: white;
	border: 1px solid #f0f0f0;
	border-radius: 12px;
	padding: 24px;
	margin-bottom: 24px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.widget-title {
	font-size: 18px;
	font-weight: 700;
	color: var(--color-text);
	margin: 0 0 20px 0;
	padding-bottom: 12px;
	border-bottom: 3px solid var(--color-gold);
}

/* ========================================
   Affiliate Products Widget
   ======================================== */

.affiliate-products {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.affiliate-product {
	text-align: center;
	padding: 16px;
	background: var(--color-cream);
	border-radius: 8px;
	transition: all 0.3s ease;
}

.affiliate-product:hover {
	background: #fff4e6;
	transform: translateY(-4px);
}

.affiliate-product img {
	width: 100%;
	height: 180px;
	object-fit: cover;
	border-radius: 6px;
	margin-bottom: 12px;
}

.affiliate-product h4 {
	font-size: 14px;
	font-weight: 600;
	color: var(--color-text);
	margin: 0 0 8px 0;
}

.affiliate-product .price {
	font-size: 16px;
	font-weight: 700;
	color: var(--color-amazon);
	margin: 0 0 12px 0;
}

.affiliate-product .btn {
	width: 100%;
}

.btn--amazon {
	background: var(--color-amazon);
	color: white;
	border: none;
	padding: 10px 12px;
	font-size: 12px;
	font-weight: 600;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.3s ease;
	text-decoration: none;
	display: inline-block;
}

.btn--amazon:hover {
	background: #E87F00;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(255, 153, 0, 0.3);
}

/* ========================================
   Featured Widgets
   ======================================== */

.sidebar-widget--featured p {
	font-size: 14px;
	line-height: 1.6;
	color: #666;
	margin: 0 0 16px 0;
}

.brand-comparison-nav,
.popular-comparisons {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.comparison-item,
.comparison-link {
	display: block;
	padding: 12px;
	background: var(--color-cream);
	border-radius: 6px;
	text-decoration: none;
	color: var(--color-primary);
	font-size: 14px;
	font-weight: 600;
	transition: all 0.3s ease;
	border-left: 4px solid transparent;
}

.comparison-item:hover,
.comparison-link:hover {
	background: #fff4e6;
	border-left-color: var(--color-gold);
	padding-left: 16px;
}

/* ========================================
   Recommendation Widget
   ======================================== */

.recommendation-content {
	background: var(--color-cream);
	padding: 16px;
	border-radius: 8px;
	margin-bottom: 16px;
}

.recommendation-content p {
	font-size: 13px;
	line-height: 1.6;
	color: var(--color-text);
	margin: 0 0 12px 0;
}

.recommendation-criteria {
	list-style: none;
	padding: 0;
	margin: 0;
	font-size: 13px;
	line-height: 1.8;
	color: var(--color-primary);
}

.recommendation-criteria li {
	margin-bottom: 6px;
}

/* ========================================
   Quick Guide Widget
   ======================================== */

.quick-guide-steps {
	counter-reset: steps;
	list-style: none;
	padding: 0;
	margin: 0 0 16px 0;
}

.quick-guide-steps li {
	counter-increment: steps;
	display: flex;
	gap: 12px;
	margin-bottom: 12px;
	font-size: 14px;
	line-height: 1.6;
	color: var(--color-text);
}

.quick-guide-steps li::before {
	content: counter(steps);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	background: var(--color-gold);
	color: white;
	border-radius: 50%;
	font-weight: 700;
	font-size: 12px;
	flex-shrink: 0;
}

/* ========================================
   Pagination
   ======================================== */

.navigation.pagination {
	display: flex;
	justify-content: center;
	gap: 12px;
	margin-top: 40px;
	padding-top: 40px;
	border-top: 2px solid var(--color-cream);
}

.pagination a,
.pagination span {
	padding: 10px 14px;
	border: 2px solid var(--color-cream);
	border-radius: 6px;
	text-decoration: none;
	color: var(--color-primary);
	font-weight: 600;
	transition: all 0.3s ease;
	display: inline-block;
}

.pagination a:hover {
	border-color: var(--color-primary);
	background: var(--color-cream);
}

.pagination .page-numbers.current {
	background: var(--color-primary);
	color: white;
	border-color: var(--color-primary);
}

/* ========================================
   Button Styles
   ======================================== */

.btn {
	display: inline-block;
	padding: 12px 24px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	border: none;
	cursor: pointer;
	transition: all 0.3s ease;
	text-align: center;
}

.btn--primary {
	background: var(--color-primary);
	color: white;
}

.btn--primary:hover {
	background: var(--color-dark);
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(111, 78, 55, 0.3);
}

.btn--secondary {
	background: var(--color-gold);
	color: var(--color-text);
}

.btn--secondary:hover {
	background: #C49760;
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(212, 167, 106, 0.3);
}

.btn--small {
	padding: 8px 16px;
	font-size: 12px;
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
	.category-hero {
		padding: 40px 20px;
	}

	.category-hero__icon {
		font-size: 36px;
	}

	.category-hero__title {
		font-size: 32px;
	}

	.category-hero__desc {
		font-size: 16px;
	}

	.category-filter-tabs {
		gap: 8px;
	}

	.filter-tab {
		padding: 8px 16px;
		font-size: 12px;
	}

	.category-page-wrap {
		flex-direction: column;
		padding: 20px;
		gap: 20px;
	}

	.category-sidebar {
		width: 100%;
	}

	.posts-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}

	.articles-grid,
	.articles-grid--2col {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.article-card__comparison-images {
		flex-direction: column;
		background: linear-gradient(to bottom, var(--color-cream) 50%, #f5f5f5 50%);
	}

	.comparison-image {
		width: 100%;
		height: 50%;
	}

	.comparison-separator {
		transform: translate(-50%, -50%) rotate(90deg);
	}

	.category-hero--comparativas .category-hero__content-left,
	.category-hero--comparativas .category-hero__content-right {
		float: none;
		width: 100%;
		padding: 0;
		text-align: center;
	}

	.article-card__image {
		height: 200px;
	}

	.affiliate-product img {
		height: 140px;
	}

	.pagination {
		flex-wrap: wrap;
	}
}

@media (max-width: 480px) {
	.category-hero__title {
		font-size: 24px;
	}

	.category-hero__icon {
		font-size: 28px;
	}

	.posts-count {
		font-size: 14px;
	}

	.sort-dropdown {
		font-size: 12px;
		padding: 8px 12px;
	}

	.widget-title {
		font-size: 16px;
	}
}
