﻿.divproductdetail {
    background-color: white;
    padding: 10px 0px 0px 0px;
    margin: 0px;
}
.dvprice {
    padding: 8px;
    background-color: var(--body);
}
.product-gallery {
    width: 100%;
}
.no-margin
{
    margin: 0 !important;
}
.promotion {
    margin-top: 12px !important;
    margin-bottom: 0px !important;
    background-color: orangered;
    padding-left: 20px;
    color: yellow;
}
.preview {
    position: relative; /*  làm cha cho absolute */
    width: 100%;
    height: 0;
    padding-top: 100%; /* Tạo tỷ lệ vuông 1:1 */
    overflow: hidden;
    background: #f8f8f8;
    border-radius: 8px;
}

#mainImage,
#mainVideo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover; /* Lấp đầy, cắt thừa, giữ tỷ lệ */
    display: block;
}

#mainVideo {
    background: #000;
}

.thumb-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.thumb-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.4);
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

    .thumb-nav:hover {
        background: rgba(0,0,0,0.6);
    }

    .thumb-nav.left {
        left: 5px;
    }

    .thumb-nav.right {
        right: 5px;
    }


.thumbnails-container {
    overflow: hidden;
    width: 100%;
}

.thumbnails {
    display: flex;
    transition: transform 0.3s ease;
}



/* Ảnh thumbnail */
.thumb {
    width: 5.6rem;
    height: 5.6rem;
    margin: 0px 0.3rem;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
}

/*swiper*/
.swiper {
    width: 100%;
    max-width: 40rem; /* hoặc tuỳ chỉnh */
    margin: 1rem auto;
}

.swiper-slide img.thumb {
    margin: 0px;
    width: 5.6rem;
    height: 5.6rem;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 5px;
    transition: border-color 0.3s ease;
}

/*.swiper-slide-thumb-active img.thumb {
    border-color: var(--primary);*/ /* màu primary hoặc mặc định xanh */
/*}*/

.swiper-slide img.thumb.active {
    border-color: var(--primary);
    cursor: pointer;
}

.details-price {
    margin: 0 !important;
    padding: 0 !important;
}

.details-add-group {
    margin: 20px 0px 0px !important;
    padding: 0 !important;
}

.details-price {
    margin: 0 !important;
    padding: 0 !important;
}

.details-content {
    padding: 0 !important;
}


.product-desc-row {
    margin-top: 1rem;
}

/* Cột mô tả */
.product-desc-content {
    line-height: 1.7;
    font-size: 0.95rem;
    word-break: break-word;
}

    .product-desc-content img {
        max-width: 100%;
        height: auto;
        display: block;
    }

    .product-desc-content table {
        max-width: 100%;
        width: 100%;
        display: block;
        overflow-x: auto;
    }

        .product-desc-content table th,
        .product-desc-content table td {
            white-space: normal;
        }

@media (min-width: 992px) {
    .product-desc-sticky {
        position: sticky;
        top: 90px;
        z-index: 1;
    }
}

/* Media wrapper */
.product-desc-media {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.product-desc-image {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.product-desc-video-wrap {
    width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.product-desc-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mobile */
@media (max-width: 991.98px) {
    .product-desc-content {
        font-size: 0.9rem;
    }
}

/* ===== Product Description - Auto styling ===== */
.product-desc-content {
    line-height: 1.7;
    font-size: 0.95rem;
    color: #333;
    word-break: break-word;
}

    /* ----- Headings ----- */
    .product-desc-content h2 {
        font-size: 1.5rem;
        font-weight: 700;
        color: #1a1a1a;
        margin: 0 0 1rem;
        line-height: 1.35;
    }

    .product-desc-content h3 {
        font-size: 1.2rem;
        font-weight: 700;
        color: #2d7a2d;
        margin: 2rem 0 0.75rem;
        padding-bottom: 0.5rem;
        border-bottom: 2px solid #e8f0e8;
        line-height: 1.4;
    }

    .product-desc-content h4 {
        font-size: 1rem;
        font-weight: 600;
        color: #2d7a2d;
        margin: 1.25rem 0 0.5rem;
        line-height: 1.4;
    }

    /* ----- Paragraphs ----- */
    .product-desc-content p {
        margin: 0 0 1rem;
    }

    /* ----- Lists ----- */
    .product-desc-content ul,
    .product-desc-content ol {
        margin: 0 0 1.25rem;
        padding-left: 1.5rem;
    }

    .product-desc-content ul {
        list-style: disc;
    }

    .product-desc-content ol {
        list-style: decimal;
    }

    .product-desc-content li {
        margin-bottom: 0.5rem;
        padding-left: 0.25rem;
    }

        .product-desc-content li::marker {
            color: #2d7a2d;
        }

    /* ----- Links ----- */
    .product-desc-content a {
        color: #2d7a2d;
        text-decoration: underline;
        text-underline-offset: 2px;
    }

        .product-desc-content a:hover {
            color: #1f5a1f;
        }

    /* ----- Tables (TỰ ĐỘNG đẹp, không cần class) ----- */
    .product-desc-content table {
        width: 100%;
        border-collapse: collapse;
        margin: 0 0 1.5rem;
        font-size: 0.9rem;
        background: #fff;
    }

        .product-desc-content table th,
        .product-desc-content table td {
            padding: 0.75rem 1rem;
            border: 1px solid #e0e0e0;
            text-align: left;
            vertical-align: middle;
        }

        /* Table có thead → kiểu "bảng so sánh" (header xanh) */
        .product-desc-content table thead th {
            background: #2d7a2d;
            color: #fff;
            font-weight: 600;
            border-color: #2d7a2d;
        }

        /* Table KHÔNG có thead → kiểu "bảng thông số" (cột trái đậm) */
        .product-desc-content table:not(:has(thead)) tbody tr td:first-child {
            background: #f0f7f0;
            font-weight: 600;
            width: 40%;
        }

        /* Sọc ngựa vằn cho mọi table */
        .product-desc-content table tbody tr:nth-child(even) td {
            background: #fafafa;
        }

        .product-desc-content table:not(:has(thead)) tbody tr:nth-child(even) td:first-child {
            background: #e8f0e8;
        }

    /* ----- Blockquote (thay cho callout box) ----- */
    .product-desc-content blockquote {
        background: #fff8e1;
        border-left: 4px solid #ffc107;
        padding: 1rem 1.25rem;
        border-radius: 6px;
        margin: 1.5rem 0;
        font-size: 0.95rem;
        font-style: normal;
    }

    /* ----- Em / Italic standalone trong p (thay cho note) ----- */
    .product-desc-content p > em:only-child {
        display: block;
        background: #f5f9f5;
        padding: 0.75rem 1rem;
        border-radius: 6px;
        border-left: 3px solid #2d7a2d;
        font-size: 0.9rem;
        font-style: italic;
    }

    /* ----- HR ----- */
    .product-desc-content hr {
        border: 0;
        border-top: 1px solid #e8e8e8;
        margin: 2rem 0;
    }

    /* ----- Strong ----- */
    .product-desc-content strong {
        color: #1a1a1a;
        font-weight: 600;
    }

    /* ----- Image trong description ----- */
    .product-desc-content img {
        max-width: 100%;
        height: auto;
        display: block;
        margin: 1rem 0;
        border-radius: 6px;
    }

/* ----- Mobile ----- */
@media (max-width: 991.98px) {
    .product-desc-content h2 {
        font-size: 1.25rem;
    }

    .product-desc-content h3 {
        font-size: 1.1rem;
    }

    .product-desc-content h4 {
        font-size: 0.95rem;
    }

    .product-desc-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

        .product-desc-content table th,
        .product-desc-content table td {
            white-space: normal;
            padding: 0.6rem 0.75rem;
            font-size: 0.85rem;
        }
}
