/*
Theme Name: BonosPremium Theme
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Tema hijo de Hello Elementor para BonosPremium Gran Canaria - Optimizado para rendimiento y seguridad
Author: BonosPremium Team
Author URI: https://bonospremiumgc.com/
Template: hello-elementor
Version: 2.1.1
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready, e-commerce
*/

/* ============================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   ============================================ */
:root {
	--hec-primary: #fee404;
	--hec-primary-dark: #e5cc00;
	--hec-text: #070604;
	--hec-text-light: #333333;
	--hec-gray: #767676;
	--hec-border: #d9d9d9;
	--hec-white: #ffffff;
	--hec-shadow: rgba(0, 0, 0, 0.1);
	
	/* Tamaños de fuente fluidos */
	--hec-text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
	--hec-text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
	--hec-text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
	--hec-text-lg: clamp(1.125rem, 1rem + 0.625vw, 1.25rem);
	--hec-text-xl: clamp(1.25rem, 1.1rem + 0.75vw, 1.5rem);
	
	/* Espaciado */
	--hec-space-xs: clamp(0.25rem, 0.2rem + 0.25vw, 0.5rem);
	--hec-space-sm: clamp(0.5rem, 0.4rem + 0.5vw, 0.75rem);
	--hec-space-md: clamp(1rem, 0.8rem + 1vw, 1.5rem);
	--hec-space-lg: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
	
	/* Transiciones */
	--hec-transition-fast: 150ms ease;
	--hec-transition-base: 300ms ease;
	--hec-transition-slow: 500ms ease;
}

/* ============================================
   RESET Y BASE
   ============================================ */

/* Prevenir layout shift con imágenes */
img {
	height: auto;
	max-width: 100%;
	vertical-align: middle;
}

/* ============================================
   SECCIÓN PORTADA
   ============================================ */

/* Ocultar botón AJAX de añadir al carrito */
a.button.product_type_simple.add_to_cart_button.ajax_add_to_cart {
	display: none !important;
}

/* ============================================
   SECCIÓN SCANNER
   ============================================ */

select#scan-action {
	display: none;
}

input#scan-code {
	float: left;
	display: block;
	margin: 0 !important;
	width: 80% !important;
}

i#openreader-btn {
	font-size: 2em;
	padding: 0.2em;
	position: absolute;
	right: 20%;
}

input[type="submit"] {
	float: left;
}

/* ============================================
   SECCIÓN TABLA
   ============================================ */

div#tablaBonos_length {
	float: left;
}

input[type="search"] {
	margin-right: -2.5em;
}

table.dataTable.no-footer {
	margin-top: 2em !important;
	border-bottom: 1px solid rgba(0, 0, 0, 0.3);
	border-top: 1px solid rgba(0, 0, 0, 0.3);
}

#tablaBonos th,
#tablaBonos td {
	padding: 0;
	border: none;
}

/* ============================================
   COMPONENTES WOOCOMMERCE
   ============================================ */

/* Indicador contraseña - Ocultar por diseño */
.woocommerce-password-strength,
.woocommerce-password-hint {
	display: none !important;
}

/* Texto usuarios registrados checkout */
p.e-woocommerce-login-nudge.e-description {
	display: none;
}

/* Precio productos - Mantener espacio reservado para evitar CLS */
p.price {
	margin-block-start: 1px;
	min-height: 1.5em;
}

p.price > span.woocommerce-Price-amount.amount > bdi {
	color: var(--hec-primary);
	font-size: 24px;
	font-weight: 500;
}

/* Ocultar flecha select */
select#horas {
	-moz-appearance: none;
	-webkit-appearance: none;
	appearance: none;
}

/* Bullets al actualizar bug elementor update */
li.elementor-icon-list-item {
	list-style-type: none;
}

/* Contenedor delete account */
.deleteAccount_form {
	padding: 2em 0;
	display: none;
}

/* Contenedor de códigos de barras en órdenes */
div.woocommerce-order > section.woocommerce-order-details > .woocommerce-order-barcodes-container {
	display: none;
}

/* ============================================
   PÁGINA PERSONALIZADA - PRODUCTOS
   ============================================ */

/* Imagen tarjetas - Aspect ratio fijo para evitar CLS */
img.attachment-woocommerce_single.size-woocommerce_single,
img.swiper-slide-image {
	aspect-ratio: 41/30;
	object-fit: cover;
}

/* Puntos suspensivos en excepciones */
.elementor-widget-theme-post-excerpt > .elementor-widget-container {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.puntos > div.elementor-widget-container > h2 {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

/* ============================================
   RESPONSIVE - VERSIÓN ESCRITORIO
   ============================================ */

@media (max-width: 800px) {
	/* Flechas diapositivas */
	.elementor-swiper-button.elementor-swiper-button-prev,
	.elementor-swiper-button.elementor-swiper-button-next {
		display: none !important;
	}
}

@media (min-width: 801px) {
	/* Botón Comprar */
	.elementor-add-to-cart.elementor-product-simple {
		width: 50%;
		margin-left: 25%;
	}
	
	/* Menu superior */
	.elementor-nav-menu--layout-horizontal .elementor-nav-menu {
		display: flex;
		flex-wrap: nowrap;
		overflow-x: auto;
		scrollbar-color: var(--hec-gray);
		scrollbar-width: thin;
		justify-content: left !important;
	}
}

/* Botones del carrusel */
.elementor-swiper-button.elementor-swiper-button-prev,
.elementor-swiper-button.elementor-swiper-button-next {
	color: hsl(0deg 0% 100%);
	transition: opacity var(--hec-transition-fast);
}

.elementor-swiper-button.elementor-swiper-button-prev:hover,
.elementor-swiper-button.elementor-swiper-button-next:hover {
	opacity: 0.8;
}

/* ============================================
   CHECKOUT
   ============================================ */

/* Barra de búsqueda */
.elementor-search-form__container {
	height: 4.5em !important;
}

a.dialog-close-button.dialog-lightbox-close-button {
	right: 0.5em;
}

.dialog-lightbox-close-button.dialog-close-button {
	padding: 0 0 0.5em 0;
}

.woocommerce-Address-title > h3 {
	margin-top: 1em !important;
	margin-bottom: 0.5em !important;
}

/* Bullets más arriba */
.swiper-pagination.swiper-pagination-clickable.swiper-pagination-bullets.swiper-pagination-horizontal {
	margin-bottom: 0.4em;
}

/* Area notificaciones woocommerce */
.woocommerce-message {
	display: none;
}

/* Texto opcional en forms */
.optional,
span.optional {
	display: none;
}

/* Regalos */
.woocommerce-additional-fields > h3 {
	display: none;
}

/* Cupones */
label.e-coupon-anchor-description {
	display: none;
}

.e-coupon-anchor {
	margin-top: 0.5em !important;
}

/* Métodos de pago */
.wc_payment_method.payment_method_cecabank_gateway {
	display: none;
}

.woocommerce-privacy-policy-text {
	display: none;
}

/* Formulario finalizar */
div#payment {
	border: 0 !important;
	padding: 0.5em !important;
}

.woocommerce-terms-and-conditions-wrapper {
	text-align: center;
}

div.woocommerce-terms-and-conditions-wrapper > p > label > abbr.required,
input#terms {
	display: none;
}

/* ============================================
   VARIACIONES EN PRODUCTO ÚNICO
   ============================================ */

th.label,
td.value {
	background-color: white !important;
	padding: 0;
	border: none;
	vertical-align: middle;
}

th.label > label {
	font-size: 1.2em;
	margin-bottom: 4px;
}

td.value > select {
	border: 1px solid var(--hec-border);
	background: none;
}

.woocommerce div.product form.cart .variations {
	margin-bottom: 0.5em;
}

a.reset_variations {
	display: none !important;
}

.woocommerce-variation.single_variation {
	text-align: center;
}

.price ins {
	text-decoration: none;
}

del > span.woocommerce-Price-amount.amount {
	color: var(--hec-gray);
	text-decoration-color: var(--hec-gray);
	font-family: Arial, sans-serif;
	font-weight: 500;
	font-size: 1em;
	text-decoration: line-through;
}

/* ============================================
   FAVORITOS / WISHLIST
   ============================================ */

tr.wlfmc-table-item {
	padding-bottom: 0 !important;
	max-width: 100% !important;
	min-width: 100% !important;
	position: relative;
	border: none !important;
	border-bottom: 1px solid !important;
	border-radius: 0 !important;
}

.wlfmc-wishlist-table .wishlist-items-wrapper:not(.wishlist-empty) {
	display: grid;
	grid-gap: 0 !important;
	grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
	justify-items: center;
}

.wlfmc-wishlist-footer {
	display: none;
}

label.product-checkbox.checkbox-label > span {
	display: none;
}

/* Botones de la wishlist */
.wlfmc-default-table-header:not(.is-elementor) .button,
.wlfmc-default-table:not(.is-elementor) .wlfmc-wishlist-footer .apply-btn,
.wlfmc-default-table:not(.is-elementor).add-to-card-same-button tr td.last-column .button:not(.minus):not(.plus),
.wlfmc-default-table:not(.is-elementor) .wlfmc-wishlist-footer .button,
.wlfmc-default-table:not(.is-elementor) .wlfmc-wishlist-footer button[type="submit"],
.wlfmc-default-table:not(.is-elementor) .wlfmc-wishlist-footer input[type="submit"],
.wlfmc-default-table:not(.is-elementor) .wlfmc-wishlist-footer select,
.wlfmc-default-table:not(.is-elementor).qty-same-button input.qty,
.wlfmc-default-table:not(.is-elementor).qty-same-button .quantity .button {
	background-color: var(--hec-primary) !important;
	color: var(--hec-white) !important;
	font-family: Arial, sans-serif;
	font-weight: 700;
}

[type="button"],
[type="submit"],
button {
	border: none !important;
}

/* Corazones Wishlist */
i.wlfmc-icon-heart,
i.wlfmc-icon-heart-o {
	font-weight: bold;
}

.wlfmc-add-to-wishlist.wlfmc-single-btn.is-elementor.wlfmc-btn-type-icon.show-remove-after-add {
	float: right;
}

i.far.fa-heart {
	font-family: wlfmc-icons !important;
	speak: never;
	font-style: normal;
	font-weight: 950;
	font-variant: normal;
	text-transform: none;
	line-height: 1;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

i.far.fa-heart::before {
	content: "\e90c";
}

/* ============================================
   BOTONES WOOCOMMERCE PERSONALIZADOS
   ============================================ */

.woocommerce-button.button.woocommerce-form-login__submit.e-woocommerce-form-login-submit {
	background-color: var(--hec-primary);
	color: var(--hec-text);
	transition: background-color var(--hec-transition-fast);
}

.woocommerce-button.button.woocommerce-form-login__submit.e-woocommerce-form-login-submit:hover {
	background-color: var(--hec-primary-dark);
}

button.woocommerce-button.button.e-apply-coupon {
	background-color: var(--hec-primary) !important;
	color: var(--hec-text) !important;
	transition: opacity var(--hec-transition-fast);
}

button.woocommerce-button.button.e-apply-coupon:hover {
	opacity: 0.9;
}

/* ============================================
   UTILIDADES
   ============================================ */

#altEmail_container,
.altEmail_container {
	display: none !important;
}

b,
strong {
	font-weight: bold !important;
}

.e-show-login,
.e-show-coupon-form,
#bpPrevio_pdf {
	font-weight: bold !important;
}

/* ============================================
   ANIMACIONES Y TRANSICIONES
   ============================================ */

a,
button,
input[type="submit"] {
	transition: opacity var(--hec-transition-base),
				background-color var(--hec-transition-fast),
				transform var(--hec-transition-fast);
}

a:hover,
button:hover,
input[type="submit"]:hover {
	opacity: 0.85;
}

button:active,
input[type="submit"]:active {
	transform: scale(0.98);
}

/* ============================================
   MEJORAS DE ACCESIBILIDAD
   ============================================ */

/* Focus visible para navegación por teclado */
:focus-visible {
	outline: 2px solid var(--hec-primary);
	outline-offset: 2px;
}

/* Skip to content para lectores de pantalla */
.skip-link {
	position: absolute;
	top: -40px;
	left: 0;
	background: var(--hec-primary);
	color: var(--hec-text);
	padding: 8px;
	text-decoration: none;
	z-index: 100000;
}

.skip-link:focus {
	top: 0;
}

/* Reducir movimiento para usuarios que lo prefieren */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
	.elementor-nav-menu,
	.woocommerce-message,
	.add-to-cart,
	.wlfmc-add-to-wishlist,
	.elementor-search-form {
		display: none !important;
	}
	
	body {
		font-size: 12pt;
		line-height: 1.5;
	}
	
	a {
		text-decoration: none;
		color: #000;
	}
}

/* ============================================
   LOADING STATES
   ============================================ */

/* Estado de carga para botones */
.button.loading,
button.loading {
	position: relative;
	opacity: 0.7;
	pointer-events: none;
}

.button.loading::after,
button.loading::after {
	content: '';
	position: absolute;
	width: 1em;
	height: 1em;
	border: 2px solid transparent;
	border-top-color: currentColor;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
	margin-left: 0.5em;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}
