/**
 * Mini Cart Sidebar Custom Styles
 * 
 * @package UnDetalle
 * @since 1.0.0
 */

/* Z-INDEX - Manejado desde elementor-widgets/mini-cart.php */
/* DESACTIVADO - Se usa body::before para el backdrop */
/*.mini-cart-sidebar-overlay {
	z-index: 99999998 !important;
}

.mini-cart-sidebar-content {
	z-index: 99999999 !important;
}*/

/* Badge del contador con degradado blanco */
.elementor-74 .elementor-element.elementor-element-5c65973 .cart-count-badge {
	background: linear-gradient(135deg, #ffffff 0%, #fffefe 100%) !important;
	color: #EC5970 !important;
	border: 2px solid #EC5970;
	box-shadow: 0 2px 8px rgba(236, 89, 112, 0.4);
}

/* También aplicar a todos los badges del carrito */
.cart-count-badge {
	background: linear-gradient(135deg, #ffffff 0%, #fffefe 100%) !important;
	color: #EC5970 !important;
	border: 2px solid #EC5970;
	font-weight: 700;
}

/* Mejoras al sidebar del mini cart */
.mini-cart-sidebar-body {
	display: flex;
	flex-direction: column;
	height: 100%;
}

/* Contenedor scrolleable */
.mini-cart-items-scroll {
	flex: 1;
	overflow-y: auto;
	padding-bottom: 20px;
}

/* Footer fixed al fondo */
.mini-cart-sidebar-footer {
	position: sticky;
	bottom: 0;
	background: white;
	border-top: 2px solid #f0f0f0;
	padding: 20px 25px;
	box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.1);
	z-index: 10;
}

/* Timer mejorado con colores del sistema */
.cart-timeout-warning {
	background: linear-gradient(135deg, #fff9e6 0%, #fff5e0 100%);
	border: 2px solid #ffc107;
	border-radius: 14px;
	padding: 15px 18px;
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	gap: 12px;
	box-shadow: 0 4px 12px rgba(255, 193, 7, 0.2);
}

.cart-timeout-warning.urgent {
	background: linear-gradient(135deg, #ffe0e0 0%, #ffd5d5 100%);
	border-color: #f44336;
	animation: pulseUrgent 1.5s infinite;
}

@keyframes pulseUrgent {
	0%, 100% { box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3); }
	50% { box-shadow: 0 4px 20px rgba(244, 67, 54, 0.5); }
}

.cart-timeout-warning .timer-icon {
	width: 36px;
	height: 36px;
	background: white;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	flex-shrink: 0;
}

.cart-timeout-warning .timer-content {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.cart-timeout-warning .timer-text {
	font-size: 0.85rem;
	color: #666;
	font-weight: 600;
	line-height: 1.2;
}

.cart-timeout-warning .time-remaining {
	font-size: 1.6rem;
	font-weight: 700;
	color: #EC5970;
	letter-spacing: 2px;
}

/* Envío gratuito mejorado */
.free-shipping-notice {
	background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f4 100%);
	border: 2px solid #4CAF50;
	border-radius: 14px;
	padding: 15px 18px;
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	gap: 12px;
}

.free-shipping-notice .truck-icon {
	width: 36px;
	height: 36px;
	background: #4CAF50;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	font-size: 18px;
}

.free-shipping-progress {
	width: 100%;
	height: 8px;
	background: #f0f0f0;
	border-radius: 10px;
	overflow: hidden;
	margin-top: 8px;
}

.free-shipping-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #4CAF50 0%, #66BB6A 100%);
	border-radius: 10px;
	transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Items del carrito mejorados */
.woocommerce-mini-cart-item {
	background: white;
	border: 2px solid #f0f0f0;
	border-radius: 16px;
	padding: 15px;
	margin-bottom: 15px;
	transition: all 0.3s ease;
	position: relative;
}

.woocommerce-mini-cart-item:hover {
	border-color: rgba(236, 89, 112, 0.3);
	box-shadow: 0 6px 20px rgba(236, 89, 112, 0.1);
	transform: translateY(-2px);
}

/* Botón eliminar MÁS NOTORIO */
.woocommerce-mini-cart-item .remove {
	position: absolute !important;
	top: 10px !important;
	right: 10px !important;
	width: 32px !important;
	height: 32px !important;
	background: #f44336 !important;
	color: white !important;
	border-radius: 50% !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	font-size: 20px !important;
	line-height: 1 !important;
	text-decoration: none !important;
	transition: all 0.3s ease !important;
	box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3) !important;
	z-index: 10;
}

.woocommerce-mini-cart-item .remove:hover {
	background: #d32f2f !important;
	transform: rotate(90deg) scale(1.1) !important;
	box-shadow: 0 4px 12px rgba(244, 67, 54, 0.5) !important;
}

/* Footer pegado abajo con subtotal y botón */
.mini-cart-sidebar-footer,
.mini-cart-footer {
	position: sticky;
	bottom: 0;
	background: white;
	border-top: 2px solid #f0f0f0;
	padding: 20px 25px;
	box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.1);
	z-index: 100;
	margin-top: auto;
}

/* Subtotal */
.woocommerce-mini-cart__total {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 15px !important;
	padding: 0 !important;
	border: none !important;
	background: none !important;
}

.woocommerce-mini-cart__total strong {
	font-size: 1.2rem !important;
	color: #242424 !important;
}

.woocommerce-mini-cart__total .amount {
	font-size: 1.5rem !important;
	color: #EC5970 !important;
	font-weight: 700 !important;
}

/* Botones del mini-cart */
.woocommerce-mini-cart__buttons {
	margin: 0 !important;
	padding: 0 !important;
}

/* Ocultar todos los botones por defecto */
.woocommerce-mini-cart__buttons .button {
	display: none !important;
}

/* Solo mostrar el botón checkout (IR A PAGAR) */
.woocommerce-mini-cart__buttons .button.checkout {
	display: block !important;
	width: 100% !important;
	background: linear-gradient(135deg, #EC5970 0%, #e94562 100%) !important;
	color: white !important;
	padding: 16px 25px !important;
	border-radius: 50px !important;
	font-size: 1.1rem !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.8px !important;
	border: none !important;
	box-shadow: 0 6px 20px rgba(236, 89, 112, 0.4) !important;
	transition: all 0.3s ease !important;
	text-align: center !important;
	text-decoration: none !important;
}

.woocommerce-mini-cart__buttons .button.checkout:hover {
	background: linear-gradient(135deg, #e94562 0%, #d63851 100%) !important;
	transform: translateY(-2px) !important;
	box-shadow: 0 8px 25px rgba(236, 89, 112, 0.5) !important;
}

/* Toggle cart details button */
.cart-item-custom-data-wrapper {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid #f0f0f0;
}

.toggle-cart-details {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 8px 12px;
	background: linear-gradient(135deg, rgba(236, 89, 112, 0.08) 0%, rgba(233, 69, 98, 0.04) 100%);
	border: 1px solid rgba(236, 89, 112, 0.2);
	border-radius: 8px;
	color: #EC5970;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
}

.toggle-cart-details:hover {
	background: linear-gradient(135deg, rgba(236, 89, 112, 0.12) 0%, rgba(233, 69, 98, 0.06) 100%);
	border-color: #EC5970;
	transform: translateX(3px);
}

.toggle-cart-details svg {
	transition: transform 0.3s ease;
	stroke: currentColor;
}

.toggle-cart-details.active svg {
	transform: rotate(180deg);
}

.cart-item-custom-data {
	margin-top: 12px;
	padding: 12px;
	background: #fafafa;
	border-radius: 8px;
	font-size: 0.85rem;
	line-height: 1.6;
	color: #666;
}

.cart-item-custom-data dl {
	margin: 0;
}

.cart-item-custom-data dt {
	font-weight: 600;
	color: #242424;
	margin-bottom: 4px;
}

.cart-item-custom-data dd {
	margin: 0 0 10px 0;
	color: #666;
}

.cart-item-custom-data dd:last-child {
	margin-bottom: 0;
}

/* Cart item structure improvements */
.cart-item-content {
	display: flex;
	gap: 12px;
	width: 100%;
	margin-top: 10px;
}

.cart-item-content img {
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: 10px;
	flex-shrink: 0;
}

.cart-item-info {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.cart-item-title {
	font-weight: 600;
	font-size: 1rem;
	color: #242424;
	line-height: 1.3;
}

.cart-item-title a {
	color: #242424;
	text-decoration: none;
	transition: color 0.3s ease;
}

.cart-item-title a:hover {
	color: #EC5970;
}

.cart-item-quantity {
	font-size: 0.9rem;
	color: #666;
}

.cart-item-price-wrapper {
	margin-top: auto;
}

.cart-item-price {
	font-size: 1.1rem;
	font-weight: 700;
	color: #EC5970;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

/* Texto que indica que incluye complementos */
.cart-item-price .includes-complements-text {
	font-size: 0.75rem;
	font-weight: 500;
	color: #666;
	font-style: italic;
}

