/*
Theme Name: Ofertacular
Theme URI: https://ofertacular.com/
Description: Tema de Ofertacular. Hijo de Rehub: mantiene toda su maquinaria (WooCommerce, Elementor, menus) y sustituye la ficha de producto y el aspecto por el diseno propio de la casa. Las personalizaciones van aqui para que no se pierdan al actualizar Rehub.
Author: Ofertacular
Template: rehub-theme
Version: 1.0.0
Text Domain: ofertacular
*/

/* ==========================================================================
   1. Variables de marca
   ========================================================================== */

:root {
	--ofc-tinta:    #141318;
	--ofc-papel:    #FBFAF6;
	--ofc-marca:    #C9231B;
	--ofc-amarillo: #FFD60A;
	--ofc-gris:     #5C5967;
	--ofc-linea:    #E4E0D8;
	--ofc-radio:    16px;
	--ofc-sombra:   6px;
}

/* Un color por categoria. Si no casa ninguna, rojo de marca. */
.ofc-card                                { --ofc: var(--ofc-marca); }
.ofc-card.ofc-cat-electronica            { --ofc: #1D4ED8; }
.ofc-card.ofc-cat-hogar-y-bricolaje      { --ofc: #0E7490; }
.ofc-card.ofc-cat-moda-y-accesorios      { --ofc: #BE185D; }
.ofc-card.ofc-cat-salud-y-belleza        { --ofc: #6D28D9; }
.ofc-card.ofc-cat-deportes               { --ofc: #0F7B4F; }
.ofc-card.ofc-cat-juguetes-y-coleccionables { --ofc: #C2410C; }
.ofc-card.ofc-cat-alimentacion-y-bebidas { --ofc: #9A3412; }
.ofc-card.ofc-cat-smartphones-y-tablets  { --ofc: #4338CA; }
.ofc-card.ofc-cat-gaming-y-videojuegos   { --ofc: #7C3AED; }

/* ==========================================================================
   2. La ficha de producto
   ========================================================================== */

.ofc-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 2.5px solid var(--ofc-tinta);
	border-radius: var(--ofc-radio);
	box-shadow: var(--ofc-sombra) var(--ofc-sombra) 0 var(--ofc);
	overflow: visible;
	margin: 0 0 calc(var(--ofc-sombra) + 22px);
	font-family: Archivo, system-ui, -apple-system, sans-serif;
}

/* banda de categoria */
.ofc-card__band {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 9px 14px;
	background: var(--ofc);
	color: #fff;
	border-bottom: 2.5px solid var(--ofc-tinta);
	border-radius: 13px 13px 0 0;
}

.ofc-card__cat {
	font-size: 11px;
	font-weight: 900;
	letter-spacing: 1.3px;
	text-transform: uppercase;
	line-height: 1.2;
}

.ofc-card__time {
	font-size: 11.5px;
	font-weight: 600;
	opacity: .92;
	white-space: nowrap;
}

/* la foto: grande, es lo que vende */
.ofc-card__media {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 260px;
	padding: 16px;
	box-sizing: border-box;
	background: #fff;
	border-bottom: 2.5px solid var(--ofc-tinta);
	overflow: hidden;
}

.ofc-card__media img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
}

/* pegatina de descuento */
.ofc-card__off {
	position: absolute;
	top: 12px;
	right: 12px;
	left: auto;
	bottom: auto;
	display: inline-block;
	width: auto;
	height: auto;
	padding: 4px 10px;
	background: var(--ofc-amarillo);
	color: var(--ofc-tinta);
	border: 2.5px solid var(--ofc-tinta);
	border-radius: 10px;
	font-size: 16px;
	font-weight: 900;
	letter-spacing: -.5px;
	line-height: 1.25;
	white-space: nowrap;
	transform: rotate(6deg);
}

.ofc-card__body {
	display: flex;
	flex-direction: column;
	gap: 13px;
	padding: 15px 16px 16px;
	flex: 1;
}

.ofc-card__title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -.3px;
	min-height: 42px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ofc-card__title a { color: var(--ofc-tinta); text-decoration: none; }
.ofc-card__title a:hover { color: var(--ofc); }

/* el precio, con forma de etiqueta troquelada */
.ofc-card__price {
	position: relative;
	background: var(--ofc-papel);
	border: 2.5px solid var(--ofc-tinta);
	border-radius: 11px;
	padding: 11px 14px 11px 28px;
}

.ofc-card__price::before {
	content: "";
	position: absolute;
	left: -10px;
	top: 50%;
	transform: translateY(-50%);
	width: 17px;
	height: 17px;
	background: #fff;
	border: 2.5px solid var(--ofc-tinta);
	border-radius: 50%;
}

.ofc-card__now {
	display: flex;
	align-items: flex-start;
	color: var(--ofc-tinta);
	font-variant-numeric: tabular-nums;
}

.ofc-card__now b {
	font-size: 36px;
	font-weight: 900;
	letter-spacing: -1.8px;
	line-height: .9;
}

.ofc-card__now i {
	font-size: 18px;
	font-weight: 900;
	font-style: normal;
	letter-spacing: -.4px;
	padding-top: 2px;
}

.ofc-card__was {
	margin: 7px 0 0;
	font-size: 12.5px;
	font-weight: 500;
	color: var(--ofc-gris);
}

.ofc-card__was s { font-variant-numeric: tabular-nums; }
.ofc-card__was b { color: var(--ofc-tinta); font-weight: 800; }

/* el boton */
.ofc-card__cta {
	display: flex;
	align-items: center;
	gap: 11px;
	margin-top: auto;
	padding: 11px 14px;
	min-height: 62px;
	box-sizing: border-box;
	background: var(--ofc);
	color: #fff;
	border: 2.5px solid var(--ofc-tinta);
	border-radius: 11px;
	text-decoration: none;
	transition: background .15s;
}

.ofc-card__cta:hover { background: var(--ofc-tinta); color: #fff; }

.ofc-card__cta span {
	flex: 1;
	min-width: 0;
	display: block;
	font-size: 15.5px;
	font-weight: 800;
	letter-spacing: -.3px;
	line-height: 1.2;
}

.ofc-card__cta em {
	display: block;
	margin-top: 3px;
	font-size: 11.5px;
	font-weight: 500;
	font-style: normal;
	color: #F0F0F3;
}

.ofc-card__cta svg { flex: 0 0 17px; }

/* la rejilla de WooCommerce respira mas */
.woocommerce ul.products,
.woocommerce .products.columns-3,
.woocommerce .products.columns-4 {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
	gap: 26px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after { content: none !important; }

.woocommerce ul.products li.product,
.woocommerce .products .ofc-card {
	width: auto !important;
	margin: 0 0 calc(var(--ofc-sombra) + 22px) !important;
	float: none !important;
	clear: none !important;
}

/* Rehub pinta cosas encima de la ficha que ya no hacen falta */
.ofc-card .heart_thumb_wrap,
.ofc-card .button_action,
.ofc-card .thumbscount,
.ofc-card .cell_wishlist { display: none !important; }

/* ==========================================================================
   3. Cabecera
   ========================================================================== */

#main_header .logo_section_wrap,
#main_header .logo_section_wrap.hideontablet {
	background: var(--ofc-tinta) !important;
}

#main_header .main-nav,
#main_header .header_icons_menu,
header .main-nav,
.main-nav.dark_style {
	background: var(--ofc-tinta) !important;
	box-shadow: none !important;
	border-top: 2px solid #26242E !important;
}

nav.top_menu > ul > li > a {
	color: #fff !important;
	font-family: Archivo, system-ui, sans-serif;
	font-weight: 700 !important;
	letter-spacing: .3px;
}

nav.top_menu > ul > li > a:hover { color: var(--ofc-amarillo) !important; }

#main_header .search form.search-form input[type="text"] {
	background: #23222B;
	border: 2px solid #35343E;
	border-radius: 10px;
	color: #fff;
}

#main_header .search form.search-form input[type="text"]::placeholder { color: #9B99A6; }

/* los iconos sociales del menu */
li.ofc-social { float: right; display: flex; align-items: center; gap: 2px; padding: 0 6px; }

li.ofc-social a.ofc-social-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 38px;
	color: #fff;
	opacity: .85;
}

li.ofc-social a.ofc-social-link:hover { opacity: 1; color: var(--ofc-amarillo); }

@media (max-width: 1024px) {
	li.ofc-social { display: none; }
}

/* ==========================================================================
   4. Movil
   ========================================================================== */

@media (max-width: 640px) {
	:root { --ofc-sombra: 5px; }

	.woocommerce ul.products,
	.woocommerce .products.columns-3,
	.woocommerce .products.columns-4 {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.ofc-card__media { height: 220px; }
	.ofc-card__now b { font-size: 32px; }
	.ofc-card__title { font-size: 15.5px; }
}

/* ==========================================================================
   5. Fichas de la portada (modulo wpsm_woorows de Rehub)
   Mientras ese widget siga siendo de Rehub, al menos que tenga nuestra cara.
   ========================================================================== */

.r_offer_details {
	position: relative;
	background: #fff;
	border: 2.5px solid var(--ofc-tinta) !important;
	border-radius: var(--ofc-radio);
	box-shadow: var(--ofc-sombra) var(--ofc-sombra) 0 var(--ofc-marca);
	padding: 16px;
	margin: 0 0 28px;
	font-family: Archivo, system-ui, sans-serif;
}

.r_offer_details .rh_gr_img_first {
	background: #fff;
	border: 2px solid var(--ofc-tinta);
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px;
	box-sizing: border-box;
	min-height: 190px;
}

.r_offer_details .rh_gr_img_first img {
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}

.r_offer_details .onsale {
	position: absolute;
	top: 10px;
	left: 10px;
	right: auto !important;
	bottom: auto !important;
	display: inline-block !important;
	width: auto !important;
	height: auto !important;
	min-width: 0 !important;
	min-height: 0 !important;
	margin: 0;
	padding: 4px 10px;
	background: var(--ofc-amarillo);
	color: var(--ofc-tinta);
	border: 2.5px solid var(--ofc-tinta);
	border-radius: 10px;
	font-size: 15px;
	font-weight: 900;
	letter-spacing: -.4px;
	line-height: 1.25;
	white-space: nowrap;
	transform: rotate(-6deg);
	box-shadow: none;
	z-index: 6;
}

.r_offer_details h2,
.r_offer_details h3 {
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -.3px;
	margin: 0 0 8px;
}

.r_offer_details h2 a,
.r_offer_details h3 a { color: var(--ofc-tinta); }

.r_offer_details .rh_gr_middle_desc {
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--ofc-gris);
}

.r_offer_details .pricefont110 {
	position: relative;
	display: inline-block;
	background: var(--ofc-papel);
	border: 2.5px solid var(--ofc-tinta);
	border-radius: 11px;
	padding: 9px 14px 9px 26px;
	margin: 10px 0 12px;
	color: var(--ofc-tinta);
}

.r_offer_details .pricefont110::before {
	content: "";
	position: absolute;
	left: -10px;
	top: 50%;
	transform: translateY(-50%);
	width: 17px;
	height: 17px;
	background: #fff;
	border: 2.5px solid var(--ofc-tinta);
	border-radius: 50%;
}

.r_offer_details .pricefont110 ins {
	background: none;
	text-decoration: none;
	font-size: 28px;
	font-weight: 900;
	letter-spacing: -1.2px;
	line-height: 1;
	color: var(--ofc-tinta);
}

.r_offer_details .pricefont110 del {
	display: block;
	margin-top: 5px;
	opacity: 1;
	font-size: 12.5px;
	font-weight: 500;
	color: var(--ofc-gris);
}

.r_offer_details .btn_offer_block,
.r_offer_details .re_track_btn.woo_loop_btn {
	background: var(--ofc-marca) !important;
	color: #fff !important;
	border: 2.5px solid var(--ofc-tinta) !important;
	border-radius: 11px !important;
	font-family: Archivo, system-ui, sans-serif !important;
	font-size: 14.5px !important;
	font-weight: 800 !important;
	min-height: 52px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 22px;
	box-shadow: none !important;
	text-shadow: none;
}

.r_offer_details .date_ago { font-size: 12px; color: var(--ofc-gris); }

/* ofc-radio-fix: Rehub fuerza 5px de radio en .news-community */
.r_offer_details {
	border-radius: var(--ofc-radio) !important;
}

/* ==========================================================================
   6. ofc-precio-grande: el precio manda, va centrado y grande
   ========================================================================== */

.ofc-card__price {
	padding: 18px 16px 16px;
	text-align: center;
}

.ofc-card__price::before { left: -11px; }

.ofc-card__now {
	justify-content: center;
	line-height: 1;
}

.ofc-card__now b {
	font-size: 56px;
	letter-spacing: -2.8px;
}

.ofc-card__now i {
	font-size: 26px;
	letter-spacing: -.6px;
	padding-top: 4px;
}

.ofc-card__was {
	margin-top: 10px;
	font-size: 15px;
	font-weight: 600;
	color: #3F3C49;
}

.ofc-card__was s { color: var(--ofc-gris); font-weight: 500; }
.ofc-card__was b { font-size: 16px; font-weight: 900; }

@media (max-width: 640px) {
	.ofc-card__now b { font-size: 50px; }
	.ofc-card__now i { font-size: 24px; }
	.ofc-card__was { font-size: 14.5px; }
}
