/* ==========================================================================
   Single product page
   `body.single-product` prefixes beat WooCommerce's default float layout.
   ========================================================================== */

.product-page { padding-block: 24px 0; }

.product-head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 12px 24px;
	margin-block-end: 24px;
}
body.single-product .product-head__title {
	margin: 0;
	font: 700 clamp(64px, 8vw, 128px)/0.82 var(--font-display);
}
.product-head__title .mark { white-space: nowrap; }
.product-head__rating {
	display: flex;
	align-items: center;
	gap: 8px;
	padding-block: 10px;
	font-size: 15px;
	color: var(--text-soft);
	text-decoration: none;
}
.product-head__rating .star-rating { color: var(--ink); margin: 0; }

/* Top: gallery + buy box ---------------------------------------------------- */

.product-top { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }

.product-gallery { position: relative; flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
body.single-product .product-gallery .woocommerce-product-gallery { float: none; width: 100%; margin: 0; }
.product-gallery .woocommerce-product-gallery__image img { background: #E6E9E2; }
.product-gallery .flex-control-thumbs { display: grid !important; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 12px 0 0 !important; }
.product-gallery .flex-control-thumbs li { width: auto !important; float: none !important; }
.product-gallery .flex-control-thumbs img { opacity: 0.6; border: 2px solid transparent; }
.product-gallery .flex-control-thumbs img.flex-active,
.product-gallery .flex-control-thumbs img:hover { opacity: 1; border-color: var(--ink); }
.product-gallery__badge {
	position: absolute;
	inset-block-start: 0;
	inset-inline-start: 0;
	z-index: 2;
	background: var(--ink);
	color: var(--accent);
	font-weight: 800;
	font-size: 14px;
	padding: 8px 14px;
}
.product-gallery__placeholder {
	aspect-ratio: 16 / 11;
	background: #E6E9E2;
	color: #9AA39C;
	display: flex;
	align-items: center;
	justify-content: center;
}
.product-video { aspect-ratio: 16 / 9; background: var(--ink); }
.product-video iframe,
.product-video video { width: 100%; height: 100%; display: block; border: 0; }

/* Buy box: WooCommerce summary hooks render inside. */
body.single-product .product-page div.buybox.summary {
	float: none;
	width: auto;
	flex: 1 1 400px;
	min-width: 0;
	margin: 0;
	padding: 28px;
	background: var(--surface);
	border: 2px solid var(--ink);
	display: flex;
	flex-direction: column;
	gap: 18px;
	position: sticky;
	inset-block-start: calc(var(--header-h) + 16px);
}
body.single-product .buybox p.price,
body.single-product .buybox span.price {
	margin: 0;
	color: var(--ink);
	font: 700 72px/0.85 var(--font-display);
}
body.single-product .buybox .price del { font-size: 36px; color: var(--muted); opacity: 1; }
body.single-product .buybox .price ins { text-decoration: none; }
.buybox__inst { margin: -8px 0 0; font-size: 15px; color: var(--text-soft); }
.buybox .woocommerce-product-details__short-description { font-size: 16px; color: var(--text-soft); }
.buybox .woocommerce-product-details__short-description p { margin: 0; }

body.single-product .buybox .stock {
	align-self: flex-start;
	margin: 0;
	padding: 6px 12px;
	font-weight: 700;
	font-size: 14px;
}
body.single-product .buybox .stock.in-stock { background: #E3F3E8; color: #155C34; }
body.single-product .buybox .stock.out-of-stock { background: #FBE4E2; color: #8C1D16; }

/* Add to cart row */
body.single-product .buybox form.cart { margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
body.single-product .buybox form.cart::before,
body.single-product .buybox form.cart::after { display: none; }
body.single-product .buybox form.cart div.quantity { float: none; margin: 0; }
body.single-product .buybox .quantity .qty {
	width: 72px;
	height: 60px;
	border: 2px solid var(--ink);
	font: 800 18px var(--font-body);
	text-align: center;
}
body.single-product .buybox .single_add_to_cart_button.button {
	float: none;
	flex: 1;
	min-height: 60px;
	border-radius: 0;
	background: var(--accent);
	color: var(--ink);
	font: 800 20px/1 var(--font-body);
}
body.single-product .buybox .single_add_to_cart_button.button:hover { background: var(--ink); color: var(--accent); }
body.single-product .buybox .single_add_to_cart_button.disabled { opacity: 0.5; }

/* Variations */
body.single-product .buybox table.variations { margin: 0; border: 0; }
body.single-product .buybox table.variations th,
body.single-product .buybox table.variations td { display: block; padding: 0; border: 0; text-align: start; line-height: 1.4; }
body.single-product .buybox table.variations th.label { padding-block: 6px 10px; font-weight: 700; }
body.single-product .buybox table.variations tr + tr th { padding-block-start: 16px; }
body.single-product .buybox .reset_variations { display: inline-block; margin-block-start: 8px; font-size: 14px; }
body.single-product .buybox .woocommerce-variation-price .price { font-size: 48px; }
body.single-product .buybox .single_variation_wrap { width: 100%; display: flex; flex-direction: column; gap: 12px; }
body.single-product .buybox .woocommerce-variation-add-to-cart { display: flex; gap: 10px; }

.swatches__select { position: absolute !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch {
	min-width: 48px;
	min-height: 48px;
	padding: 0 16px;
	border: 2px solid var(--line);
	background: var(--surface);
	color: var(--ink);
	font: 700 15px var(--font-body);
	cursor: pointer;
}
.swatch--color { width: 48px; padding: 0; background: var(--swatch); box-shadow: inset 0 0 0 3px var(--surface); }
.swatch[aria-pressed="true"] { border-color: var(--ink); }
.swatch:not(.swatch--color)[aria-pressed="true"] { background: var(--ink); color: var(--accent); }
.swatch:disabled { opacity: 0.3; cursor: not-allowed; }

/* Delivery + contact */
.buybox__label { margin: 0 0 8px; font-weight: 700; }
.buybox__delivery ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 15px; }
.buybox__delivery li { display: flex; gap: 10px; align-items: flex-start; }
.buybox__delivery li .icon { margin-block-start: 3px; color: #155C34; }
.buybox__note { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.buybox__contact { display: flex; flex-direction: column; gap: 10px; }
.buybox__whatsapp { border-color: #C9CEC6; font-size: 16px; }
.buybox__whatsapp .icon { color: var(--whatsapp); }
.buybox__testdrive { text-align: center; font-weight: 700; font-size: 15px; padding-block: 6px; }

/* Big numbers band ----------------------------------------------------------- */

.big-specs { background: var(--ink); color: #F2F5F0; margin-block-start: 64px; }
.big-specs__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.big-specs__item { padding: 36px 28px; border-inline-end: 1px solid var(--ink-line); display: flex; flex-direction: column; gap: 6px; }
.big-specs__item:last-child { border-inline-end: 0; }
.big-specs__value { font: 700 84px/0.85 var(--font-display); }
.big-specs__value.is-accent { color: var(--accent); }
.big-specs__label { font-size: 15px; color: var(--muted-dark); }

/* Sections -------------------------------------------------------------------- */

.product-sections { display: flex; flex-wrap: wrap; gap: 48px 40px; padding-block: 72px 24px; }
.product-section { flex: 1 1 480px; min-width: 0; }
.product-section__title,
.product-reviews .woocommerce-Reviews-title,
.product-reviews #reply-title {
	margin: 0 0 20px;
	font: 700 clamp(52px, 6vw, 72px)/0.85 var(--font-display);
}
.product-description__content { font-size: 17px; line-height: 1.7; color: var(--text-soft); }
.product-description__content img { height: auto; }

.spec-table { width: 100%; border-collapse: collapse; border-block-start: 2px solid var(--ink); font-size: 16px; }
.spec-table th,
.spec-table td { padding: 14px 0; border-block-end: 1px solid var(--line); text-align: start; }
.spec-table th { font-weight: 400; color: var(--muted); }
.spec-table td { font-weight: 800; text-align: end; }

.product-reviews { flex-basis: 100%; }
.product-reviews .commentlist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.product-reviews .commentlist li .comment_container { background: var(--surface); border: 1px solid var(--line); padding: 20px; }
.product-reviews .commentlist img.avatar { display: none; }
.product-reviews .commentlist .comment-text { margin: 0 !important; border: 0 !important; padding: 0 !important; }
.product-reviews .woocommerce-noreviews { color: var(--text-soft); }
.product-reviews #review_form_wrapper { max-width: 640px; margin-block-start: 24px; }
.product-reviews textarea,
.product-reviews input[type="text"],
.product-reviews input[type="email"] { width: 100%; border: 1px solid #C9CEC6; background: var(--surface); padding: 12px; font: 500 16px var(--font-body); }
body.single-product .product-reviews #respond input#submit { background: var(--ink); color: #F2F5F0; border: 0; border-radius: 0; min-height: 52px; padding: 0 28px; font: 800 17px var(--font-body); }
body.single-product .product-reviews #respond input#submit:hover { background: var(--accent); color: var(--ink); }
.product-reviews #reply-title { font-size: 40px; }
.product-reviews p.stars a { color: var(--ink); }

.more-products { padding-block-start: 48px; }

/* Sticky buy bar (phones) ----------------------------------------------------- */

.buybar { display: none; }

@media (max-width: 860px) {
	.product-page { padding-block-start: 16px; }
	body.single-product .product-head__title { font-size: 64px; }
	.product-top { gap: 20px; }
	body.single-product .product-page div.buybox.summary { position: static; padding: 20px; }
	body.single-product .buybox p.price,
	body.single-product .buybox span.price { font-size: 56px; }
	.big-specs { margin-block-start: 40px; }
	.big-specs__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.big-specs__item { padding: 20px 16px; border-block-end: 1px solid var(--ink-line); }
	.big-specs__item:nth-child(2n) { border-inline-end: 0; }
	.big-specs__value { font-size: 56px; }
	.product-sections { padding-block: 48px 16px; gap: 40px; }

	.buybar {
		position: fixed;
		inset-inline: 0;
		inset-block-end: var(--tabbar-h);
		z-index: 44;
		display: flex;
		align-items: center;
		gap: 12px;
		padding: 10px var(--gutter);
		background: var(--ink);
		border-block-end: 1px solid var(--ink-line);
	}
	.buybar[hidden] { display: none; }
	.buybar__price { color: #F2F5F0; font: 700 32px/1 var(--font-display); }
	.buybar__price del { display: none; }
	.buybar__price ins { text-decoration: none; }
	.buybar__button { flex: 1; min-height: 52px; }
}
