/**
 * Villegas Product Bundles - Frontend Styles
 */

/* Widget "Cómpralos juntos" en ficha de producto */
.villegas-bundle-widget {
	margin: 28px 0;
	padding: 20px 24px;
	background: #faf9f6;
	border: 1px solid #e8e3d8;
	border-radius: 10px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
	font-family: inherit;
	color: #2c2825;
}

.villegas-bundle-widget-header {
	margin-bottom: 16px;
}

.villegas-bundle-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #8C7A46;
	background: #f4ede0;
	padding: 3px 10px;
	border-radius: 20px;
	margin-bottom: 8px;
}

.villegas-bundle-title {
	font-size: 18px;
	font-weight: 700;
	margin: 0 0 4px 0;
	color: #1a1816;
}

.villegas-bundle-desc {
	font-size: 13px;
	color: #666;
	margin: 0;
}

/* Fila de productos */
.villegas-bundle-items-row {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px 0;
	border-top: 1px solid #eee8dc;
	border-bottom: 1px solid #eee8dc;
	flex-wrap: wrap;
}

.villegas-bundle-item {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1 1 200px;
	min-width: 180px;
}

.villegas-bundle-item-thumb {
	width: 60px;
	height: 85px;
	flex-shrink: 0;
	background: #fff;
	border-radius: 4px;
	overflow: hidden;
	box-shadow: 0 2px 6px rgba(0,0,0,0.08);
	display: flex;
	align-items: center;
	justify-content: center;
}

.villegas-bundle-item-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.villegas-bundle-item-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.villegas-bundle-item-name {
	font-size: 13px;
	font-weight: 600;
	color: #222;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.villegas-bundle-item.is-current .villegas-bundle-item-name::after {
	content: " (Este libro)";
	font-size: 11px;
	font-weight: normal;
	color: #8C7A46;
}

.villegas-bundle-item-price {
	font-size: 13px;
	color: #666;
	font-weight: 500;
}

.villegas-bundle-plus {
	font-size: 20px;
	font-weight: 300;
	color: #8C7A46;
	user-select: none;
}

/* Footer del widget con precios y botón */
.villegas-bundle-widget-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 16px;
	gap: 16px;
	flex-wrap: wrap;
}

.villegas-bundle-pricing {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.villegas-bundle-price-label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #777;
}

.villegas-bundle-price-box {
	display: flex;
	align-items: baseline;
	gap: 8px;
}

.villegas-bundle-regular-total {
	font-size: 14px;
	color: #888;
	text-decoration: line-through;
}

.villegas-bundle-final-total {
	font-size: 22px;
	font-weight: 700;
	color: #1a1816;
}

.villegas-bundle-savings-badge {
	display: inline-block;
	background: #e8f5e9;
	color: #2e7d32;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 4px;
	margin-top: 2px;
	width: fit-content;
}

/* Botón Añadir Pack */
.button.villegas-btn-add-bundle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: #8C7A46 !important;
	color: #ffffff !important;
	border: 1px solid #796839 !important;
	padding: 12px 24px !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	border-radius: 6px !important;
	cursor: pointer;
	transition: all 0.2s ease;
	text-decoration: none;
	min-height: 44px;
}

.button.villegas-btn-add-bundle:hover {
	background: #796839 !important;
	box-shadow: 0 4px 10px rgba(140, 122, 70, 0.3) !important;
}

.button.villegas-btn-add-bundle .btn-text {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.button.villegas-btn-add-bundle.is-loading {
	opacity: 0.8;
	pointer-events: none;
}

.button.villegas-btn-add-bundle.is-added {
	background: #2e7d32 !important;
	border-color: #256428 !important;
}

/* Aviso de Pack en el Carrito */
.villegas-bundle-cart-notice {
	display: flex;
	align-items: center;
	gap: 14px;
	background: #fdfaf2;
	border: 1px solid #8C7A46;
	border-left-width: 5px;
	padding: 14px 18px;
	border-radius: 6px;
	margin-bottom: 24px;
	color: #2a251e;
	box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.villegas-bundle-cart-notice-icon {
	color: #8C7A46;
	flex-shrink: 0;
	display: flex;
	align-items: center;
}

.villegas-bundle-cart-notice-content {
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: 14px;
}

/* Precios y badge en tabla de carrito */
.villegas-cart-bundle-price del {
	color: #888;
	font-size: 0.9em;
	margin-right: 6px;
}

.villegas-cart-bundle-price ins {
	color: #2e7d32;
	text-decoration: none;
	font-weight: 700;
}

@media (max-width: 600px) {
	.villegas-bundle-widget {
		padding: 16px;
	}
	.villegas-bundle-items-row {
		flex-direction: column;
		align-items: flex-start;
	}
	.villegas-bundle-plus {
		align-self: center;
	}
	.villegas-bundle-widget-footer {
		flex-direction: column;
		align-items: stretch;
	}
	.button.villegas-btn-add-bundle {
		width: 100%;
	}
}
