/**
 * Rate2Rate — Single product detail polish (electro-child)
 * Loaded only on product pages. Keeps Electro yellow brand.
 */

body.single-product {
	--r2r-yellow: #fed700;
	--r2r-yellow-dark: #e5c200;
	--r2r-ink: #1d1d1f;
	--r2r-muted: #6b7280;
	--r2r-line: #e8eaed;
	--r2r-surface: #f7f8fa;
	--r2r-sale: #e53935;
	--r2r-ok: #1b8f4a;
}

/* ---------- Layout shell ---------- */
body.single-product .single-product-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem 2rem;
	align-items: flex-start;
	margin-bottom: 2rem;
}

body.single-product .product-images-wrapper {
	flex: 1 1 42%;
	min-width: 280px;
	background: var(--r2r-surface);
	border-radius: 12px;
	padding: 1rem;
	position: relative;
}

body.single-product .summary.entry-summary {
	flex: 1 1 48%;
	min-width: 280px;
	padding: 0.25rem 3rem 1rem 0;
	position: relative;
}

/* ---------- Gallery ---------- */
body.single-product .woocommerce-product-gallery {
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
}

body.single-product .onsale {
	background: var(--r2r-sale) !important;
	border-radius: 6px !important;
	font-weight: 700;
	letter-spacing: 0.02em;
	padding: 0.35em 0.65em !important;
	min-height: auto !important;
	line-height: 1.2 !important;
	z-index: 3;
}

body.single-product .electro-wc-product-gallery__image {
	border: 1px solid var(--r2r-line);
	border-radius: 8px;
	overflow: hidden;
	margin: 0.25rem;
}

body.single-product .electro-wc-product-gallery__image:hover,
body.single-product .electro-wc-product-gallery__image.flex-active-slide {
	border-color: var(--r2r-yellow-dark);
}

/* ---------- Summary hierarchy ---------- */
body.single-product .loop-product-categories {
	display: block;
	margin-bottom: 0.4rem;
	font-size: 0.8rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--r2r-muted);
}

body.single-product .loop-product-categories a {
	color: var(--r2r-muted);
	text-decoration: none;
}

body.single-product .loop-product-categories a:hover {
	color: var(--r2r-ink);
}

body.single-product .product_title.entry-title {
	font-size: clamp(1.45rem, 2.4vw, 1.9rem);
	font-weight: 700;
	color: var(--r2r-ink);
	line-height: 1.25;
	margin: 0 0 0.75rem;
	padding-right: 0.5rem;
}

body.single-product .single-product-title-divider {
	display: none;
}

body.single-product .availability {
	margin: 0 0 0.75rem;
	font-size: 0.9rem;
}

body.single-product .availability .electro-stock-availability .available {
	color: var(--r2r-ok);
	font-weight: 600;
}

/* ---------- Title-area wishlist (heart icon) ---------- */
body.single-product .r2r-title-wishlist {
	position: absolute;
	top: 0.15rem;
	right: 0;
	z-index: 2;
}

body.single-product .r2r-title-wishlist .yith-wcwl-add-to-wishlist {
	margin: 0 !important;
}

body.single-product .r2r-title-wishlist .yith-wcwl-add-button a,
body.single-product .r2r-title-wishlist .yith-wcwl-wishlistexistsbrowse a,
body.single-product .r2r-title-wishlist .yith-wcwl-wishlistaddedbrowse a {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border: 1px solid var(--r2r-line);
	border-radius: 50%;
	background: #fff;
	color: var(--r2r-ink) !important;
	text-decoration: none !important;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

body.single-product .r2r-title-wishlist .yith-wcwl-add-button a:hover {
	border-color: var(--r2r-sale);
	color: var(--r2r-sale) !important;
}

body.single-product .r2r-title-wishlist .yith-wcwl-icon {
	margin: 0 !important;
	font-size: 1.1rem;
}

body.single-product .r2r-title-wishlist .yith-wcwl-add-button a span,
body.single-product .r2r-title-wishlist .yith-wcwl-wishlistexistsbrowse a span,
body.single-product .r2r-title-wishlist .yith-wcwl-wishlistaddedbrowse a span {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}

/* Hide wishlist everywhere else in the summary */
body.single-product .summary > .yith-wcwl-add-to-wishlist,
body.single-product .summary .action-buttons .yith-wcwl-add-to-wishlist {
	display: none !important;
}

/* ---------- Buy box: price + cart ---------- */
body.single-product .summary > .price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.5rem 0.85rem;
	margin: 0 0 1rem;
	padding: 0.85rem 1rem;
	background: var(--r2r-surface);
	border-radius: 10px;
	border: 1px solid var(--r2r-line);
}

body.single-product .summary > .price .electro-price ins {
	text-decoration: none;
}

body.single-product .summary > .price .electro-price ins .amount {
	font-size: 1.75rem;
	font-weight: 800;
	color: var(--r2r-ink);
}

body.single-product .summary > .price .electro-price del {
	text-decoration: none;
	position: relative;
}

body.single-product .summary > .price .electro-price del .amount {
	font-size: 1rem;
	color: var(--r2r-sale) !important;
	font-weight: 600;
	text-decoration: line-through;
	text-decoration-color: var(--r2r-sale);
	text-decoration-thickness: 2px;
}

body.single-product .summary form.cart {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 0.75rem;
	margin: 0 0 1rem;
}

body.single-product .summary form.cart .quantity {
	margin: 0 !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	background: #fff;
	border: 1px solid var(--r2r-line);
	border-radius: 8px;
	overflow: hidden;
	min-height: 48px;
	width: auto !important;
	float: none !important;
}

body.single-product .summary form.cart .quantity label {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

body.single-product .summary form.cart .quantity .r2r-qty-btn {
	appearance: none;
	border: 0;
	background: var(--r2r-surface);
	color: var(--r2r-ink);
	width: 2.5rem;
	height: 48px;
	font-size: 1.2rem;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	flex: 0 0 2.5rem;
}

body.single-product .summary form.cart .quantity .r2r-qty-btn:hover {
	background: #eceff3;
}

body.single-product .summary form.cart .quantity .qty {
	border: 0 !important;
	border-left: 1px solid var(--r2r-line) !important;
	border-right: 1px solid var(--r2r-line) !important;
	border-radius: 0 !important;
	width: 3.25rem !important;
	min-width: 3.25rem;
	height: 48px !important;
	margin: 0 !important;
	padding: 0 !important;
	text-align: center;
	font-size: 1rem;
	font-weight: 700;
	box-shadow: none !important;
	background: #fff !important;
	-moz-appearance: textfield;
}

body.single-product .summary form.cart .quantity .qty::-webkit-outer-spin-button,
body.single-product .summary form.cart .quantity .qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

body.single-product .summary form.cart .single_add_to_cart_button.button.alt {
	flex: 1 1 180px;
	min-height: 48px;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 8px !important;
	background: var(--r2r-yellow) !important;
	color: var(--r2r-ink) !important;
	font-size: 0.9rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	white-space: nowrap !important;
	overflow: hidden;
	text-overflow: ellipsis;
	padding-left: 1rem !important;
	padding-right: 1rem !important;
	box-shadow: none !important;
	transition: background 0.15s ease, transform 0.1s ease;
	float: none !important;
	width: auto !important;
	line-height: 1.2 !important;
}

body.single-product .summary form.cart .single_add_to_cart_button.button.alt:hover {
	background: var(--r2r-yellow-dark) !important;
	color: var(--r2r-ink) !important;
}

body.single-product .summary form.cart .single_add_to_cart_button.button.alt:active {
	transform: translateY(1px);
}

/* ---------- Promo / cashback (woo-cashback)
   Select/Apply = toggle offer (login required if guest). T&C = terms popup. */
body.single-product .efft-price {
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--r2r-ok);
	margin: 0 0 0.4rem;
}

body.single-product .dis-box {
	background: #fff8d6 !important;
	color: var(--r2r-ink) !important;
	border: 1px solid var(--r2r-yellow);
	border-bottom: 0;
	border-radius: 10px 10px 0 0;
	padding: 0.85rem 1rem 0.65rem;
	font-size: 0.875rem;
	line-height: 1.45;
	margin: 0;
	clear: both;
}

body.single-product .discount_div,
body.single-product .discount_div_not_logged {
	float: none !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0.65rem 1.1rem;
	min-height: 42px;
	background: var(--r2r-yellow) !important;
	color: var(--r2r-ink) !important;
	border: 1px solid var(--r2r-yellow-dark) !important;
	border-radius: 0 0 0 10px;
	font-size: 0.875rem;
	font-weight: 700;
	cursor: pointer;
	box-sizing: border-box;
	width: calc(100% - 5.5rem);
	text-align: center;
}

body.single-product .discount_div:hover,
body.single-product .discount_div_not_logged:hover {
	background: var(--r2r-yellow-dark) !important;
}

body.single-product .term-condition-link {
	float: none !important;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	vertical-align: top;
	width: 5.5rem;
	margin: 0;
	text-decoration: none;
}

body.single-product .term-condition {
	float: none !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 42px;
	margin: 0;
	padding: 0.65rem 0.5rem;
	background: var(--r2r-surface) !important;
	color: var(--r2r-muted) !important;
	border: 1px solid var(--r2r-line) !important;
	border-left: 0 !important;
	border-radius: 0 0 10px 0;
	font-size: 0;
	font-weight: 600;
	cursor: pointer;
	box-sizing: border-box;
}

body.single-product .term-condition::after {
	content: "Terms";
	font-size: 0.8rem;
	font-weight: 600;
}

body.single-product .term-condition:hover {
	color: var(--r2r-ink) !important;
	background: #eceff3 !important;
}

/* ---------- Short description ---------- */
body.single-product .woocommerce-product-details__short-description {
	margin: 1rem 0 1.25rem;
	padding-top: 0.25rem;
	color: #374151;
	font-size: 0.95rem;
	line-height: 1.6;
}

/* ---------- Compare / share ---------- */
body.single-product .summary .action-buttons,
body.single-product .summary .add-to-compare-link {
	font-size: 0.875rem;
}

body.single-product .summary .action-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.25rem;
	margin: 0.75rem 0 0.5rem;
	padding: 0.65rem 0 0;
	border-top: 1px solid var(--r2r-line);
}

body.single-product .summary .action-buttons a,
body.single-product .summary .add-to-compare-link {
	color: var(--r2r-muted) !important;
	text-decoration: none;
}

body.single-product .summary .action-buttons a:hover,
body.single-product .summary .add-to-compare-link:hover {
	color: var(--r2r-ink) !important;
}

body.single-product .summary .addtoany_list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0 0 1rem;
	opacity: 0.85;
}

body.single-product .summary .addtoany_list a {
	border-radius: 50% !important;
	overflow: hidden;
	transform: scale(0.92);
}

/* ---------- Tabs & related ---------- */
body.single-product .woocommerce-tabs {
	margin-top: 1.5rem;
	border-top: 1px solid var(--r2r-line);
	padding-top: 0.5rem;
}

body.single-product .woocommerce-tabs ul.tabs {
	padding-left: 0;
	margin-bottom: 1rem;
}

body.single-product .woocommerce-tabs ul.tabs li {
	border-radius: 8px 8px 0 0;
	background: transparent;
}

body.single-product .woocommerce-tabs ul.tabs li.active {
	background: var(--r2r-surface);
}

body.single-product .woocommerce-tabs ul.tabs li a {
	font-weight: 600;
	color: var(--r2r-ink);
}

body.single-product .related.products > h2,
body.single-product .related.products .section-title {
	font-size: 1.25rem;
	font-weight: 700;
	margin-bottom: 1rem;
}

body.single-product .related.products ul.products li.product {
	border: 1px solid var(--r2r-line);
	border-radius: 10px;
	padding: 0.75rem;
	background: #fff;
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
	body.single-product .single-product-wrapper {
		gap: 1rem;
		margin-bottom: 1.25rem;
	}

	body.single-product .product-images-wrapper {
		padding: 0.5rem;
		border-radius: 0;
		background: #fff;
		margin-left: -15px;
		margin-right: -15px;
		width: calc(100% + 30px);
	}

	body.single-product .summary.entry-summary {
		padding: 0 2.75rem 5.5rem 0;
	}

	body.single-product .summary > .price {
		padding: 0.75rem 0.85rem;
	}

	body.single-product .summary > .price .electro-price ins .amount {
		font-size: 1.55rem;
	}

	body.single-product .summary form.cart {
		position: sticky;
		bottom: 12px;
		z-index: 40;
		display: flex;
		flex-wrap: nowrap;
		background: rgba(255, 255, 255, 0.96);
		backdrop-filter: blur(8px);
		padding: 0.65rem;
		margin: 0 0 1rem;
		border: 1px solid var(--r2r-line);
		border-radius: 12px;
		box-shadow: 0 8px 28px rgba(0, 0, 0, 0.1);
	}

	body.single-product .summary form.cart .quantity {
		flex: 0 0 auto;
	}

	body.single-product .summary form.cart .single_add_to_cart_button.button.alt {
		flex: 1 1 auto;
		width: auto !important;
		float: none !important;
	}

	body.single-product .discount_div,
	body.single-product .discount_div_not_logged {
		width: calc(100% - 4.75rem);
	}

	body.single-product .term-condition-link {
		width: 4.75rem;
	}

	body.single-product .ht-ctc-chat,
	body.single-product #ht-ctc-chat {
		bottom: 88px !important;
	}

	body.single-product .summary .addtoany_list {
		margin-bottom: 0.75rem;
	}
}

@media (min-width: 992px) {
	body.single-product .product-images-wrapper {
		position: sticky;
		top: 1rem;
	}
}

/* ---------- Left category navigation ---------- */
body.single-product #sidebar.sidebar {
	background: #fff;
	border: 1px solid var(--r2r-line);
	border-radius: 12px;
	padding: 0.85rem 0.75rem 1rem;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

body.single-product #sidebar .widget {
	margin: 0 0 1rem;
	padding: 0;
	border: 0;
	background: transparent;
}

body.single-product #sidebar .widget:last-child {
	margin-bottom: 0;
}

body.single-product #sidebar .widget .widget-title {
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--r2r-ink);
	margin: 0 0 0.75rem;
	padding: 0 0.4rem 0.65rem;
	border-bottom: 2px solid var(--r2r-yellow);
	background: transparent;
}

body.single-product #sidebar .widget_nav_menu ul.menu {
	margin: 0;
	padding: 0;
	list-style: none;
}

body.single-product #sidebar .widget_nav_menu ul.menu > li {
	margin: 0;
	border-bottom: 1px solid var(--r2r-line);
}

body.single-product #sidebar .widget_nav_menu ul.menu > li:last-child {
	border-bottom: 0;
}

body.single-product #sidebar .widget_nav_menu ul.menu > li > a {
	display: block;
	padding: 0.55rem 0.55rem;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--r2r-ink);
	text-decoration: none;
	border-radius: 6px;
	line-height: 1.35;
	transition: background 0.12s ease, color 0.12s ease;
}

body.single-product #sidebar .widget_nav_menu ul.menu > li > a:hover {
	background: var(--r2r-surface);
	color: var(--r2r-ink);
}

body.single-product #sidebar .widget_nav_menu ul.menu > li.current-menu-item > a,
body.single-product #sidebar .widget_nav_menu ul.menu > li.current-product-parent > a,
body.single-product #sidebar .widget_nav_menu ul.menu > li.current-product-ancestor > a,
body.single-product #sidebar .widget_nav_menu ul.menu > li.current-menu-parent > a {
	background: #fff8d6;
	color: var(--r2r-ink);
}

body.single-product #sidebar .widget_nav_menu ul.sub-menu {
	margin: 0 0 0.35rem;
	padding: 0 0 0.25rem 0.65rem;
	list-style: none;
	border-left: 2px solid #f0e2a0;
}

body.single-product #sidebar .widget_nav_menu ul.sub-menu li {
	margin: 0;
	border: 0;
}

body.single-product #sidebar .widget_nav_menu ul.sub-menu a {
	display: block;
	padding: 0.35rem 0.45rem;
	font-size: 0.82rem;
	font-weight: 500;
	color: var(--r2r-muted);
	text-decoration: none;
	border-radius: 4px;
}

body.single-product #sidebar .widget_nav_menu ul.sub-menu a:hover,
body.single-product #sidebar .widget_nav_menu ul.sub-menu .current-menu-item > a {
	color: var(--r2r-ink);
	background: var(--r2r-surface);
}

body.single-product #sidebar .widget_media_image {
	padding: 0.35rem;
}

body.single-product #sidebar .widget_media_image img {
	border-radius: 8px;
	display: block;
	width: 100%;
	height: auto;
}

/* ---------- Cashback / Terms popup (colorbox) ---------- */
body.single-product #cboxOverlay {
	background: rgba(17, 24, 39, 0.45) !important;
	opacity: 1 !important;
}

body.single-product #colorbox {
	border-radius: 12px !important;
	overflow: hidden !important;
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2) !important;
}

body.single-product #cboxWrapper,
body.single-product #cboxContent,
body.single-product #cboxLoadedContent {
	background: #fff !important;
	border-radius: 12px;
}

body.single-product #cboxTopLeft,
body.single-product #cboxTopCenter,
body.single-product #cboxTopRight,
body.single-product #cboxBottomLeft,
body.single-product #cboxBottomCenter,
body.single-product #cboxBottomRight,
body.single-product #cboxMiddleLeft,
body.single-product #cboxMiddleRight {
	display: none !important;
	width: 0 !important;
	height: 0 !important;
	background: none !important;
}

body.single-product #cboxContent {
	margin: 0 !important;
	padding: 0 !important;
}

body.single-product #cboxLoadedContent {
	margin: 0 !important;
	padding: 0 !important;
	background: #fff !important;
	overflow: visible !important;
}

body.single-product #cboxClose {
	top: 10px !important;
	right: 10px !important;
	width: 32px !important;
	height: 32px !important;
	background: var(--r2r-surface) !important;
	border: 1px solid var(--r2r-line) !important;
	border-radius: 50% !important;
	color: var(--r2r-ink) !important;
	text-indent: 0 !important;
	font-size: 18px !important;
	line-height: 30px !important;
	text-align: center !important;
	padding: 0 !important;
}

body.single-product #cboxClose:hover {
	background: #eceff3 !important;
}

body.single-product .r2r-offer-modal {
	padding: 1.5rem 1.35rem 1.35rem;
	max-width: 360px;
	background: #fff;
	color: var(--r2r-ink);
	font-size: 0.95rem;
	line-height: 1.5;
	text-align: center;
}

body.single-product .r2r-offer-modal__title {
	margin: 0 0 0.55rem;
	font-size: 1.05rem;
	font-weight: 700;
}

body.single-product .r2r-offer-modal__text {
	margin: 0 0 1.1rem;
	color: #4b5563;
}

body.single-product .r2r-offer-modal__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
}

body.single-product .r2r-offer-modal__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	padding: 0.55rem 1.1rem;
	border-radius: 8px;
	font-size: 0.875rem;
	font-weight: 700;
	text-decoration: none !important;
	border: 1px solid transparent;
}

body.single-product .r2r-offer-modal__btn--primary {
	background: var(--r2r-yellow);
	color: var(--r2r-ink) !important;
}

body.single-product .r2r-offer-modal__btn--ghost {
	background: #fff;
	border-color: var(--r2r-line);
	color: var(--r2r-muted) !important;
	cursor: pointer;
}
