/* =========================================================================
 * Indangnguyen — Element "Chi tiết sản phẩm" [idn_pdp] (PDP kiểu FPTShop)
 * Kích thước/tỷ lệ bám SÁT mẫu FPT: cột 661/507, ảnh 372, thumbnail 60…
 * Desktop-first; có breakpoint thu nhỏ & xếp dọc cho mobile.
 * ====================================================================== */
.idn-pdp {
    --pdp-text: #090d14;       /* black-opacity-100 */
    --pdp-link: var(--primary-color, #2496ea);   /* màu chính của theme Flatsome */
    --pdp-gray1: #f9fafb;      /* neutral-gray-1 */
    --pdp-gray2: #e5e7eb;      /* neutral-gray-2 */
    --pdp-gray3: #d1d5db;      /* neutral-gray-3 */
    --pdp-gray5: #6b7280;      /* neutral-gray-5 */
    --pdp-gray8: #1f2937;      /* neutral-gray-8 */
    --pdp-red: #dc2626;        /* red-red-7 */
    --pdp-yellow-bg: #fffbeb;
    --pdp-yellow-bd: #fde68a;  /* yellow-yellow-3 */
    width: 100%;
    color: var(--pdp-text);
    font-size: 14px;
    line-height: 1.5;
}

/* ---------- Bố cục 2 cột: 661 + 507, justify-between ---------- */
.idn-pdp__row {
    display: flex;
    justify-content: space-between;
    align-items: stretch;      /* cột phải cao bằng cột trái (gallery) */
    gap: 40px;                 /* khoảng cách giữa 2 box trái/phải */
    max-width: 100%;
    margin-inline: auto;
       /* py-6 */
}
.idn-pdp__left  { flex: 0 0 661px; width: 661px; max-width: 661px; }
.idn-pdp__right { flex: 0 0 507px; width: 507px; max-width: 507px; display: flex; flex-direction: column; }

/* ---------- Gallery ---------- */
.idn-pdp__gallery { width: 100%; }
.idn-pdp__galmain {
    position: relative;
    overflow: hidden;
}
.idn-pdp__galtrack {
    display: flex;
    transition: transform .35s ease;
    will-change: transform;
}
.idn-pdp__slide {
    flex: 0 0 100%;
    width: 100%;
    height: 372px;             /* pc:h-[372px] */
    display: flex;
    align-items: center;
    justify-content: center;
}
.idn-pdp__slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}
.idn-pdp__slide--video { height: 372px; }
.idn-pdp__video { width: 100%; height: 100%; border: 0; display: block; }

/* Nút chuyển ảnh (bg black-opacity-40, ~40px, cách mép 10) */
.idn-pdp__galnav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 40px !important; height: 40px !important;
    min-width: 0 !important; min-height: 0 !important;
    max-width: 40px; max-height: 40px;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box;
    border: none;
    border-radius: 50%;
    background: rgba(9, 13, 20, .4);
    color: #fff;
    font-size: 32px;
    line-height: 0;
    text-align: center;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 8px 1px rgba(0, 0, 0, .08);
    transition: background .15s;
}
.idn-pdp__galnav:hover { background: rgba(9, 13, 20, .6); }
.idn-pdp__galnav--prev { left: 10px; }
.idn-pdp__galnav--next { right: 10px; }

/* Dải thumbnail (mt 19, thumb 60x60, mr 8, rounded 6) */
.idn-pdp__thumbs {
    display: flex;
    gap: 8px;
    margin-top: 19px;          /* pc:mt-[19px] */
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
}
.idn-pdp__thumb {
    flex: 0 0 auto;
    width: 60px; height: 60px;
    padding: 2px;
    border: 1px solid var(--pdp-gray3);
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    position: relative;
    transition: opacity .15s, border-color .15s;
    opacity: .6;               /* opacity-60 cho thumb chưa chọn */
}
.idn-pdp__thumb:hover { opacity: 1; }
.idn-pdp__thumb.is-active {
    opacity: 1;
    border-color: var(--pdp-gray8);
    background: var(--pdp-gray1);
}
.idn-pdp__thumb img { width: 100%; height: 100%; object-fit: contain; border-radius: 4px; }
.idn-pdp__thumbplay { font-size: 16px; color: var(--pdp-gray8); line-height: 1; }
.idn-pdp__thumb em {
    font-style: normal;
    font-size: 12px;
    line-height: 18px;
    color: var(--pdp-text);
}

/* ---------- Hộp chính sách dưới gallery ---------- */
.idn-pdp__policy { margin-top: 20px; }
.idn-pdp__policy .idn-pbox__icon { display: inline-flex; align-items: center; }
.idn-pdp__policy .idn-pbox__icon svg { width: 24px; height: 24px; }

/* ---------- Cột phải: tiêu đề + giá ---------- */
.idn-pdp__title {
    margin: 0 0 20px;          /* pc:mt-5 khoảng cách tới giá */
    font-size: 20px;           /* pc:l6-semibold */
    line-height: 28px;
    font-weight: 600;
    color: var(--pdp-text);
}
.idn-pdp__titlesub { font-weight: 600; word-break: break-all; }

.idn-pdp__pricebox {
    background: #F8F9FA;
    border: 1px solid #bfc5cc;
    border-radius: 8px;        /* pc:rounded-2 */
    padding: 16px;             /* p-4 */
    flex: 1 1 auto;            /* lấp đầy chiều cao còn lại -> đẩy CTA xuống đáy */
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.idn-pdp__pricerow {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;       /* pc:mb-5 */
}
.idn-pdp__pricecol { display: flex; flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 10px; }
.idn-pdp__price {
    font-size: 28px;           /* h4-bold pc */
    line-height: 36px;
    font-weight: 700;
    color: var(--pdp-text);
}
.idn-pdp__price--contact { font-size: 24px; }
.idn-pdp__pricesub {
    display: flex;
    gap: 8px;
    align-items: baseline;
    margin-top: 0;
    font-size: 14px;           /* b2-medium */
    line-height: 20px;
    font-weight: 500;
}
.idn-pdp__priceold { color: var(--pdp-gray5); text-decoration: line-through; }
.idn-pdp__pricepct { color: var(--pdp-red); }

/* ---------- Khuyến mãi ---------- */
.idn-pdp__promohead {
    display: block;
    margin: 0 0 8px;           /* mb-2 */
    color: #000;
    font-size: 14px;           /* f1-medium */
    line-height: 18px;
    font-weight: 500;
}
.idn-pdp__price, .idn-pdp__price span {
    color: #ee4d2d !important;
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.idn-pdp__price .woocommerce-Price-currencySymbol {
    font-size: 28px;
}

.idn-pdp__priceold {
    color: #9e9e9e;
    text-decoration: line-through;
    font-size: 15px;
}

.idn-pdp__pricepct {
    background: #fff0ed;
    color: #ee4d2d;
    border: 1px solid #ee4d2d;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 700;
}
.idn-pdp__promocard {
    position: relative;
    border: 1px solid var(--pdp-link);
    border-radius: 8px;        /* rounded-2 */
    background: #fff;
    padding: 12px;             /* p-3 */
    display: flex;
    flex-direction: column;
    gap: 10px;                 /* gap-2.5 */
    overflow: hidden;
    min-height: 0;
}
/* Ruy-băng tick góc phải trên */
.idn-pdp__promocard::before {
    content: "";
    position: absolute;
    top: 0; right: 0;
    width: 0; height: 0;
    border-style: solid;
    border-width: 0 26px 26px 0;
    border-color: transparent var(--pdp-link) transparent transparent;
    z-index: 2;
}
.idn-pdp__promocard::after {
    content: "✓";
    position: absolute;
    top: 0; right: 2px;
    color: #fff;
    font-size: 11px;
    line-height: 14px;
    font-weight: 700;
    z-index: 2;
}
.idn-pdp__promotitle {
    margin: 0;
    font-size: 14px;           /* pc:b2-medium */
    line-height: 20px;
    font-weight: 500;
    color: var(--pdp-text);
    flex: 0 0 auto;
    padding-right: 20px;       /* tránh đè ruy-băng */
}

/* Vùng nội dung: kẹp khi dài, fade đáy khi thu gọn */
.idn-pdp__promoinner {
    position: relative;
    min-height: 0;
    transition: max-height .28s ease;
}
.idn-pdp__promocard.is-collapsible:not(.is-open) .idn-pdp__promoinner {
    overflow: hidden;
}
.idn-pdp__promocard.is-collapsible:not(.is-open) .idn-pdp__promoinner::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 48px;
    pointer-events: none;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 90%);
}
.idn-pdp__promocard.is-open .idn-pdp__promoinner {
    overflow: visible;
    max-height: none !important;
}

/* Nội dung HTML từ "Mô tả ngắn" sản phẩm */
.idn-pdp__promobody {
    font-size: 14px;
    line-height: 1.55;
    color: var(--pdp-text);
    word-break: break-word;
    overflow-wrap: anywhere;
}
.idn-pdp__promobody > :first-child { margin-top: 0; }
.idn-pdp__promobody > :last-child { margin-bottom: 0; }
.idn-pdp__promobody p { margin: 0 0 8px; }
.idn-pdp__promobody ul,
.idn-pdp__promobody ol { margin: 0 0 8px; padding-left: 20px; }
.idn-pdp__promobody li { margin: 0 0 4px; }
.idn-pdp__promobody a { color: var(--pdp-link); }
.idn-pdp__promobody a:hover { text-decoration: underline; }
.idn-pdp__promobody img { max-width: 100%; height: auto; }
.idn-pdp__promobody div { margin: 0 0 4px; }
.idn-pdp__promobody div:last-child { margin-bottom: 0; }

.idn-pdp__promolist { display: flex; flex-direction: column; gap: 8px; }
.idn-pdp__promoitem {
    position: relative;
    margin: 0;
    padding-left: 20px;        /* pl-5 */
    font-size: 14px;           /* pc:b2-regular */
    line-height: 20px;
    color: var(--pdp-text);
    word-break: break-word;
}
.idn-pdp__promoitem::before {
    content: "";
    position: absolute;
    left: 8px; top: 8px;       /* before:m-2 */
    width: 4px; height: 4px;   /* before:size-1 */
    border-radius: 50%;
    background: var(--pdp-gray5);
}
.idn-pdp__promoitem a { color: var(--pdp-link); }
.idn-pdp__promoitem a:hover { text-decoration: underline; }

/* Nút Xem thêm / Thu gọn khi nội dung vượt max-height */
.idn-pdp__promomore {
    flex: 0 0 auto;
    align-self: flex-start;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--pdp-link);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    text-decoration: none;
}
.idn-pdp__promomore:hover { text-decoration: underline; }
.idn-pdp__promomore[hidden] { display: none !important; }
.idn-pdp__promocard.is-open .idn-pdp__promomore { margin-top: 2px; }

/* ---------- 2 nút CTA (Tư vấn / Liên hệ mua hàng) ---------- */
.idn-pdp .idn-product__cta {
    --idn-pc: var(--primary-color, #2496ea);
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 16px;
    margin-bottom: 0;          /* đáy CTA khớp đáy thumbnail (cùng đáy cột) */
}
.idn-pdp .idn-product__btn {
    flex: 1 1 0;
    min-width: 160px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 22px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: .02em;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.idn-pdp .idn-product__btn--outline {
    background: #fff;
    color: var(--idn-pc);
    border: 2px solid var(--idn-pc);
}
.idn-pdp .idn-product__btn--outline:hover { background: var(--idn-pc); color: #fff; }
.idn-pdp .idn-product__btn--solid {
    background: var(--idn-pc);
    color: #fff;
    border: 2px solid var(--idn-pc);
    box-shadow: 0 10px 22px -10px color-mix(in srgb, var(--idn-pc) 75%, transparent);
}
.idn-pdp .idn-product__btn--solid:hover { filter: brightness(.95); }

/* ---------- Tiêu đề "Sản phẩm liên quan" (kiểu tab-title) ---------- */
.idn-related__head {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 2px solid #ededed;
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
}
.idn-related__head .nav-item {
    position: relative;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary-color, #2496ea);
    margin-bottom: 10px;
}
.idn-related__head .nav-item.active::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--primary-color, #2496ea);
    bottom: -12px;
    left: 0;
}

/* ---------- Tab "Mô tả sản phẩm" [idn_product_desc] ---------- */
.idn-pdesc { background: #fff;}
.idn-pdesc.mg-top { margin-top: 15px; }
.idn-pdesc .tab-title {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 2px solid #ededed;
    list-style: none;
    padding: 0;
    margin: 0;
}
.idn-pdesc .tab-title .nav-item {
    font-size: 16px;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--primary-color, #2496ea);
    text-transform: uppercase;
    position: relative;
    text-decoration: none;
}
.idn-pdesc .tab-title .nav-item.active::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--primary-color, #2496ea);
    bottom: -12px;
    left: 0;
}
.idn-pdesc .tab-content { padding-top: 20px; }

.idn-pdesc .description-content { position: relative; }
.idn-pdesc .description-productdetail { transition: max-height .3s ease; }
.idn-pdesc .description-productdetail img { height: auto !important; max-width: 100%; }
.idn-pdesc .description-productdetail p { margin: 0 0 13px; line-height: 1.6; }
.idn-pdesc .description-productdetail ul,
.idn-pdesc .description-productdetail ol { list-style: initial; padding-left: 20px; margin: 0 0 13px; }
.idn-pdesc .description-productdetail ol { list-style: decimal; }
.idn-pdesc .description-productdetail li { margin: 0 0 6px; }
.idn-pdesc .description-productdetail h2 { font-size: 22px; font-weight: 700; text-transform: uppercase; margin: 18px 0 13px; line-height: 1.2; }
.idn-pdesc .description-productdetail h3 { font-size: 20px; font-weight: 700; margin: 16px 0 13px; line-height: 1.2; }
.idn-pdesc .description-productdetail a { color: #007bff; }
.idn-pdesc .description-productdetail a:hover { text-decoration: underline; }
.idn-pdesc .description-productdetail hr { width: 100%; border: 0; border-top: 1px solid rgba(0,0,0,.1); margin: 16px 0; }

.idn-pdesc .description-btn { position: relative; text-align: center; margin-top: 8px; }
/* Lớp mờ gradient khi đang thu gọn */
.idn-pdesc .description-content:not(.is-open) .description-btn::before {
    content: "";
    position: absolute;
    top: -90px; left: 0;
    width: 100%; height: 90px;
    pointer-events: none;
    background: linear-gradient(rgba(255,255,255,0), rgba(255,255,255,.5) 35%, #fff);
}
.idn-pdesc .expandable-content_toggle {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--primary-color, #2496ea);
    padding: 7px 15px;
    color: var(--primary-color, #2496ea);
    border-radius: 4px;
    font-weight: 500;
    background: #fff;
    position: relative;
    z-index: 2;
    cursor: pointer;
    outline: none;
}
.idn-pdesc .expandable-content_toggle-icon {
    position: relative;
    margin-right: 12px;
    width: 10px; height: 10px;
}
.idn-pdesc .expandable-content_toggle-icon::before,
.idn-pdesc .expandable-content_toggle-icon::after {
    content: "";
    position: absolute;
    background: var(--primary-color, #2496ea);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}
.idn-pdesc .expandable-content_toggle-icon::before { width: 2px; height: 10px; }  /* dấu | của dấu + */
.idn-pdesc .expandable-content_toggle-icon::after  { width: 10px; height: 2px; }
/* Khi mở -> thành dấu trừ (ẩn thanh dọc) */
.idn-pdesc .description-content.is-open .expandable-content_toggle-icon::before { display: none; }

/* ---------- Responsive ---------- */
/* Màn vừa: 2 cột co lại để không tràn */
@media (max-width: 1239px) {
    .idn-pdp__row { max-width: 100%; gap: 24px; }
    .idn-pdp__left  { flex: 1 1 auto; width: auto; max-width: none; min-width: 0; }
    .idn-pdp__right { flex: 0 0 420px; width: 420px; max-width: 420px; }
    .idn-pdp__slide, .idn-pdp__slide--video { height: 340px; }
}
/* Mobile: xếp dọc, giảm kích thước (bám các lớp mb:/h-[210px]) */
@media (max-width: 768px) {
    .idn-pdp__row { flex-direction: column; gap: 16px; padding: 12px 0; }
    .idn-pdp__left, .idn-pdp__right { flex: 1 1 auto; width: 100%; max-width: 100%; }
    .idn-pdp__slide, .idn-pdp__slide--video { height: 210px; }   /* h-[210px] */
    .idn-pdp__thumbs { margin-top: 11px; height: 64px; }          /* mt-[11px] */
    .idn-pdp__thumb { width: 48px; height: 48px; border-radius: 4px; }  /* mb thumb 48 */
    .idn-pdp__galnav { width: 24px !important; height: 24px !important; max-width: 24px; max-height: 24px; font-size: 22px; }
    .idn-pdp__title { font-size: 16px;
        text-transform: uppercase;
        line-height: 20px;
        font-weight: 500;
        margin-bottom: 12px; }
    .idn-pdp__price { font-size: 20px; line-height: 28px; }       /* h4-bold mobile */
    .idn-pdp__pricesub { font-size: 14px; }
    .idn-pdp__promotitle, .idn-pdp__promoitem { font-size: 12px; line-height: 18px; }  /* f1 */
    .idn-pdp__promobody { font-size: 13px; line-height: 1.5; }
    .idn-pdp__promomore { font-size: 12px; }
}

/* =========================================================================
   POPUP chi tiết (lightbox 3 tab): Điểm nổi bật / Mô tả ngắn / Thông tin SP
   ========================================================================= */
/* gợi ý click ảnh trang (không phải ảnh trong popup) để phóng to */
.idn-pdp__gallery:not(.idn-pdp__gallery--modal) .idn-pdp__galmain { cursor: zoom-in; }

body.idn-pdp-modal-open { overflow: hidden; }

.idn-pdp__modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.idn-pdp__modal[hidden] { display: none; }

.idn-pdp__modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
}

.idn-pdp__modal-dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 920px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .32);
    animation: idn-pdp-modal-in .25s ease;
}
@keyframes idn-pdp-modal-in {
    from { opacity: 0; transform: translateY(16px) scale(.98); }
    to   { opacity: 1; transform: none; }
}

.idn-pdp__modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 3;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .06);
    color: #333;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, transform .2s;
}
.idn-pdp__modal-close:hover { background: rgba(0, 0, 0, .14); transform: rotate(90deg); }

/* Tabs cố định trên cùng */
.idn-pdp__modal-tabs {
    flex: 0 0 auto;
    display: flex;
    gap: 4px;
    padding: 14px 60px 0 16px;
    border-bottom: 1px solid #eee;
    overflow-x: auto;
    scrollbar-width: none;
}
.idn-pdp__modal-tabs::-webkit-scrollbar { display: none; }
.idn-pdp__modal-tab {
    flex: 0 0 auto;
    border: 0;
    background: none;
    padding: 10px 16px 12px;
    font-size: 15px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: color .2s, border-color .2s;
}
.idn-pdp__modal-tab:hover { color: #1f2a44; }
.idn-pdp__modal-tab.is-active {
    color: var(--primary-color, #2496ea);
    border-bottom-color: var(--primary-color, #2496ea);
}

/* Vùng nội dung: cuộn khi dài */
.idn-pdp__modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px;
    scrollbar-width: thin;
}
.idn-pdp__modal-view[hidden] { display: none; }

/* Nội dung văn bản (mô tả) */
.idn-pdp__modal-rich {
    font-size: 15px;
    line-height: 1.7;
    color: #374151;
    word-wrap: break-word;
}
.idn-pdp__modal-rich img { max-width: 100%; height: auto; }
.idn-pdp__modal-rich table { width: 100%; border-collapse: collapse; }
.idn-pdp__modal-rich :first-child { margin-top: 0; }
.idn-pdp__modal-rich :last-child { margin-bottom: 0; }
.idn-pdp__modal-empty { color: #9ca3af; font-style: italic; }

/* Gallery bên trong popup: to hơn, canh giữa, ảnh co theo màn hình */
.idn-pdp__gallery--modal { max-width: 620px; margin: 0 auto; }
.idn-pdp__gallery--modal .idn-pdp__slide,
.idn-pdp__gallery--modal .idn-pdp__slide--video {
    height: 56vh;
    max-height: 460px;
    min-height: 220px;
}

@media (max-width: 575px) {
    .idn-pdp__modal { padding: 0; }
    .idn-pdp__modal-dialog { max-width: 100%; max-height: 100vh; height: 100vh; border-radius: 0; }
    .idn-pdp__modal-tab { font-size: 14px; padding: 10px 12px 12px; }
    .idn-pdp__gallery--modal .idn-pdp__slide,
    .idn-pdp__gallery--modal .idn-pdp__slide--video { height: 44vh; }
}
