/*
 * Raadha Krishna Design Studio — single product page tweaks.
 * Loaded only on is_singular('product') (see functions.php) to keep
 * every other page lighter.
 */
/*
 * IMPORTANT: WooCommerce's single-product markup is NOT just
 * [gallery, summary] inside div.product — the description/reviews tabs,
 * upsells, related products, AND our own bilingual description section
 * (see inc/bilingual.php) are ALSO direct children of div.product,
 * rendered as siblings AFTER .summary (via the woocommerce_after_single_
 * product_summary hook), not nested inside it. A plain
 * `display:grid;grid-template-columns:1fr 1fr` on div.product therefore
 * pulls ALL of those sections into the same 2-column grid as extra grid
 * items instead of just the gallery+summary pair — scrambling the whole
 * page (related products squeezed into a half-width column, odd gaps,
 * misaligned add-to-cart, etc). The fix: every section other than the
 * gallery and summary is explicitly forced to span both columns so it
 * simply stacks full-width below the gallery/summary row, which is the
 * only correct layout here.
 */
.single-product div.product{
	display:grid;grid-template-columns:1fr;gap:24px;padding:32px 20px;max-width:var(--rkds-container,1280px);margin:0 auto;
}
@media (min-width:1024px){
	.single-product div.product{grid-template-columns:1fr 1fr;column-gap:48px;row-gap:24px;}
	.single-product div.product > .woocommerce-tabs,
	.single-product div.product > .upsells.products,
	.single-product div.product > .related.products,
	.single-product div.product > .rkds-bilingual{
		grid-column:1 / -1;
	}
}
/*
 * Round 6: the tabs/upsells/related/bilingual sections were each ALSO
 * carrying their own top margin/padding on top of the grid's row-gap
 * above, so the visible gap compounded and grew with every section
 * (gallery->summary: 24px, but summary->tabs: 24px grid-gap + 32px own
 * padding = 56px, tabs->upsells: another 56px, and the bilingual block
 * added a THIRD layer — 24px grid-gap + its own 40px margin + 32px
 * padding = 96px) — that's the "awkward gap" / "products must start
 * from the beginning" feedback. Fixed by making every one of these four
 * sections use the exact same single spacer (a border-top + one
 * padding-top, no extra margin), so the gap before each is identical
 * and predictable regardless of how many sections are present.
 */
.single-product div.product > .woocommerce-tabs,
.single-product div.product > .upsells.products,
.single-product div.product > .related.products,
.single-product div.product > .rkds-bilingual{
	margin-top:0 !important;padding-top:28px;border-top:1px solid var(--rkds-secondary,#a9895a);
}
.single-product div.product .woocommerce-product-gallery{border-radius:var(--rkds-radius,10px);overflow:hidden;background:var(--rkds-secondary,#a9895a);}
.single-product div.product .woocommerce-product-gallery__wrapper{margin:0;padding:0;}
.single-product div.product .woocommerce-product-gallery img{
	width:100% !important;height:auto;display:block;object-fit:cover;margin:0 !important;
}
.single-product div.product .summary{display:flex;flex-direction:column;gap:14px;}
.single-product div.product .summary .price{color:var(--rkds-gold,#b8863c);font-size:24px;font-weight:700;}
.single-product div.product .summary .stock{font-weight:600;}
.single-product div.product .summary .stock.in-stock{color:var(--rkds-sage,#2f9e6e);}
.single-product div.product .summary .stock.out-of-stock{color:#a3372c;}
.single-product div.product form.cart{display:flex;align-items:center;gap:14px;flex-wrap:wrap;}
.single-product div.product .quantity input{width:64px;padding:10px;border:1px solid var(--rkds-secondary,#a9895a);border-radius:8px;}
.rkds-product-sku{font-size:13px;color:var(--rkds-text,#3a2f22);opacity:.7;margin-top:4px;}
.rkds-product-sku span{font-weight:600;}

.woocommerce-tabs{min-width:0;}
.woocommerce-tabs ul.tabs{display:flex;gap:6px;border-bottom:1px solid var(--rkds-secondary,#a9895a);margin:0 0 20px;padding:0;list-style:none;flex-wrap:wrap;}
.woocommerce-tabs ul.tabs li{margin:0;}
.woocommerce-tabs ul.tabs li a{display:block;padding:10px 16px;border-radius:8px 8px 0 0;font-weight:600;}
.woocommerce-tabs ul.tabs li.active a{background:var(--rkds-secondary,#a9895a);}

.upsells.products,
.related.products{min-width:0;margin:0 auto;}
.upsells.products > h2,
.related.products > h2{text-align:center;font-size:26px;color:var(--rkds-primary,#6b5a2f);margin-bottom:24px;}
