/* ============ Product Detail Page – Layout & Responsive ============ */
.pd-page { padding: 30px 0 50px; }
.pd-page .pd-wrap {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    padding: 28px;
}

/* ---- Image gallery ---- */
.pd-gallery { position: sticky; top: 90px; }
.pd-gallery .pd-main-slider {
    background: #f7f7f9;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}
.pd-gallery .pd-main-slider #sync1 .item {
    background: #f7f7f9;
    margin: 0;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 460px;
}
.pd-gallery .pd-main-slider #sync1 .item img {
    max-height: 100%;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.35s ease;
    cursor: zoom-in;
}
.pd-gallery .pd-main-slider #sync1 .item:hover img {
    transform: scale(1.04);
}

/* ---- Image preview lightbox ---- */
.pd-img-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 1060;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.pd-img-lightbox.is-open { display: flex; }
.pd-img-lightbox .pd-img-box {
    position: relative;
    width: min(600px, 90vw);
    max-height: 85vh;
}
.pd-img-lightbox .pd-img-scroll {
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}
.pd-img-lightbox .pd-img-full {
    display: block;
    width: 100%;
    height: auto;
}
.pd-img-lightbox .pd-img-close {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    z-index: 2;
}
.pd-img-lightbox .pd-img-close .material-symbols-outlined { font-size: 22px; color: #222; }
.pd-img-lightbox .pd-img-close:hover { background: #0f3cc9; }
.pd-img-lightbox .pd-img-close:hover .material-symbols-outlined { color: #fff; }
@media (max-width: 600px) {
    .pd-img-lightbox { padding: 10px; }
    .pd-img-lightbox .pd-img-box { width: 95vw; max-height: 88vh; }
    .pd-img-lightbox .pd-img-scroll { max-height: 88vh; }
    .pd-img-lightbox .pd-img-close { top: 6px; right: 6px; }
}
.pd-gallery #sync1.owl-theme .owl-next,
.pd-gallery #sync1.owl-theme .owl-prev {
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 50% !important;
    width: 42px !important;
    height: 42px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin-top: -21px !important;
    opacity: 0.9;
}
.pd-gallery #sync1.owl-theme .owl-next:hover,
.pd-gallery #sync1.owl-theme .owl-prev:hover {
    background: #0f3cc9 !important;
    opacity: 1;
}
.pd-gallery #sync1.owl-theme .owl-next:hover svg path,
.pd-gallery #sync1.owl-theme .owl-prev:hover svg path {
    stroke: #fff !important;
}
.pd-gallery #sync1 svg {
    width: 14px !important;
}
.pd-gallery .pd-thumbs { margin-top: 14px; }
.pd-gallery .pd-thumbs #sync2 .item {
    background: #f7f7f9;
    margin: 4px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pd-gallery .pd-thumbs #sync2 .item img {
    max-width: 100%;
    max-height: 100%;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
    border-radius: 4px;
}
.pd-gallery .pd-thumbs #sync2 .current .item {
    background: #fff;
    border-color: #0f3cc9;
    box-shadow: 0 2px 8px rgba(15, 60, 201, 0.15);
}
.pd-gallery .pd-thumbs .owl-dots { display: none !important; }

/* ---- Product info ---- */
.pd-info { padding-left: 10px; }
.pd-info .pd-title {
    font-size: 26px;
    font-weight: 600;
    line-height: 1.3;
    color: #1a1a1a;
    margin-bottom: 10px;
}
.pd-info .pd-subtitle {
    font-size: 15px;
    font-weight: 400;
    color: #666;
    margin-bottom: 18px;
}
.pd-info .pd-price-block {
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
    margin: 18px 0 20px;
    padding: 14px 16px;
    background: #f7f7f9;
    border-radius: 8px;
}
.pd-info .pd-price-block .pd-price-now {
    font-size: 28px;
    font-weight: 700;
    color: #0f3cc9;
}
.pd-info .pd-price-block .pd-price-old {
    font-size: 18px;
    color: #9a9a9a;
    text-decoration: line-through;
}
.pd-info .pd-price-block .pd-discount {
    font-size: 13px;
    color: #1ba94c;
    font-weight: 600;
    background: #e8f6ec;
    padding: 4px 10px;
    border-radius: 4px;
}

.pd-info .pd-qty-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 20px 0 24px;
    flex-wrap: wrap;
}
.pd-info .pd-qty-wrap label {
    font-size: 14px;
    color: #444;
    font-weight: 500;
}
.pd-info .quantity {
    max-width: 140px;
    border-color: #d6d6d6;
    box-shadow: none;
    border-radius: 6px;
}
.pd-info .quantity button {
    padding: 0 12px;
    font-size: 22px;
    color: #0f3cc9;
}
.pd-info .quantity button:disabled { color: #ccc; cursor: not-allowed; }
.pd-info .pd-cart-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #0f3cc9;
    background: #eaf0ff;
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: 500;
}
.pd-info .pd-cart-hint .material-symbols-outlined { font-size: 16px; }

.pd-info .pd-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}
.pd-info .pd-actions .theme-btn {
    flex: 1 1 200px;
    margin-top: 0 !important;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.25s ease;
}
.pd-info .pd-actions .theme-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 60, 201, 0.2);
}
.pd-info .pd-out-of-stock {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fdecec;
    color: #d63333;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 500;
    margin-top: 6px;
}

/* ---- Sample PDF download ---- */
.pd-info .pd-sample-pdf { margin: 6px 0 18px; }
.pd-info .pd-sample-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
    border: 1.5px dashed #e63946;
    border-radius: 10px;
    text-decoration: none;
    color: #1a1a1a;
    transition: all 0.25s ease;
}
.pd-info .pd-sample-btn:hover {
    background: #e63946;
    color: #fff;
    border-style: solid;
    box-shadow: 0 6px 18px rgba(230, 57, 70, 0.25);
    transform: translateY(-1px);
}
.pd-info .pd-sample-btn > .material-symbols-outlined:first-child {
    font-size: 32px;
    color: #e63946;
    transition: color 0.25s ease;
}
.pd-info .pd-sample-btn:hover > .material-symbols-outlined:first-child,
.pd-info .pd-sample-btn:hover .pd-sample-arrow {
    color: #fff;
}
.pd-info .pd-sample-text {
    display: flex;
    flex-direction: column;
    flex: 1;
    line-height: 1.25;
}
.pd-info .pd-sample-title {
    font-size: 15px;
    font-weight: 600;
}
.pd-info .pd-sample-sub {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 2px;
}
.pd-info .pd-sample-arrow {
    font-size: 22px;
    color: #e63946;
    transition: color 0.25s ease;
}

.pd-info .pd-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 14px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}
.pd-info .pd-trust .pd-trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #555;
    flex: 1 1 140px;
}
.pd-info .pd-trust .pd-trust-item .material-symbols-outlined {
    color: #0f3cc9;
    font-size: 22px;
}

.pd-info .pd-desc h4 {
    font-size: 17px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #0f3cc9;
    display: inline-block;
}
.pd-info .pd-desc {
    font-size: 14px;
    line-height: 1.7;
    color: #555;
}
.pd-info .pd-desc p { margin-bottom: 10px; }

/* Full-width description below the gallery + info row */
.pd-desc.pd-desc-full {
    margin-top: 30px;
    padding-top: 26px;
    border-top: 1px solid #eee;
    font-size: 15px;
    line-height: 1.8;
    color: #444;
}
.pd-desc.pd-desc-full h4 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0f3cc9;
    display: inline-block;
}
.pd-desc.pd-desc-full p { margin-bottom: 12px; }
.pd-desc.pd-desc-full img { max-width: 100%; height: auto; border-radius: 6px; }
.pd-desc.pd-desc-full ul,
.pd-desc.pd-desc-full ol { padding-left: 22px; margin-bottom: 14px; }
.pd-desc.pd-desc-full table {
    width: 100%;
    border-collapse: collapse;
    margin: 14px 0;
}
.pd-desc.pd-desc-full table td,
.pd-desc.pd-desc-full table th {
    border: 1px solid #e3e3e3;
    padding: 8px 10px;
}

/* ---- Related products carousel ---- */
section.related-product.pd-related { padding: 40px 0 60px; }
.pd-related h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 22px;
    position: relative;
    padding-bottom: 10px;
}
.pd-related h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: #0f3cc9;
    border-radius: 2px;
}
.pd-related .card-box {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}
.pd-related .card-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}
.pd-related .card-box .card-img {
    position: relative;
    overflow: hidden;
    background: #f7f7f9;
}
.pd-related .card-box .card-img img {
    height: 240px;
    width: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.pd-related .card-box:hover .card-img .display {
    transform: scale(1.05);
}
.pd-related .card-box .card-info {
    padding: 14px 14px 16px;
}
.pd-related .card-box .card-info h3 {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 8px;
    padding: 0;
    color: #1a1a1a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 42px;
}
.pd-related .card-box .card-info h3::after { display: none; }
.pd-related .card-box .price {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.pd-related .card-box .price .line-through {
    font-size: 13px;
    color: #9a9a9a;
    text-decoration: line-through;
}
.pd-related .card-box .price > span:last-child {
    font-size: 17px;
    font-weight: 600;
    color: #0f3cc9;
}
.pd-related .book-label {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 4px;
    color: #fff;
    font-weight: 500;
    z-index: 2;
}
.pd-related .book-label.new { background: #1ba94c; }
.pd-related .book-label.sell { background: #f59e0b; }
.pd-related .book-label.stock { background: #d63333; }

.pd-related .owl-nav button {
    position: absolute;
    top: 40%;
    background: #fff !important;
    border-radius: 50% !important;
    width: 38px !important;
    height: 38px !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 18px !important;
    color: #0f3cc9 !important;
}
.pd-related .owl-nav button.owl-prev { left: -10px; }
.pd-related .owl-nav button.owl-next { right: -10px; }
.pd-related .owl-nav button:hover {
    background: #0f3cc9 !important;
    color: #fff !important;
}

/* ---- Tablet ---- */
@media (max-width: 991px) {
    .pd-page { padding: 20px 0 40px; }
    .pd-page .pd-wrap { padding: 20px; }
    .pd-gallery { position: static; }
    .pd-gallery .pd-main-slider #sync1 .item { height: 380px; }
    .pd-info { padding-left: 0; padding-top: 20px; }
    .pd-info .pd-title { font-size: 22px; }
    .pd-info .pd-price-block .pd-price-now { font-size: 24px; }
}

/* ---- Mobile ---- */
@media (max-width: 767px) {
    .pd-page { padding: 14px 0 30px; }
    .pd-page .pd-wrap {
        padding: 14px;
        border-radius: 8px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    }
    .pd-gallery .pd-main-slider #sync1 .item { height: 300px; }
    .pd-gallery .pd-thumbs #sync2 .item { height: 70px; margin: 3px; }
    .pd-gallery #sync1.owl-theme .owl-next,
    .pd-gallery #sync1.owl-theme .owl-prev {
        width: 34px !important;
        height: 34px !important;
        margin-top: -17px !important;
    }
    .pd-info { padding-top: 16px; }
    .pd-info .pd-title { font-size: 19px; line-height: 1.35; }
    .pd-info .pd-subtitle { font-size: 14px; margin-bottom: 14px; }
    .pd-info .pd-price-block {
        padding: 12px 14px;
        margin: 14px 0 18px;
        gap: 10px;
    }
    .pd-info .pd-price-block .pd-price-now { font-size: 22px; }
    .pd-info .pd-price-block .pd-price-old { font-size: 15px; }
    .pd-info .pd-qty-wrap { gap: 10px; margin: 16px 0 18px; }
    .pd-info .pd-actions { gap: 10px; }
    .pd-info .pd-actions .theme-btn {
        flex: 1 1 100%;
        padding: 13px 16px;
        font-size: 14px;
    }
    .pd-info .pd-sample-btn { padding: 11px 14px; gap: 10px; }
    .pd-info .pd-sample-btn > .material-symbols-outlined:first-child { font-size: 28px; }
    .pd-info .pd-sample-title { font-size: 14px; }
    .pd-info .pd-sample-sub { font-size: 11.5px; }
    .pd-info .pd-trust { gap: 10px; padding: 12px 0; }
    .pd-info .pd-trust .pd-trust-item { flex: 1 1 45%; font-size: 12px; }
    .pd-info .pd-desc h4 { font-size: 16px; }
    .pd-info .pd-desc { font-size: 13.5px; line-height: 1.65; }
    .pd-info .pd-desc img { max-width: 100% !important; height: auto !important; }
    .pd-desc.pd-desc-full { margin-top: 22px; padding-top: 20px; font-size: 14px; line-height: 1.7; }
    .pd-desc.pd-desc-full h4 { font-size: 17px; margin-bottom: 14px; }
    .pd-desc.pd-desc-full img { max-width: 100% !important; height: auto !important; }
    .pd-desc.pd-desc-full table { display: block; overflow-x: auto; white-space: nowrap; }

    section.related-product.pd-related { padding: 30px 0 40px; }
    .pd-related h3 { font-size: 20px; margin-bottom: 16px; }
    .pd-related .card-box .card-img img { height: 220px; }
    .pd-related .card-box .card-info h3 { font-size: 14px; min-height: 38px; }
    .pd-related .card-box .price > span:last-child { font-size: 15px; }
    .pd-related .owl-nav button.owl-prev { left: 2px; }
    .pd-related .owl-nav button.owl-next { right: 2px; }
}

@media (max-width: 480px) {
    .pd-gallery .pd-main-slider #sync1 .item { height: 260px; }
    .pd-gallery .pd-thumbs #sync2 .item { height: 60px; }
    .pd-info .pd-title { font-size: 18px; }
    .pd-related .card-box .card-img img { height: 200px; }
}
