﻿/*
 * WooCommerce-specific styles for Avada Child Alua.
 * Load only when WooCommerce is active.
 */

body.single-product .product-images-col {
	position: sticky;
	top: 80px;
}

body.single-product .woocommerce-product-gallery__image {
	border-radius: 12px;
	overflow: hidden;
}

body.single-product .flex-control-thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-start;
	margin-top: 12px;
}

body.single-product .flex-control-thumbs li {
	width: 80px;
}

body.single-product .flex-control-thumbs li img {
	border-radius: 8px;
	cursor: pointer;
	transition: opacity 0.2s ease, border-color 0.2s ease;
	border: 2px solid transparent;
}

body.single-product .flex-control-thumbs li img:hover,
body.single-product .flex-control-thumbs li img.flex-active {
	opacity: 0.85;
	border-color: var(--awb-color4);
}

body.single-product .summary.entry-summary .product_title {
	font-size: 36px;
	line-height: 1.2;
	margin-bottom: 12px;
}

body.single-product .summary.entry-summary p.price,
body.single-product .summary.entry-summary span.price {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

body.single-product .summary.entry-summary p.price ins,
body.single-product .summary.entry-summary span.price ins {
	color: #cc2222;
	font-size: 28px;
	font-weight: 700;
	text-decoration: none;
}

body.single-product .summary.entry-summary p.price del,
body.single-product .summary.entry-summary span.price del {
	color: #888888;
	font-size: 18px;
}

body.single-product .alua-price-badge-wrap {
	margin: 8px 0 12px;
}

body.single-product .badge-ahorro {
	background-color: #cc2222;
	color: #ffffff;
	font-size: 13px;
	font-weight: 600;
	padding: 4px 14px;
	border-radius: 20px;
	display: inline-block;
}

body.single-product .summary.entry-summary .woocommerce-product-details__short-description {
	font-size: 15px;
	line-height: 1.6;
	color: #555555;
	margin-bottom: 12px;
}

body.single-product .summary.entry-summary .variations tr {
	display: block;
	margin-bottom: 12px;
}

body.single-product .summary.entry-summary .variations td,
body.single-product .summary.entry-summary .variations th {
	display: block;
	width: 100%;
}

body.single-product .summary.entry-summary .variations label {
	font-size: 14px;
	font-weight: 600;
	color: #333333;
	margin-bottom: 4px;
}

body.single-product .summary.entry-summary .variations select,
body.single-product .summary.entry-summary form.cart .variations select {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid #d0d0d0;
	border-radius: 8px;
	font-size: 15px;
	color: #333333;
	background-color: #ffffff;
	cursor: pointer;
}

body.single-product .summary.entry-summary .variations select:hover,
body.single-product .summary.entry-summary .variations select:focus {
	border-color: var(--awb-color4);
}

body.single-product .quantity {
	display: flex;
	align-items: center;
	gap: 8px;
}

body.single-product .quantity input[type='number'] {
	width: 55px;
	text-align: center;
	border: 1px solid #d0d0d0;
	border-radius: 8px;
	padding: 10px;
	font-size: 16px;
}

body.single-product .quantity .qty-btn {
	width: 38px;
	height: 38px;
	border: 1px solid #d0d0d0;
	border-radius: 8px;
	background: #f5f5f5;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

body.single-product .quantity .qty-btn:hover {
	background: #e0e0e0;
}

body.single-product .single_add_to_cart_button {
	width: 100%;
	padding: 15px;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	transition: filter 0.2s ease;
}

body.single-product .single_add_to_cart_button:hover {
	filter: brightness(0.9);
}

body.single-product .alua-whatsapp-cta {
	margin-top: 12px;
	width: 100%;
	background-color: #25d366;
	color: #ffffff;
	border-radius: 8px;
	padding: 14px 20px;
	font-size: 15px;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	text-decoration: none;
}

body.single-product .alua-whatsapp-cta:hover {
	filter: brightness(0.92);
	color: #ffffff;
}

body.single-product .alua-whatsapp-icon {
	display: inline-flex;
}

body.single-product .alua-product-measurement-intro {
	margin-bottom: 12px;
}

body.single-product .alua-product-measurement-copy {
	margin: 0 0 4px;
	font-size: 14px;
}

@media (max-width: 768px) {
	body.single-product .summary.entry-summary .product_title {
		font-size: 26px;
	}

	body.single-product .product-images-col {
		position: static;
		top: auto;
	}

	body.single-product .summary.entry-summary,
	body.single-product .summary.entry-summary .variations select,
	body.single-product .summary.entry-summary .quantity,
	body.single-product .single_add_to_cart_button,
	body.single-product .alua-whatsapp-cta {
		width: 100%;
	}
}

/* -------------------------------------------------------------------------- */
/* Cart page (custom, independent from Avada default cart table). */
/* -------------------------------------------------------------------------- */
body.woocommerce-cart .woocommerce {
	max-width: 1320px;
	padding: 28px 24px 60px;
	margin: 0 auto;
}

body.woocommerce-cart .alua-cart-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.8fr);
	gap: 28px;
	align-items: start;
	padding: 26px;
	border: 1px solid #d7c8ad;
	border-radius: 12px;
	background: #ffffff;
}

body.woocommerce-cart .alua-cart-main__header {
	margin-bottom: 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid #e3d7c2;
}

body.woocommerce-cart .alua-cart-main__title {
	margin: 0;
	font-size: clamp(34px, 2.5vw, 48px);
	line-height: 1.15;
	font-weight: 600;
	color: #1a1308;
}

body.woocommerce-cart .alua-cart-items {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

body.woocommerce-cart .alua-cart-item {
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr);
	gap: 20px;
	padding: 18px;
	background: #ffffff;
	border: 1px solid #e8dfd0;
	border-radius: 10px;
}

body.woocommerce-cart .alua-cart-item__thumb {
	background: #f8f5ef;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 180px;
	border-radius: 8px;
	overflow: hidden;
}

body.woocommerce-cart .alua-cart-item__thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

body.woocommerce-cart .alua-cart-item__content {
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-width: 0;
}

body.woocommerce-cart .alua-cart-item__top {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	justify-content: space-between;
}

body.woocommerce-cart .alua-cart-item__meta {
	min-width: 0;
}

body.woocommerce-cart .alua-cart-item__name {
	margin: 0;
	font-size: clamp(20px, 1.55vw, 30px);
	line-height: 1.2;
	font-weight: 600;
}

body.woocommerce-cart .alua-cart-item__name a {
	color: #17130f;
	text-decoration: none;
}

body.woocommerce-cart .alua-cart-item__name a:hover {
	text-decoration: underline;
}

body.woocommerce-cart .alua-cart-item__attributes,
body.woocommerce-cart .alua-cart-item__attributes p,
body.woocommerce-cart .alua-cart-item__attributes dl,
body.woocommerce-cart .alua-cart-item__attributes dd {
	margin-top: 8px;
	font-size: 15px;
	line-height: 1.4;
	color: #31281f;
}

body.woocommerce-cart .alua-cart-item__attributes dt {
	font-weight: 600;
	color: #18130f;
}

body.woocommerce-cart .alua-cart-item__remove .remove {
	display: inline-flex;
	width: 32px;
	height: 32px;
	align-items: center;
	justify-content: center;
	font-size: 30px;
	line-height: 1;
	color: #2a221a !important;
	background: transparent;
	border-radius: 6px;
	opacity: 0.9;
}

body.woocommerce-cart .alua-cart-item__remove .remove:hover {
	opacity: 1;
	background: #ceac6e1a;
}

body.woocommerce-cart .alua-cart-item__bottom {
	display: flex;
	align-items: end;
	justify-content: space-between;
	gap: 14px;
	border-top: 1px solid #ece4d8;
	padding-top: 14px;
}

body.woocommerce-cart .alua-cart-item__qty label {
	display: block;
	font-size: 15px;
	font-weight: 600;
	color: #2f261d;
	margin-bottom: 6px;
}

body.woocommerce-cart .alua-cart-item__qty .quantity {
	display: flex;
	align-items: center;
}

body.woocommerce-cart .alua-cart-item__qty .qty {
	min-height: 44px;
	min-width: 72px;
	border: 1px solid #d9cebc;
	border-radius: 6px;
	font-size: 24px;
	font-weight: 500;
	color: #18130f;
	text-align: center;
}

body.woocommerce-cart .alua-cart-item__prices {
	text-align: right;
}

body.woocommerce-cart .alua-cart-item__price {
	font-size: 30px;
	color: #5b5144;
}

body.woocommerce-cart .alua-cart-item__subtotal {
	margin-top: 2px;
	font-size: clamp(34px, 2.4vw, 48px);
	font-weight: 600;
	line-height: 1;
	color: #16120e;
}

body.woocommerce-cart .alua-cart-actions {
	margin-top: 18px;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: end;
}

body.woocommerce-cart .alua-cart-coupon {
	flex: 1 1 360px;
}

body.woocommerce-cart .alua-cart-coupon label {
	display: block;
	font-size: 16px;
	font-weight: 600;
	color: #2b251f;
	margin-bottom: 8px;
}

body.woocommerce-cart .alua-cart-coupon__row {
	display: flex;
	gap: 12px;
}

body.woocommerce-cart .alua-cart-coupon input[type='text'] {
	flex: 1 1 auto;
	min-height: 52px;
	border: 1px solid #ded6ca;
	padding: 12px 16px;
	font-size: 24px;
	line-height: 1.2;
	border-radius: 6px;
}

body.woocommerce-cart .alua-cart-coupon .button,
body.woocommerce-cart .alua-cart-update {
	border: 0;
	border-radius: 6px;
	background: #1a1a1a;
	color: #ffffff;
	min-height: 52px;
	font-weight: 600;
	padding: 12px 22px;
	font-size: 16px;
}

body.woocommerce-cart .alua-cart-coupon .button:hover,
body.woocommerce-cart .alua-cart-update:hover {
	background: #ceac6e;
	color: #1d140a;
}

body.woocommerce-cart .alua-cart-summary {
	position: sticky;
	top: 114px;
	background: #f8f5ef;
	border: 1px solid #dfd2bf;
	border-radius: 10px;
	padding: 22px 22px 20px;
	min-height: 100%;
}

body.woocommerce-cart .alua-cart-summary__title {
	margin: 0 0 14px;
	padding-bottom: 10px;
	border-bottom: 1px solid #d8d1c6;
	font-size: clamp(22px, 1.8vw, 34px);
	line-height: 1.1;
	font-weight: 500;
	color: #1f1914;
}

body.woocommerce-cart .alua-cart-summary__rows {
	display: grid;
	gap: 10px;
}

body.woocommerce-cart .alua-cart-summary__row {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 14px;
	font-size: 16px;
	line-height: 1.3;
	color: #2f2922;
}

body.woocommerce-cart .alua-cart-summary__row--shipping {
	color: #80a59c;
}

body.woocommerce-cart .alua-cart-summary__row--total {
	margin-top: 8px;
	font-size: clamp(20px, 1.8vw, 30px);
	font-weight: 700;
	color: #17130f;
}

body.woocommerce-cart .alua-cart-summary__checkout {
	display: inline-flex;
	width: 100%;
	margin-top: 16px;
	align-items: center;
	justify-content: center;
	min-height: 56px;
	background: #1a1a1a !important;
	color: #ffffff !important;
	font-size: 20px;
	font-weight: 600;
	text-decoration: none;
	border-radius: 6px;
}

body.woocommerce-cart .alua-cart-summary__checkout:hover {
	background: #ceac6e !important;
	color: #1d140a !important;
}

body.woocommerce-cart .alua-cart-summary__benefits {
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid #e1d9ce;
	display: grid;
	gap: 6px;
}

body.woocommerce-cart .alua-cart-summary__benefits p {
	margin: 0;
	font-size: 15px;
	color: #393127;
	display: flex;
	align-items: center;
	gap: 8px;
}

body.woocommerce-cart .alua-cart-summary__benefits p::before {
	content: '•';
	font-size: 16px;
	line-height: 1;
	color: #ceac6e;
}

body.woocommerce-cart .alua-cart-collaterals--hidden {
	display: none;
}

@media (max-width: 1200px) {
	body.woocommerce-cart .woocommerce {
		padding: 20px 16px 42px;
	}

	body.woocommerce-cart .alua-cart-layout {
		grid-template-columns: 1fr;
		gap: 20px;
		padding: 20px;
	}

	body.woocommerce-cart .alua-cart-summary {
		position: static;
		top: auto;
	}
}

@media (max-width: 768px) {
	body.woocommerce-cart .woocommerce {
		padding: 12px 10px 28px;
	}

	body.woocommerce-cart .alua-cart-main__title {
		font-size: 28px;
	}

	body.woocommerce-cart .alua-cart-item {
		grid-template-columns: 1fr;
		gap: 12px;
		padding: 14px;
	}

	body.woocommerce-cart .alua-cart-item__thumb {
		min-height: 180px;
	}

	body.woocommerce-cart .alua-cart-item__bottom {
		flex-direction: column;
		align-items: flex-start;
	}

	body.woocommerce-cart .alua-cart-item__prices {
		text-align: left;
	}

	body.woocommerce-cart .alua-cart-coupon__row {
		flex-direction: column;
	}

	body.woocommerce-cart .alua-cart-summary__title {
		font-size: 28px;
	}

	body.woocommerce-cart .alua-cart-summary__row {
		font-size: 16px;
	}

	body.woocommerce-cart .alua-cart-summary__checkout {
		font-size: 18px;
		min-height: 52px;
	}

	body.woocommerce-cart .alua-cart-item__name {
		font-size: 24px;
	}

	body.woocommerce-cart .alua-cart-item__attributes,
	body.woocommerce-cart .alua-cart-item__attributes p,
	body.woocommerce-cart .alua-cart-item__attributes dl,
	body.woocommerce-cart .alua-cart-item__attributes dd {
		font-size: 15px;
	}

	body.woocommerce-cart .alua-cart-item__subtotal {
		font-size: 34px;
	}

	body.woocommerce-cart .alua-cart-coupon input[type='text'] {
		font-size: 18px;
		min-height: 48px;
	}

	body.woocommerce-cart .alua-cart-coupon .button,
	body.woocommerce-cart .alua-cart-update {
		min-height: 48px;
		font-size: 16px;
	}

	body.woocommerce-cart .alua-cart-summary__benefits p {
		font-size: 14px;
	}
}
