/* Product Detail Page Styles */

.product-detail-page {
    font-family: 'Poppins', sans-serif;
}

/* Breadcrumb Styles */
.breadcrumb-section {
    margin-top: 88px;
    /* Account for fixed header */
}

.breadcrumb {
    background-color: transparent;
    padding: 0;
}

.breadcrumb-item+.breadcrumb-item::before {
    content: "›";
    color: #938b81;
    font-size: 1.2rem;
}

.breadcrumb-item a {
    transition: color 0.3s;
}

.breadcrumb-item a:hover {
    color: #8B1515 !important;
}

/* Product Hero Section */
.product-hero {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* Product Gallery */
.product-gallery {
    position: sticky;
    top: 120px;
}

.main-product-image {
    position: relative;
    overflow: hidden;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 2;
}

.gallery-nav:hover {
    background: rgba(180, 25, 29, 0.9);
    transform: translateY(-50%) scale(1.05);
}

.gallery-nav.prev {
    left: 12px;
}

.gallery-nav.next {
    right: 12px;
}

.gallery-nav i {
    font-size: 1.2rem;
    line-height: 1;
}

.image-counter {
    position: absolute;
    right: 12px;
    bottom: 12px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    z-index: 2;
}

.main-image {
    transition: transform 0.3s ease;
}

.main-image:hover {
    transform: scale(1.02);
}

.product-thumbnails {
    margin-top: 15px;
}

.thumbnail-item {
    flex: 0 0 auto;
    position: relative;
    overflow: hidden;
}

.thumbnail-item.active {
    border-color: #B4191D !important;
}

.thumbnail-item:hover {
    border-color: #B4191D !important;
}

.thumbnail-item img {
    transition: transform 0.3s ease;
}

.thumbnail-item:hover img {
    transform: scale(1.1);
}

/* Product Info Section */
.product-info {
    padding: 0 15px;
}

.product-title {
    position: relative;
    padding-bottom: 15px;
}

.product-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 3px;
    background-color: #B4191D;
}

/* Available Colors */
.available-colors {
    padding: 20px 0;
}

.color-palette {
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    background-color: #fafafa;
    border-radius: 8px;
}

.color-palette::-webkit-scrollbar {
    width: 6px;
}

.color-palette::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.color-palette::-webkit-scrollbar-thumb {
    background: #B4191D;
    border-radius: 10px;
}

.color-circle {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.color-circle::after {
    content: '';
    position: absolute;
    inset: -3px;
    border: 2px solid transparent;
    border-radius: 50%;
    transition: border-color 0.2s;
}

.color-circle:hover::after {
    border-color: #B4191D;
}

/* Product Attributes */
.product-attributes {
    background-color: #fafafa;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.attribute-item:last-child {
    border-bottom: none !important;
}

/* Technical Documents */
.technical-documents {
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.document-link {
    position: relative;
    overflow: hidden;
}

.document-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #B4191D;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.document-link:hover::before {
    transform: scaleY(1);
}

/* Product Features Section */
.product-features {
    margin-top: 40px;
}

.feature-card {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1) !important;
    border-color: #EDDFDF;
}

/* Related Products Section */
.related-products {
    background-color: #ffffff;
    margin-top: 40px;
}

.section-title {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 40px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background-color: #B4191D;
}

.product-card {
    transition: all 0.3s ease;
}

.product-image-wrapper {
    position: relative;
    overflow: hidden;
}

.product-image-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.product-card:hover .product-image-wrapper::before {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 991px) {
    .product-gallery {
        position: static;
        margin-bottom: 30px;
    }

    .gallery-nav {
        width: 38px;
        height: 38px;
    }

    .breadcrumb-section {
        margin-top: 70px;
    }

    .product-title {
        font-size: 2rem !important;
    }

    .product-hero {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

@media (max-width: 767px) {
    .product-title {
        font-size: 1.75rem !important;
    }

    .section-title {
        font-size: 1.5rem !important;
    }

    .color-palette {
        max-height: 150px;
    }

    .product-thumbnails {
        overflow-x: auto;
        flex-wrap: nowrap !important;
    }

    .thumbnail-item {
        flex-shrink: 0;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-info>* {
    animation: fadeInUp 0.6s ease-out forwards;
    animation-delay: calc(var(--order) * 0.1s);
}

/* Print Styles */
@media print {

    .breadcrumb-section,
    .related-products,
    .document-link {
        display: none;
    }

    .product-gallery {
        position: static;
    }
}

/* ======================================
   RECOMMENDATION SECTIONS (Series & Similar)
   ====================================== */

.recommendation-section {
    overflow: hidden;
}

.rec-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        box-shadow 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    height: 100%;
}

.rec-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.rec-card-img-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #f8f8f8;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rec-card-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 16px;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.rec-card:hover .rec-card-img {
    transform: scale(1.06);
}

.rec-card-placeholder {
    font-size: 2.5rem;
    color: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.rec-card-body {
    padding: 16px 18px 20px;
    border-top: 1px solid #f0f0f0;
}

.rec-card-title {
    font-size: 0.9rem;
    color: #1a1a1a;
    margin-bottom: 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s;
}

.rec-card:hover .rec-card-title {
    color: #b71c1c;
}

.rec-card-code {
    font-size: 0.75rem;
    color: #999;
    letter-spacing: 0.5px;
}

/* Recommendation section responsive */
@media (max-width: 767px) {
    .recommendation-section .container-fluid {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .rec-card-body {
        padding: 10px 12px 14px;
    }

    .rec-card-title {
        font-size: 0.8rem;
    }

    .rec-card-img {
        padding: 10px;
    }
}

/* Print: hide recommendation sections */
@media print {
    .recommendation-section {
        display: none;
    }
}

/* ======================================
   360° VIEW BUTTON
   ====================================== */

.btn-360-view {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    color: #333;
    border: none;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-360-view:hover {
    color: #b71c1c;
    background: rgba(183, 28, 28, 0.06);
}

.btn-360-view i {
    font-size: 1.15rem;
    transition: transform 0.5s ease;
}

.btn-360-view:hover i {
    transform: rotate(360deg);
}

.btn-360-view span {
    line-height: 1;
}

@media (max-width: 767px) {
    .btn-360-view {
        top: 10px;
        right: 10px;
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    .btn-360-view i {
        font-size: 1rem;
    }
}

/* ======================================
   3D MODEL VIEWER OVERLAY
   ====================================== */

.model-viewer-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.model-viewer-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 100000;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.model-viewer-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.model-viewer-container {
    width: 85vw;
    height: 85vh;
    max-width: 1200px;
    max-height: 900px;
    border-radius: 12px;
    overflow: hidden;
    background: #1a1a1a;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.model-viewer-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.model-viewer-progress-text {
    color: #999;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

@media (max-width: 767px) {
    .model-viewer-container {
        width: 95vw;
        height: 70vh;
        border-radius: 8px;
    }

    .model-viewer-close {
        top: 10px;
        right: 15px;
        font-size: 2rem;
    }
}