@charset "utf-8";
/* =========================================================
   product-detail.css
   สไตล์เฉพาะหน้ารายละเอียดสินค้า (?p=pd)
   ใช้คู่กับ product-modern.css (การ์ดสินค้าอื่น ๆ ของเรา)
   ========================================================= */

.pd {
    padding: 26px 0 0;
}

/* ---------------------------------------------------------
   breadcrumb
   --------------------------------------------------------- */
.pd-crumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--pm-muted);
}

.pd-crumb a {
    color: #40454f !important;
    text-decoration: none !important;
}

.pd-crumb a:hover {
    color: var(--pm-red) !important;
    text-decoration: underline !important;
}

.pd-crumb i {
    font-size: 10px;
    opacity: .6;
}

.pd-crumb .pd-crumb-now {
    max-width: 340px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--pm-ink);
}

/* ---------------------------------------------------------
   ส่วนบน : รูป + ข้อมูล
   --------------------------------------------------------- */
.pd-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

.pd-media {
    position: sticky;
    top: 20px;
}

.pd-figure {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    border: 1px solid var(--pm-line);
    border-radius: 20px;
    background: #fff;
    overflow: hidden;
    cursor: zoom-in;
}

@supports not (aspect-ratio: 1 / 1) {
    .pd-figure {
        height: 0;
        padding-top: 100%;
    }
}

.pd-figure img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
    transition: transform .4s ease;
}

.pd-figure:hover img {
    transform: scale(1.03);
}

.pd-zoom {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(22, 24, 29, .72);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 13px;
}

.pd-thumbs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.pd-thumb {
    width: 78px;
    height: 78px;
    padding: 0;
    border: 2px solid var(--pm-line);
    border-radius: 12px;
    background: #fff no-repeat center center;
    background-size: cover;
    cursor: pointer;
    transition: border-color .2s ease, transform .2s ease;
}

.pd-thumb:hover {
    transform: translateY(-2px);
}

.pd-thumb.is-active {
    border-color: var(--pm-red);
}

/* ---------------------------------------------------------
   ข้อมูลสินค้า
   --------------------------------------------------------- */
.pd-cate {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 15px;
    border-radius: 999px;
    background: #eef2f8;
    color: var(--pm-navy) !important;
    font-size: 14px;
    text-decoration: none !important;
    transition: all .2s ease;
}

.pd-cate:hover {
    background: linear-gradient(120deg, var(--pm-navy-2) 0%, var(--pm-navy) 100%);
    color: #fff !important;
}

.pd-title {
    margin: 14px 0 0;
    font-size: clamp(24px, 2.6vw, 33px);
    line-height: 1.4;
    font-weight: 600;
    color: var(--pm-ink);
}

.pd-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 12px;
    font-size: 14px;
    color: var(--pm-muted);
}

.pd-meta i {
    margin-right: 5px;
    color: #9aa1ad;
}

.pd-price-box {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 0;
    padding: 18px 22px;
    border: 1px solid #ffdcd9;
    border-radius: 16px;
    background: linear-gradient(120deg, #fff6f5 0%, #fff 70%);
}

.pd-price-label {
    font-size: 15px;
    color: var(--pm-muted);
}

.pd-price {
    font-size: 34px;
    line-height: 1.3;
    font-weight: 600;
    color: var(--pm-red);
}

.pd-price.pd-ask {
    font-size: 24px;
}

.pd-price-note {
    width: 100%;
    font-size: 13.5px;
    color: var(--pm-muted) !important;
}

.pd-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 18px;
}

.pd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    flex: 1 1 190px;
    height: 54px;
    padding: 0 22px;
    border-radius: 999px;
    font-size: 17px;
    text-decoration: none !important;
    transition: transform .2s ease, box-shadow .2s ease;
}

.pd-btn:hover {
    transform: translateY(-2px);
}

.pd-btn-call {
    background: linear-gradient(120deg, #ff2d18 0%, #d7000b 100%);
    color: #fff !important;
    box-shadow: 0 10px 24px rgba(215, 0, 11, .34);
}

.pd-btn-line {
    background: #06c755;
    color: #fff !important;
    box-shadow: 0 10px 24px rgba(6, 199, 85, .3);
}

.pd-btn-fb {
    background: #0084ff;
    color: #fff !important;
    box-shadow: 0 10px 24px rgba(0, 132, 255, .3);
}

.pd-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.pd-badges li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border: 1px solid var(--pm-line);
    border-radius: 999px;
    background: #fff;
    font-size: 14px;
    color: #40454f;
}

.pd-badges i {
    color: var(--pm-red);
}

/* แชร์ */
.pd-share {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px dashed #e3e7ee;
    font-size: 14.5px;
    color: var(--pm-muted);
}

.pd-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--pm-line);
    border-radius: 50%;
    background: #fff;
    color: #40454f !important;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none !important;
    transition: all .2s ease;
}

.pd-share-btn:hover {
    transform: translateY(-2px);
    border-color: transparent;
    color: #fff !important;
}

.pd-share-btn.is-line:hover { background: #06c755; }
.pd-share-btn.is-fb:hover   { background: #1877f2; }
.pd-share-btn.is-copy:hover { background: var(--pm-navy); }

.pd-copied {
    font-size: 13.5px;
    color: #1f7a3d;
}

/* ---------------------------------------------------------
   รายละเอียดสินค้า (เนื้อหาจาก editor)
   --------------------------------------------------------- */
.pd-detail {
    margin-top: 40px;
    padding: 26px 28px;
    border: 1px solid var(--pm-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--pm-shadow);
}

.pd-detail-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--pm-line);
    font-size: 20px;
    font-weight: 600;
    color: var(--pm-ink);
}

.pd-detail-title i {
    color: var(--pm-red);
}

.pd-body {
    font-size: 16.5px;
    line-height: 1.85;
    color: #2b3038;
    overflow-x: auto;
}

.pd-body p {
    margin: 0 0 12px !important;
    color: #2b3038 !important;
    line-height: 1.85 !important;
}

.pd-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.pd-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
    font-size: 15px;
}

.pd-body table td,
.pd-body table th {
    padding: 9px 12px;
    border: 1px solid #e6e9ef;
}

.pd-body table tr:nth-child(even) td {
    background: #fafbfc;
}

.pd-body ul,
.pd-body ol {
    padding-left: 22px;
    margin: 0 0 12px;
}

/* ---------------------------------------------------------
   สินค้าอื่น ๆ
   --------------------------------------------------------- */
.pd-related {
    margin-top: 46px;
    padding-bottom: 40px;
}

/* ---------------------------------------------------------
   แถบปุ่มติดมือถือ
   --------------------------------------------------------- */
.pd-bar {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    gap: 10px;
    padding: 10px 84px 10px 12px;
    background: rgba(255, 255, 255, .96);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--pm-line);
    box-shadow: 0 -6px 20px rgba(16, 24, 40, .1);
}

.pd-bar a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1 1 0;
    height: 46px;
    border-radius: 999px;
    font-size: 16px;
    text-decoration: none !important;
}

.pd-bar .pd-bar-price {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: 4px;
    font-size: 18px;
    font-weight: 600;
    color: var(--pm-red);
    white-space: nowrap;
}

/* ---------------------------------------------------------
   LIGHTBOX
   --------------------------------------------------------- */
.pd-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(8, 10, 14, .92);
}

.pd-lightbox.is-open {
    display: flex;
}

.pd-lightbox img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
    object-fit: contain;
}

.pd-lightbox-close,
.pd-lightbox-nav {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: background .2s ease;
}

.pd-lightbox-close:hover,
.pd-lightbox-nav:hover {
    background: rgba(255, 255, 255, .3);
}

.pd-lightbox-close { top: 20px; right: 20px; }
.pd-lightbox-prev  { left: 20px; top: 50%; margin-top: -23px; }
.pd-lightbox-next  { right: 20px; top: 50%; margin-top: -23px; }

.pd-lightbox-count {
    position: absolute;
    left: 50%;
    bottom: 22px;
    transform: translateX(-50%);
    padding: 6px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: 14px;
}

/* ---------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------- */
@media (max-width: 991px) {
    .pd-top {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .pd-media {
        position: static;
    }
}

@media (max-width: 767px) {
    .pd {
        padding-top: 16px;
    }

    .pd-detail {
        margin-top: 28px;
        padding: 20px 16px;
    }

    .pd-price-box {
        padding: 14px 16px;
    }

    .pd-price {
        font-size: 29px;
    }

    .pd-btn {
        height: 50px;
        font-size: 16px;
    }

    .pd-thumb {
        width: 64px;
        height: 64px;
    }

    .pd-bar {
        display: flex;
    }

    .pd-related {
        padding-bottom: 86px;   /* เผื่อที่ให้แถบปุ่มด้านล่าง */
    }

    .pd-lightbox-prev,
    .pd-lightbox-next {
        width: 40px;
        height: 40px;
    }
}
