/* Product Detail Page Styles (Refined for SeckinBuro Style) */

/* Minimalist Breadcrumb Bar */
.product-detail-breadcrumb {
    background-color: #f9f9f9;
    /* Light gray background */
    padding: 20px 0;
    width: 100%;
    margin-bottom: 40px;
    /* Spacing from header */
    border-bottom: 1px solid #eee;
}

.product-detail-breadcrumb .container {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
    color: #666;
}

.product-detail-breadcrumb a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.product-detail-breadcrumb a:hover {
    color: #000;
}

.product-detail-breadcrumb .sep {
    margin: 0 10px;
    color: #ccc;
    font-size: 0.8rem;
}

.product-detail {
    margin-top: 0;
    /* Remove top margin since breadcrumb handles spacing */
    margin-bottom: 100px;
}

.product-detail__grid {
    display: grid;
    grid-template-columns: 86px 1fr 482px;
    gap: 60px;
    /* Increased gap for cleaner look */
    align-items: flex-start;
}

/* Left Thumbnails */
.product-detail__thumbnails {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 520px;
    /* Fits roughly 5 thumbnails + gaps */
    overflow-y: auto;
    scrollbar-width: none;
    padding-right: 5px;
    /* Tiny space for scroll */
}

.product-detail__thumbnails::-webkit-scrollbar {
    display: none;
}

.product-detail__thumbnail {
    width: 86px;
    height: 86px;
    border: 1px solid transparent;
    cursor: pointer;
    overflow: hidden;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    flex-shrink: 0;
    /* Important: prevent squashing */
}

.product-detail__thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Changed to contain */
    opacity: 0.6;
    transition: opacity 0.2s;
}

.product-detail__thumbnail:hover img,
.product-detail__thumbnail.is-active img {
    opacity: 1;
}

/* Center: Main Image */
.product-detail__main-image {
    position: relative;
    width: 100%;
    height: 600px;
    /* Fixed height for consistency */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-detail__image-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.product-detail__image-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-detail__image-item.is-active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.product-detail__image-item img {
    max-width: 85%;
    max-height: 100%;
    object-fit: contain;
}

/* Right Info Area */
.product-detail__info {
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: sticky;
    top: 120px;
}

.product-detail__header {
    border-bottom: none;
    /* Removed border */
    padding-bottom: 0;
}

.product-detail__title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.25rem;
    /* Larger font */
    font-weight: 400;
    line-height: 1.2;
    color: #333;
    text-transform: lowercase;
    margin: 0 0 25px 0;
}

/* New Quote Button */
.product-detail__quote-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #17a2b8;
    /* Teal color */
    color: #fff;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 12px 28px;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
    width: fit-content;
}

.product-detail__quote-btn:hover {
    background-color: #138496;
    color: #fff;
}

.product-detail__description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #666;
    margin-top: 10px;
}

/* SKU and Categories Meta */
.product-detail__meta-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 20px;
}

.product-detail__meta-item {
    font-size: 0.85rem;
    color: #333;
}

.product-detail__meta-label {
    font-weight: 700;
    color: #333;
    margin-right: 5px;
    text-transform: uppercase;
}

.product-detail__meta-value {
    color: #666;
}

.product-detail__meta-value a {
    color: #666;
    text-decoration: none;
    transition: color 0.2s;
}

.product-detail__meta-value a:hover {
    color: #17a2b8;
}

/* Social Share */
.product-detail__share {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.product-detail__share-link {
    width: 36px;
    height: 36px;
    border: 1px solid #e0e0e0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    transition: all 0.2s;
    text-decoration: none;
}

.product-detail__share-link:hover {
    border-color: #17a2b8;
    color: #17a2b8;
}

.product-detail__share-link svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

/* Variations Config */
.product-detail__variations {
    border-top: 1px solid #e0e0e0;
    padding-top: 25px;
    margin-top: 25px;
    max-width: 500px;
    /* Limit width to keep cards reasonable */
}

.product-detail__variations-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    text-transform: uppercase;
}

/* Common Card Style */
.product-detail__variation-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 10px;
    transition: all 0.2s ease;
    background: #fff;
    height: 100%;
}

.product-detail__variation-card:hover {
    border-color: #ddd;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.product-detail__variation-card.is-selected {
    border-color: #17a2b8;
    background-color: #f0fbff;
}

.product-detail__variation-img {
    width: 100%;
    aspect-ratio: 1;
    /* Square image container */
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-detail__variation-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-detail__variation-name {
    font-size: 0.85rem;
    color: #555;
    text-align: center;
    line-height: 1.3;
}

.product-detail__variation-card.is-selected .product-detail__variation-name {
    color: #17a2b8;
    font-weight: 500;
}

/* Grid Layout (< 3 items) */
.product-detail__variation-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

/* Swiper overrides for this section */
.variation-swiper {
    padding: 5px;
    /* Space for shadow */
    margin: -5px;
}

.variation-swiper .swiper-button-next,
.variation-swiper .swiper-button-prev {
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.variation-swiper .swiper-button-next::after,
.variation-swiper .swiper-button-prev::after {
    font-size: 10px;
    color: #333;
    font-weight: bold;
}

/* Product Family (Bottom) */
.product-detail__family {
    margin-top: 18 px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.product-detail__family-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.product-detail__family-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: #333;
    margin: 0;
}

.product-detail__family-controls {
    display: flex;
    /* Hidden by default via inline style, toggled by JS */
    gap: 10px;
}

.product-detail__family-control {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: #333;
    font-size: 1.2rem;
    line-height: 1;
    padding-bottom: 3px;
    /* visual center fix */
}

.product-detail__family-control:hover:not(:disabled) {
    border-color: #17a2b8;
    color: #17a2b8;
}

.product-detail__family-control:disabled {
    cursor: not-allowed;
    color: #ccc;
    background: #f9f9f9;
}

.product-detail__family-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    /* Default grid */
    gap: 20px;
}

/* CAROUSEL MODE */
.product-detail__family-grid.has-carousel {
    display: flex;
    overflow-x: auto;
    /* Enable horizontal scrolling */
    scroll-behavior: smooth;
    /* Smooth by default, JS handles increments */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE */
    padding-bottom: 5px;
    /* Tiny safe space */
}

.product-detail__family-grid.has-carousel::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.product-detail__family-grid.has-carousel .product-detail__family-item {
    min-width: calc(20% - 16px);
    /* 100% / 5 minus gap approximation */
    flex-shrink: 0;
}


.product-detail__family-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    background: #f9f9f9;
    padding: 30px 20px;
    border-radius: 8px;
    transition: transform 0.2s;
}

.product-detail__family-item:hover {
    transform: translateY(-5px);
}

.product-detail__family-thumb {
    width: 100%;
    height: 214px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.product-detail__family-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.product-detail__family-item span {
    color: #666;
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 1200px) {
    .product-detail__grid {
        grid-template-columns: 80px 1fr 300px;
        gap: 40px;
    }
}

@media (max-width: 992px) {
    .product-detail__grid {
        display: flex;
        flex-direction: column;
    }

    .product-detail__thumbnails {
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
        max-height: none;
        order: 2;
        gap: 12px;
        padding: 10px 0;
        scrollbar-width: none;
    }

    .product-detail__thumbnails::-webkit-scrollbar {
        display: none;
    }

    .product-detail__thumbnail {
        width: 70px;
        height: 70px;
        flex-shrink: 0;
    }

    .product-detail__main-image {
        height: 400px;
        order: 1;
    }

    .product-detail__info {
        order: 3;
        position: static;
    }

    /* Responsive Family Grid/Carousel */
    .product-detail__family-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .product-detail__family-grid.has-carousel .product-detail__family-item {
        min-width: calc(50% - 10px);
        /* 2 items visible */
    }
}

/* Product Inquiry Modal Styles */
.inquiry-modal {
    width: 100%;
    max-width: 50%;
    /* Relative to fancybox content */
    padding: 30px;
    border-radius: 12px;
    background: #fff;
}

/* User requested specific width for the fancybox container of this modal */
[data-src="#product-inquiry-modal"].fancybox__content {
    max-width: 39% !important;
}

@media (max-width: 992px) {
    [data-src="#product-inquiry-modal"].fancybox__content {
        max-width: 50% !important;
    }
}

.inquiry-modal__header {
    margin-bottom: 25px;
    text-align: center;
}

.inquiry-modal__header h3 {
    font-size: 1.5rem;
    color: #333;
    margin: 0 0 5px 0;
    font-weight: 500;
}

.inquiry-modal__header p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

.inquiry-modal__form .form-group {
    margin-bottom: 20px;
}

.inquiry-modal__form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.inquiry-modal__form input,
.inquiry-modal__form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #333;
    background: #f8f9fa;
    transition: border-color 0.2s;
}

.inquiry-modal__form input:focus,
.inquiry-modal__form textarea:focus {
    border-color: #17a2b8;
    outline: none;
    background: #fff;
}

.inquiry-modal__footer {
    margin-top: 30px;
}

.inquiry-modal__footer .submit-btn {
    width: 100%;
    background-color: #17a2b8;
    color: #fff;
    padding: 14px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.inquiry-modal__footer .submit-btn:hover {
    background-color: #138496;
}

.inquiry-modal__success {
    text-align: center;
    padding: 40px 20px;
}

.inquiry-modal__success .success-icon {
    width: 60px;
    height: 60px;
    background: #28a745;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto 20px auto;
}

.inquiry-modal__success p {
    font-size: 1.1rem;
    color: #333;
    line-height: 1.5;
}