/* SE WooCommerce Extension - Product Template Styles */

:root {
    --se-green: #5ab230;
    --se-dark-gray: #565656;

}

.single-product main#tm-main > .uk-container {
    padding: 0;
    max-width: none !important;
}

.single-product main#main div.product > * {
    max-width: 1200px;
    padding-left: 40px;
    padding-right: 40px;
    margin: 2rem auto;
}

.single-product main#main div.product > .se-product-section.se-key-features-section {
    max-width: none;
}

.single-product summary {
    color: #fff;
}

.single-product main#tm-main {
    background-color: #fff;
    color: var(--se-dark-gray);
}

.single-product main .product_title {
    color: var(--se-green);
    margin: 0;
    font-size: 52px;
    line-height: 1;
}


/* Product Metadata Section */
.se-product-metadata {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 20px;
    margin: 20px 0;
}

.se-product-metadata h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2em;
    font-weight: 600;
}

.se-meta-item {
    margin-bottom: 8px;
    font-size: 0.95em;
}

.se-meta-item strong {
    color: #555;
    margin-right: 5px;
}

/* Teaser Text */
.se-teaser-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    margin: 15px 0;
    font-size: 1.1em;
    line-height: 1.6;
}

/* Product Section Wrappers */
.se-product-section {
    margin: 2rem 0;
    padding: 4rem;
    background: #fff;
}

.se-product-section h2 {
    color: #333;
}

.se-section-content {
    line-height: 1.6;
}

/* Product Hero Section (Gallery + Summary) */
.se-product-hero {
    background: #ffffff;
    margin: 0 0 2rem 0; /* No top margin for first section */
}

.se-hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

/* Make sure gallery and summary fit nicely in the grid */
.se-hero-content .woocommerce-product-gallery {
    margin: 0;
}

.se-hero-content .summary {
    margin: 0;
}

/* USPs in Hero Section */
.se-usps-hero {
    margin: 1.5rem 0;
}

.woocommerce-product-details__short-description {
    margin: 2.5rem 0 1.5rem;
}

.se-usps-hero h3 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Key Features Grid */
.se-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.se-feature-item {
    text-align: center;
}

.se-feature-image {
    margin-bottom: 1rem;
}

.se-feature-image img {
    max-width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: contain;
    width: auto;
    min-height: 100px;
}

.se-feature-text {
    font-size: 1rem;
    /* line-height: 1.4; */
    padding: 0 2rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .se-inquiry-button {
        min-width: 180px;
        padding: 0.6rem 1.2rem;
    }
    
    .se-product-inquiry .se-inquiry-button {
        min-width: 200px;
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
}

/* Legacy styles for backward compatibility */
.se-usps, .se-key-features, .se-technical-data {
    margin: 1rem 0;
}

.se-usps ul, .se-key-features ul {
    padding-left: 1.5rem;
}

.se-usps li, .se-key-features li {
    margin-bottom: 0.5rem;
}

/* Product Line */
.se-product-line {
    font-size: 1rem;
    color: var(--se-green);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    font-weight: 500;
}


/* Long Description Section */
.se-long-description {
    background: #f8f9fa;
}

.se-long-description .se-section-content {
    font-size: 1.1rem;
}

/* USPs Section */
.se-usps-section {
    background: #fff8f0;
}

.se-usp-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.se-usp-list li {
    position: relative;
    padding: .75rem 0;
    border-bottom: 1px solid lightgray;
}

.se-usp-list li:last-child {
    border-bottom: none;
}

/* Key Features Section */
.se-key-features-section {
    color: #fff;
    background: #000;
}

.se-key-features-section .se-inquiry-button-wrapper {
    text-align: center;
}

.se-key-features-section .se-section-content {
    max-width: calc(1200px + 80px);
    margin: auto;
}

.se-feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.se-feature-list li {
    position: relative;
    padding: 1rem 0 1rem 2rem;
    margin-bottom: 0.75rem;
    border-left: 3px solid #2196f3;
    background: rgba(33, 150, 243, 0.05);
}

.se-feature-list li:before {
    content: "ÃƒÂ¢Ã‹Å“Ã¢â‚¬Â¦";
    position: absolute;
    left: 0.5rem;
    color: #2196f3;
    font-weight: bold;
    font-size: 1.2rem;
}

/* Technical Data Section */
.se-technical-data {
    background: #f5f5f5;
}

.se-diagrams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1rem;
}

.se-diagram-item {
    background: #fff;
    padding: 1.5rem;
    text-align: center;
}

.se-diagram-item h3 {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    color: #555;
}

.se-diagram-image {
    max-width: 100%;
    height: auto;
}

/* Downloads Section */
.se-downloads-section {
    background: #fff;
    padding: 20px;
}

.se-downloads-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2em;
    font-weight: 600;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

.se-download-section {
    margin-bottom: 25px;
}

.se-download-item {
    margin-bottom: 10px;
}

.se-download-link {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.se-download-link:hover {
    background: #e9ecef;
    border-color: #007cba;
    color: #007cba;
    text-decoration: none;
}

.se-download-icon {
    margin-right: 10px;
    font-size: 1.2em;
}

.se-download-label {
    flex: 1;
    font-weight: 500;
}

.se-download-filename {
    font-size: 0.9em;
    color: #666;
    margin-left: 10px;
}

/* Additional Details / Technical Specifications */
.se-additional-details {
    background: #fff;
    padding: 20px;
}

.se-specs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.se-specs-table tr {
    border-bottom: 1px solid #e9ecef;
}

.se-specs-table td {
    padding: 12px 15px;
    vertical-align: top;
}

.se-spec-parameter {
    font-weight: 500;
    color: #555;
    width: 40%;
}

.se-spec-value {
    color: #333;
}

.se-spec-heading td {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    border-top: 2px solid #007cba;
    border-bottom: 1px solid #ddd;
}

/* Debug Section */
.se-wc-debug-info {
    margin-top: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

.se-wc-debug-info details {
    margin: 0;
}

.se-wc-debug-info summary {
    cursor: pointer;
    font-weight: bold;
    padding: 0.5rem 0;
}

.se-wc-debug-info table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.se-wc-debug-info th,
.se-wc-debug-info td {
    padding: 0.5rem;
    border: 1px solid #dee2e6;
    text-align: left;
}

.se-wc-debug-info th {
    background-color: #f8f9fa;
    font-weight: bold;
}

/* Additional Details Table */


.se-additional-details-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: #fff;
}

.se-additional-details-table th,
.se-additional-details-table td {
    padding: 0.75rem 1rem;
    text-align: left;
}

.se-additional-details-table .table-heading {
    color: var(--se-green);
}

tr.table-heading-row {
    padding-top: 2rem;
    display: block;
}

.se-additional-details-table .table-reference-row .table-label,.se-additional-details-table .table-reference-row td {
    border: none;
    padding: 0;
}


.se-additional-details-table tr .table-label,
.se-additional-details-table tr td {
    border-bottom: 1px solid lightgray;
}


.se-additional-details-table .table-label {
    font-weight: 600;
    width: 40%;
    vertical-align: top;
}

.se-additional-details-table td {
    vertical-align: top;
    line-height: 1.5;
}

/* Product Downloads Section */

.se-product-section.se-product-downloads {
    border: 1px solid lightgray;
    border-radius: 2rem;
}

.se-product-downloads h5 {
    margin-bottom: 0;
}

.se-product-downloads h5 + p {
    margin: 0;
}

.se-product-downloads h5 + p + a {margin-top: 0;}

.uk-first-column, .uk-first-column + div {
    border-right: 1px solid lightgray;
}

.se-product-section.se-product-downloads > div > div {
    margin-bottom: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .se-product-section {
        margin: 1rem 0;
        padding: 1.5rem;
    }
    
    .se-product-section h2 {
        font-size: 1.3rem;
    }
    
    /* Stack hero content on mobile */
    .se-hero-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Stack features grid on mobile */
    .se-features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .se-diagrams-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .se-usp-list li,
    .se-feature-list li {
        padding: 0.5rem 0 0.5rem 1.5rem;
    }
    
    .se-download-link {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .se-download-filename {
        margin-left: 0;
        margin-top: 5px;
    }
    
    .se-specs-table {
        font-size: 0.9em;
    }
    
    .se-spec-parameter {
        width: 35%;
    }
    
    .se-additional-details-table {
        font-size: 0.9rem;
    }
    
    .se-additional-details-table th,
    .se-additional-details-table td {
        padding: 0.5rem;
    }
    
    .se-additional-details-table .table-label {
        width: 35%;
    }
} 

/* Gallery Video Styles */
.se-gallery-video-wrapper {
    position: relative;
    cursor: pointer;
}

.se-gallery-video-container {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
}

.se-gallery-video-poster-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    aspect-ratio: 16/9; /* Default video aspect ratio */
    background: #000;
    overflow: hidden;
}

.se-gallery-video-poster {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Fit poster inside video container */
    transition: opacity 0.3s ease;
}

.se-gallery-video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: transform 0.3s ease;
    z-index: 10;
}

.se-gallery-video-play-icon {
    width: 60px;
    height: 60px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.se-gallery-video-wrapper:hover .se-gallery-video-play-overlay {
    transform: translate(-50%, -50%) scale(1.1);
}

.se-gallery-video-wrapper:hover .se-gallery-video-poster {
    opacity: 0.9;
}

.se-gallery-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Content Video Styles */
.se-content-video-section {
    background: white;
    padding: 0 !important;
    max-width: none !important;
    margin: 0 !important;
}

.se-content-video-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50vh;
    padding: 2rem;
}

.se-content-video {
    max-width: calc(1200px + 80px);
    width: 50%;
    height: auto;
    border-radius: 8px;
    /* box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); */
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translateY(20px);
    aspect-ratio: 16/9;
}

.se-content-video.se-video-in-viewport {
    opacity: 1;
    transform: translateY(0);
    width: 100%;
}

.se-content-video:focus {
    outline: 2px solid var(--se-green);
    outline-offset: 4px;
}

@media (max-width: 768px) {
    .se-content-video-wrapper {
        padding: 1rem;
    }
    
    .se-content-video {
        width: 100%;
    }
    
    .se-gallery-video-play-icon {
        width: 40px;
        height: 40px;
    }
}

/* Square Main Gallery Images */
.woocommerce-product-gallery__image {
    aspect-ratio: 1/1 !important;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    /* background: #f8f8f8; */
}

.woocommerce-product-gallery__image img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
}

/* Video Gallery Exception - Natural Aspect Ratio */
.woocommerce-product-gallery__image.se-gallery-video-wrapper {
    aspect-ratio: unset !important; /* Allow natural aspect ratio for videos */
}

.se-gallery-video-poster-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    aspect-ratio: 16/9; /* Natural video aspect ratio */
    background: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.se-gallery-video-container {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 16/9; /* Natural video aspect ratio */
}

/* Thumbnail Navigation Styles */
.flex-control-nav.flex-control-thumbs {
    display: flex !important;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
    padding: 0;
}

.flex-control-nav.flex-control-thumbs li {
    width: calc(100% / 7 - 8px) !important;
    max-width: 80px;
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: 4px;
    /* background: #f8f8f8; */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 2px solid transparent;
    margin-top: 1rem !important;
    transition: border-color 0.2s ease;
}

.flex-control-nav.flex-control-thumbs li img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.flex-control-nav.flex-control-thumbs li:hover img {
    opacity: 0.8;
}

.flex-control-nav.flex-control-thumbs li.flex-active {
    border-color: #007cba !important;
}

.flex-control-nav.flex-control-thumbs li.flex-active img {
    opacity: 1;
}

/* Video Thumbnail Play Button Overlay */
.flex-control-nav.flex-control-thumbs li.se-video-thumbnail {
    position: relative;
}

.flex-control-nav.flex-control-thumbs li.se-video-thumbnail::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10;
}

.flex-control-nav.flex-control-thumbs li.se-video-thumbnail::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-45%, -50%);
    width: 0;
    height: 0;
    border-left: 6px solid white;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    pointer-events: none;
    z-index: 11;
}

.se-inquiry-button-container {
    margin-top: 1rem;
}

.se-inquiry-available {
    display: flex;
}

@media (max-width: 999px) {
    .se-product-section.se-product-downloads {
        border: none;
        border-radius: 0;
    }
}    

@media (max-width: 768px) {
    .flex-control-nav.flex-control-thumbs li {
        width: calc(100% / 5 - 8px) !important;
    }
}

@media (max-width: 480px) {
    .flex-control-nav.flex-control-thumbs li {
        width: calc(100% / 3 - 8px) !important;
    }
}