/* Modern Ofertas Styles for ConstruDepot */

body {
	background: #f8f9fa;
	margin: 0 !important;
	padding: 0 !important;
}

/* Remove extra spacing */
body > div:first-of-type {
	margin-top: 0 !important;
}

/* Main Container */
.ofertas-main-wrapper {
	max-width: 1600px;
	margin: 0 auto;
	padding: 20px 20px 60px 20px;
}

/* Modern Page Header */
.ofertas-header {
	display: flex;
	align-items: center;
	gap: 20px;
	margin-bottom: 40px;
	padding-bottom: 20px;
	border-bottom: 4px solid transparent;
	background: linear-gradient(90deg, #f7931d 26%, #0673B5 100%) left bottom no-repeat;
	background-size: 100% 4px;
}

.ofertas-title {
	font-family: 'Poppins', century-gothic, sans-serif;
	font-size: 2.5rem;
	font-weight: 700;
	color: #1f2937;
	margin: 0;
	display: flex;
	align-items: center;
	gap: 12px;
}

.ofertas-title svg {
	color: #f7931d;
}

/* Products Grid */
.products-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 32px;
	margin-bottom: 48px;
}

/* Product Card */
.product-card-ofertas {
	background: white;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.product-card-ofertas:hover {
	transform: translateY(-8px);
	box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
}

/* Image Container */
.product-image-container {
	position: relative;
	padding: 24px;
	background: white;
	height: 240px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	border-bottom: 1px solid #e5e7eb;
}

.product-image-container img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	transition: transform 0.3s ease;
}

.product-card-ofertas:hover .product-image-container img {
	transform: scale(1.05);
}

/* Discount Badge */
.discount-badge {
	position: absolute;
	top: 16px;
	right: 16px;
	background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
	color: white;
	padding: 8px 16px;
	border-radius: 20px;
	font-weight: 700;
	font-size: 14px;
	box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
	z-index: 10;
}

/* Product Details */
.product-card-ofertas .product-details {
	padding: 24px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	margin-top: 0 !important;
}

.product-card-ofertas .product-name {
	font-size: 14px !important;
	font-weight: 600;
	color: #1f2937 !important;
	line-height: 1.4;
	margin: 0 0 10px 0 !important;
	min-height: 40px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.product-card-ofertas .product-name a {
	color: #1f2937;
	text-decoration: none;
	transition: color 0.2s ease;
}

.product-card-ofertas .product-name a:hover {
	color: #f7931d;
}

.product-card-ofertas .product-code {
	font-size: 11px;
	color: #9ca3af;
	margin: 0 0 6px 0;
}

/* Price Section */
.product-price-section {
	margin-top: auto;
	padding-top: 16px;
	border-top: 1px solid #e5e7eb;
}

.price-container {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 16px;
}

.original-price {
	font-size: 14px;
	color: #9ca3af;
	text-decoration: line-through;
	font-weight: 500;
}

.discount-price {
	font-size: 18px;
	font-weight: 700;
	color: #f7931d;
}

.savings-text {
	font-size: 12px;
	color: #10b981;
	font-weight: 600;
	margin: 0 0 12px 0;
}

/* Add to Cart Button */
.btn-add-cart {
	background: linear-gradient(135deg, #f7931d 0%, #ffab4a 100%);
	color: white;
	padding: 10px 16px;
	border-radius: 8px;
	border: none;
	font-weight: 600;
	font-size: 13px;
	width: 100%;
	transition: all 0.3s ease;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	box-shadow: 0 4px 12px rgba(247, 100, 32, 0.25);
}

.btn-add-cart:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(247, 100, 32, 0.4);
}

.btn-add-cart:active {
	transform: translateY(0);
}

/* Pagination */
nav[data-pagination] {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 48px;
	padding: 24px;
	background: white;
	border-radius: 16px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

nav[data-pagination] a {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 12px;
	border-radius: 10px;
	background: white;
	color: #6b7280;
	text-decoration: none;
	font-weight: 600;
	border: 2px solid #e5e7eb;
	transition: all 0.2s ease;
}

nav[data-pagination] a:hover:not([disabled]) {
	background: #fff5f0;
	border-color: #f7931d;
	color: #f7931d;
}

nav[data-pagination] ul {
	display: flex;
	list-style: none;
	gap: 8px;
	margin: 0;
	padding: 0;
}

nav[data-pagination] ul li {
	margin: 0;
}

nav[data-pagination] ul li a {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	border-radius: 10px;
	background: white;
	color: #6b7280;
	text-decoration: none;
	font-weight: 600;
	border: 2px solid #e5e7eb;
	transition: all 0.2s ease;
}

nav[data-pagination] ul li.current a {
	background: linear-gradient(135deg, #f7931d 0%, #ffab4a 100%);
	border-color: #f7931d;
	color: white;
	box-shadow: 0 4px 12px rgba(247, 100, 32, 0.25);
}

nav[data-pagination] ul li:hover a:not(.current) {
	background: #fff5f0;
	border-color: #f7931d;
	color: #f7931d;
}

nav[data-pagination] ul li span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	color: #6b7280;
	font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1400px) {
	.products-grid {
		grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
		gap: 28px;
	}
}

@media (max-width: 1200px) {
	.products-grid {
		grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
		gap: 24px;
	}

	.ofertas-title {
		font-size: 2rem;
	}
}

@media (max-width: 992px) {
	.products-grid {
		grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
		gap: 20px;
	}

	.ofertas-main-wrapper {
		padding: 16px 16px 48px 16px;
	}
}

@media (max-width: 768px) {
	.products-grid {
		grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
		gap: 16px;
	}

	.ofertas-title {
		font-size: 1.75rem;
	}

	.product-image-container {
		height: 180px;
		padding: 16px;
	}

	.product-details {
		padding: 16px;
	}
}

@media (max-width: 576px) {
	.products-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}

	.ofertas-main-wrapper {
		padding: 12px;
	}

	.ofertas-title {
		font-size: 1.5rem;
	}

	.product-image-container {
		height: 150px;
		padding: 12px;
	}

	.product-card-ofertas .product-details {
		padding: 12px;
	}

	.product-card-ofertas .product-name {
		font-size: 12px !important;
		min-height: 34px;
	}

	.product-card-ofertas .product-code {
		font-size: 10px;
	}

	/* Fix precio en móviles - evitar que se corte en dos líneas */
	.price-container {
		flex-direction: column;
		align-items: flex-start;
		gap: 4px;
		margin-bottom: 10px;
	}

	.original-price {
		font-size: 12px;
	}

	.discount-price {
		font-size: 16px;
		white-space: nowrap;
	}

	.savings-text {
		font-size: 10px;
		margin-bottom: 8px;
	}

	.btn-add-cart {
		padding: 10px 12px;
		font-size: 12px;
	}
}

/* Override Bootstrap styles - only hide old layout containers */
body > .container-fluid:not(.ofertas-main-wrapper) {
	padding: 0 !important;
}
