/**
 * Single Product Page – professional layout and look
 * Theme primary: #f0a402
 * Overrides WooCommerce default .images / .summary layout so our grid controls width.
 */

body.single-product .main.sp-single-product {
	--sp-primary: #f0a402;
	--sp-primary-dark: #d99300;
	--sp-primary-rgb: 240, 164, 2;
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ========== WooCommerce layout reset (override .woocommerce div.product div.images / div.summary) ========== */
body.single-product .woocommerce #content div.product div.images,
body.single-product .woocommerce div.product div.images,
body.single-product .woocommerce-page #content div.product div.images,
body.single-product .woocommerce-page div.product div.images {
	float: none !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
}
body.single-product .woocommerce #content div.product div.summary,
body.single-product .woocommerce div.product div.summary,
body.single-product .woocommerce-page #content div.product div.summary,
body.single-product .woocommerce-page div.product div.summary {
	float: none !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
}
body.single-product .woocommerce div.product div.thumbnails a,
body.single-product .woocommerce-page div.product div.thumbnails a {
	float: none !important;
	width: auto !important;
	margin-right: 0 !important;
}

/* ========== Page Header (dynamic banner / hero) ========== */
body.single-product .sp-product-header {
	background: #1a1a1a;
	padding: 48px 0 56px;
	text-align: center;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}
body.single-product .sp-product-header.has-banner {
	background-image: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)), var(--porto-breadcrumb-banner);
}
body.single-product .sp-product-header.has-hero-image {
	background-image: linear-gradient(rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)), var(--sp-hero-banner);
}
body.single-product .sp-product-header .sp-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 0.4rem;
	margin: 0 0 16px;
	padding: 0;
	list-style: none;
	background: none;
}
body.single-product .sp-product-header .sp-breadcrumb .breadcrumb-item a {
	color: rgba(255, 255, 255, 0.78);
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
}
body.single-product .sp-product-header .sp-breadcrumb .breadcrumb-item a:hover {
	color: #fff;
}
body.single-product .sp-product-header .sp-breadcrumb .breadcrumb-item.active {
	color: var(--sp-primary);
	font-size: 14px;
	font-weight: 600;
}
body.single-product .sp-product-header .sp-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
	color: rgba(255, 255, 255, 0.5);
	font-weight: 400;
}
body.single-product .sp-product-header .sp-product-title {
	color: #fff;
	font-size: 32px;
	font-weight: 700;
	margin: 0 0 6px;
	line-height: 1.25;
}
body.single-product .sp-product-header .sp-product-subtitle {
	color: rgba(255, 255, 255, 0.85);
	font-size: 15px;
	margin: 0;
}

/* ========== Content area ========== */
body.single-product .sp-product-content {
	padding: 48px 0 56px;
	background: #f8f9fa;
}
body.single-product #content,
body.single-product .content-area,
body.single-product .site-main,
body.single-product .sp-product .sp-product__summary {
	float: none !important;
	width: 100% !important;
}

/* ========== Product layout: gallery (larger) | details ========== */
body.single-product .sp-product {
	background: transparent;
}
body.single-product .sp-product__layout {
	display: grid;
	grid-template-columns: 1.25fr 0.75fr;
	gap: 2rem;
	align-items: start;
	max-width: 100%;
}
body.single-product .sp-product__gallery {
	min-width: 0;
	width: 100%;
}
body.single-product .sp-product__gallery > div {
	width: 100% !important;
	max-width: 100% !important;
}

/* Gallery – full width in column, professional look */
body.single-product .sp-product .woocommerce-product-gallery {
	padding: 0;
	opacity: 1 !important;
	width: 100% !important;
}
body.single-product .sp-product .woocommerce-product-gallery .woocommerce-product-gallery__wrapper {
	width: 100%;
}
body.single-product .sp-product .woocommerce-product-gallery .woocommerce-product-gallery__image {
	width: 100%;
}
body.single-product .sp-product .woocommerce-product-gallery .woocommerce-product-gallery__image img {
	border-radius: 12px;
	width: 100% !important;
	max-width: 100% !important;
	height: auto;
	display: block;
}
body.single-product .sp-product .flex-control-thumbs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}
body.single-product .sp-product .flex-control-thumbs li {
	margin: 0;
	flex: 0 0 calc(25% - 6px);
	max-width: calc(25% - 6px);
}
body.single-product .sp-product .flex-control-thumbs img {
	border: 2px solid transparent;
	border-radius: 8px;
	opacity: 0.75;
	transition: opacity 0.2s, border-color 0.2s;
	cursor: pointer;
}
body.single-product .sp-product .flex-control-thumbs img:hover,
body.single-product .sp-product .flex-control-thumbs img.flex-active {
	opacity: 1;
	border-color: var(--sp-primary);
}

/* Sale badge */
body.single-product .sp-product .onsale {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 2;
	background: var(--sp-primary) !important;
	color: #fff !important;
	font-size: 12px;
	font-weight: 600;
	padding: 6px 12px;
	border-radius: 6px;
}

/* ========== Summary column – clean reference style ========== */
body.single-product .sp-product .summary,
body.single-product .sp-product .sp-product__summary {
	background: #fff;
	border-radius: 12px;
	border: 1px solid #e8e8e8;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
	padding: 28px 32px;
}

/* Title – large, elegant */
body.single-product .sp-product .summary .product_title,
body.single-product .sp-product .sp-product__summary .product_title {
	font-size: 1.75rem;
	font-weight: 700;
	color: #1a1a1a;
	margin: 0 0 12px;
	line-height: 1.3;
	letter-spacing: -0.02em;
}

/* Rating */
body.single-product .sp-product .summary .star-rating,
body.single-product .sp-product .sp-product__summary .star-rating {
	color: var(--sp-primary);
	margin-bottom: 12px;
}

/* Price */
body.single-product .sp-product .summary .price,
body.single-product .sp-product .sp-product__summary .price {
	font-size: 1.5rem;
	font-weight: 700;
	color: #1a1a1a;
	margin-bottom: 1.25rem;
}
body.single-product .sp-product .summary .price .amount,
body.single-product .sp-product .sp-product__summary .price .amount {
	color: var(--sp-primary);
}
body.single-product .sp-product .summary .price del,
body.single-product .sp-product .sp-product__summary .price del {
	color: #888;
	font-size: 1.1rem;
	font-weight: 500;
}
body.single-product .sp-product .summary .price ins {
	text-decoration: none;
}

/* Short description – readable */
body.single-product .sp-product .summary .woocommerce-product-details__short-description,
body.single-product .sp-product .sp-product__summary .woocommerce-product-details__short-description {
	margin-bottom: 1.5rem;
	color: #444;
	font-size: 15px;
	line-height: 1.75;
}
body.single-product .sp-product .summary .woocommerce-product-details__short-description p:last-child {
	margin-bottom: 0;
}

/* ========== Add to cart – prominent card ========== */
body.single-product .sp-product .summary form.cart,
body.single-product .sp-product .sp-product__summary form.cart {
	display: flex !important;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
	margin-bottom: 1.5rem;
	padding: 20px 22px;
	background: linear-gradient(135deg, rgba(240, 164, 2, 0.08) 0%, rgba(240, 164, 2, 0.04) 100%);
	border: 1px solid rgba(var(--sp-primary-rgb), 0.25);
	border-radius: 12px;
}
body.single-product .sp-product .summary .quantity .qty {
	width: 80px;
	padding: 12px 14px;
	font-size: 1rem;
	font-weight: 600;
	border: 1px solid #ddd;
	border-radius: 8px;
	text-align: center;
}
body.single-product .sp-product .summary .quantity .qty:focus,
body.single-product .sp-product .sp-product__summary .quantity .qty:focus {
	border-color: var(--sp-primary);
	outline: 0;
	box-shadow: 0 0 0 3px rgba(var(--sp-primary-rgb), 0.2);
}
body.single-product .sp-product .summary .single_add_to_cart_button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 28px;
	font-size: 1rem;
	font-weight: 600;
	color: #fff !important;
	background: var(--sp-primary) !important;
	border: none !important;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.2s, transform 0.2s;
}
body.single-product .sp-product .summary .single_add_to_cart_button:hover,
body.single-product .sp-product .sp-product__summary .single_add_to_cart_button:hover {
	background: var(--sp-primary-dark) !important;
	color: #fff !important;
	transform: translateY(-2px);
}

/* Selling points – checkmarks below Add to Cart */
body.single-product .sp-product .sp-selling-points {
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 0;
}
body.single-product .sp-product .sp-selling-points li {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 0;
	font-size: 15px;
	color: #333;
	line-height: 1.4;
	border-bottom: 1px solid #f0f0f0;
}
body.single-product .sp-product .sp-selling-points li:last-child {
	border-bottom: none;
}
body.single-product .sp-product .sp-selling-icon {
	color: var(--sp-primary);
	font-size: 18px;
	flex-shrink: 0;
}
body.single-product .sp-product .sp-selling-icon i {
	vertical-align: middle;
}

/* Stock */
body.single-product .sp-product .summary .stock {
	display: block !important;
	margin-bottom: 1rem;
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
}
body.single-product .sp-product .summary .in-stock,
body.single-product .sp-product .sp-product__summary .in-stock {
	background: #d1e7dd;
	border: 1px solid #badbcc;
	color: #0f5132;
}
body.single-product .sp-product .summary .out-of-stock {
	background: #f8d7da;
	border: 1px solid #f5c2c7;
	color: #842029;
}

/* ========== Tyre specifications – professional / Shopify-style ========== */
body.single-product .sp-product .tyre-specifications {
	margin-bottom: 1.75rem;
	padding: 28px 28px 24px;
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 14px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}
body.single-product .sp-product .tyre-specs-title {
	font-size: 1.35rem;
	font-weight: 700;
	color: #1a1a1a;
	margin: 0 0 20px;
	padding-bottom: 14px;
	border-bottom: 3px solid var(--sp-primary);
	letter-spacing: -0.02em;
}
body.single-product .sp-product .tyre-specs-table {
	width: 100%;
	margin: 0;
	font-size: 1rem;
	line-height: 1.5;
}
body.single-product .sp-product .tyre-specs-table td {
	padding: 14px 16px 14px 0;
	border-bottom: 1px solid #eee;
	font-size: 1rem;
	vertical-align: middle;
}
body.single-product .sp-product .tyre-specs-table tr:last-child td {
	border-bottom: 0;
}
body.single-product .sp-product .tyre-specs-table td:first-child {
	color: #555;
	font-weight: 600;
	font-size: 0.9375rem;
	width: 42%;
}
body.single-product .sp-product .tyre-specs-table td:last-child {
	color: #1a1a1a;
	font-weight: 500;
	font-size: 1rem;
}
body.single-product .sp-product .tyre-specs-table strong {
	font-weight: 600;
}

/* Meta */
body.single-product .sp-product .summary .product_meta,
body.single-product .sp-product .sp-product__summary .product_meta {
	padding-top: 1.25rem;
	border-top: 1px solid #eee;
	font-size: 14px;
	color: #666;
}
body.single-product .sp-product .summary .product_meta a {
	color: var(--sp-primary);
	text-decoration: none;
	font-weight: 500;
}
body.single-product .sp-product .summary .product_meta a:hover,
body.single-product .sp-product .sp-product__summary .product_meta a:hover {
	text-decoration: underline;
}

/* ========== Product complete details – tabbed (reference: minimal tabs, two-column content) ========== */
body.single-product .sp-product .woocommerce-tabs {
	margin-top: 3rem;
	padding: 0;
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}
body.single-product .sp-product .woocommerce-tabs .wc-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	list-style: none;
	padding: 0 24px 0 0;
	margin: 0;
	border-bottom: 1px solid #e0e0e0;
	background: #fff;
}
body.single-product .sp-product .woocommerce-tabs .wc-tabs li {
	margin: 0;
}
body.single-product .sp-product .woocommerce-tabs .wc-tabs li a {
	display: block;
	padding: 18px 24px;
	font-weight: 600;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #999;
	text-decoration: none;
	border-bottom: 3px solid transparent;
	margin-bottom: -1px;
	transition: color 0.2s, border-color 0.2s;
}
body.single-product .sp-product .woocommerce-tabs .wc-tabs li.active a,
body.single-product .sp-product .woocommerce-tabs .wc-tabs li a:hover {
	color: #1a1a1a;
	border-bottom-color: #1a1a1a;
}
body.single-product .sp-product .woocommerce-tabs .woocommerce-Tabs-panel {
	padding: 2rem 2.25rem;
}
/* Two-column: Description (left) | Tyre Specifications (right) */
body.single-product .sp-product .sp-tab-two-col {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	align-items: start;
}
@media (min-width: 992px) {
	body.single-product .sp-product .sp-tab-two-col.sp-tab-two-col--with-specs {
		grid-template-columns: 1fr 380px;
		gap: 2.5rem;
	}
}
/* Description column – clean reading */
body.single-product .sp-product .sp-tab-desc {
	min-width: 0;
	padding-right: 0;
}
body.single-product .sp-product .sp-tab-heading {
	font-size: 0.8125rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: #374151;
	margin: 0 0 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid #1a1a1a;
}
body.single-product .sp-product .sp-tab-desc .entry-content,
body.single-product .sp-product .sp-tab-desc p {
	font-size: 1.4rem;
	line-height: 1.8;
	color: #374151;
	margin: 0 0 1rem;
}
body.single-product .sp-product .sp-tab-desc p:last-child {
	margin-bottom: 0;
}
/* Specs column – card */
body.single-product .sp-product .sp-tab-specs {
	min-width: 0;
}
body.single-product .sp-product .sp-tab-specs .tyre-specifications {
	margin: 0;
}
body.single-product .sp-product .woocommerce-tabs .woocommerce-Tabs-panel table {
	width: 100%;
	font-size: 14px;
	border-collapse: collapse;
}
body.single-product .sp-product .woocommerce-tabs .woocommerce-Tabs-panel th {
	width: 30%;
	padding: 12px 14px;
	color: #666;
	font-weight: 600;
	text-align: left;
	border-bottom: 1px solid #eee;
}
body.single-product .sp-product .woocommerce-tabs .woocommerce-Tabs-panel td {
	padding: 12px 14px;
	border-bottom: 1px solid #eee;
}
body.single-product .sp-product .sp-tab-shipping p {
	margin: 0;
	font-size: 15px;
	line-height: 1.7;
	color: #555;
}

/* ========== Why Choose sidebar ========== */
body.single-product .sp-why-choose-sidebar {
	background: #fff;
	border-radius: 14px;
	border: 1px solid #e8e8e8;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
	overflow: hidden;
	position: sticky;
	top: 20px;
}
body.single-product .sp-why-choose-title {
	font-size: 1rem;
	font-weight: 700;
	color: #fff;
	background: #2d2d2d;
	margin: 0;
	padding: 16px 20px;
	text-align: center;
}
body.single-product .sp-why-choose-list {
	list-style: none;
	margin: 0;
	padding: 20px 18px;
}
body.single-product .sp-why-choose-list li {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	margin-bottom: 18px;
}
body.single-product .sp-why-choose-list li:last-child {
	margin-bottom: 0;
}
body.single-product .sp-why-icon {
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: linear-gradient(135deg, rgba(var(--sp-primary-rgb), 0.15) 0%, rgba(var(--sp-primary-rgb), 0.08) 100%);
	color: var(--sp-primary);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	font-size: 16px;
}
body.single-product .sp-why-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
}
body.single-product .sp-why-text strong {
	font-size: 14px;
	color: #1a1a1a;
}
body.single-product .sp-why-text span {
	font-size: 13px;
	color: #666;
	line-height: 1.4;
}
body.single-product .sp-product-meta-sidebar {
	padding: 16px 20px;
	border-top: 1px solid #eee;
	font-size: 13px;
	color: #555;
}
body.single-product .sp-product-meta-sidebar .sp-meta-line {
	margin: 0 0 8px;
	line-height: 1.5;
}
body.single-product .sp-product-meta-sidebar .sp-meta-line:last-child {
	margin-bottom: 0;
}
body.single-product .sp-product-meta-sidebar .sp-meta-label {
	font-weight: 600;
	color: #333;
}
body.single-product .sp-product-meta-sidebar a {
	color: var(--sp-primary);
	text-decoration: none;
}
body.single-product .sp-product-meta-sidebar a:hover {
	text-decoration: underline;
}

/* ========== Related / Upsells ========== */
body.single-product .sp-product .related.products,
body.single-product .sp-product .upsells.products {
	margin-top: 2.5rem;
	padding-top: 2rem;
	border-top: 1px solid #e8e8e8;
}
body.single-product .sp-product .related.products h2,
body.single-product .sp-product .upsells.products h2 {
	font-size: 1.35rem;
	font-weight: 700;
	color: #1a1a1a;
	margin-bottom: 1.25rem;
	padding-bottom: 10px;
	border-bottom: 3px solid var(--sp-primary);
	display: inline-block;
}
body.single-product .sp-product .related.products ul.products,
body.single-product .sp-product .upsells.products ul.products {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	padding: 0;
	margin: 0 -10px -20px;
}
body.single-product .sp-product .related.products ul.products > li,
body.single-product .sp-product .upsells.products ul.products > li {
	float: none;
	margin: 0 10px 20px;
	flex: 0 0 calc(33.333% - 20px);
	max-width: calc(33.333% - 20px);
}
@media (max-width: 991px) {
	body.single-product .sp-product .related.products ul.products > li,
	body.single-product .sp-product .upsells.products ul.products > li {
		flex: 0 0 calc(50% - 20px);
		max-width: calc(50% - 20px);
	}
}
@media (max-width: 575px) {
	body.single-product .sp-product .related.products ul.products > li,
	body.single-product .sp-product .upsells.products ul.products > li {
		flex: 0 0 100%;
		max-width: 100%;
	}
}

/* Notices */
body.single-product .woocommerce-message,
body.single-product .woocommerce-info {
	border-left: 4px solid var(--sp-primary);
	border-radius: 8px;
	padding: 14px 18px;
	margin-bottom: 1rem;
	background: #fff;
}

/* Tablet: stack gallery-wrap and details */
@media (max-width: 991px) {
	body.single-product .sp-product__layout {
		grid-template-columns: 1fr;
	}
	body.single-product .sp-product__gallery-wrap {
		grid-template-columns: 1fr;
	}
	body.single-product .sp-product__sidebar {
		min-width: 0;
		max-width: 100%;
	}
	body.single-product .sp-sidebar {
		position: static;
	}
}

/* Mobile */
@media (max-width: 767px) {
	body.single-product .sp-product-header .sp-product-title {
		font-size: 24px;
	}
	body.single-product .sp-product-header .sp-product-subtitle {
		font-size: 14px;
	}
	body.single-product .sp-product-content {
		padding: 32px 0 40px;
	}
	body.single-product .sp-product .summary,
	body.single-product .sp-product .sp-product__summary {
		padding: 20px 18px;
	}
	body.single-product .sp-product .summary form.cart,
	body.single-product .sp-product .sp-product__summary form.cart {
		flex-direction: column;
		align-items: stretch;
		padding: 16px;
	}
	body.single-product .sp-product .summary .quantity .qty,
	body.single-product .sp-product .sp-product__summary .quantity .qty {
		width: 100%;
	}
	body.single-product .sp-product .summary .single_add_to_cart_button,
	body.single-product .sp-product .sp-product__summary .single_add_to_cart_button {
		width: 100%;
	}
}
