/* Product-only layout and controls; catalog data and WooCommerce behavior stay in the parent theme. */
body.single-product #main-content.hn-single-product {
	max-width: 96rem;
	margin-inline: auto;
	padding-block: clamp(1rem, 2.5vw, 2.5rem) 8rem;
}

body.single-product .wp-block-columns.is-layout-flex.hn-single-product-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.08fr) minmax(340px, .82fr);
	gap: clamp(2rem, 5vw, 5rem);
	align-items: start;
}

body.single-product .hn-single-product-gallery,
body.single-product .hn-single-product-summary { min-width: 0; }
body.single-product .hn-single-product-gallery .wp-block-woocommerce-product-image-gallery { overflow: hidden; background: transparent; }
body.single-product .hn-single-product-gallery .woocommerce-product-gallery__image img { display: block; width: 100%; height: auto; object-fit: contain; }
body.single-product .hn-single-product-gallery .woocommerce-product-gallery__image,
body.single-product .hn-single-product-gallery .woocommerce-product-gallery__image img { height: auto !important; }
body.single-product .hn-single-product-gallery .woocommerce-product-gallery__image img { max-height: none !important; }
body.single-product .hn-single-product-gallery .flex-control-nav.flex-control-thumbs { display: flex !important; flex-wrap: nowrap; gap: .55rem; margin: .8rem 0 0 !important; padding: 0; overflow-x: auto; overscroll-behavior-inline: contain; }
body.single-product .hn-single-product-gallery .flex-control-thumbs li { float: none !important; width: clamp(3.5rem, 7vw, 5.5rem) !important; flex: 0 0 clamp(3.5rem, 7vw, 5.5rem); margin: 0 !important; }
body.single-product .hn-single-product-gallery .flex-control-thumbs img { display: block; width: 100%; aspect-ratio: 4 / 5; border: 1px solid transparent; object-fit: cover; opacity: .76; transition: border-color 180ms ease, opacity 180ms ease; }
body.single-product .hn-single-product-gallery .flex-control-thumbs .flex-active { border-color: var(--hn-brand-primary); opacity: 1; }

body.single-product .hn-single-product-summary { position: sticky; top: 6rem; align-self: start; }
body.single-product .hn-single-product-summary > .wp-block-post-title { max-width: 18ch; margin: 0 0 .5rem; font-size: clamp(2rem, 3.2vw, 3.4rem); line-height: 1.06; }
body.single-product .hn-single-product-summary .wp-block-woocommerce-product-rating { margin-block: .65rem; }
body.single-product .hn-single-product-summary .wp-block-woocommerce-product-price { margin-block: .9rem 1.2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--hn-rule); color: var(--hn-ink); font-size: 1.18rem; font-weight: 600; }
body.single-product .hn-single-product-summary .wp-block-woocommerce-add-to-cart-form { margin-top: 1.15rem; }

body.single-product .hn-product-size { gap: .6rem; }
body.single-product .hn-product-size__head { min-height: 46px; }
body.single-product .hn-product-size__title { font-size: .78rem; letter-spacing: .08em; }
body.single-product .hn-product-size__head .hn-size-guide-trigger { gap: .5rem; color: var(--hn-ink); font-size: .85rem; }
body.single-product .hn-product-size__head .hn-size-guide-trigger .hn-icon { width: 1.15rem; height: 1.15rem; }
body.single-product .hn-product-size__options { gap: .5rem; }
body.single-product .hn-product-size__option { display: inline-flex; width: auto; min-width: 4rem; min-height: 3.05rem; height: auto; align-items: center; justify-content: center; border-radius: 999px; padding: .6rem 1rem; font-size: .86rem; line-height: 1.2; }
body.single-product .hn-product-size__option[aria-pressed="true"] { border-color: var(--hn-brand-primary); background: var(--hn-brand-primary); color: var(--hn-paper); }
body.single-product .hn-product-size__option:disabled { opacity: .78; }
body.single-product .hn-product-size .reset_variations { margin-top: -.2rem; }
body.single-product .hn-product-variant-help { min-height: 1.5em; font-size: .84rem; }

body.single-product .hn-single-product-summary .woocommerce-variation-add-to-cart,
body.single-product .hn-single-product-summary form.cart:not(.variations_form) { grid-template-columns: minmax(112px, .42fr) minmax(0, 1fr); gap: .7rem; }
body.single-product .hn-single-product-summary .quantity { min-height: 56px; border-radius: 4px; }
body.single-product .hn-single-product-summary .quantity input,
body.single-product .hn-single-product-summary .hn-quantity-step { min-height: 54px; }
body.single-product .hn-product-pickup { gap: .9rem; margin-block: 1rem 1.25rem; border-radius: 6px; background: color-mix(in srgb, var(--hn-sand) 48%, var(--hn-paper)); padding: 1rem; }
body.single-product .hn-product-pickup__icon { width: 2.8rem; height: 2.8rem; flex-basis: 2.8rem; }
body.single-product .hn-product-pickup__copy h2 { font-size: 1.22rem; }
body.single-product .hn-product-pickup__copy p { font-size: .88rem; }
body.single-product .hn-product-pickup__links a { font-size: .72rem; }
body.single-product .hn-single-product-summary .wp-block-post-excerpt { margin-block: 1.25rem; padding-top: 1.1rem; border-top: 1px solid var(--hn-rule); font-size: .98rem; line-height: 1.7; }
body.single-product .hn-single-product-summary .hn-product-purchase-details summary { min-height: 54px; font-size: .78rem; letter-spacing: .06em; }

body.single-product .hn-sticky-product-bar:not([hidden]) { z-index: 90; justify-content: center; min-height: 84px; gap: .8rem; }
body.single-product .hn-sticky-product-bar [data-hn-sticky-product-button] { min-height: 3.5rem; border-radius: 999px; background: #171615; border-color: #171615; font-size: .76rem; }
body.single-product .hn-sticky-product-bar [data-hn-sticky-product-button]::before { margin-inline-end: .55rem; color: var(--hn-brand-gold); content: "+"; font-size: 1.2rem; }

@media (min-width: 1100px) {
	body.single-product .hn-single-product .hn-related-products > .wc-block-product-template,
	body.single-product .hn-single-product ul.wc-block-product-template[data-collection="woocommerce/product-collection/related"] { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
@media (min-width: 701px) and (max-width: 1099px) {
	body.single-product .hn-single-product .hn-related-products > .wc-block-product-template,
	body.single-product .hn-single-product ul.wc-block-product-template[data-collection="woocommerce/product-collection/related"] { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (max-width: 700px) {
	body.single-product .hn-single-product .hn-related-products > .wc-block-product-template,
	body.single-product .hn-single-product ul.wc-block-product-template[data-collection="woocommerce/product-collection/related"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 900px) {
	body.single-product .wp-block-columns.is-layout-flex.hn-single-product-layout { grid-template-columns: minmax(0, 1fr); gap: 1.65rem; }
	body.single-product .hn-single-product-summary { position: static; max-width: 48rem; }
	body.single-product .hn-single-product-gallery { max-width: 52rem; }
}

@media (max-width: 600px) {
	body.single-product #main-content.hn-single-product { padding-top: .5rem; padding-bottom: 7rem; }
	body.single-product .hn-single-product-layout { gap: 1.25rem; }
	body.single-product .hn-single-product-summary > .wp-block-post-title { max-width: none; font-size: clamp(1.8rem, 7vw, 2.4rem); line-height: 1.1; }
	body.single-product .hn-single-product-summary .wp-block-woocommerce-product-price { margin-block: .7rem 1rem; padding-bottom: .85rem; font-size: 1.12rem; }
	body.single-product .hn-product-size__options { gap: .45rem; }
	body.single-product .hn-product-size__option { min-width: 3.6rem; min-height: 2.85rem; padding: .55rem .8rem; font-size: .82rem; }
	body.single-product .hn-single-product-summary .woocommerce-variation-add-to-cart,
	body.single-product .hn-single-product-summary form.cart:not(.variations_form) { grid-template-columns: minmax(104px, .4fr) minmax(0, 1fr); gap: .55rem; }
	body.single-product .hn-single-product-summary .quantity,
	body.single-product .hn-single-product-summary .single_add_to_cart_button { min-height: 54px; }
	body.single-product .hn-product-pickup { align-items: flex-start; gap: .7rem; padding: .85rem; }
	body.single-product .hn-product-pickup__icon { width: 2.4rem; height: 2.4rem; flex-basis: 2.4rem; }
	body.single-product .hn-sticky-product-bar:not([hidden]) { justify-content: flex-start; gap: .65rem; min-height: 76px; padding: .6rem max(1rem, env(safe-area-inset-right)) calc(.6rem + env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left)); }
	body.single-product .hn-sticky-product-bar [data-hn-sticky-product-button] { flex: 1 1 auto; min-height: 3.2rem; }
}

@media (prefers-reduced-motion: reduce) {
	body.single-product .hn-single-product-gallery .flex-control-thumbs img,
	body.single-product .hn-product-size__option,
	body.single-product .hn-single-product-summary :is(.single_add_to_cart_button, .hn-buy-now-button),
	body.single-product .hn-sticky-product-bar:not([hidden]),
	body.single-product .hn-sticky-product-bar [data-hn-sticky-product-button] { animation: none; transition: none; }
}
