/* ============================================================
   Tennessee Rack - WooCommerce Product Page Styles
   ============================================================ */

/* Shop Page */
.woocommerce-shop.header_title_off .top_panel_navi {
    padding-bottom: 0;
}

.woocommerce-shop:not(.expand_content):not(.body_style_fullwide):not(.body_style_fullscreen)  .content {
    width: 100%;
}

/* --- Shop / archive: products list (flex grid, override WooCommerce floats) --- */
.woocommerce-shop.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    margin: 0;
    float: none;
    list-style: none;
    padding: 0 16px;
    width: 100%;
}

.woocommerce-shop.woocommerce ul.products,
.woocommerce-page ul.products {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -16px 4.8rem;
    list-style: none;
}

.woocommerce-shop.woocommerce ul.products li.product + li.product,
.woocommerce-page ul.products li.product + li.product {
    margin-top: 36px;
}

/* Toolbar above products (result count + ordering): alignment and clear floats */
.woocommerce-shop .woocommerce-result-count,
.woocommerce-shop .woocommerce-ordering,
.woocommerce-page .woocommerce-result-count,
.woocommerce-page .woocommerce-ordering {
    margin-bottom: 1rem;
}

@media ( min-width: 768px ) {
    .woocommerce-shop.woocommerce ul.products li.product,
    .woocommerce-page ul.products li.product {
        flex: 0 0 calc(50% - 32px);
        width: calc(50% - 32px);
        max-width: calc(50% - 32px);
    }

    .woocommerce-shop.woocommerce ul.products li.product,
    .woocommerce-page ul.products li.product {
        margin-top: 24px;
    }

    .woocommerce-shop.woocommerce ul.products li.product + li.product, 
    .woocommerce-page ul.products li.product + li.product {
        margin-top: 24px;
    }
}

@media ( min-width: 1200px ) {
    .woocommerce-shop.woocommerce ul.products li.product,
    .woocommerce-page ul.products li.product {
        flex: 0 0 calc(25% - 32px);
        width: calc(25% - 32px);
        max-width: calc(25% - 32px);
    }
}

/* --- FORCE FULL-WIDTH: Hide sidebar on all WooCommerce pages --- */
.single-product .sidebar,
.single-product #secondary,
.single-product .widget-area,
.single-product aside,
.single-product .sidebar_inner,
.single-product .sidebar_wrap,
.woocommerce .sidebar,
.woocommerce #secondary,
.woocommerce .widget-area,
.woocommerce aside.widget_area,
body.single-product .widget_area {
	display: none !important;
}

/* Force content area to full width when sidebar is hidden */
.single-product .content,
.single-product .content_wrap > .content,
.single-product .page_content_wrap .content,
body.single-product .content {
	width: 100% !important;
	max-width: 100% !important;
	float: none !important;
	margin-right: 0 !important;
}

.single-product .content_wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* Remove any parent theme column classes that restrict width */
.single-product .page_content_wrap {
	width: 100% !important;
}

/* --- Hide "Private:" prefix from product titles --- */
.single-product .product_title .private-prefix,
.single-product .summary .product_title::before {
	display: none;
}

/* Fallback: if WP injects "Private: " as text, hide via PHP filter (see functions.php)
   but also try to handle it visually */

/* --- Hide elements we don't need --- */
.single-product .cart .single_add_to_cart_button,
.single-product .quantity,
.woocommerce-cart-form,
.woocommerce-mini-cart,
.single-product .cart .woocommerce-variation-add-to-cart {
	display: none !important;
}

/* --- Product page layout --- */
.single-product div.product {
	display: flex;
	flex-wrap: wrap;
	gap: 40px;
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 0;
}

/* --- Product image gallery --- */
.single-product .woocommerce-product-gallery {
	flex: 0 0 48%;
	max-width: 48%;
}

.single-product .woocommerce-product-gallery .woocommerce-product-gallery__image img {
	width: 100%;
	height: auto;
}

.single-product .woocommerce-product-gallery .flex-control-thumbs {
	display: flex;
	gap: 10px;
	margin-top: 15px;
	padding: 0;
}

.single-product .woocommerce-product-gallery .flex-control-thumbs li {
	flex: 0 0 calc(25% - 8px);
	list-style: none;
}

.single-product .woocommerce-product-gallery .flex-control-thumbs li img {
	border: 2px solid transparent;
	cursor: pointer;
	transition: border-color 0.2s ease;
}

.single-product .woocommerce-product-gallery .flex-control-thumbs li img:hover,
.single-product .woocommerce-product-gallery .flex-control-thumbs li img.flex-active {
	border-color: #e8550f;
}

/* --- Product summary / details --- */
.single-product .summary.entry-summary {
	flex: 1;
	min-width: 0;
	padding-left: 0;
}

.single-product .summary .product_title {
	font-size: 32px;
	font-weight: 700;
	color: #222;
	margin-bottom: 15px;
	line-height: 1.3;
}

.single-product .summary .woocommerce-product-details__short-description {
	font-size: 15px;
	line-height: 1.7;
	color: #555;
	margin-bottom: 20px;
}

/* --- "Starting at" price styling --- */
.single-product .summary .price {
	font-size: 26px;
	font-weight: 700;
	color: #e8550f;
	margin: 15px 0 20px;
	display: block;
}

.single-product .summary .price del {
	display: none;
}

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

/* Hide the duplicate variation price (the "Starting at" price above handles this) */
.woocommerce-variation-price,
.single-product .woocommerce-variation-price {
	display: none !important;
}

/* --- Variation selector styling --- */
.single-product .variations {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 20px;
}

.single-product .variations tr {
	display: flex;
	flex-direction: column;
	margin-bottom: 15px;
}

.single-product .variations td.label {
	padding-bottom: 6px;
}

.single-product .variations td.label label {
	font-weight: 600;
	font-size: 15px;
	color: #333;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.single-product .variations td.value {
	padding: 0;
}

.single-product .variations select {
	width: 100%;
	max-width: 350px;
	padding: 12px 16px;
	border: 2px solid #ddd;
	border-radius: 4px;
	font-size: 15px;
	color: #333;
	background-color: #fff;
	appearance: auto;
	cursor: pointer;
	transition: border-color 0.2s ease;
}

.single-product .variations select:hover,
.single-product .variations select:focus {
	border-color: #e8550f;
	outline: none;
}

.single-product .reset_variations {
	display: inline-block;
	margin-top: 8px;
	font-size: 13px;
	color: #888;
	text-decoration: underline;
}

/* --- "Contact Us for Your Estimate" CTA button --- */
.tnrack-contact-cta {
	margin-top: 25px;
	padding-top: 20px;
	border-top: 1px solid #eee;
}

.tnrack-contact-btn {
	display: inline-block !important;
	width: auto !important;
	padding: 14px 32px !important;
	background: #e8550f !important;
	color: #fff !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	text-transform: uppercase;
	letter-spacing: 1px;
	border: 2px solid #e8550f !important;
	border-radius: 3px;
	cursor: pointer;
	transition: all 0.3s ease;
	text-decoration: none !important;
	text-align: center;
	line-height: 1.4 !important;
}

.tnrack-contact-btn:hover {
	background: #c94700 !important;
	border-color: #c94700 !important;
	color: #fff !important;
}

.tnrack-contact-btn .sc_button_text,
.tnrack-contact-btn .sc_button_title {
	font-size: 15px !important;
	font-weight: 600 !important;
	color: #fff !important;
}

/* --- Product meta (SKU, categories, tags) --- */
.single-product .product_meta {
	margin-top: 25px;
	padding-top: 20px;
	border-top: 1px solid #eee;
	font-size: 14px;
	color: #777;
}

.single-product .product_meta span {
	display: block;
	margin-bottom: 5px;
}

.single-product .product_meta a {
	color: #e8550f;
	text-decoration: none;
}

.single-product .product_meta a:hover {
	text-decoration: underline;
}

/* --- Product tabs (description, additional info, etc.) --- */
.single-product .woocommerce-tabs {
	flex: 0 0 100%;
	max-width: 100%;
	margin-top: 20px;
	clear: both;
}

.single-product .woocommerce-tabs ul.tabs {
	display: flex;
	list-style: none;
	padding: 0;
	margin: 0 0 25px;
	border-bottom: 2px solid #eee;
}

.single-product .woocommerce-tabs ul.tabs li {
	margin: 0;
	padding: 0;
}

.single-product.woocommerce div.product .woocommerce-tabs ul.tabs li {
    padding: 0;
    border-radius: 0;
    border: 0;
}

.single-product.woocommerce div.product .woocommerce-tabs ul.tabs::before {
    display: none;
}

.single-product.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.single-product.woocommerce div.product .woocommerce-tabs ul.tabs li::after {
    display: none;
}

.single-product.woocommerce div.product .woocommerce-tabs ul.tabs li {
    padding: 0;
    border-radius: 0;
    border: 0;
}

.single-product.woocommerce div.product .woocommerce-tabs ul.tabs li a {
    display: block;
    padding: 12px 24px;
    font-family: "Khand", sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    background: transparent !important;
    border: 0;
    transition: all 0.2s ease;
}

.single-product.woocommerce div.product .woocommerce-tabs ul.tabs li a:hover {
    color: #fff;
    background: #ed4c21 !important;
    box-shadow: none;
}

.single-product.woocommerce div.product .woocommerce-tabs ul.tabs li a:focus {
    box-shadow: none;
    outline: none;
}

.single-product.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
    color: #ffffff;
    background: #ed4c21 !important;
    border-bottom-color: #ed4c21;
}

.single-product.woocommerce div.product .woocommerce-tabs .woocommerce-Tabs-panel {
    padding: 0 0 30px;
    font-size: 15px;
    line-height: 1.7;
    color: #555;
}

.single-product .woocommerce-tabs .woocommerce-Tabs-panel h2 {
	font-size: 24px;
	margin-bottom: 15px;
}

.single-product.woocommerce table.shop_attributes td {
    padding: 5px;
}

/* --- Related products section --- */
.single-product .related.products {
	flex: 0 0 100%;
	max-width: 100%;
	margin-top: 40px;
	padding-top: 30px;
	border-top: 1px solid #eee;
}

.single-product .related.products h2 {
	font-size: 22px;
	font-weight: 700;
	margin-bottom: 25px;
}

/* --- Shop / Archive page product cards --- */
.woocommerce ul.products li.product {
	text-align: center;
}

.woocommerce ul.products li.product a img {
	margin-bottom: 15px;
	transition: opacity 0.2s ease;
}

.woocommerce ul.products li.product a img:hover {
	opacity: 0.85;
}

.woocommerce ul.products li.product .price {
	color: #e8550f;
	font-weight: 600;
	font-size: 16px;
}

.woocommerce ul.products li.product a.button {
	background: #e8550f;
	color: #fff;
	border: none;
	padding: 10px 20px;
	font-weight: 600;
	text-transform: uppercase;
	font-size: 13px;
	letter-spacing: 0.5px;
	transition: background 0.3s ease;
}

.woocommerce ul.products li.product a.button:hover {
	background: #c94700;
}

/* --- Responsive --- */
@media (max-width: 768px) {
	.single-product div.product {
		flex-direction: column;
		gap: 20px;
		padding: 20px 0;
	}

	.single-product .woocommerce-product-gallery {
		flex: 0 0 100%;
		max-width: 100%;
	}

	.single-product .summary.entry-summary {
		flex: 0 0 100%;
	}

	.single-product .summary .product_title {
		font-size: 24px;
	}

	.single-product .summary .price {
		font-size: 22px;
	}

	.single-product .variations select {
		max-width: 100%;
	}

	.tnrack-contact-btn {
		display: block !important;
		text-align: center;
		width: 100% !important;
	}

	.single-product .woocommerce-tabs ul.tabs {
		flex-direction: column;
	}

	.single-product .woocommerce-tabs ul.tabs li a {
		padding: 10px 16px;
	}
}

@media (max-width: 480px) {
	.single-product .summary .product_title {
		font-size: 20px;
	}

	.single-product .summary .price {
		font-size: 20px;
	}

	.tnrack-contact-btn {
		padding: 12px 20px !important;
		font-size: 14px !important;
	}
}
