/**
 * Toy Max storefront polish
 * Native WoodMart/WooCommerce structures remain responsible for behaviour.
 */

:root {
	--tmx-store-navy: #0b1d53;
	--tmx-store-blue: #0878bd;
	--tmx-store-red: #ed101f;
	--tmx-store-yellow: #ffce00;
	--tmx-store-cream: #fff9eb;
	--tmx-store-ink: #17274f;
	--tmx-store-line: #e6e9f2;
}

/* Product detail: branded, calm purchase stage around native commerce UI. */
body.single-product .main-page-wrapper {
	background:
		radial-gradient(circle at 4% 11%, rgba(255, 206, 0, .16) 0 62px, transparent 63px),
		radial-gradient(circle at 96% 18%, rgba(8, 120, 189, .08) 0 105px, transparent 106px),
		linear-gradient(180deg, #fffdf8 0, #fff 520px);
}

body.single-product .single-product-content {
	padding-top: clamp(18px, 3vw, 38px);
}

body.single-product .product-image-summary-wrap {
	position: relative;
	margin-bottom: clamp(38px, 6vw, 72px);
}

body.single-product .product-image-summary {
	position: relative;
	padding: clamp(14px, 2vw, 24px);
	border: 1px solid rgba(11, 29, 83, .07);
	border-radius: clamp(24px, 3vw, 38px);
	background: rgba(255, 255, 255, .88);
	box-shadow: 0 24px 65px rgba(22, 47, 92, .10);
	overflow: hidden;
}

body.single-product .product-image-summary::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 150px;
	height: 13px;
	border-radius: 0 0 999px 0;
	background: linear-gradient(90deg, var(--tmx-store-yellow), #ff9e00);
}

body.single-product .product-images {
	align-self: start;
}

body.single-product .woocommerce-product-gallery {
	padding: clamp(12px, 2vw, 22px);
	border: 1px solid #f0e4c7;
	border-radius: clamp(20px, 2.5vw, 30px);
	background: linear-gradient(145deg, #fffdf6, #fff7e7);
}

body.single-product .woocommerce-product-gallery__image a {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: min(520px, 46vw);
}

body.single-product .woocommerce-product-gallery__image img {
	max-height: 510px;
	object-fit: contain;
}

body.single-product .product-labels .product-label {
	box-shadow: 0 8px 18px rgba(237, 16, 31, .18);
}

body.single-product .summary.entry-summary {
	align-self: stretch;
	padding: clamp(10px, 2.4vw, 30px) clamp(6px, 1.6vw, 22px);
}

body.single-product .summary-inner {
	display: flex;
	flex-direction: column;
	height: 100%;
}

body.single-product .single-breadcrumbs-wrapper {
	margin-bottom: 18px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--tmx-store-line);
}

.tmx-product-eyebrow {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 7px;
	margin-bottom: 13px;
	padding: 7px 13px;
	border-radius: 999px;
	background: #eaf7ff;
	color: #075d94;
	font-size: 12px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: .045em;
	text-transform: uppercase;
}

.tmx-product-eyebrow:hover {
	background: #d9f1ff;
	color: var(--tmx-store-navy);
}

body.single-product .product_title {
	max-width: 690px;
	margin-bottom: 13px;
	color: var(--tmx-store-navy);
	font-size: clamp(28px, 3vw, 46px);
	font-weight: 900;
	line-height: 1.08;
	letter-spacing: -.035em;
}

body.single-product .summary > .price,
body.single-product .summary-inner > .price {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 9px;
	margin: 3px 0 18px;
	color: var(--tmx-store-red);
	font-size: clamp(25px, 2.5vw, 36px);
	font-weight: 900;
}

body.single-product .summary .price del {
	color: #8b94a8;
	font-size: .55em;
}

body.single-product .woocommerce-product-details__short-description {
	max-width: 660px;
	margin-bottom: 18px;
	color: #526078;
	font-size: 15px;
	line-height: 1.72;
}

body.single-product .summary .stock.in-stock {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 7px;
	margin-bottom: 16px;
	padding: 7px 13px;
	border-radius: 999px;
	background: #e8f8df;
	color: #287231;
	font-size: 12px;
	font-weight: 800;
}

body.single-product .summary .stock.in-stock::before {
	content: "";
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #43a94e;
	box-shadow: 0 0 0 4px rgba(67, 169, 78, .13);
}

body.single-product .summary form.cart {
	align-items: stretch;
	gap: 10px;
	margin: 0 0 19px;
	padding: 14px;
	border: 1px solid #e7eaf1;
	border-radius: 18px;
	background: #f8faff;
}

body.single-product .summary form.cart .quantity {
	min-height: 54px;
	border: 1px solid #d8deea;
	border-radius: 999px;
	background: #fff;
	overflow: hidden;
}

body.single-product .summary form.cart .quantity :is(.minus, .plus) {
	width: 42px;
	color: var(--tmx-store-navy);
	font-size: 18px;
	font-weight: 900;
}

body.single-product .summary form.cart .qty {
	min-width: 38px;
	font-size: 15px;
	font-weight: 800;
}

body.single-product .summary .single_add_to_cart_button {
	flex: 1 1 240px;
	min-height: 54px;
	min-width: min(270px, 100%);
	padding-inline: 34px;
	border-radius: 999px;
	background: var(--tmx-store-red);
	box-shadow: 0 12px 24px rgba(237, 16, 31, .20);
	font-size: 14px;
	font-weight: 900;
	letter-spacing: .02em;
}

body.single-product .summary .single_add_to_cart_button:hover {
	background: #cb0916;
	box-shadow: 0 15px 28px rgba(203, 9, 22, .26);
	transform: translateY(-2px);
}

/* Native WoodMart Buy Now: a confident full-width second action row. */
body.single-product .summary form.cart > .wd-buy-now-btn,
body.single-product .summary form.cart .woocommerce-variation-add-to-cart > .wd-buy-now-btn {
	position: relative;
	display: inline-flex;
	flex: 1 1 100%;
	width: 100%;
	min-height: 52px;
	align-items: center;
	justify-content: center;
	margin: 2px 0 0;
	padding: 10px 24px;
	border: 0;
	border-radius: 16px;
	background:
		radial-gradient(circle at 16px 13px, rgba(255, 255, 255, .58) 0 2px, transparent 2.5px),
		linear-gradient(135deg, #ffe04b 0%, #ffca12 100%) !important;
	box-shadow: inset 0 -4px 0 #dfa700, 0 10px 22px rgba(217, 159, 0, .22);
	color: var(--tmx-store-navy) !important;
	font-size: 14px;
	font-weight: 900;
	letter-spacing: .035em;
	text-align: center;
	text-transform: uppercase;
	transition: transform .22s ease, box-shadow .22s ease, background-color .22s ease;
}

body.single-product .summary form.cart > .wd-buy-now-btn:is(:hover, :focus-visible),
body.single-product .summary form.cart .woocommerce-variation-add-to-cart > .wd-buy-now-btn:is(:hover, :focus-visible) {
	background:
		radial-gradient(circle at 16px 13px, rgba(255, 255, 255, .72) 0 2px, transparent 2.5px),
		linear-gradient(135deg, #ffeb78 0%, #ffd324 100%) !important;
	box-shadow: inset 0 -4px 0 #dfa700, 0 14px 26px rgba(217, 159, 0, .28);
	color: var(--tmx-store-navy) !important;
	outline: none;
	transform: translateY(-2px);
}

body.single-product .summary form.cart > .wd-buy-now-btn:focus-visible,
body.single-product .summary form.cart .woocommerce-variation-add-to-cart > .wd-buy-now-btn:focus-visible {
	outline: 3px solid rgba(11, 45, 111, .28);
	outline-offset: 3px;
}

body.single-product .summary form.cart > .wd-buy-now-btn:active,
body.single-product .summary form.cart .woocommerce-variation-add-to-cart > .wd-buy-now-btn:active {
	box-shadow: inset 0 -2px 0 #dfa700, 0 7px 15px rgba(217, 159, 0, .2);
	transform: translateY(1px);
}

.tmx-product-assurance {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	margin: 4px 0 20px;
}

.tmx-product-assurance__item {
	display: flex;
	align-items: center;
	gap: 9px;
	min-width: 0;
	padding: 11px 10px;
	border: 1px solid #e4e9f3;
	border-radius: 14px;
	background: #fff;
	color: var(--tmx-store-ink);
}

.tmx-product-assurance__icon {
	display: inline-grid;
	flex: 0 0 32px;
	width: 32px;
	height: 32px;
	place-items: center;
	border-radius: 11px;
	background: #fff2bd;
	color: var(--tmx-store-navy);
	font-size: 16px;
	font-weight: 900;
}

.tmx-product-assurance__item > span:last-child {
	display: flex;
	min-width: 0;
	flex-direction: column;
	gap: 2px;
}

.tmx-product-assurance__item strong {
	color: var(--tmx-store-navy);
	font-size: 11px;
	font-weight: 900;
	line-height: 1.2;
}

.tmx-product-assurance__item small {
	color: #718096;
	font-size: 9px;
	line-height: 1.25;
}

.tmx-product-assurance__link:hover {
	border-color: #badaef;
	background: #f1f9ff;
}

body.single-product .summary .wd-action-btn > a {
	color: var(--tmx-store-navy);
	font-weight: 800;
}

body.single-product .product_meta {
	padding-top: 16px;
	border-top: 1px solid var(--tmx-store-line);
	font-size: 12px;
}

body.single-product .product-tabs-wrapper {
	padding-block: clamp(40px, 6vw, 74px);
	background: linear-gradient(180deg, #f6fbff, #fff);
}

body.single-product .woocommerce-tabs {
	padding: clamp(20px, 3vw, 34px);
	border: 1px solid #e3edf5;
	border-radius: 28px;
	background: #fff;
	box-shadow: 0 18px 45px rgba(20, 54, 95, .07);
}

body.single-product .woocommerce-tabs .wd-nav-tabs {
	gap: 8px;
}

body.single-product .woocommerce-tabs .wd-nav-tabs > li > a {
	padding: 10px 17px;
	border-radius: 999px;
	color: #64718a;
	font-weight: 800;
}

body.single-product .woocommerce-tabs .wd-nav-tabs > li.wd-active > a {
	background: var(--tmx-store-navy);
	color: #fff;
}

body.single-product .related-and-upsells {
	padding-block: clamp(45px, 6vw, 76px);
}

body.single-product .related-products > .title,
body.single-product .related-products .title {
	color: var(--tmx-store-navy);
	font-size: clamp(27px, 3vw, 42px);
	font-weight: 900;
	letter-spacing: -.025em;
}

/* Native sticky add-to-cart, when enabled through WoodMart settings. */
body.single-product .wd-sticky-btn {
	border-top: 1px solid #e7eaf1;
	background: rgba(255, 255, 255, .96);
	box-shadow: 0 -12px 35px rgba(11, 29, 83, .11);
	backdrop-filter: blur(14px);
}

body.single-product .wd-sticky-btn .single_add_to_cart_button {
	border-radius: 999px;
	background: var(--tmx-store-red);
}

/* Shop archive: retain the existing hero/sidebar/cards, refine native controls. */
body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .site-content {
	padding-top: clamp(22px, 3vw, 38px);
}

body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .shop-loop-head {
	min-height: 62px;
	margin-bottom: 24px;
	padding: 10px 13px 10px 18px;
	border: 1px solid #e4ebf3;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 10px 28px rgba(24, 58, 99, .07);
}

body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .woocommerce-result-count {
	color: #637089;
	font-size: 12px;
	font-weight: 700;
}

body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .woocommerce-ordering select {
	min-height: 42px;
	border-color: #dce4ee;
	border-radius: 999px;
	background-color: #f7faff;
	color: var(--tmx-store-navy);
	font-size: 12px;
	font-weight: 800;
}

body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) :is(.wd-show-sidebar-btn, .wd-products-per-page, .wd-products-shop-view) {
	color: var(--tmx-store-navy);
	font-weight: 800;
}

body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .products.wd-products {
	row-gap: clamp(20px, 3vw, 32px);
}

@media (max-width: 1024px) {
	body.single-product .woocommerce-product-gallery__image a {
		min-height: 400px;
	}

	.tmx-product-assurance {
		grid-template-columns: 1fr;
	}

	.tmx-product-assurance__item {
		padding: 9px 10px;
	}
}

@media (max-width: 767px) {
	body.single-product .single-product-content {
		padding-top: 10px;
	}

	body.single-product .product-image-summary {
		padding: 10px;
		border-radius: 22px;
	}

	body.single-product .woocommerce-product-gallery {
		padding: 8px;
		border-radius: 18px;
	}

	body.single-product .woocommerce-product-gallery__image a {
		min-height: 88vw;
	}

	body.single-product .summary.entry-summary {
		padding: 14px 5px 4px;
	}

	body.single-product .product_title {
		font-size: clamp(26px, 8vw, 36px);
	}

	body.single-product .summary form.cart {
		padding: 10px;
	}

	body.single-product .summary .single_add_to_cart_button {
		flex: 1 1 calc(100% - 120px);
		min-width: 0;
	}

	body.single-product .summary form.cart > .wd-buy-now-btn,
	body.single-product .summary form.cart .woocommerce-variation-add-to-cart > .wd-buy-now-btn {
		min-height: 50px;
		border-radius: 14px;
	}

	body.single-product .woocommerce-tabs {
		padding: 12px;
		border-radius: 20px;
	}

	body:is(.woocommerce-shop, .post-type-archive-product, .tax-product_cat, .tax-product_tag) .shop-loop-head {
		gap: 10px;
		padding: 9px 11px;
		border-radius: 15px;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.single-product .summary .single_add_to_cart_button,
	body.single-product .summary form.cart .wd-buy-now-btn,
	.tmx-product-assurance__link {
		transition: none;
		transform: none;
	}
}
