/* ========== PRODUCT DETAIL PAGE STYLE ========== */
body {
    background-color: #fafafa;
    color: #222;
    font-family: "Inter", "Segoe UI", sans-serif;
}

/* Chặn tràn ngang toàn trang (trường hợp có chuỗi rất dài) */
html, body {
    overflow-x: hidden;
}

/* Đúng pattern sticky footer */
main {
    flex: 1 0 auto;
}

/* Footer không tự tạo scrollbar */
footer, .footer, .site-footer {
    overflow: visible !important;
    max-height: none !important;
    flex-shrink: 0;
}

/* Mô tả tự xuống dòng, kể cả khi là chuỗi dài/URL */
.product-description {
    overflow-wrap: anywhere; /* ưu tiên */
    word-break: break-word; /* fallback */
}

h2.text-center {
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #111;
    margin-top: 40px;
}

/* Container chỉnh khoảng cách & đổ bóng */
.container.py-5 {
    background: #fff;
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    max-width: 1100px;
}

/* Hình sản phẩm */
.img-fluid.rounded {
    border-radius: 16px !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease;
}

.img-fluid.rounded:hover {
    transform: scale(1.03);
}

/* Tiêu đề sản phẩm */
.col-md-6 h2 {
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 10px;
}

/* Giá sản phẩm */
.text-muted {
    font-size: 1.2rem;
    color: #888 !important;
    margin-bottom: 15px;
}

/* Mô tả sản phẩm */
.col-md-6 p {
    line-height: 1.6;
    font-size: 1.05rem;
}

/* Các nút hành động */
.btn {
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 50px;
    transition: all 0.2s ease-in-out;
}

.btn-danger {
    background-color: #d32f2f;
    border: none;
}

.btn-danger:hover {
    background-color: #b71c1c;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(211, 47, 47, 0.3);
}

.btn-outline-secondary {
    border-color: #ccc;
    --bs-btn-hover-color: #dc3545;
    color: #555;
}

.btn-outline-secondary:hover {
    background-color: #f2f2f2;
    transform: translateY(-2px);
}

/* Căn chỉnh cột phải cho cân đối */
.col-md-6:last-child {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Giữ bố cục 2 cột cân đối */
.product-gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.product-gallery .main-image {
    width: 100%;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 5px;
}

/* Hàng ảnh nhỏ */
.thumbnail-row {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap; /* tự xuống hàng nếu nhỏ */
    width: 100%;
    max-width: 100%; /* không vượt chiều ngang ảnh chính */
}

/* Ảnh nhỏ */
.thumbnail-row img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail-row img:hover {
    border-color: #ccc;
    transform: scale(1.05);
}

.thumbnail-row img.active {
    border-color: #333;
    transform: scale(1.05);
}

.site-footer { background:#1f2428; }
.footer-logo { max-height:250px; width:auto; }
.site-footer a { color:#eaeaea; text-decoration:none; }
.site-footer a:hover { color:#ffffff; text-decoration:underline; }
.footer-nav .list-inline-item { margin:0 .75rem; }
.footer-social { display:inline-flex; align-items:center; }
.copyright { opacity:.8; }

/* Mobile: menu thành danh sách dọc cho dễ bấm */
@media (max-width: 991.98px) {
    .footer-nav .list-inline-item { display:block; margin:.25rem 0; }
}

/* Responsive */
@media (max-width: 768px) {
    .product-gallery, .product-info {
        text-align: center;
    }

    .thumbnail-row {
        justify-content: center;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .container.py-5 {
        padding: 30px 20px;
    }

    .col-md-6 h2 {
        font-size: 1.5rem;
        text-align: center;
        margin-top: 20px;
    }

    .col-md-6 p {
        text-align: center;
    }

    .btn {
        width: 100%;
        margin-top: 12px !important;
    }

    .col-md-6:last-child {
        align-items: center;
    }
}