/**
 * Ahanit Theme
 *
 * Styles for WooCommerce Single Product Page Components.
 * This file contains all styles for the single product page layout and its
 * modular template parts, loaded conditionally for performance.
 *
 * @version 3.6 (FAQ inline display override & minor hardening)
 */

/* ==========================================================================
   0.0 - Single Product Page Layout
   ========================================================================== */

.single-product-main-container {
    width: 90vw;
    margin: 0 auto;
}

.main-content.single-product-page {
    padding-top: 8vh;
}

.article-body-content h2,
.article-body-content h3,
.article-body-content h4 {
    scroll-margin-top: 120px;
}

@media (max-width: 768px) {
    .single-product-main-container {
        width: 100%;
        padding: 0 4vw;
        box-sizing: border-box;
    }
    .main-content.single-product-page {
        padding-top: 10vh;
    }
}

/* ==========================================================================
   1.0 - Product Header Block
   ========================================================================== */

/* Visually Hidden: For screen readers and SEO */
.visually-hidden {
	border: 0;
	clip: rect(0 0 0 0);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	white-space: nowrap;
}

/* Main Wrapper */
.product-header-block {
	background: #fff;
	border-radius: 1.2vw;
	border: 1px solid #e9ecef;
	padding: 2vw;
	box-shadow: 0 0.8vw 3.2vw rgba(0,0,0,.07);
	margin-top: 2vw;
}

/* Two-column grid */
.product-layout-grid {
	display: grid;
	grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
	gap: 2vw;
	align-items: start;
}

/* Generic Column Styles */
.product-info-column, .product-chart-column {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-width: 0;
}

/* Info Column Content */
.product-info-column .product-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5vw; gap: 1vw; }
.product-info-column .product_title { font-size: 2.2vw; font-weight: 800; color: #1a1a2e; line-height: 1.4; margin: 0; word-break: break-word; }
.product-info-column .price-box { display: flex; flex-direction: column; align-items: flex-end; text-align: right; flex-shrink: 0; border-right: 0.3vw solid #6a5acd; padding-right: 0.8vw; }
.product-info-column .main-price { font-size: 2vw; font-weight: 800; margin-bottom: 0.2vw; color: #1a1a2e !important; }
.product-info-column .last-updated { font-size: 0.8vw; color: #6c757d; }
.product-info-column .product-info-list { list-style: none; padding: 0; margin: 0 0 1.5vw; }
.product-info-column .product-info-item { font-size: 1vw; margin-bottom: 0.8vw; display: flex; justify-content: space-between; align-items: center; padding: 0.7vw 1vw; border-radius: 0.7vw; border: 1px solid #f1f3f5; background-color: #f8f9fa; }
.product-info-column .price-value { font-weight: 700; color: #6a5acd; }
.product-info-column .quantity-input { width: 3.5vw; text-align: center; border: 1px solid #ced4da; border-radius: 0.4vw; padding: 0.2vw 0.4vw; margin: 0 0.4vw; font-size: 0.9vw; }
.product-info-column .product-cta { margin-top: auto; padding-top: 1vw; border-top: 1px solid #e9ecef; }
.product-info-column .cart { display: flex; align-items: center; gap: 1vw; }
.product-info-column .quantity { margin: 0; }
.product-info-column .quantity .qty { width: 5vw; border-radius: 0.7vw; padding: 0.8vw; border: 1px solid #ced4da; text-align: center; font-size: 1vw; font-weight: 600; }
.product-info-column .quantity-label { font-weight: 600; color: #343a40; margin-right: -0.5vw; }
.product-info-column .single_add_to_cart_button { flex-grow: 1; padding: 0.8vw 2vw; border-radius: 0.8vw; background: linear-gradient(45deg, #6a5acd, #8a4af3); color: #fff !important; font-size: 1.1vw; font-weight: 700; border: none; cursor: pointer; box-shadow: 0 0.4vw 1.5vw rgba(106,90,205,.2); transition: all 0.3s ease; }
.product-info-column .single_add_to_cart_button:hover { transform: translateY(-0.3vw); box-shadow: 0 0.6vw 2vw rgba(106,90,205,.4); }

/* Chart Column Content */
.product-chart-column .product-chart-title { font-weight: 700; font-size: 1.2vw; color: #1a1a2e; text-align: right; margin: 0 0 1vw; }
.product-chart-column .chart-placeholder { width: 100%; flex-grow: 1; background: #f8f9fa; border-radius: 0.8vw; padding: 1vw; border: 1px solid #e9ecef; box-sizing: border-box; }
.product-chart-column canvas { max-width: 100% !important; height: auto !important; }

/* Price Difference Indicator Styles */
.price-diff { display: inline-block; margin-top: 0.4vw; padding: 0.2vw 0.8vw; font-size: 0.85vw; font-weight: 700; border-radius: 0.4vw; line-height: 1.4; color: #fff; direction: ltr; margin-left: auto; }
.price-diff.positive { background-color: #28a745; }
.price-diff.negative { background-color: #dc3545; }

/* Responsive Styles for Header Block */
@media (max-width: 992px) {
	.product-layout-grid { grid-template-columns: 1fr; gap: 4vw; }
	.product-info-column .product_title { font-size: 3vw; }
	.product-info-column .main-price { font-size: 2.8vw; }
	.product-info-column .last-updated { font-size: 1.2vw; }
	.product-info-column .product-info-item { font-size: 1.5vw; }
	.product-info-column .quantity-input { width: 5vw; font-size: 1.4vw; }
	.product-info-column .quantity .qty { width: 7vw; font-size: 1.5vw; }
	.product-info-column .single_add_to_cart_button { font-size: 1.6vw; }
	.product-chart-column .product-chart-title { font-size: 2vw; }
    .price-diff { font-size: 1.3vw; padding: 0.4vw 0.8vw; }
}

@media (max-width: 768px) {
	.product-header-block { padding: 4vw; border-radius: 2.5vw; }
	.product-layout-grid { gap: 6vw; }
	.product-info-column .product-header { flex-direction: column; align-items: center; gap: 3vw; text-align: center; }
	.product-info-column .product_title { font-size: 5.5vw; }
	.product-info-column .price-box { border-right: none; border-bottom: 0.4vw solid #6a5acd; padding-bottom: 2.5vw; padding-right: 0; align-items: center; width: 100%; gap: 0.5rem; }
	.product-info-column .main-price { font-size: 5vw; }
	.product-info-column .last-updated { font-size: 2.8vw; }
	.product-info-column .product-info-item { font-size: 3.5vw; flex-direction: column; align-items: center; gap: 2vw; padding: 2.5vw; border-radius: 2vw; }
	.product-info-column .product-info-item span { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1.5vw; }
	.product-info-column .price-value { font-size: 3.8vw; }
	.product-info-column .quantity-input { width: 15vw; font-size: 3.5vw; padding: 1vw; border-radius: 1vw; }
	.product-info-column .cart { flex-wrap: wrap; justify-content: center; gap: 2.5vw; }
	.product-info-column .quantity { flex-basis: 100%; justify-content: center; display: flex; align-items: center; gap: 1.5vw; }
	.product-info-column .quantity .qty { width: 18vw; font-size: 4vw; padding: 1.5vw; border-radius: 1.5vw; }
	.product-info-column .quantity-label { font-size: 3.8vw; }
	.product-info-column .single_add_to_cart_button { font-size: 4.2vw; padding: 2.5vw; border-radius: 2vw; flex-basis: 100%; text-align: center; }
	.product-chart-column .product-chart-title { font-size: 4.5vw; text-align: center; }
	.product-chart-column .chart-placeholder { min-height: 35vh; padding: 3vw; border-radius: 2vw; }
    .price-diff { font-size: 2.8vw; padding: 0.8vw 1.5vw; border-radius: 1vw; margin-right: 0; margin-left: 0; }
}

/* ==========================================================================
   2.0 - Product Specifications Block
   ========================================================================== */

.technical-specs-section { margin: 2.5vw 0; }
.ahanit-section-box { direction: rtl; background: #fff; border-radius: 1.2rem; border: 1px solid #e9ecef; padding: 1.5rem 2rem; box-shadow: 0 8px 32px rgba(0,0,0,.07); }
.section-title-inside-box { position: relative; font-size: clamp(1.2rem, 1.8vw, 1.5rem); font-weight: 700; color: #1a1a2e; margin: 0 0 2rem 0; padding-bottom: 0.75rem; text-align: center; }
.section-title-inside-box::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 60px; height: 4px; background: linear-gradient(90deg, #6a5acd, #8a4af3); border-radius: 2px; }
.specs-grid-layout { display: grid; grid-template-columns: 1fr 1.5fr 1fr; gap: 1rem; }
.spec-item { background-color: #fdfdff; border: 1px solid #f0f0f0; border-radius: 16px; padding: 1.1rem; display: flex; flex-direction: column; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.spec-item:hover { transform: translateY(-5px); box-shadow: 0 8px 30px rgba(106, 90, 205, 0.12); }
.spec-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.8rem; }
.spec-header i { font-size: 1.1rem; color: #7b2cbf; }
.spec-title { font-size: 0.9rem; font-weight: 500; color: #4a4a4a; }
.spec-content { flex-grow: 1; display: flex; flex-direction: column; justify-content: center; }
.spec-value { font-size: 1.1rem; font-weight: 600; color: #1a1a2e; }
.spec-column-center { display: flex; flex-direction: column; gap: 1rem; }
.spec-column-center .spec-item { padding: 1rem; }
.manufacturer-content { flex-direction: row; align-items: center; justify-content: space-between; }
.manufacturer-name-link { text-decoration: none; color: #1a1a2e; transition: color 0.2s ease; }
.manufacturer-name-link:hover, .manufacturer-name-link:focus { color: #7b2cbf; }
.manufacturer-content .brand-logo { max-height: 32px; width: auto; object-fit: contain; border-radius: 6px; }
.spec-item-shape .spec-content { align-items: center; }
.spec-item-shape .shape-image { max-width: 100%; height: auto; object-fit: contain; }
.spec-item-standards { background: linear-gradient(135deg, #8e44ad 0%, #7b2cbf 100%); color: #fff; justify-content: flex-start; position: relative; overflow: hidden; }
.standards-column-title { color: #fff; font-size: 1rem; font-weight: 600; margin: 0 0 1rem 0; z-index: 2; }
.standards-list-wrapper { display: flex; flex-direction: column; gap: 0.5rem; flex-grow: 1; z-index: 2; }
.standard-list-item { display: flex; align-items: center; background-color: transparent; border-radius: 8px; padding: 0.5rem; border: 1px solid transparent; transition: background-color 0.2s ease-in-out; }
.standard-list-item:hover { background-color: rgba(255, 255, 255, 0.1); }
.standard-list-item .standard-icon { color: #fff; opacity: 0.8; font-size: 1.1rem; margin-left: 0.7rem; flex-shrink: 0; }
.standard-list-item .standard-name { font-size: 0.875rem; font-weight: 500; color: #fff; }
.standards-bg-stamp { position: absolute; bottom: 5px; left: 5px; width: clamp(80px, 15vw, 100px); height: auto; opacity: 0.3; z-index: 1; pointer-events: none; }

@media (max-width: 980px) { .specs-grid-layout { grid-template-columns: 1fr; } }
@media (max-width: 768px) { .specs-grid-layout { grid-template-columns: 1fr 1fr; } .spec-item-shape, .spec-item-standards { grid-column: span 2; } }
@media (max-width: 576px) { .ahanit-section-box { padding: 1rem 1.2rem; } .specs-grid-layout { grid-template-columns: 1fr; } .spec-item-shape, .spec-item-standards { grid-column: auto; } }

/* ==========================================================================
   3.0 - Product Testimonial Slider & CTA Section
   ========================================================================== */

.product-social-proof-container { margin-top: 2.5vw; }
.product-widgets-grid-three-col { display: grid; grid-template-columns: 0.8fr 1.8fr 0.8fr; gap: 2.5vw; align-items: center; }
.minimal-image-column { position: sticky; top: 120px; align-self: start; }
.minimal-image-wrapper { background: #fff; border-radius: 1.2vw; padding: 1vw; box-shadow: 0 0.5vw 2vw rgba(0,0,0,.05); }
.product-main-img-minimal { width: 100%; height: auto; border-radius: 0.8vw; max-width: 100%; object-fit: contain; }
.section-title-centered { font-size: 1.6vw; font-weight: 700; color: #1a1a2e; text-align: center; margin-bottom: 1.5vw; }
.testimonial-slider-wrapper { position: relative; padding: 0 2.5vw; }
.testimonial-swiper-polished { padding: 0.6vw 0; }
.swiper-wrapper { display: flex; align-items: stretch; }
.swiper-slide { width: 85%; transition: transform 0.4s ease, opacity 0.4s ease; opacity: 0.4; transform: scale(0.9); height: auto; }
.swiper-slide-active { opacity: 1; transform: scale(1); }
.testimonial-card-glass { background: rgba(255, 255, 255, 0.6); backdrop-filter: blur(0.6vw); -webkit-backdrop-filter: blur(0.6vw); border-radius: 1vw; border: 1px solid rgba(255, 255, 255, 0.3); box-shadow: 0 0.3vw 1.2vw rgba(106, 90, 205, 0.1); padding: 1.5vw; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; height: 100%; transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease; }
.testimonial-card-glass:hover { transform: translateY(-5px); box-shadow: 0 8px 30px rgba(106, 90, 205, 0.15); border-color: rgba(106, 90, 205, 0.4); }
.testimonial-quote { margin: 0 0 1.5rem 0; flex-grow: 1; }
.testimonial-quote p { font-size: 1rem; line-height: 1.8; color: #343a40; }
.testimonial-author-info { display: flex; justify-content: space-between; align-items: flex-end; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, 0.4); }
.author-details { display: flex; align-items: center; gap: 0.8rem; }
.author-avatar { flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(45deg, #6a5acd, #8a4af3); color: #fff; font-size: 1rem; font-weight: 600; display: flex; align-items: center; justify-content: center; text-transform: uppercase; border: 2px solid #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.author-meta { display: flex; flex-direction: column; align-items: flex-start; }
.author-name { font-size: 1rem; font-weight: 700; color: #1a1a2e; }
.author-company { font-size: 0.85rem; color: #495057; }
.testimonial-star-rating { direction: ltr; display: inline-flex; gap: 0.2vw; }
.testimonial-star-rating i { font-size: 0.9vw; color: #ffc107; }
.swiper-button-next, .swiper-button-prev { color: #6a5acd; background-color: rgba(255, 255, 255, 0.7); border-radius: 50%; width: 2.5vw; height: 2.5vw; box-shadow: 0 0.2vw 0.6vw rgba(0,0,0,0.1); }
.swiper-button-next:after, .swiper-button-prev:after { font-size: 0.8vw; font-weight: 800; }
.swiper-pagination .swiper-pagination-bullet { background: #6a5acd; }
.swiper-pagination .swiper-pagination-bullet-active { background: #8a4af3; }
.product-cta-column { position: sticky; top: 120px; align-self: start; }
.cta-box { background: linear-gradient(145deg, #6a5acd, #8a4af3); color: #fff; border-radius: 1.2vw; padding: 2vw; text-align: center; box-shadow: 0 10px 30px rgba(106, 90, 205, 0.3); display: flex; flex-direction: column; align-items: center; height: 100%; }
.cta-icon-wrapper { width: 60px; height: 60px; background-color: rgba(255,255,255,0.2); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; animation: pulse-animation 2s infinite; }
.cta-icon-wrapper i { font-size: 28px; color: #fff; }
@keyframes pulse-animation { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.4); } 70% { box-shadow: 0 0 0 15px rgba(255, 255, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); } }
.cta-title { font-size: 1.2vw; font-weight: 700; margin: 0 0 0.5rem 0; }
.cta-description { font-size: 0.85vw; opacity: 0.9; line-height: 1.7; margin-bottom: 1.5rem; flex-grow: 1; }
.cta-phone-number { display: inline-block; background-color: #fff; color: #6a5acd; padding: 0.8vw 2vw; border-radius: 50px; font-size: 1.2vw; font-weight: 700; text-decoration: none; transition: transform 0.3s ease, background-color 0.3s ease; }
.cta-phone-number:hover { transform: scale(1.05); background-color: #f0f0ff; }

/* Responsive adjustments for Three-Column Layout */
@media (max-width: 1200px) {
    .product-widgets-grid-three-col { grid-template-columns: 1fr 1.5fr; }
    .product-cta-column { grid-column: 1 / -1; position: static; margin-top: 2rem; }
}
@media (max-width: 768px) {
    .product-widgets-grid-three-col { grid-template-columns: 1fr; }
    .minimal-image-column, .product-cta-column { position: static; }
    .cta-title { font-size: 4vw; }
    .cta-description { font-size: 2.8vw; }
    .cta-phone-number { font-size: 4.5vw; }
    .testimonial-star-rating i { font-size: 2.5vw; }
    .author-details { flex-direction: column; text-align: center; }
    .author-meta { align-items: center; }
    .testimonial-author-info { flex-direction: column; align-items: center; gap: 1rem; }
    .testimonial-quote p { font-size: 1.1rem; }
}

/* ==========================================================================
   4.0 - Article Content & Sidebars
   ========================================================================== */

.article-layout-grid {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr) 280px;
    gap: 2.5rem;
    align-items: flex-start;
    margin-top: 2rem;
}

.article-body-content {
    grid-column: 2 / 3;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: .8rem;
    padding: 2rem 2.5rem 3rem;
}

aside.sticky-from-top {
    grid-column: 3 / 4;
    grid-row: 1;
    position: -webkit-sticky;
    position: sticky;
    top: 120px; /* Fallback, JS will adjust */
    align-self: start;
}
aside.sticky-from-bottom {
    grid-column: 1 / 2;
    grid-row: 1;
    position: -webkit-sticky;
    position: sticky;
    bottom: 40px;
    align-self: end;
}

/* General Sidebar Widget Styling */
.sidebar-widget { background: #fff; border: 1px solid #e9ecef; border-radius: .8rem; padding: 1.5rem; }
.sidebar-widget:not(:last-child) { margin-bottom: 1.5rem; }
.widget-title { font-size: 1rem; font-weight: 700; color: #212529; margin: 0 0 1rem; padding-bottom: .5rem; border-bottom: 1px solid #e9ecef; }

/* Meta Sidebar (Share & Top) */
.share-buttons-vertical { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.share-buttons-vertical a { color: #6c757d; font-size: 1.2rem; transition: all .2s; }
.share-buttons-vertical a:hover { color: #6a5acd; transform: scale(1.2); }
.back-to-top-widget { background: none; border: none; padding: 0 !important; text-align: center; margin-top: 1.5rem; }
.back-to-top-button { display: inline-flex; align-items: center; justify-content: center; width: 50px; height: 50px; background-color: #6a5acd; color: #fff; border-radius: 50%; font-size: 1.2rem; text-decoration: none; transition: transform 0.2s ease-in-out; }
.back-to-top-button:hover { transform: scale(1.1); color: #fff; }

/* TOC Sidebar (TOC & CTA) */
.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-list a { display: block; padding: .6rem 0; font-size: .9rem; color: #6c757d; text-decoration: none; transition: all .2s; border-right: 2px solid transparent; padding-right: 1rem; }
.toc-list a.is-active { color: #6a5acd; font-weight: 700; border-right-color: #6a5acd; }
.cta-widget { background: linear-gradient(45deg, #6a5acd, #8a4af3); }
.cta-widget .widget-title, .cta-widget p { color: #fff; border-bottom: none; }
.cta-widget p { font-size: 0.9rem; line-height: 1.7; opacity: 0.9; }
.cta-widget .cta-btn { display: block; width: 100%; text-align: center; margin-top: 1rem; padding: 0.7rem; background-color: #fff; color: #6a5acd; border-radius: 0.7rem; text-decoration: none; font-weight: 700; transition: all 0.2s ease; }
.cta-widget .cta-btn:hover { background-color: #e0e0ff; transform: translateY(-2px); }

/* Rich Content Styles (inside .article-body-content) */
.article-body-content { color: #343a40; font-size: 1.05rem; }
.article-body-content p { line-height: 1.8; margin-bottom: 1.5em; }
.article-body-content a { color: #6a5acd; text-decoration: none; border-bottom: 2px solid rgba(106, 90, 205, 0.2); transition: all 0.2s ease; }
.article-body-content a:hover { background-color: rgba(106, 90, 205, 0.1); border-bottom-color: #6a5acd; }
.article-body-content h2, .article-body-content h3, .article-body-content h4 { color: #212529; font-weight: 700; line-height: 1.4; }
.article-body-content h2 { font-size: 1.8rem; margin: 2.5rem 0 1rem 0; padding-bottom: 0.5rem; border-bottom: 3px solid #6a5acd; display: inline-block; }
.article-body-content h3 { font-size: 1.4rem; margin: 2rem 0 1rem 0; padding-right: 1rem; border-right: 3px solid #ced4da; }
.article-body-content h4 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem 0; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; color: #495057; }
.article-body-content ul, .article-body-content ol { padding-right: 2rem; margin-bottom: 1.5rem; }
.article-body-content ul li, .article-body-content ol li { padding-right: 1.5rem; position: relative; margin-bottom: 0.8rem; line-height: 1.7; }
.article-body-content ul li::before { font-family: "Font Awesome 5 Free"; content: "\f00c"; font-weight: 900; position: absolute; right: 0; top: 5px; color: #6a5acd; font-size: 0.9em; }
.article-body-content ol { counter-reset: custom-counter; }
.article-body-content ol li { counter-increment: custom-counter; }
.article-body-content ol li::before { content: counter(custom-counter); position: absolute; right: -5px; top: 2px; background-color: #6a5acd; color: white; font-size: 0.8em; font-weight: bold; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.article-body-content table { width: 100%; border-collapse: collapse; margin: 2rem 0; font-size: 0.95rem; box-shadow: 0 2px 15px rgba(0,0,0,0.05); border-radius: 8px; overflow: hidden; }
.article-body-content th, .article-body-content td { padding: 12px 15px; text-align: right; border-bottom: 1px solid #dee2e6; }
.article-body-content thead th { background-color: #6a5acd; color: #fff; font-weight: 600; border-bottom: 1px solid #4a3f92; }
.article-body-content tbody tr:nth-of-type(even) { background-color: #f8f9fa; }
.article-body-content tbody tr:hover { background-color: #e9ecef; }
.article-body-content tbody tr:last-of-type { border-bottom: 2px solid #6a5acd; }

/* Responsive Adjustments */
@media(max-width: 1200px) {
    .article-layout-grid { grid-template-columns: 1fr; }
    .meta-sidebar-right, .toc-sidebar { display: none; }
    .article-body-content { grid-column: 1 / -1; }
}