/* ==========================================================================
   SINGLE PRODUCT STYLES
   ========================================================================== */

/* --- LAYOUT GRID --- */
.single-product-container {
    max-width: 2000px;
    margin: 0 auto;
    padding: var(--space-m);
}

.single-product-container .specs-section .specs-header{
    font-size: var(--step-0);
}

.product-top-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 80px;
    position: relative;
}

/* --- MAIN GALLERY (1:1 Ratio) --- */
.product-gallery-wrapper {
    display: grid;
    grid-template-columns: 80px 1fr; /* Thumbs | Main */
    gap: 20px;
    /* Height auto to respect aspect ratio */
    align-items: start;
    position: relative;
}

.gallery-thumbs {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 5px;
}

.gallery-thumbs::-webkit-scrollbar {
    width: 0;
}

.thumb-img {
    width: 100%;
    aspect-ratio: 1/1; /* FORCE SQUARE */
    object-fit: cover;
    border: 1px solid #eee;
    border-radius: 0 0 1em 0;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    box-shadow: 2px 2px 7px 0px rgba(0, 0, 0, 0.1);
    -webkit-box-shadow: 2px 2px 7px 0px rgba(0, 0, 0, 0.1);
    -moz-box-shadow: 2px 2px 7px 0px rgba(0, 0, 0, 0.1);
}

.thumb-img:hover, .thumb-img.active {
    border-color: #ed1d23;
}

.gallery-main {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    border-radius: 0 0 1em 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: pointer;
    background: #fff;
    z-index: 10;
    box-shadow: 2px 2px 7px 0px rgba(0, 0, 0, 0.1);
    -webkit-box-shadow: 2px 2px 7px 0px rgba(0, 0, 0, 0.1);
    -moz-box-shadow: 2px 2px 7px 0px rgba(0, 0, 0, 0.1);
}

.gallery-main img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    width: auto;
    height: auto;
}

/* --- ZOOM PANE (Large Overlay) --- */
#zoom-pane {
    display: none;
    position: absolute;
    top: 0;
    width: calc(50% - 30px); /* Fill the right column width */
    aspect-ratio: 1/1; /* Keep it square like main image if possible, or fill */
    background-color: #fff;
    border-radius: 0 0 1em 0;
    z-index: 900; /* Above everything */
    background-repeat: no-repeat;
    background-size: 250%; /* Deep Zoom */
    box-shadow: 2px 2px 15px 0px rgba(0, 0, 0, 0.1);
    -webkit-box-shadow: 2px 2px 15px 0px rgba(0, 0, 0, 0.1);
    -moz-box-shadow: 2px 2px 15px 0px rgba(0, 0, 0, 0.1);
    max-height: 700px;
}

/* --- LIGHTBOX (AMAZON IMMERSIVE STYLE) --- */
.product-lightbox {
    display: none; /* Hidden */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6); /* Grey Overlay */
    z-index: 99999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.lightbox-modal {
    position: relative;
    width: calc(100vw - 80px);
    height: calc(100vh - 80px);
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    display: grid;
    grid-template-columns: 1fr 350px; /* Main Stage | Sidebar */
    overflow: hidden;
}

/* Header/Close Button Area */
.lightbox-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 100;
    width: 40px;
    height: 40px;
    background: #f0f0f0;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    font-size: 24px;
    line-height: 1;
    color: #333;
}

.lightbox-close-btn:hover {
    background: #e0e0e0;
    color: #ed1d23;
}

/* Left: Main Stage */
.lightbox-stage {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
    height: 100%;
    overflow: hidden;
}

.lightbox-stage img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Right: Sidebar */
.lightbox-sidebar {
    border-left: 1px solid #eee;
    background: #fcfcfc;
    padding: 60px 20px 20px 20px; /* Top padding clears close btn */
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.lightbox-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #313231;
    line-height: 1.3;
}

/* Tabs (Visual only for now) */
.lightbox-tabs {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
    padding-bottom: 10px;
}

.lb-tab {
    font-weight: 700;
    font-size: 0.85rem;
    color: #666;
    cursor: pointer;
    padding-bottom: 10px;
    margin-bottom: -11px;
    border-bottom: 3px solid transparent;
}

.lb-tab.active {
    color: #313231;
    border-color: #ed1d23;
}

.lightbox-thumbs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.lb-thumb {
    aspect-ratio: 1/1;
    border-radius: 0 0 1em 0;
    padding: 2px;
    cursor: pointer;
    background: #fff;
    box-shadow: 2px 2px 7px 0px rgba(0, 0, 0, 0.1);
    -webkit-box-shadow: 2px 2px 7px 0px rgba(0, 0, 0, 0.1);
    -moz-box-shadow: 2px 2px 7px 0px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.lb-thumb:hover, .lb-thumb.active {
    border-color: #ed1d23;
}

.lb-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}


/* --- RIGHT COLUMN CONTENT --- */
.product-info-col {
    display: flex;
    flex-direction: column;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ed1d23;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.back-link svg {
    transform: rotate(90deg);
}

.product-title {
    font-size: 2.5rem;
    font-family: "finalsix", sans-serif;
    font-weight: 800;
    margin: 0 0 20px 0;
    color: #313231;
    line-height: 1.1;
}

.product-desc {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    padding-bottom: 20px;
}

/* CTA Row */
.cta-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 30px;
    align-items: center;
    padding-bottom: 20px;
}

.cta-row .cta-left{
    font-weight: 600;
}

.distributor-link {
    color: #ed1d23;
    text-decoration: none;
    display: inline-block;
}

.distributor-link:hover {
    text-decoration: underline;
}

/* Accordions */
.product-info-col .info-accordion {
    border-top: 1px solid #ed1d23;
    border-bottom: 1px solid #ed1d23;
}

.product-info-col .info-accordion:first-of-type{
    border-top: 2px solid #ed1d23;
    border-bottom: 1px solid #ed1d23;
}

.product-info-col .info-accordion:last-of-type{
    border-top: 1px solid #ed1d23;
    border-bottom: 2px solid #ed1d23;
}

.info-accordion summary {
    list-style: none;
    font-family: "finalsix", sans-serif;
    padding: 20px 0;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    justify-content: flex-start;
    text-transform: uppercase;
    align-items: center;
    color: #313231;
    gap: 10px;
    font-family: "finalsix", sans-serif;
}

.info-accordion summary svg #chev{
    fill: #333;
}

.info-accordion summary::-webkit-details-marker {
    display: none;
}

.info-accordion[open] summary {
    color: #ed1d23;
}

.info-accordion .content {
    padding-bottom: 20px;
    color: #555;
    line-height: 1.6;
}

.info-accordion summary svg {
    transition: transform 0.3s;
}

.info-accordion[open] summary svg {
    transform: rotate(90deg);
}

.info-accordion[open] summary svg #chev{
    fill: #ed1d23;
}

.section-title {
    font-size: var(--step-0);
    font-weight: 800;
    margin-bottom: 20px;
    color: #313231;
}

.section-title svg{
    width: 13px;
    height: 13px;
    transform: rotate(90deg);
}

.section-title svg #chev{
    fill: #333;
}

.scroll-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 10px 0;
    scrollbar-width: thin;
    scrollbar-color: #ed1d23 #ffffff;
}

.scroll-container::-webkit-scrollbar {
    height: 8px;
}

.scroll-container::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

.scroll-container::-webkit-scrollbar-thumb {
    background-color: #ed1d23;
    border-radius: 4px;
}

.scroll-card {
    min-width: 220px;
    width: 220px;
    border: 1px solid #fff;
    border-radius: 0 0 1rem 0;
    padding: 15px;
    text-align: left;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s;
    background: #fff;
}

.scroll-card:hover {
    border-color: #ed1d23;
    transform: translateY(-3px);
}

.scroll-card img {
    height: 120px;
    width: 100%;
    object-fit: contain;
    margin-bottom: 10px;
}

.scroll-card h4 {
    font-size: 0.8rem;
    margin: 0;
    line-height: 1.3;
    text-transform: uppercase;
}

.scroll-card small{
    font-size: 0.7rem;
    color: #ed1d23;
}

/* --- RELATED SLIDER --- */
.slider-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.slider-controls {
    display: flex;
    gap: 10px;
}

.slider-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

.slider-btn:hover {
    background: #ed1d23;
    color: #fff;
    border-color: #ed1d23;
}

.product-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.product-slider::-webkit-scrollbar {
    display: none;
}

/* back btn */
.back-row {
    position: relative;
    display: flex;
    flex-direction: row;
    margin-bottom: 15px;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.back-row .back-btn {
    display: flex;
    flex-direction: row;
    text-decoration: none;
    justify-content: center;
    align-items: center;
    color: #ED1D23FF;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.8rem;
    line-height: 1;
    gap: 5px;
}

.trel-chev {
    width: 15px;
    height: 15px;
    fill: #ED1D23FF;
}

.trel-chev #chev {
    fill: #ED1D23FF;
}

.back-row .back-btn .trel-chev {
    transform: rotate(180deg);
    width: 10px;
    height: 10px;
    fill: #ED1D23FF;
}

.back-row .back-btn .trel-chev #chev {
    fill: #ED1D23FF;
}

.back-row .red-line-spacer {
    width: auto;
    height: 2px;
    background: #ED1D23FF;
    flex-grow: 1;
}

/* Enquire */

.enquire-btn {
    position: relative;
    color: #ffffff;
    background-color: #ED1D23FF;
    display: inline-block;
    padding: 0.6em 0.8em;
    padding-right: var(--space-l);
    margin-left: var(--space-xs);
    border-radius: 0 0 1em 0 !important;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 800;
    font-family: "roboto", sans-serif !important;
    text-wrap-mode: nowrap;
}

.enquire-btn .divide_marker {
    top: 1em;
    transform: rotate(90deg);
    display: flex;
    position: absolute;
    right: -2px;
}

.enquire-btn .divide_marker div {
    background-color: #FFFFFF;
}

/* Responsive */
@media (max-width: 900px) {
    .product-top-section {
        grid-template-columns: 1fr;
    }

    .product-gallery-wrapper {
        grid-template-columns: 1fr;
        height: auto;
    }

    .gallery-thumbs {
        flex-direction: row;
        order: 2;
        height: auto;
        overflow-x: auto;
    }

    .thumb-img {
        width: 60px;
        height: 60px;
    }

    .gallery-main {
        order: 1;
        aspect-ratio: 1/1;
    }

    #zoom-pane {
        display: none !important;
    }

    .lightbox-modal {
        width: 100%;
        height: 100%;
        grid-template-columns: 1fr;
    }

    .lightbox-sidebar {
        display: none;
    }
}

/* ==========================================================================
   RELATED PRODUCT SLIDER STYLES
   ========================================================================== */

/* Slider Container */
.product-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    padding-bottom: 30px; /* Space for hover shadow */
    scroll-snap-type: x mandatory; /* Snap into place */
}

.product-slider::-webkit-scrollbar {
    display: none;
}

/* --- PRODUCT CARD (Copied & Adapted for Slider) --- */
.prod-card {
    background: #fff;
    border: 1px solid #fff;
    border-radius: 0 0 1rem 0;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: border 0.3s, box-shadow 0.3s;
    scroll-snap-align: start;

    /* MOBILE DEFAULT: 2 Cards Visible (approx 45% width each) */
    min-width: 45%;
    flex: 0 0 45%;
}

/* DESKTOP: 3.5 Cards Visible (approx 20% width each) */
@media (min-width: 1000px) {
    .prod-card {
        min-width: 20%;
        flex: 0 0 20%;
    }
}
@media (max-width: 1000px) {
    .prod-card {
        min-width: 65%;
    }
}

.prod-card:hover {
    border-color: #ed1d23;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.prod-card figure {
    margin: 0;
    padding: 20px;
    background: #fff;
    text-align: center;
    height: 180px; /* Slightly smaller for slider */
    display: flex;
    align-items: center;
    justify-content: center;
}

.prod-card figure img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
}

.prod-card .details {
    padding: 0 20px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.prod-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #313231;
    line-height: 1.2;
}

.prod-card .models {
    font-size: 0.65rem;
    color: #ed1d23;
    font-weight: 600;
}

.prod-card .divider {
    height: 2px;
    background: #ed1d23;
    margin: 15px 0;
    width: 100%;
    opacity: 1;
}

.prod-card .bottom-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    margin-top: auto;
}

.prod-card .short-desc {
    font-size: 0.65rem;
    color: #333;
    line-height: 1.3;
}

/* Arrow Button Styles */
.prod-card .arrow-btn {
    background: #ed1d23;
    color: #fff;
    border-radius: 0 0 0.7rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 13px 10px 10px;
    position: relative;
    width: 38px;
    height: 35px;
}

.prod-card .arrow-btn .trel-chev,
.prod-card .arrow-btn .trel-chev #chev {
    fill: #ffffff;
    width: 12px;
    height: 12px;
}

.prod-card .arrow-btn .divide_marker {
    display: flex;
    position: absolute;
    top: 50%;
    right: -4px;
    height: 10px;
    transform: translateY(-50%) rotate(90deg);
    overflow: hidden;
}

.prod-card .arrow-btn .divide_marker div {
    background-color: #fff;
    border-radius: 2px 0 0 2px;
    width: 2px;
    height: 1em;
    margin-bottom: 2px;
}


/* ==========================================================================
   MAIN BODY ACCORDIONS (Specs, Accessories, etc.)
   ========================================================================== */

.main-accordion summary {
    list-style: none;
    padding: 20px 0;
    cursor: pointer;
    font-weight: 800;
    font-size: var(--step-0);
    display: flex;
    justify-content: flex-start;
    align-items: center;
    color: #313231;
    gap: 10px;
    text-transform: uppercase;
    font-family: "finalsix", sans-serif;
    margin: 10px 0;
}

/* Hide default marker */
.main-accordion summary::-webkit-details-marker {
    display: none;
}

.main-accordion summary svg {
    transition: transform 0.3s;
    transform: rotate(0deg);
}

.main-accordion[open] summary svg {
    transform: rotate(90deg);
}

.main-accordion[open] summary svg #chev{
    fill: #ed1d23;
}

.main-accordion[open] .table-wrapper {
    margin-bottom: 20px;
}

.main-accordion .slider-header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
    margin-bottom: 0;
}

/* Ensure controls don't trigger the accordion close */
.slider-controls {
    z-index: 10;
}

.datasheet-row-list li{
    margin: 0 !important;
}

.datasheet-row-list li a{
    text-decoration: underline !important;
}

.datasheet-row-list li::marker{
    content: '';
}