/*
 * Product page in the style of the approved home page mockup (inc/product-page.php): grey page,
 * white cards, meta line, tinted price box, green promise ticks, card sections and a buy bar on
 * phones. Shared card and pill styles come from home.css.
 */

/* ---- Page and top card ---- */
body.single-product #main { background: #f2f3f6; }
body.single-product .product-container { padding-top: 12px; }
body.single-product .product-main { padding: 0; }
body.single-product .product-main > .row.content-row {
	background: #fff;
	border: 1px solid #e6e7eb;
	border-radius: 10px;
	padding: 18px 8px 8px;
	margin: 0 auto 12px;
	max-width: 1240px;
}

/* Gallery: a square main photo with the whole product visible, square thumbnails. */
body.single-product .product-gallery .woocommerce-product-gallery__image img,
body.single-product .product-gallery .woocommerce-product-gallery__image a img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	background: #fff;
}
body.single-product .product-thumbnails .col a { border: 1px solid #ececf0; border-radius: 8px; overflow: hidden; display: block; }
body.single-product .product-thumbnails .col.is-nav-selected a { border-color: #e5457b; }
body.single-product .product-thumbnails img { aspect-ratio: 1 / 1; object-fit: contain; background: #fff; }
body.single-product .product-images .badge-container { display: none; } /* The % badge sits by the price. */

/* Summary: breadcrumb, title, meta line. */
body.single-product .product-info .breadcrumbs { text-transform: none; font-size: 13px; margin-bottom: 6px; }
body.single-product .product-info .product-title { font-size: 24px; line-height: 1.3; margin-bottom: 6px; color: #1d1d1f; }
/* The meta line carries the rating; Flatsome's own rating line would repeat it. */
body.single-product .product-info .woocommerce-product-rating { display: none; }
.ntv-pdp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; font-size: 13.5px; color: #737378; margin-bottom: 12px; }
.ntv-pdp-meta a { color: #e5457b; }
.ntv-pdp-meta b { color: #1d1d1f; margin-left: 4px; }
.ntv-pdp-sep { width: 1px; height: 14px; background: #ddd; margin: 0 12px; }

/* Stars from one inline-block: grey stars with gold ones clipped to the rating. */
.ntv-pdp-stars { position: relative; display: inline-block; font-size: 15px; line-height: 1; letter-spacing: 1px; color: #ddd; }
.ntv-pdp-stars::before { content: "\2605\2605\2605\2605\2605"; }
.ntv-pdp-stars::after { content: "\2605\2605\2605\2605\2605"; position: absolute; left: 0; top: 0; width: var(--ntv-rating, 0%); overflow: hidden; color: #ffb400; white-space: nowrap; }

/* Price in a tinted box, red; the old price struck through; the discount badge. */
body.single-product .product-info .price-wrapper {
	background: #fff0f5;
	border-radius: 10px;
	padding: 12px 16px;
	margin: 4px 0 14px;
	order: 0;
}
body.single-product .product-info .price-wrapper .price { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
body.single-product .product-info .price-wrapper .price > .amount,
body.single-product .product-info .price-wrapper .price ins .amount { color: #ee2b3b; font-size: 28px; font-weight: 700; }
body.single-product .product-info .price-wrapper .price ins { text-decoration: none; order: 1; }
body.single-product .product-info .price-wrapper .price del { order: 2; opacity: 1; }
body.single-product .product-info .price-wrapper .price del .amount { color: #9a9aa0; font-size: 16px; font-weight: 400; }
.ntv-pdp-off { order: 3; background: #ee2b3b; color: #fff; font-size: 13px; font-weight: 700; border-radius: 6px; padding: 2px 8px; }
body.single-product .product-short-description { font-size: 14.5px; color: #444; margin-bottom: 10px; }
body.single-product .product-short-description p { margin-bottom: 6px; }

/* Buy buttons (row built in inc/shop.php): rounded like the rest of the site. */
body.single-product .ntv-buy-row .button { border-radius: 8px; height: 46px; font-size: 15px; }
body.single-product .ntv-buy-row .ntv-product-buy { background: #ee2b3b; border-color: #ee2b3b; }
body.single-product .ntv-buy-row .single_add_to_cart_button { background: #fff; color: #ee2b3b; border: 2px solid #ee2b3b; }
body.single-product .ntv-buy-row .single_add_to_cart_button:hover { background: #fff5f5; }
body.single-product form.cart .ux-quantity .ux-quantity__button,
body.single-product form.cart .ux-quantity input.qty { height: 46px; }
body.single-product form.cart .ux-quantity .ux-quantity__button--minus { border-radius: 8px 0 0 8px; }
body.single-product form.cart .ux-quantity .ux-quantity__button--plus { border-radius: 0 8px 8px 0; }

/* Promise ticks (client's list): dashed green box with a check per line. */
.ntv-pdp-ticks { list-style: none; margin: 4px 0 14px; padding: 12px 14px; background: #eef7e8; border: 1px dashed #bfe0a8; border-radius: 10px; }
.ntv-pdp-ticks li { position: relative; margin: 0 0 6px; padding-left: 26px; font-size: 14px; color: #2a2a2a; line-height: 1.45; }
.ntv-pdp-ticks li:last-child { margin-bottom: 0; }
.ntv-pdp-ticks li::before { content: ""; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 4px; background: #2f9e5b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 13px no-repeat; }
body.single-product .product_meta { font-size: 13px; color: #737378; border-top: 0; }
body.single-product .product_meta a { color: #e5457b; }

/* ---- Sections below: details, reviews, related (cards from sections.php and related.php) ---- */
.ntv-pdp-sections { max-width: 1240px; margin: 0 auto; padding: 0; border: 0; }
.ntv-pdp-sec { margin-bottom: 12px; }
.ntv-pdp-sec .ntv-home__body { font-size: 15px; line-height: 1.65; color: #2a2a2a; }
.ntv-pdp-sec .ntv-home__body h2,
.ntv-pdp-sec .ntv-home__body h3 { font-size: 17px; margin: 18px 0 8px; }
.ntv-pdp-sec .ntv-home__body img { border-radius: 8px; }
body.single-product .product-footer .container { max-width: 1240px; padding: 0; }
body.single-product .ntv-pdp-related { margin: 0 auto 16px; max-width: 1240px; }
body.single-product .ntv-pdp-related .product-section-title { display: none; }

/* Reviews: summary, list, form. */
.ntv-pdp-rating { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid #ececf0; }
.ntv-pdp-rating__avg { display: flex; flex-direction: column; align-items: center; min-width: 110px; }
.ntv-pdp-rating__avg b { font-size: 40px; line-height: 1; color: #ffb400; }
.ntv-pdp-rating__avg small { color: #737378; margin-top: 4px; }
.ntv-pdp-rating__bars { flex: 1; min-width: 220px; max-width: 420px; font-size: 13px; }
.ntv-pdp-rating__row { display: grid; grid-template-columns: 34px 1fr 30px; gap: 8px; align-items: center; margin: 3px 0; }
.ntv-pdp-rating__bar { height: 7px; border-radius: 9px; background: #eee; overflow: hidden; }
.ntv-pdp-rating__bar i { display: block; height: 100%; background: #ffb400; }
/* The pill already says "Reviews"; WooCommerce's own heading would repeat it when there are none. */
.ntv-pdp-sec--reviews .woocommerce-Reviews-title { font-size: 15px; margin: 0 0 10px; }
.ntv-pdp-sec--reviews .woocommerce-Reviews-title:has(+ .woocommerce-noreviews) { display: none; }
/* The admin's Custom CSS frames the review form box in pink; one plain box is enough. */
.ntv-pdp-sec--reviews #review_form_wrapper,
.ntv-pdp-sec--reviews #review_form,
.ntv-pdp-sec--reviews .review-form-inner { border: 0 !important; padding: 0 !important; box-shadow: none !important; background: none !important; max-width: 680px; }
.ntv-pdp-sec--reviews .commentlist { margin: 0; padding: 0; }
.ntv-pdp-sec--reviews .commentlist li { list-style: none; border-bottom: 1px solid #ececf0; padding: 12px 0; margin: 0; }
.ntv-pdp-sec--reviews .woocommerce-verification-required,
.ntv-pdp-sec--reviews .woocommerce-noreviews { background: #f7f7f9; border: 1px solid #ececf0 !important; border-radius: 8px; padding: 12px 14px; margin: 8px 0 0; font-size: 14px; }
.ntv-pdp-sec--reviews #review_form_wrapper { max-width: 680px; }
.ntv-pdp-sec--reviews textarea,
.ntv-pdp-sec--reviews input[type="text"],
.ntv-pdp-sec--reviews input[type="email"] { border-radius: 8px; font-size: 16px; }

/* ---- Phones ---- */
.ntv-pdp-bar { display: none; }
@media (max-width: 849px) {
	body.single-product .product-main > .row.content-row { border-radius: 0; border-left: 0; border-right: 0; padding: 10px 0 4px; }
	body.single-product .product-info .product-title { font-size: 19px; }
	/* A shorter photo so the price shows in the first screen. */
	body.single-product .product-gallery .woocommerce-product-gallery__image img { max-height: 290px; }
	body.single-product .product-info .price-wrapper .price > .amount,
	body.single-product .product-info .price-wrapper .price ins .amount { font-size: 24px; }
	.ntv-pdp-sections,
	body.single-product .ntv-pdp-related { margin-left: 10px; margin-right: 10px; }
	.ntv-pdp-sec .ntv-home__body { font-size: 14.5px; }

	/* Buy bar along the bottom; it takes the contact buttons' place (Zalo is in the bar). */
	.ntv-pdp-bar {
		display: flex;
		gap: 8px;
		align-items: center;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 10000000;
		background: #fff;
		border-top: 1px solid #ececf0;
		box-shadow: 0 -2px 10px rgba(0, 0, 0, .06);
		padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
	}
	.ntv-pdp-bar__zalo { flex: 0 0 46px; height: 46px; border-radius: 8px; border: 1px solid #ececf0; display: grid; place-items: center; color: #0068ff; font-weight: 800; font-size: 12px; }
	.ntv-pdp-bar button { flex: 1; height: 46px; margin: 0; border-radius: 8px; font-weight: 700; font-size: 14px; text-transform: uppercase; padding: 0 6px; line-height: 1.1; }
	.ntv-pdp-bar__add { background: #fff; color: #ee2b3b; border: 2px solid #ee2b3b; }
	.ntv-pdp-bar__buy { background: #ee2b3b; color: #fff; border: 2px solid #ee2b3b; }
	body.single-product .vka-wrapper { display: none !important; }
	body.single-product { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
}
