/* ============================================================
   BASE OVERFLOW PREVENTION
   ============================================================ */
/* html,
body {
    overflow-x: hidden;
    max-width: 100%;
} */

/* ============================================================
   PRODUCT GALLERY + ZOOM
   ============================================================ */
.gallery-wrapper {
    position: sticky;
    top: 20px;
    min-width: 0;
}

.main-image-container {
    position: relative;
    background: #f8f9fa;
    border-radius: 16px;
    overflow: hidden;
    cursor: crosshair;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px
}

.main-image-container img {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

.zoom-hint {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: none;
    transition: opacity 0.3s;
}

/* Lightbox */
.image-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    cursor: zoom-out;
}

.image-lightbox.active {
    display: flex;
}

.image-lightbox img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.image-lightbox .lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.1);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    transition: background 0.3s;
}

.image-lightbox .lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* Thumbnails */
.thumbnail-strip {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    overflow-x: auto;
    padding: 5px 0;
    scrollbar-width: thin;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.thumbnail-strip::-webkit-scrollbar {
    height: 6px;
}

.thumbnail-strip::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.thumbnail-strip::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.thumbnail-item {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 10px;
    overflow: hidden;
    background: #f8f9fa;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.25s ease;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumbnail-item:hover {
    border-color: #0d6efd;
    transform: translateY(-2px);
}

.thumbnail-item.active {
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

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

/* Detail info */
.detail-info {
    padding-left: 20px;
    min-width: 0;
}

.detail-price {
    font-size: 2rem;
    font-weight: 700;
    color: #0d6efd;
}

.detail-compare-price {
    font-size: 1.1rem;
    color: #6c757d;
    text-decoration: line-through;
    margin-left: 10px;
}

.feature-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 50px;
    font-size: 12px;
    color: #495057;
    margin: 3px 5px 3px 0;
}

.feature-chip i {
    color: #0d6efd;
    font-size: 12px;
}

.breadcrumb-custom {
    background: #f8f9fa;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.breadcrumb-custom a {
    color: #6c757d;
    text-decoration: none;
}

.breadcrumb-custom a:hover {
    color: #0d6efd;
}

.breadcrumb-custom .current {
    color: #0d6efd;
    font-weight: 600;
}

.btn-order-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0b5ed7 100%);
    color: #fff;
    border: none;
    padding: 18px 40px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.15rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
    width: 100%;
    max-width: 100%;
}

.btn-order-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
    color: #fff;
}

.trust-badge-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6c757d;
}

.trust-badge-item i {
    color: #0d6efd;
    font-size: 18px;
}

.related-product-card {
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    background: #fff;
    max-width: 100%;
}

.related-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.related-product-card img {
    height: 180px;
    width: 100%;
    object-fit: contain;
    background: #f8f9fa;
    padding: 12px;
}

/* ============================================================
   FLEX/GRID SHRINK FIX
   ============================================================ */
.row,
.col-lg-6,
.col-md-6,
.col-lg-4 {
    min-width: 0;
}

/* ============================================================
   MODAL FIXES
   ============================================================ */
/* .modal-dialog {
    max-width: calc(100% - 1rem);
    margin: 0.5rem auto;
} */

@media (min-width: 992px) {
    .modal-lg {
        max-width: 800px;
    }
}

@media (max-width: 767px) {
    .modal-body .row>[class*="col-"] {
        margin-bottom: 15px;
    }

    .order-summary {
        padding: 12px !important;
    }
}

/* ============================================================
   MOBILE BREAKPOINTS
   ============================================================ */
@media (max-width: 991px) {
    .detail-info {
        padding-left: 0 !important;
        margin-top: 30px;
    }

    .gallery-wrapper {
        position: static;
    }
}

@media (max-width: 576px) {
    .main-image-container {
        border-radius: 12px;
        max-height: 340px;
    }

    .detail-price {
        font-size: 1.6rem;
    }

    .detail-compare-price {
        font-size: 1rem;
    }

    .btn-order-primary {
        padding: 16px 30px;
        font-size: 1rem;
    }

    .thumbnail-item {
        width: 64px;
        height: 64px;
    }

    .breadcrumb-custom {
        padding: 10px 14px;
        font-size: 0.78rem;
    }
}