:root {
	--thp-text: #1a1a1a;
	--thp-border: #e5e5e5;
	--thp-accent: #d32f2f;
	--thp-low: #ef6c00;
	--thp-out: #c62828;
}
/* =====================================================================
 * Product page: [th_bulk_order]
 * ===================================================================== */
.thp-bulk { margin: 16px 0; font-size: 14px; color: var(--thp-text); }
.thp-bulk-title { font-size: 15px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; margin-bottom: 10px; }
.thp-bulk-setall { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; color: #555; font-size: 13px; }
.thp-bulk-setall input { width: 64px; padding: 6px 8px; border: 1px solid var(--thp-border); border-radius: 6px; text-align: center; }
html body .thp-bulk button.thp-setall-btn, html body .thp-bulk button.thp-reset-btn {
	padding: 6px 12px; border: 1px solid var(--thp-text) !important; border-radius: 6px; background: #fff !important;
	color: var(--thp-text) !important; font-size: 12px; font-weight: 600; text-transform: uppercase; cursor: pointer;
}
html body .thp-bulk button.thp-reset-btn { border-color: var(--thp-border) !important; color: #777 !important; }
html body .thp-bulk button.thp-setall-btn:hover { background: var(--thp-text) !important; color: #fff !important; }

.thp-bulk-table { border: 1px solid var(--thp-border); border-radius: 10px; overflow: hidden; }
.thp-bulk-row {
	display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, .9fr) auto;
	align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--thp-border); background: #fff;
}
.thp-bulk-row:first-child { border-top: 0; }
.thp-bulk-head { background: #f7f7f7; font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: #666; }
.thp-bulk-head span:last-child { text-align: center; min-width: 116px; }
.thp-bulk-row.thp-bulk-on { background: #fff8f8; }
.thp-bulk-row.thp-bulk-out { opacity: .55; }
.thp-bulk-colour { display: flex; align-items: center; gap: 10px; min-width: 0; cursor: pointer; }
.thp-bulk-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thp-bulk-stock em { font-style: normal; font-size: 12px; font-weight: 600; }
.thp-st-in { color: #2e7d32; } .thp-st-low { color: var(--thp-low); } .thp-st-out { color: var(--thp-out); }

.thp-bulk-qty { display: inline-flex; align-items: stretch; border: 1px solid var(--thp-border); border-radius: 8px; overflow: hidden; min-width: 116px; }
html body .thp-bulk-qty button {
	width: 34px; padding: 0; border: 0 !important; background: #f5f5f5 !important; color: var(--thp-text) !important;
	font-size: 18px; line-height: 34px; cursor: pointer; border-radius: 0;
}
html body .thp-bulk-qty button:hover { background: var(--thp-text) !important; color: #fff !important; }
.thp-bulk-qty input.thp-q {
	width: 48px; height: 34px; padding: 0; margin: 0; border: 0; text-align: center; font-weight: 700; font-size: 14px;
	-moz-appearance: textfield; background: #fff;
}
.thp-bulk-qty input.thp-q::-webkit-outer-spin-button, .thp-bulk-qty input.thp-q::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.thp-q-na { display: block; width: 100%; text-align: center; color: #aaa; line-height: 34px; }

.thp-bulk-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; flex-wrap: wrap; }
.thp-bulk-sum { font-size: 15px; color: #555; }
.thp-bulk-sum strong { color: var(--thp-text); font-size: 18px; }
html body .thp-bulk button.thp-bulk-add {
	padding: 13px 28px; border: 0 !important; border-radius: 8px; background: var(--thp-text) !important; color: #fff !important;
	font-size: 14px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; cursor: pointer; min-width: 180px;
}
html body .thp-bulk button.thp-bulk-add:hover { background: var(--thp-accent) !important; }
html body .thp-bulk button.thp-bulk-add:disabled { background: #bbb !important; cursor: not-allowed; }
html body .thp-bulk button.thp-bulk-add.thp-busy { opacity: .6; pointer-events: none; }
.thp-bulk-msg { margin-top: 10px; padding: 10px 12px; border-radius: 8px; font-size: 13px; }
.thp-bulk-msg.thp-ok { background: #e8f5e9; color: #1b5e20; }
.thp-bulk-msg.thp-err { background: #fdecea; color: #b71c1c; }
.thp-bulk-msg a { color: inherit; font-weight: 700; text-decoration: underline; }


@media (max-width: 767px) {
	.thp-bulk-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "c q" "s q"; row-gap: 2px; }
	.thp-bulk-head { display: none; }
	.thp-bulk-colour { grid-area: c; } .thp-bulk-qty { grid-area: q; }
	.thp-bulk-stock { grid-area: s; padding-left: 0; }
	html body .thp-bulk button.thp-bulk-add { flex: 1; }
}
.thp-no-stock .thp-bulk-row { grid-template-columns: minmax(0, 1fr) auto; }
@media (max-width: 767px) { .thp-no-stock .thp-bulk-row { grid-template-areas: "c q"; } }

/* =====================================================================
 * [th_product] layout
 * ===================================================================== */
.thp-product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.thp-product.thp-no-images { grid-template-columns: minmax(0, 1fr); }
.thp-col-media { position: sticky; top: 20px; }
body.admin-bar .thp-col-media { top: 52px; }
@media (max-width: 1024px) { .thp-product { gap: 24px; } }
@media (max-width: 767px) {
	.thp-product { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	.thp-col-media { position: static; }
}

/* ---------- Gallery ---------- */
.thp-gallery { width: 100%; }
.thp-main {
	display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
	border: 1px solid var(--thp-border); border-radius: 12px; background: #fff;
}
.thp-main::-webkit-scrollbar { display: none; }
.thp-slide { flex: 0 0 100%; scroll-snap-align: start; display: flex; align-items: center; justify-content: center; cursor: zoom-in; aspect-ratio: 1 / 1; }
.thp-slide img { width: 100%; height: 100%; object-fit: contain; display: block; }
.thp-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 4px; }
html body button.thp-thumb {
	flex: 0 0 72px; width: 72px; height: 72px; padding: 3px; margin: 0;
	border: 2px solid var(--thp-border) !important; border-radius: 8px; background: #fff !important; cursor: pointer;
}
html body button.thp-thumb.is-active, html body button.thp-thumb:hover { border-color: var(--thp-text) !important; }
.thp-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
@media (max-width: 767px) { html body button.thp-thumb { flex-basis: 58px; width: 58px; height: 58px; } }

.thp-lightbox { position: fixed; inset: 0; z-index: 100000; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.92); cursor: zoom-out; }
.thp-lightbox.is-open { display: flex; }
.thp-lightbox img { max-width: 96vw; max-height: 92vh; object-fit: contain; }
html body button.thp-lb-close { position: absolute; top: 12px; right: 16px; background: none !important; border: 0 !important; color: #fff !important; font-size: 40px; line-height: 1; cursor: pointer; }
html.thp-lock, html.thp-lock body { overflow: hidden; }

/* ---------- Title / price ---------- */
.thp-series { font-size: 13px; letter-spacing: .5px; text-transform: uppercase; color: #888; margin-bottom: 4px; }
.thp-series a { color: inherit; text-decoration: none; }
.thp-series a:hover { color: var(--thp-accent); }
.thp-title { margin: 0 0 10px; font-size: 28px; line-height: 1.25; font-weight: 700; color: var(--thp-text); }
.thp-short { color: #555; font-size: 14px; line-height: 1.6; margin-bottom: 8px; }
.thp-short p { margin: 0 0 8px; }
@media (max-width: 767px) {
	.thp-title { font-size: 22px; }
}

/* ---------- Price: selling price big, MRP small + faded + struck ---------- */
.thp-price { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin: 0 0 16px; line-height: 1.2; }
.thp-price .thp-now, .thp-price .thp-now .amount, .thp-price .thp-now bdi { font-size: 28px; font-weight: 700; color: var(--thp-text) !important; }
.thp-price .thp-mrp, .thp-price .thp-mrp .amount, .thp-price .thp-mrp bdi { font-size: 16px !important; font-weight: 400 !important; color: #8a8a8a !important; }
.thp-price .thp-mrp s, .thp-price .thp-mrp s * { text-decoration: line-through !important; text-decoration-thickness: 1.5px; }
.thp-off { font-size: 12px; font-weight: 700; color: #fff; background: #2e7d32; padding: 4px 8px; border-radius: 4px; letter-spacing: .3px; }
@media (max-width: 767px) {
	.thp-price .thp-now, .thp-price .thp-now .amount, .thp-price .thp-now bdi { font-size: 24px; }
	.thp-price .thp-mrp, .thp-price .thp-mrp .amount, .thp-price .thp-mrp bdi { font-size: 14px !important; }
}

/* ---------- Standard side padding ---------- */
.thp-product { max-width: 1240px; margin: 0 auto; padding: 24px; box-sizing: border-box; }
@media (max-width: 767px) {
	.thp-product { padding: 12px 16px; }
	body.thp-page .related.products, body.thp-page .upsells.products,
	body.thp-page .elementor-widget-woocommerce-product-related, body.thp-page .elementor-widget-woocommerce-product-upsell { padding-left: 16px; padding-right: 16px; box-sizing: border-box; }
}

/* ---------- Mobile: fixed bottom "Add to cart" bar (same style as the shop Filters button) ---------- */
@media (max-width: 767px) {
	body.thp-page { padding-bottom: 84px; }
	.thp-bulk-foot {
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990; margin: 0;
		padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--thp-text);
		flex-wrap: nowrap; box-shadow: 0 -4px 14px rgba(0,0,0,.18);
	}
	.thp-bulk-sum { color: #ccc; font-size: 13px; white-space: nowrap; }
	.thp-bulk-sum strong { color: #fff; font-size: 16px; display: block; }
	html body .thp-bulk button.thp-bulk-add {
		flex: 1; min-width: 0; padding: 13px 16px; border-radius: 8px;
		background: #fff !important; color: var(--thp-text) !important;
	}
	html body .thp-bulk button.thp-bulk-add:hover { background: #fff !important; }
	html body .thp-bulk.thp-has-qty button.thp-bulk-add { background: var(--thp-accent) !important; color: #fff !important; }
	.thp-bulk-msg { position: fixed; left: 12px; right: 12px; bottom: 80px; z-index: 9991; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
}

/* ---------- Mobile: Filters button (Smart Filters) + Add to cart side by side ---------- */
@media (max-width: 767px) {
	body.thp-page:has(.thf-toggle) .thp-bulk-foot { padding-left: calc(38% + 8px); }
	body.thp-page:has(.thf-toggle) .thp-bulk-sum { display: none; }
	html body.thp-page button.thf-toggle {
		left: 12px !important; right: auto !important; width: 38% !important; max-width: 38% !important;
		bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important; padding: 13px 8px !important;
		background: #fff !important; color: var(--thp-text) !important; border: 1px solid #fff !important;
		font-size: 14px !important; box-shadow: none !important; z-index: 9995 !important;
	}
	/* While the filter sheet is open the button becomes full width "Apply filters" */
	html.thf-lock body.thp-page button.thf-toggle { width: auto !important; max-width: none !important; right: 12px !important; background: var(--thp-text) !important; color: #fff !important; border-color: var(--thp-text) !important; }
	html body.thp-page button.thf-toggle.thf-pending { background: #d32f2f !important; color: #fff !important; border-color: #d32f2f !important; }
}
