﻿/* SHOP/P1 PDP â€” port layout P2, accent P1 */
:root {
    --p2-ink: #1a2744;
    --p2-muted: #6b6b6b;
    --p2-gold: #ff6b00;
    --p2-gold-dark: #e55a00;
    --p2-bg: #f7f9fc;
    --p2-white: #ffffff;
    --p2-line: #e6ecf5;
    --p2-rose: #ff6b00;
    --p2-rose-dark: #e55a00;
    --p2-accent: #ff6b00;
    --p2-accent-dark: #e55a00;
    --p2-link: #00216d;
    --p2-font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
    --p2-radius: 6px;
}

/* ===== Product card (mt-product1 adapted) ===== */
.mt-productrow {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}
.mt-productrow > li {
    width: 25%;
    padding: 0 10px 24px;
    box-sizing: border-box;
}
@media (max-width: 991.98px) {
    .mt-productrow > li { width: 33.333%; }
}
@media (max-width: 767.98px) {
    .mt-productrow > li { width: 50%; }
}
.mt-product1 .box { position: relative; background: #fff; border: 1px solid var(--p2-line); border-radius: var(--p2-radius); overflow: hidden; }
.mt-product1 .b3 { position: relative; }
/* Website: ảnh sản phẩm 4:3 (video dùng 16:9 riêng) */
.mt-product1 img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
.mt-product1 .caption {
    position: absolute; top: 8px; left: 8px;
    background: var(--p2-gold); color: #fff;
    font-size: 0.75rem; font-weight: 700;
    padding: 2px 6px; border-radius: 3px; z-index: 2;
}
.mt-product1 .links {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: flex;
    justify-content: center;
    background: rgba(255, 255, 255, .92);
    transform: translateY(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform .25s ease, opacity .25s ease, visibility .25s;
}
/* Sóng nhỏ lặp trên mép thanh Đặt Mua — chỉ hiện cùng thanh khi hover */
.mt-product1 .links:before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -8px;
    height: 8px;
    background-repeat: repeat-x;
    background-position: center bottom;
    background-size: 75px 8px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 75 8' preserveAspectRatio='none'%3E%3Cpath fill='rgba(255,255,255,0.92)' d='M0 8 V5 Q18.75 1 37.5 5 T75 5 V8 Z'/%3E%3C/svg%3E");
    pointer-events: none;
}
.mt-product1:hover .links {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}
.mt-product1 .links li {
    margin: 0;
    padding: 0;
    list-style: none;
}
.mt-product1 .links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.85rem;
    color: var(--p2-ink);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
}
.mt-product1 .links a i,
.mt-product1 .links a .fa-solid {
    display: inline-block;
    margin: 0 8px 0 0 !important;
    padding: 0;
    font-size: 0.92em;
    line-height: 1;
    vertical-align: middle;
}
.mt-product1 .links a span {
    display: inline-block;
    margin: 0;
    padding: 0;
    vertical-align: middle;
}
.mt-product1 .links a:hover { color: var(--p2-gold); }
.mt-product1 .txt { padding: 0.65rem 0.15rem 0; text-align: left; }
.mt-product1 .title { display: block; font-size: 0.9rem; font-weight: 500; margin-bottom: 0.35rem; }
.mt-product1 .title a { color: #555; }
.mt-product1 .title a:hover { color: var(--p2-gold); }
.mt-product1 .price {
    color: var(--p2-gold);
    font-weight: 700;
    font-size: 1.05rem;
    margin-right: 0.4rem;
}
.mt-product1 del.off {
    color: #999;
    font-size: 0.85rem;
}
.truncate-h {
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

/* ===== PDP: gallery trên + sticky mua (7|5) ===== */
.p2-pdp { padding: 1.5rem 0 3rem; }
.p2-pdp-breadcrumb {
    background: #f5f5f5;
    border-bottom: 1px solid #ebebeb;
    padding: 0.65rem 0;
    margin-bottom: 1.25rem;
}
.p2-pdp-breadcrumb .breadcrumb,
.p2-pdp-breadcrumb .p2-bc {
    margin: 0;
    padding: 0;
    background: transparent;
    font-size: 0.875rem;
    line-height: 1.45;
    flex-wrap: wrap;
}
.p2-pdp-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    float: none;
    padding-right: 0.5rem;
    color: #999;
    font-weight: 400;
}
.p2-pdp-breadcrumb .breadcrumb-item {
    color: #666;
}
.p2-pdp-breadcrumb .breadcrumb-item a {
    color: #666;
    text-decoration: none !important;
    font-weight: 400;
}
.p2-pdp-breadcrumb .breadcrumb-item a:hover {
    color: var(--p2-rose, #e4416f);
}
.p2-pdp-breadcrumb .breadcrumb-item.active {
    color: #1a1a1a;
    font-weight: 600;
}

/* Gallery: ảnh lớn trên + thumbs ngang dưới — khung 4:3 */
.p2-pdp-gallery {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 10px;
    width: 100%;
}
/* order: luôn đẩy thumbs xuống dưới dù HTML cũ (cache) vẫn để thumbs trước */
.p2-thumbs-col {
    order: 2;
    position: relative;
    display: block;
    width: 100%;
    flex: 0 0 auto;
}
.p2-thumbs-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 28px;
    height: 28px;
    border: 1px solid rgba(255,255,255,.85);
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    color: #444;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0.7rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.p2-thumbs-nav.prev { left: 4px; }
.p2-thumbs-nav.next { right: 4px; }
.p2-thumbs-nav:hover {
    border-color: var(--p2-rose);
    color: var(--p2-rose);
    background: #fff;
}
.p2-pdp-thumbs {
    --p2-thumb-gap: 8px;
    --p2-thumb-visible: 6; /* desktop: vừa ~6 thumb trong khung */
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: var(--p2-thumb-gap);
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 4px 2px;
    /* Ẩn thanh trượt — cuộn bằng nút ← → */
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.p2-pdp-thumbs::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}
.p2-pdp-thumbs .thumb {
    flex: 0 0 calc((100% - (var(--p2-thumb-visible) - 1) * var(--p2-thumb-gap)) / var(--p2-thumb-visible));
    width: calc((100% - (var(--p2-thumb-visible) - 1) * var(--p2-thumb-gap)) / var(--p2-thumb-visible));
    height: auto;
    aspect-ratio: 4 / 3;
    padding: 0;
    margin: 0;
    border: none !important; /* bỏ viền đen mặc định của <button> */
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    background: #f5f5f5;
    appearance: none !important;
    -webkit-appearance: none !important;
    outline: none !important;
    box-shadow: none !important;
}
.p2-pdp-thumbs .thumb:focus,
.p2-pdp-thumbs .thumb:focus-visible,
.p2-pdp-thumbs .thumb:active {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}
.p2-pdp-thumbs .thumb:hover {
    border: none !important;
    box-shadow: 0 0 0 2px #f2a0b8 !important;
}
/* Active: chỉ ring hồng brand — không dùng border (tránh đen UA) */
    .p2-pdp-thumbs .thumb.active,
    .p2-pdp-thumbs .thumb.active:hover,
    .p2-pdp-thumbs .thumb.active:focus {
        border: none !important;
        outline: none !important;
        box-shadow: 0 0 0 2px #e4416f57 !important ;
    }
.p2-pdp-thumbs .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.p2-pdp-thumbs .thumb img.yt-thumb-fix {
    transform: scale(1.28);
    object-fit: cover;
}
.p2-pdp-thumbs .thumb-play {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,.28); color: #fff; font-size: 1.15rem;
    pointer-events: none;
}

.p2-pdp-main {
    order: 1;
    position: relative;
    width: 100%;
    background: #fff;
    border: none;
    border-radius: 12px;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    box-shadow: none;
    outline: none;
}
.p2-pdp-main:not(.is-video) { background: #fff; }
.p2-pdp-main.is-video { background: #000; }
.p2-main-media {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.32s ease, transform 0.32s ease;
    will-change: opacity, transform;
    background: transparent;
}
.p2-main-media.p2-media-hide {
    opacity: 0;
    transform: scale(1.02);
}
/* Ảnh / MP4: full khung 4:3 — ảnh không nền đen */
.p2-main-media img {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    object-fit: cover;
    object-position: center;
    background: transparent;
}
.p2-main-media video {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    object-fit: cover;
    object-position: center;
    background: #000;
}
/* YouTube ngang 16:9 → cover khung 4:3 (lấp đầy, crop 2 bên nhẹ) */
.p2-pdp-main.is-video:not(.is-tiktok) .p2-main-media iframe {
    position: absolute;
    top: 0;
    left: 50%;
    height: 100%;
    width: 133.333%; /* (16/9) / (4/3) */
    max-width: none;
    border: 0;
    display: block;
    transform: translateX(-50%);
    background: #000;
}
/* TikTok / Shorts 9:16 → cover khung 4:3 (lấp đầy, crop trên/dưới) */
.p2-pdp-main.is-tiktok .p2-main-media iframe {
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 237.037%; /* (16/9) / (3/4) = cover 9:16 trong 4:3 */
    max-width: none;
    border: 0;
    display: block;
    transform: translateY(-50%);
    background: #000;
}
.p2-main-media iframe {
    border: 0;
    display: block;
}
.p2-main-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,.12);
    opacity: 0;
    transition: opacity .2s;
}
.p2-pdp-main:hover .p2-main-nav { opacity: 1; }
.p2-main-nav.prev { left: 10px; }
.p2-main-nav.next { right: 10px; }
/* Nút "Xem to" ảnh — đồng bộ kiểu ad-expand-btn (tròn, chỉ icon) */
.p2-pdp-main .p2-main-zoom.ad-expand-btn,
.p2-main-zoom {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 3;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(17, 17, 17, 0.72);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
    cursor: pointer;
    transform: none;
}
.p2-pdp-main .p2-main-zoom.ad-expand-btn:hover,
.p2-main-zoom:hover {
    background: var(--p2-rose, #e4416f);
    transform: none;
}
.p2-main-zoom .ad-expand-btn__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 0.95rem;
}

/* PDP video toolbar — đồng bộ nút phóng to + loa với tin tức / ola-ads */
.p2-pdp-main .ola-ad-video--pdp {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    border-radius: 0;
}
.p2-pdp-main .ola-ad-video--pdp > .ola-ad-video__frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
    background: #000;
}
.p2-pdp-main.is-video:not(.is-tiktok) .ola-ad-video--pdp > .ola-ad-video__frame iframe.ad-yt-player {
    position: absolute;
    top: 0;
    left: 50%;
    height: 100%;
    width: 133.333%;
    max-width: none;
    border: 0;
    transform: translateX(-50%);
    background: #000;
}
.p2-pdp-main.is-tiktok .ola-ad-video--pdp > .ola-ad-video__frame iframe.ad-yt-player {
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 237.037%;
    max-width: none;
    border: 0;
    transform: translateY(-50%);
    background: #000;
}
.p2-pdp-main .ola-ad-video--pdp .ola-ad-video__mp4 {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #000;
}
.p2-pdp-main .ola-ad-video--pdp > .ola-ad-video__toolbar,
.p2-pdp-main .p2-pdp-video-toolbar {
    position: absolute !important;
    inset: auto 10px 10px auto !important;
    top: auto !important;
    left: auto !important;
    bottom: 10px !important;
    right: 10px !important;
    width: auto !important;
    height: auto !important;
    z-index: 6 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: auto !important;
    transform: none !important;
}
.p2-pdp-main .ola-ad-video--pdp .ola-ad-video__toolbar-actions {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    pointer-events: auto !important;
}
.p2-pdp-main .ola-ad-video--pdp .ad-expand-btn,
.p2-pdp-main .ola-ad-video--pdp .sound-toggle-btn {
    position: static !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    border-radius: 50% !important;
    background: rgba(17, 17, 17, 0.72) !important;
    color: #fff !important;
    border: 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
    transform: none !important;
}
.p2-pdp-main .ola-ad-video--pdp .ad-expand-btn:hover,
.p2-pdp-main .ola-ad-video--pdp .sound-toggle-btn:hover:not(.is-toggling) {
    background: var(--p2-rose, #e4416f) !important;
    transform: none !important;
}
.p2-pdp-main .ola-ad-video--pdp .ad-expand-btn__icon,
.p2-pdp-main .ola-ad-video--pdp .sound-toggle-btn__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 0.95rem;
}
.p2-pdp-main.is-video .p2-main-zoom { display: none !important; }

@media (max-width: 991.98px) {
    .p2-pdp-main {
        aspect-ratio: 4 / 3;
        width: 100%;
        max-height: none;
        margin-left: auto;
        margin-right: auto;
    }
    .p2-main-nav { opacity: 1; }
}

.p2-pdp-intro { max-width: 52rem; }
.p2-pdp-title {
    font-family: var(--p2-font);
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
    font-weight: 700;
    color: var(--p2-link);
    margin-bottom: 0.5rem;
    line-height: 1.35;
}
.p2-pdp-meta { font-size: 0.98rem; color: var(--p2-muted); }
.p2-pdp-meta strong { color: var(--p2-rose); font-weight: 600; }
.p2-sku-label { font-size: 15px; color: #655858; margin-right: 0.2rem; }

/* ShortDescription / Description / ContentBlocks — cùng Inter + cùng cỡ */
.p2-body-text,
.short-desc-box,
.p2-html-content,
.p2-html-content p,
.p2-html-content li,
.p2-html-content td,
.p2-html-content span,
.p2-desc-note,
.block-text,
.spec-clean {
    font-family: var(--p2-font) !important;
    font-size: 1.05rem !important;
    line-height: 1.7 !important;
    font-weight: 400;
}
.short-desc-box { color: #555; }
.p2-html-content { color: #444; }

/* Sticky buy card */
.p2-pdp-body > [class*="col-"] {
    display: flex;
    flex-direction: column;
}
.p2-pdp-sticky {
    height: max-content;
    margin-bottom: 1rem;
    width: 100%;
}
@media (min-width: 992px) {
    .p2-pdp-sticky {
        position: -webkit-sticky;
        position: sticky;
        top: 88px;
        z-index: 15;
        align-self: flex-start;
    }
}
.p2-buy-card {
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 14px;
    padding: 1.15rem 1.2rem 1.25rem;
    box-shadow: 0 4px 18px rgba(40, 10, 25, 0.05);
}

/* Mã + tồn kho — gọn, 1 hàng */
.p2-buy-card .p2-pdp-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 0.75rem;
    margin: 0 0 0.85rem;
    padding: 0;
    font-size: 0.92rem;
    line-height: 1.35;
}
.p2-sku-line {
    display: inline-flex;
    align-items: baseline;
    gap: 0.35rem;
    min-width: 0;
}
.p2-buy-card .p2-sku-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #888;
    margin: 0;
}
.p2-buy-card .p2-sku-val,
.p2-buy-card .p2-pdp-meta strong.p2-sku-val {
    font-size: 1rem;
    font-weight: 700;
    color: var(--p2-rose, #e4416f);
    letter-spacing: 0.02em;
}
.p2-stock-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.65rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}
.p2-stock-badge.is-in {
    background: #1db954;
    color: #fff;
}
.p2-stock-badge.is-out {
    background: #9aa0a6;
    color: #fff;
}

/* Khối giá */
.p2-price-block {
    margin: 0 0 1rem;
    padding: 0 0 0.15rem;
}
.p2-price-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.55rem;
    margin: 0 0 0.35rem;
}
.p2-price-sale {
    font-size: clamp(1.55rem, 2.5vw, 1.9rem);
    font-weight: 800;
    color: var(--p2-rose, #e4416f);
    line-height: 1.15;
    letter-spacing: -0.02em;
}
.p2-price-old {
    font-size: 0.95rem;
    color: #a0a0a0;
    text-decoration: line-through;
    font-weight: 500;
}
.p2-price-pct {
    display: inline-flex;
    align-items: center;
    background: var(--p2-rose, #e4416f);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    line-height: 1.2;
}
.p2-price-save {
    font-size: 0.88rem;
    color: #888;
    margin: 0 0 0.55rem;
    font-weight: 500;
}
.p2-price-note {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #999;
}

.p2-buy-box {
    background: #f6f6f6;
    border: 1px solid #ececec;
    border-radius: 10px;
    padding: 0.85rem 0.95rem 0.95rem;
    margin-bottom: 0.85rem;
}
.p2-buy-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}
.p2-buy-label {
    display: block;
    font-size: 0.88rem;
    color: #777;
    font-weight: 600;
    margin-bottom: 0.3rem;
}
.p2-qty-stepper {
    display: inline-flex;
    align-items: stretch;
    gap: 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.p2-qty-btn {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 0;
    background: #f4f4f4;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    color: #444;
    padding: 0;
}
.p2-qty-btn:hover { background: #ececec; color: #111; }
.p2-qty-val {
    width: 52px;
    height: 36px;
    text-align: center;
    border: 0;
    border-left: 1px solid #e8e8e8;
    border-right: 1px solid #e8e8e8;
    border-radius: 0;
    background: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    color: #222;
}
.p2-subtotal-wrap { text-align: right; }
.p2-subtotal {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1a1a1a;
}
.p2-buy-hint {
    font-size: 0.8rem;
    color: #999;
    text-align: left;
    margin: 0.4rem 0 0.7rem;
    font-style: normal;
}
.p2-buy-actions {
    display: flex;
    flex-direction: row;
    gap: 0.55rem;
    margin-bottom: 0;
}
.btn-p2-buy,
.btn-p2-cart {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    margin-bottom: 0;
    border-radius: 10px !important;
}
.btn-p2-buy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 46px;
    padding: 0.65rem 0.75rem;
    background: var(--p2-rose, #ea4575) !important;
    border: 0 !important;
    color: #fff !important;
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.btn-p2-buy:hover { filter: brightness(0.95); color: #fff !important; }
.btn-p2-cart {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 46px;
    padding: 0.65rem 0.75rem;
    background: #fff !important;
    border: 1px solid #d0d0d0 !important;
    color: #333 !important;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.btn-p2-cart:hover {
    background: #f7f7f7 !important;
    border-color: #bbb !important;
    color: #111 !important;
}
.btn-p2-buy:disabled,
.btn-p2-buy.disabled {
    opacity: .55;
    pointer-events: none;
}

.p2-intro-note {
    background: #faf6f8;
    border: 1px dashed #e5c9d4;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    color: #5a3a45;
}

/* Call / Zalo — ghost, không cạnh tranh CTA */
.p2-contact-row {
    display: flex;
    gap: 0.5rem;
    margin: 0.75rem 0 0.65rem;
}
.p2-contact-btn {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 40px;
    padding: 0.4rem 0.65rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none !important;
    box-shadow: none;
    transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.p2-contact-btn i { font-size: 0.9rem; opacity: 0.75; }
.p2-contact-call,
.p2-contact-zalo {
    background: #fff;
    color: #555 !important;
    border: 1px solid #e5e5e5;
}
.p2-contact-call:hover,
.p2-contact-zalo:hover {
    background: #f8f8f8;
    border-color: #d0d0d0;
    color: #222 !important;
    transform: none;
}

/* Hotline — CTA cân bằng: số nổi, pulse nhẹ, không spam */
.p2-hotline-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    padding: 0.8rem 0.95rem;
    border-radius: 10px;
    background: linear-gradient(135deg, #fff7fa 0%, #ffffff 55%, #fff5f8 100%);
    border: 1px solid rgba(228, 65, 111, 0.28);
    box-shadow: 0 0 0 0 rgba(228, 65, 111, 0.12);
    animation: p2HotlineBreathe 2.8s ease-in-out infinite;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: default;
}
.p2-hotline-banner:hover {
    transform: translateY(-1px);
    border-color: rgba(228, 65, 111, 0.45);
    box-shadow: 0 6px 18px rgba(228, 65, 111, 0.14);
}
@keyframes p2HotlineBreathe {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(228, 65, 111, 0.1), 0 2px 8px rgba(228, 65, 111, 0.06);
        border-color: rgba(228, 65, 111, 0.28);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(228, 65, 111, 0.08), 0 4px 14px rgba(228, 65, 111, 0.12);
        border-color: rgba(228, 65, 111, 0.4);
    }
}
.p2-hotline-ico {
    flex: 0 0 auto;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 50%;
    background: rgba(228, 65, 111, 0.1);
    color: var(--p2-rose, #e4416f);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    animation: p2HotlineHeartbeat 1.6s ease-in-out infinite;
}
@keyframes p2HotlineHeartbeat {
    0%, 100% { transform: scale(1); }
    14% { transform: scale(1.12); }
    28% { transform: scale(1); }
    42% { transform: scale(1.08); }
    56% { transform: scale(1); }
}
.p2-hotline-text { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.p2-hotline-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #8a6a73;
    text-transform: none;
    letter-spacing: 0;
}
.p2-hotline-nums {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1.25;
}
.p2-hotline-nums a {
    color: var(--p2-rose, #e4416f) !important;
    text-decoration: none !important;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
.p2-hotline-nums a:hover,
.p2-hotline-nums a:focus {
    color: var(--p2-rose-dark, #c92f5c) !important;
    text-decoration: underline !important;
}
.p2-hotline-sep { color: rgba(228, 65, 111, 0.45); font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
    .p2-hotline-banner,
    .p2-hotline-ico {
        animation: none !important;
    }
    .p2-hotline-banner:hover {
        transform: none;
    }
}

.p2-hotline-line {
    font-size: 0.9rem;
    color: var(--p2-accent-dark, #c92f5c);
    font-weight: 600;
    margin-bottom: 0.85rem;
}
.p2-hotline-line a { color: var(--p2-accent, #ea4575); font-weight: 700; }

.p2-trust-box {
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 0.15rem 0.9rem;
    background: #fff;
}
.p2-trust-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0e6ea;
}
.p2-trust-item:last-child { border-bottom: 0; }
.p2-trust-ico {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff0f5;
    color: var(--p2-rose, #ea4575);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}
.p2-trust-title {
    font-weight: 800;
    color: var(--p2-rose, #ea4575);
    font-size: 1rem;
    margin-bottom: 0.1rem;
}
.p2-trust-desc {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.45;
}

.p2-pdp-tabs .nav-tabs { border-bottom: 1px solid var(--p2-line); }
.p2-pdp-tabs .nav-link {
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    border: 0;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    font-size: 0.9rem;
}
.p2-pdp-tabs .nav-link.active {
    color: var(--p2-ink);
    background: transparent;
    border-bottom-color: var(--p2-rose, #ea4575);
}
.p2-pdp-tab-content {
    background: transparent;
    border: 0 !important;
    padding: 0.85rem 0 0 !important;
    margin: 0;
}

.p2-clamp { position: relative; }
.p2-clamp.is-clamped .p2-clamp__body {
    max-height: var(--p2-clamp-h, 960px);
    overflow: hidden;
}
.p2-clamp.is-clamped::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 2.5rem;
    height: 72px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 85%);
    pointer-events: none;
}
.p2-clamp.is-open .p2-clamp__body { max-height: none; }
.p2-clamp.is-open::after { display: none; }
.p2-clamp__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin: 1rem auto 0;
    padding: 0.55rem 1.35rem;
    border: 1.5px solid var(--p2-rose, #e4416f);
    border-radius: 999px;
    background: #fff;
    color: var(--p2-rose, #e4416f);
    font-family: var(--p2-font);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(228, 65, 111, 0.12);
    transition: background .15s ease, color .15s ease, transform .15s ease;
}
.p2-clamp { text-align: left; }
.p2-clamp > .p2-clamp__btn {
    display: flex;
    margin-left: auto;
    margin-right: auto;
}
.p2-clamp__btn:hover {
    background: var(--p2-rose, #e4416f);
    color: #fff;
    transform: translateY(-1px);
}
.p2-clamp.is-open .p2-clamp__more { display: none; }
.p2-clamp:not(.is-open) .p2-clamp__less { display: none; }

html.p2-fancybox-open .btn-back-to-top,
html.p2-fancybox-open .zalo-chat-widget,
html.p2-fancybox-open .fab-group {
    visibility: hidden !important;
    pointer-events: none !important;
}

#custom-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.9);
    z-index: 9999; display: none; align-items: center; justify-content: center;
}
#custom-overlay.open { display: flex; }
#custom-overlay .overlay-close {
    position: absolute; top: 16px; right: 20px; color: #fff; font-size: 2.5rem; cursor: pointer;
}
#overlay-img { max-width: 90%; max-height: 90vh; object-fit: contain; }
.overlay-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    color: #fff; font-size: 1.75rem; cursor: pointer;
    width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.12); border-radius: 50%;
}
.nav-prev { left: 16px; } .nav-next { right: 16px; }

.related-slider .txt .title {
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 600;
}
.related-slider .price {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--p2-ink);
}
.related-slider .off {
    font-size: 0.9rem;
}
.related-slider {
    display: flex; gap: 1rem; overflow-x: auto; scroll-behavior: smooth;
    scrollbar-width: none; padding: 0.5rem 0.25rem;
}
.related-slider::-webkit-scrollbar { display: none; }
.slider-item { flex: 0 0 calc(25% - 0.75rem); min-width: 200px; }

.p2-related-section {
    position: relative;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--p2-line);
}
/* Dùng đúng .p2-ftabs__nav / .p2-ftabs__pill từ shop-p2-layout (trang chủ) */
.p2-related-section.p2-ftabs {
    background: transparent;
    padding-bottom: 0.5rem;
}
.p2-related-section .p2-ftabs__pane {
    text-align: left;
}
.p2-related {
    position: relative;
    padding: 0;
}
/* Nút ← →: dùng đúng .slick-prev/.slick-next của trang chủ (shop-p2-layout) */
.p2-related .slick-prev,
.p2-related .slick-next {
    top: var(--p2-arrow-y, 50%);
    width: 44px;
    height: 44px;
    /* luôn trong khung như home ≤1349px — có shadow, nền trắng mờ */
    background: rgba(255,255,255,.94);
    border-color: rgba(0,0,0,.06);
    box-shadow: 0 3px 12px rgba(0,0,0,.16);
}
.p2-related .slick-prev { left: 10px; }
.p2-related .slick-next { right: 10px; }

@media (max-width: 991.98px) {
    .p2-pdp-sticky { position: static; }
    .p2-pdp-thumbs { --p2-thumb-visible: 4; }
    .p2-related .slick-prev,
    .p2-related .slick-next {
        width: 40px;
        height: 40px;
    }
}
@media (max-width: 768px) {
    .slider-item { flex: 0 0 70%; }
    .p2-pdp-thumbs { --p2-thumb-visible: 3; }
    .p2-buy-actions { gap: 0.45rem; }
    .btn-p2-buy, .btn-p2-cart { font-size: 0.82rem; min-height: 44px; padding: 0.55rem 0.45rem; }
    .p2-contact-btn { min-height: 38px; font-size: 0.82rem; }
}

/* PDP tabs + mô tả kiểu Tour */
.p2-pdp-tabs .nav-tabs .nav-link {
    font-size: 0.98rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.7rem 1rem;
}
.p2-pdp-tabs .tab-content {
    font-family: var(--p2-font);
    font-size: 1.05rem;
    line-height: 1.7;
    border: 0;
    padding: 0;
    background: transparent;
}
.p2-html-content p { margin-bottom: 0.85rem; }
.p2-html-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
    margin: 0.75rem auto;
    cursor: zoom-in;
}
/* Admin chọn H1–H6: giới hạn cỡ để nội dung vẫn cân đối */
.p2-html-content h1,
.p2-html-content h2,
.p2-html-content h3,
.p2-html-content h4,
.p2-html-content h5,
.p2-html-content h6,
.spec-clean h1,
.spec-clean h2,
.spec-clean h3,
.spec-clean h4,
.spec-clean h5,
.spec-clean h6,
.block-text h1,
.block-text h2,
.block-text h3,
.block-text h4,
.block-text h5,
.block-text h6 {
    font-family: var(--p2-font) !important;
    color: var(--p2-ink);
    font-weight: 700 !important;
    margin: 1rem 0 0.5rem;
    line-height: 1.4 !important;
}
.p2-html-content h1, .spec-clean h1, .block-text h1 { font-size: 1.28rem !important; }
.p2-html-content h2, .spec-clean h2, .block-text h2 { font-size: 1.2rem !important; }
.p2-html-content h3, .spec-clean h3, .block-text h3 { font-size: 1.12rem !important; }
.p2-html-content h4, .spec-clean h4, .block-text h4 { font-size: 1.08rem !important; }
.p2-html-content h5, .spec-clean h5, .block-text h5,
.p2-html-content h6, .spec-clean h6, .block-text h6 { font-size: 1.05rem !important; }
.p2-html-content strong,
.p2-html-content b,
.spec-clean strong,
.spec-clean b {
    font-weight: 700;
    font-size: inherit !important;
}
.p2-html-content ul,
.p2-html-content ol { padding-left: 1.25rem; margin-bottom: 0.85rem; }
.p2-html-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.75rem 0;
    font-size: 1.05rem !important;
}
.p2-html-content table th,
.p2-html-content table td {
    border: 1px solid #e8e8e8;
    padding: 0.5rem 0.65rem;
    vertical-align: top;
    font-size: inherit !important;
}
.p2-desc-hero img {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: 12px;
}
.p2-desc-note {
    font-style: italic;
    color: #777;
    font-size: 0.95rem;
}
.p2-desc-gallery {
    display: grid;
    gap: 8px;
}
.p2-gal-1 { grid-template-columns: 1fr; }
.p2-gal-2 { grid-template-columns: 1fr 1fr; }
.p2-gal-3 { grid-template-columns: 1.2fr 1fr; grid-template-rows: 1fr 1fr; }
.p2-gal-3 .p2-gal-item:first-child { grid-row: 1 / span 2; }
.p2-gal-4 { grid-template-columns: 1fr 1fr; }
.p2-gal-5 { grid-template-columns: repeat(6, 1fr); }
.p2-gal-5 .p2-gal-item:nth-child(1) { grid-column: span 3; }
.p2-gal-5 .p2-gal-item:nth-child(2) { grid-column: span 3; }
.p2-gal-5 .p2-gal-item:nth-child(n+3) { grid-column: span 2; }
.p2-gal-item {
    display: block;
    overflow: hidden;
    border-radius: 10px;
    background: #f3f3f3;
}
.p2-gal-item img {
    width: 100%;
    height: 100%;
    min-height: 140px;
    object-fit: cover;
    display: block;
    transition: transform .25s ease;
}
.p2-gal-item:hover img { transform: scale(1.04); }

.p2-intro-heading {
    font-family: var(--p2-font) !important;
    font-size: 1.12rem !important;
    font-weight: 800;
    color: var(--p2-ink);
    margin: 0 0 0.75rem;
    line-height: 1.4;
}
.p2-intro-row {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 0.65rem;
    font-family: var(--p2-font) !important;
    font-size: 1.05rem !important;
    line-height: 1.7 !important;
}
.p2-intro-row i {
    color: var(--p2-rose, #e4416f);
    width: 1.15rem;
    text-align: center;
    margin-top: 0.2rem;
}
.p2-intro-row a {
    color: var(--p2-rose, #e4416f);
    font-weight: 700;
    text-decoration: none;
}
.p2-intro-row a:hover { text-decoration: underline; }

.p2-ftabs__nav {
    display: inline-flex;
    max-width: 100%;
    margin: 0 auto 22px;
    padding: 5px;
    border-radius: 999px;
    background: #eceef3;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

    .p2-ftabs__nav::-webkit-scrollbar {
        display: none;
    }

.p2-ftabs__pill {
    flex: 0 0 auto;
    border: 0;
    padding: 10px 26px;
    border-radius: 999px;
    background: transparent;
    color: #7b8494;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .3px;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

    .p2-ftabs__pill:hover {
        color: #ea4575;
    }

    .p2-ftabs__pill.is-active {
        background: #fff;
        color: #ea4575;
        box-shadow: 0 4px 12px rgba(23, 32, 51, .12);
    }

    .p2-ftabs__pill:focus-visible {
        outline: 2px solid #ea4575;
        outline-offset: 2px;
    }

.p2-ftabs__pane {
    display: none;
}

    .p2-ftabs__pane.is-active {
        display: block;
    }

/* Màn hẹp: giữ một hàng và cho cuộn ngang. Xếp pill xuống dòng sẽ cao hơn cả
   phần chiều cao vừa tiết kiệm được, nên chỉ làm mờ mép phải để báo còn tab. */
@media (max-width: 767.98px) {
    /* Điện thoại: ba nút chia đều bề ngang, chữ tự xuống dòng. Trước đây thanh
       này phải cuộn ngang nên tab thứ ba luôn bị cắt mất một nửa. */
    .p2-ftabs__nav {
        display: flex;
        width: 100%;
        margin-bottom: 16px;
        padding: 4px;
        border-radius: 16px;
        overflow: visible;
    }

    .p2-ftabs__pill {
        flex: 1 1 0;
        min-width: 0;
        padding: 8px 6px;
        border-radius: 13px;
        font-size: 11px;
        letter-spacing: 0;
        line-height: 1.3;
        white-space: normal;
    }
}
.slick-prev,
.slick-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #d5d5d5;
    border-radius: 50%;
    background: #fff;
    color: #a8a8a8;
    font-size: 0;
    cursor: pointer;
    transition: all .25s linear;
    z-index: 5;
}

    .slick-prev:hover,
    .slick-next:hover {
        border-color: var(--p2-accent);
        color: var(--p2-accent);
    }

    .slick-prev:before,
    .slick-next:before {
        content: "";
        display: block;
        width: 9px;
        height: 9px;
        border-top: 2px solid currentColor;
        border-right: 2px solid currentColor;
    }

    .slick-prev:before {
        transform: rotate(-135deg);
        margin-left: 3px;
    }

    .slick-next:before {
        transform: rotate(45deg);
        margin-right: 3px;
    }
.p2-outstock-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 4;
    padding: 2px 8px;
    border-radius: 3px;
    background: #6c757d;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

/* ===================== FOOTER ===================== */
#mt-footer {

.p2-pdp-sticky { top: 76px; }
@media (min-width: 992px) { .p2-pdp-sticky { top: 76px; } }
