:root {
    --navy-blue: #002D72;
    --gold-accent: #D4AF37;
    --win-gray: #f3f3f3;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== LAYOUT CORE (STUCK FOOTER) ===== */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    font-family: 'Segoe UI', Roboto, sans-serif;
}

header {
    flex-shrink: 0;
}

main {
    flex: 1 0 auto;
}
/* Đẩy footer xuống đáy */
footer {
    flex-shrink: 0;
}

/* ===== TOPBAR & NAVIGATION ===== */
.topbar {
    background: #f8f9fb;
    font-size: 0.8rem;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.win11-navbar {
    padding: 0.75rem 0;
    background: #ffffff;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.search-panel {
    background: #fff;
    border-top: 1px solid #e9ecef;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(-12px);
    transition: max-height 0.35s ease, opacity 0.25s ease, transform 0.3s ease, padding 0.3s ease;
    pointer-events: none;
}

.search-panel.show {
    max-height: 160px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.search-form {
    display: flex;
    gap: 12px;
    align-items: center;
}

.search-input-wrap {
    position: relative;
    flex: 1;
}

.search-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 14px;
    pointer-events: none;
}

.search-input-custom {
    height: 46px;
    padding-left: 40px;
    border: 1px solid #ced4da;
    border-radius: 12px;
    box-shadow: none;
}

.search-input-custom:focus {
    border-color: lightgray;
    box-shadow: 0 0 0 0.15rem rgba(13, 110, 253, 0.12);
}

.search-submit-btn {
    height: 46px;
    padding: 0 20px;
    border: 1px solid lightgray;
    border-radius: 12px;
    background-color: #0d6efd;
    color: #fff;
    white-space: nowrap;
}

.search-submit-btn:hover {
    background-color: #0b5ed7;
    border-color: #0b5ed7;
    color: #fff;
}

@media (max-width: 767.98px) {
    .search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .search-submit-btn {
        width: 100%;
    }
}

.win11-navbar .nav-link {
    font-weight: 500;
    color: #444;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: var(--transition);
}

.win11-navbar .nav-link:hover,
.win11-navbar .nav-link.active {
    background-color: var(--win-gray);
    color: var(--navy-blue);
}

/* ===== SEARCH BOX (OPTIMIZED) ===== */
.search-box {
    display: flex;
    align-items: center;
    position: relative;
    height: 40px;
}

.search-input {
    width: 0;
    opacity: 0;
    visibility: hidden;
    height: 36px;
    border: 1px solid lightgray !important;
    border-radius: 5px;
    padding: 0;
    transition: var(--transition);
    outline: none;
}

.search-box.active .search-input {
    width: 200px;
    opacity: 1;
    visibility: visible;
    padding: 0 15px;
    border-color: lightgray;
    margin-right: 8px;
}

.search-btn, .btn-lang-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid lightgray;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.search-btn:hover, .btn-lang-toggle:hover {
    background-color: var(--win-gray);
    transform: scale(1.05);
}

/* ===== COMPONENTS ===== */
.flag-icon {
    width: 22px;
    height: 22px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.1);
}

.win11-mobile-sidebar {
    width: 350px !important;
    backdrop-filter: blur(20px);
    background-color: rgba(255, 255, 255, 0.9);
}

.card, .win11-section {
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    transition: var(--transition);
}

/* ===== FOOTER ===== */
.site-footer {
    background-color: #ffffff;
    border-top: 1px solid rgba(0,0,0,0.06);
    padding: 3rem 0 1.5rem;
}

.site-footer a {
    color: #666;
    text-decoration: none;
    transition: var(--transition);
}

.site-footer a:hover {
    color: var(--navy-blue);
    padding-left: 4px; /* Hiệu ứng hover nhẹ */
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991.98px) {
    .search-box.active .search-input {
        width: 150px;
    }
}

@media (max-width: 767.98px) {
    .topbar {
        display: none;
    }
    .site-footer {
        text-align: center;
    }

    .site-footer .d-flex {
        justify-content: center;
    }
}

.text-navy {
    color: var(--navy-blue) !important;
}

.footer-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.footer-company-name {
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 600;
}

.footer-slogan {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.75);
    font-style: italic;
}

.footer-info {
    font-size: 0.9rem;
    color: #fff;
}

.footer-info i {
    width: 18px;
}

/* hover link */
.footer-info a:hover {
    text-decoration: underline;
}

/* mobile tối ưu */
@media (max-width: 767.98px) {
    .footer-logo {
        height: 50px;
    }

    .footer-company-name {
        font-size: 0.95rem;
    }
}

.footer-dvc {
    background: #24384f;
    position: relative;
}

.footer-company-name {
    font-size: 1.1rem;
    line-height: 1.7;
    font-weight: 500;
}

.footer-links li {
    border-bottom: 1px solid rgba(255,255,255,0.15);
    padding: 10px 0;
}

.footer-links li a {
    color: #fff;
    text-decoration: none;
    display: inline-block;
    transition: all 0.25s ease;
    position: relative;
    padding-left: 16px;
}

.footer-links li a::before {
    content: "\f105";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    top: 0;
    color: #8bc34a;
}

.footer-links li a:hover {
    color: #8bc34a;
    transform: translateX(4px);
}

.footer-qr-box {
    background: #fff;
    padding: 6px;
    border-radius: 6px;
    display: inline-block;
}

.qr-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

.footer-contact-form input,
.footer-contact-form textarea {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 0.9rem;
}

.footer-contact-form input::placeholder,
.footer-contact-form textarea::placeholder {
    color: rgba(255,255,255,0.6);
}

.footer-contact-form input:focus,
.footer-contact-form textarea:focus {
    background: rgba(255,255,255,0.12);
    border-color: #0d6efd;
    box-shadow: none;
    color: #fff;
}

.footer-contact-form .btn {
    border-radius: 6px;
    font-weight: 500;
}

.footer-divider {
    border-color: rgba(255,255,255,0.65);
    opacity: 1;
}

.footer-company-info p {
    font-size: 1rem;
}

.footer-bottom {
    background: #5d5d5d;
}

.footer-payment-icons img {
    opacity: 0.8;
}

/* ===== Floating Hotline ===== */
.floating-hotline {
    position: fixed;
    left: 14px;
    bottom: 14px;
    z-index: 999;
    display: flex;
    align-items: center;
    background: #e31313;
    color: #fff;
    border-radius: 999px;
    overflow: visible;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    animation: hotlineFloat 2.2s ease-in-out infinite;
}

    .floating-hotline::before {
        content: "";
        position: absolute;
        inset: -6px;
        border-radius: 999px;
        border: 2px solid rgba(227, 19, 19, 0.25);
        animation: hotlinePulseRing 2s infinite;
        pointer-events: none;
    }

    .floating-hotline .icon {
        width: 54px;
        height: 54px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #ff1f1f;
        font-size: 20px;
        border-radius: 50%;
        animation: hotlineShake 1.8s infinite;
    }

    .floating-hotline .number {
        padding: 0 18px 0 14px;
        font-size: 1.5rem;
        font-weight: 700;
        line-height: 54px;
        white-space: nowrap;
    }

    .floating-hotline:hover {
        color: #fff;
        transform: translateY(-2px) scale(1.02);
        transition: 0.25s ease;
    }

/* ===== Floating Zalo ===== */
.floating-zalo {
    position: fixed;
    right: 16px;
    bottom: 22px;
    z-index: 999;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: visible;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: zaloFloat 2.4s ease-in-out infinite;
}

    .floating-zalo::before,
    .floating-zalo::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: 50%;
        border: 2px solid rgba(0, 132, 255, 0.25);
        animation: zaloRipple 2.2s infinite;
    }

    .floating-zalo::after {
        animation-delay: 1.1s;
    }

    .floating-zalo img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
        position: relative;
        z-index: 2;
    }

    .floating-zalo:hover {
        transform: scale(1.08);
        transition: 0.25s ease;
    }

/* ===== Go Top ===== */
.go-top-btn {
    position: fixed;
    right: 18px;
    bottom: 92px;
    z-index: 998;
    width: 48px;
    height: 48px;
    border: none;
    outline: none;
    border-radius: 50%;
    background: #ffffff;
    color: #24384f;
    box-shadow: 0 8px 20px rgba(0,0,0,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

    .go-top-btn.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .go-top-btn:hover {
        background: #24384f;
        color: #fff;
        transform: translateY(-3px);
    }

/* ===== Keyframes ===== */
@keyframes hotlineFloat {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

@keyframes hotlineShake {
    0%, 100% {
        transform: rotate(0deg);
    }

    10% {
        transform: rotate(-15deg);
    }

    20% {
        transform: rotate(12deg);
    }

    30% {
        transform: rotate(-10deg);
    }

    40% {
        transform: rotate(6deg);
    }

    50% {
        transform: rotate(0deg);
    }
}

@keyframes hotlinePulseRing {
    0% {
        transform: scale(0.95);
        opacity: 0.9;
    }

    70% {
        transform: scale(1.15);
        opacity: 0;
    }

    100% {
        transform: scale(1.15);
        opacity: 0;
    }
}

@keyframes zaloFloat {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

@keyframes zaloRipple {
    0% {
        transform: scale(1);
        opacity: 0.65;
    }

    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

@media (max-width: 767.98px) {
    .floating-hotline .icon {
        width: 46px;
        height: 46px;
        font-size: 18px;
    }

    .floating-hotline .number {
        line-height: 46px;
        font-size: 1rem;
        padding: 0 14px 0 10px;
    }

    .floating-zalo {
        width: 50px;
        height: 50px;
        right: 14px;
        bottom: 18px;
    }

    .go-top-btn {
        width: 44px;
        height: 44px;
        right: 16px;
        bottom: 78px;
    }
}

/* Social icons */
.footer-social {
    margin-top: 10px;
}

.social-item {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    transition: all 0.3s ease;
    text-decoration: none;
}

/* màu từng platform */
.social-item.facebook {
    background: #1877f2;
}

.social-item.youtube {
    background: #ff0000;
}

.social-item.tiktok {
    background: #000;
}

.social-item.zalo {
    background: #fff;
}

.social-item.zalo img {
    width: 22px;
    height: 22px;
}

/* hover effect */
.social-item:hover {
    transform: translateY(-5px) scale(1.08);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    color: #fff;
}

.section {
    padding: 80px 0;
}

.section-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 40px;
}

.hero-section {
    height: 70vh;
    background: linear-gradient(135deg, #24384f, #0d6efd);
    color: #fff;
    display: flex;
    align-items: center;
}

.hero-carousel {
    position: relative;
}

.hero-carousel img {
    height: 90vh;
    object-fit: fill;
}

/* overlay gradient */
.hero-overlay {
    position: absolute;
    inset: 0;
    /*background: linear-gradient(90deg,rgba(0, 0, 0, 1) 0%, rgba(140, 143, 142, 1) 0%, rgba(255, 255, 255, 0) 100%);*/
    display: flex;
    align-items: center;
}

/* content */
.hero-content {
    color: #fff;
    max-width: 600px;
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 700;
}

.hero-content p {
    font-size: 18px;
    opacity: 0.9;
}

/* button */
.hero-content .btn {
    border-radius: 12px;
    padding: 10px 22px;
}

/* indicator đẹp hơn */
.carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* animation chữ */
.carousel-item.active .hero-content {
    animation: fadeUp 0.8s ease;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content h1 {
    font-size: 48px;
    font-weight: 700;
}

.hero-actions .btn {
    margin-right: 10px;
    border-radius: 12px;
}

.glass-box {
    backdrop-filter: blur(16px);
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 40px;
    color: #fff;
}

.card-modern {
    border: none;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: 0.3s;
}

.card-modern:hover {
    transform: translateY(-6px);
}

/* Product */
.product-card {
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
}

/* News */
.news-card {
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* Background nhẹ */
.bg-soft {
    background: #f6f8fb;
}

.nav-link.active {
    color: #0d6efd !important;
    position: relative;
}

.nav-link.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 20%;
    width: 60%;
    height: 2px;
    background: #0d6efd;
    border-radius: 2px;
}

.sidebar-product {
    padding: 8px;
    border-radius: 10px;
    transition: all 0.25s ease;
}

.sidebar-product:hover {
    background: #f8f9fa;
    transform: translateX(3px);
}

.sidebar-product img {
    border: 1px solid #eee;
}

.sidebar-product .fw-semibold {
    transition: color 0.2s;
}

.sidebar-product:hover .fw-semibold {
    color: #dc3545;
}

.product-card {
    overflow: hidden;
    position: relative;
    transition: all 0.25s ease;
}

.product-img {
    overflow: hidden;
    position: relative;
    transition: all 0.25s ease;
    width: 100%;
    aspect-ratio: 1 / 1; /* hoặc 4/3 nếu thích */
    overflow: hidden;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 🔥 key chính */
    object-position: center;
}
/* OVERLAY */
.product-img::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}
.product-img:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

.product-img:hover::before {
    opacity: 1;
}


/* IMAGE */
.product-img {
    overflow: hidden;
}

.product-img img {
    object-fit: cover;
    transition: transform 0.35s ease;
}


/* QUICK VIEW BUTTON */
.quickview-btn {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform: translate(-50%, 20px);
    opacity: 0;
    z-index: 2;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.product-card:hover .quickview-btn {
    opacity: 1;
    transform: translate(-50%, 0);
}

.product-card h6 {
    min-height: 40px; /* ~2 dòng */
    line-height: 1.3;
}

/* TITLE */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-transform: uppercase;
}

.sidebar-category li {
    padding: 6px 0;
    border-bottom: 1px solid #eee;
}

.sidebar-category a {
    text-decoration: none;
    color: #333;
}

.sidebar-category a:hover {
    color: #0d6efd;
    padding-left: 5px;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-main-img {
    max-height: 400px;
    object-fit: contain;
}

/* NAV TAB WRAPPER */
.nav-tabs {
    border-bottom: none;
    gap: 10px;
}

.nav-tabs .nav-link {
    border: none;
    background: #f1f3f5;
    color: #555;
    border-radius: 20px;
    padding: 8px 18px;
    font-weight: 500;
    transition: all 0.25s ease;
}

.nav-tabs .nav-link:hover {
    border-color: #0d6efd;
    color: white !important;
}

.nav-tabs .nav-link.active {
    background: #0d6efd;
    color: white;
}

.nav-tabs .nav-link {
    background: #f1f3f5;
    color: #555;
    border-radius: 10px;
    border: none;
}

.nav-tabs .nav-link.active {
    background: #0d6efd;
    color: #fff !important;
    transform: translateY(-2px);
}

.tab-content {
    padding-top: 10px;
}

.table td {
    vertical-align: middle;
}

.share-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: all 0.25s ease;
    font-size: 14px;
    border: none;
}

/* BRAND COLORS */
.share-btn.facebook {
    background: #1877f2;
}

.share-btn.zalo {
    background: #0068ff;
}

.share-btn.messenger {
    background: #0084ff;
}

.share-btn.telegram {
    background: #229ED9;
}

.share-btn.copy {
    background: #6c757d;
}

/* HOVER */
.share-btn:hover {
    transform: translateY(-3px);
    opacity: 0.9;
}

.review-item {
    font-size: 14px;
}

.rating-input i {
    cursor: pointer;
    transition: 0.2s;
}

.rating-input i:hover {
    transform: scale(1.2);
}

.blog-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.blog-img {
    height: 180px;
    overflow: hidden;
}

.blog-img img {
    object-fit: cover;
    height: 100%;
    transition: 0.3s;
}

.blog-card .btn {
    margin-top: auto;
}

.blog-card:hover img {
    transform: scale(1.05);
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card:hover {
    transform: translateY(-4px);
}

.blog-card .p-3 {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* seller */
.seller-avatar {
    position: fixed;
    left: 15px;
    bottom: 90px; /* nằm trên hotline */
    z-index: 9999;
}

.seller-avatar img {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    animation: floatSeller 2s ease-in-out infinite;
}



/* animation */
@keyframes floatSeller {
    0% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-6px);
    }

    100% {
        transform: translateY(0);
    }
}

.about-wrapper {
    display: flex;
    gap: 30px;
    align-items: flex-start;
}

.about-image {
    flex: 0 0 45%;
}

.about-content {
    flex: 1;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
}

.about-content h3 {
    color: #0d47a1;
    font-weight: 700;
    margin-bottom: 12px;
}

/* chỉ mobile mới xuống dưới */
@media(max-width:768px) {
    .about-wrapper {
        flex-direction: column;
    }
}
.section-header {
    text-align: center;
    margin-bottom: 30px;
    color: darkslateblue;
}

.section-header h2 {
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.section-header p {
    max-width: 800px;
    margin: auto;
    opacity: 0.9;
    line-height: 1.6;
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 cột */
    gap: 20px;
}

.gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}
/* 1. Ảnh cùng kích thước */
.news-img {
    width: 100%;
    height: 200px; /* chỉnh theo ý bạn */
    overflow: hidden;
}

    .news-img img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* crop ảnh, không méo */
    }

/* 2. Card cao bằng nhau */
.news-card {
    background: #fff;
    border-radius: 8px;
    transition: 0.2s;
}
.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
/* 3. Clamp text */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: nowrap;
}

.product-filter-search {
    width: 305px !important;
    height: 38px;
    flex: 0 0 305px;
}

.product-filter-select {
    width: 165px !important;
    height: 38px;
    flex: 0 0 165px;
}

.product-filter-btn {
    height: 38px;
    padding: 0 18px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .product-filter-bar {
        flex-wrap: wrap;
    }

    .product-filter-search,
    .product-filter-select {
        width: 100% !important;
        flex: 1 1 100%;
    }

    .product-filter-btn {
        width: 100%;
    }
}


.product-detail-img {
    width: 330px;
    height: 330px;
    object-fit: contain;
    background: #fff;
    border: 1px solid lightgray;
}

.product-detail-img img {
    width: 100%;
}

.product-detail-info {
    flex: 1;
}

.related-img-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #fff;
}

.related-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-content {
    font-size: 15px;
    line-height: 1.7;
    color: #333;
    word-break: break-word;
}

    /* ===== PARAGRAPH ===== */
    .product-content p {
        margin: 12px 0;
    }

    /* ===== IMAGE ===== */
    .product-content img {
        max-width: 100% !important;
        height: auto !important;
        display: block;
        margin: 16px auto;
        border-radius: 6px;
    }

    /* Giữ layout khi có figure */
    .product-content figure {
        margin: 16px 0;
        text-align: center;
    }

    .product-content figcaption {
        font-size: 13px;
        color: #6c757d;
        margin-top: 6px;
    }

    /* ===== VIDEO ===== */
    .product-content iframe,
    .product-content video {
        max-width: 100%;
        display: block;
        margin: 16px auto;
        border-radius: 6px;
    }

    /* ===== TABLE (rất quan trọng cho thông số) ===== */
    .product-content table {
        width: 100%;
        border-collapse: collapse;
        margin: 16px 0;
        font-size: 14px;
    }

        .product-content table th,
        .product-content table td {
            border: 1px solid #e5e7eb;
            padding: 8px 10px;
        }

        .product-content table th {
            background: #f8f9fa;
            font-weight: 600;
            width: 30%;
        }

    /* ===== LIST ===== */
    .product-content ul,
    .product-content ol {
        padding-left: 20px;
        margin: 12px 0;
    }

    /* ===== HEADING ===== */
    .product-content h1,
    .product-content h2,
    .product-content h3,
    .product-content h4 {
        margin-top: 20px;
        margin-bottom: 10px;
        font-weight: 600;
        line-height: 1.4;
    }

    /* ===== LINK ===== */
    .product-content a {
        color: #0d6efd;
        text-decoration: none;
    }

        .product-content a:hover {
            text-decoration: underline;
        }

    /* ===== CODE ===== */
    .product-content pre {
        background: #f6f8fa;
        padding: 12px;
        border-radius: 6px;
        overflow-x: auto;
    }

    .product-content code {
        background: #f1f3f5;
        padding: 2px 6px;
        border-radius: 4px;
    }

    /* ===== FIX TRÀN ===== */
    .product-content * {
        max-width: 100%;
    }

/* ===== MOBILE ===== */
@media (max-width: 576px) {
    .product-content {
        font-size: 14px;
    }

    .product-content img {
        margin: 12px auto;
    }
}

.product-gallery-dropzone {
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.product-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
}

.product-gallery-item {
    border: 1px solid var(--editor-border-soft);
    border-radius: var(--editor-radius);
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.product-gallery-thumb {
    position: relative;
    background: #f3f4f6;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.product-gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-gallery-index {
    position: absolute;
    top: 8px;
    left: 8px;
    min-width: 26px;
    height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    background: rgba(17, 24, 39, .78);
    color: #fff;
    font-size: .75rem;
    font-weight: 650;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.product-gallery-body {
    padding: 10px;
}

.product-gallery-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 8px;
}

.product-gallery-actions .btn {
    padding-left: 0;
    padding-right: 0;
}

.product-gallery-url {
    font-size: .73rem;
    color: var(--editor-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
}

.product-gallery-empty {
    border: 1px dashed var(--editor-border);
    border-radius: var(--editor-radius);
    background: #f9fafb;
    padding: 18px;
    text-align: center;
    color: var(--editor-muted);
    font-size: .86rem;
}

@media (max-width: 575.98px) {
    .product-gallery-grid {
        grid-template-columns: 1fr;
    }
}
        .product-content img {
            margin: 12px auto;
        }
}
.card-modern {
    background: #fff;
    border-radius: 12px;
    overflow: hidden; /* 🔥 fix tràn ảnh */
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}