/* Product Detail (Laptop) - Separate file (do not put in styles.css) */
.main_product_detail {
    width: 1200px;
    max-width: 100%;
    margin: 18px auto 0;
    padding: 0 0px;
    font-family: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

/* Force Roboto for the whole product detail UI (exclude Font Awesome icons) */
.main_product_detail :where(*):not(i):not([class^="fa-"]):not([class*=" fa-"]) {
    font-family: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif !important;
}

.pd-container {
    width: 100%;
}

.pd-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 14px;
    color: #777;
    margin: 10px 0 14px;
}

.pd-breadcrumb a {
    color: #555;
    text-decoration: none;
}

.pd-breadcrumb a:hover {
    color: #ee4d2d;
}

.pd-breadcrumb-sep {
    opacity: 0.6;
}

.pd-breadcrumb-current {
    color: #333;
    font-weight: 600;
}

.pd-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.pd-grid {
    display: grid;
    /* Media chiếm 50% tổng chiều rộng, cột còn lại linh hoạt */
    grid-template-columns: minmax(0, 50%) minmax(0, 1fr);
    gap: 40px;
    padding: 30px;
    align-items: start;
}

.pd-media {
    min-width: 0;
}

.pd-main-image {
    position: relative;
    background: #fafafa;
    border: 1px solid #f1f1f1;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.pd-main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.pd-gallery {
    display: grid;
    gap: 12px;
}

.pd-swiper-main {
    position: relative;
    width: 100%;
    border-radius: 14px;
    border: 1px solid #f1f1f1;
    background: #fafafa;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

/* Bố cục slide Swiper: căn giữa ảnh, cho phép ảnh rộng tối đa 100% */
.pd-swiper-main .swiper-slide {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pd-swiper-main .swiper-slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.pd-swiper-thumbs {
    width: 100%;
}

/* Style thumbnail Swiper: đều nhau, có viền, trạng thái active rõ ràng */
.pd-swiper-thumbs .swiper-wrapper {
    display: flex;
    align-items: center;
}

.pd-swiper-thumbs .swiper-slide {
    width: auto;
    opacity: 0.6;
    transition: opacity 0.2s ease, transform 0.15s ease;
}

.pd-swiper-thumbs .swiper-slide img {
    width: 100%;
    height: 72px;
    object-fit: cover;
    display: block;
    border-radius: 10px;
    border: 2px solid transparent;
    background: #fff;
}

.pd-swiper-thumbs .swiper-slide-thumb-active img {
    border-color: #67c6c2;
    opacity: 1;
}

.pd-thumb-slide {
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
}

.pd-thumb-slide img {
    width: 100%;
    height: 72px;
    object-fit: cover;
    display: block;
    border-radius: 10px;
    border: 2px solid transparent;
}

.pd-swiper-thumbs .swiper-slide-thumb-active .pd-thumb-slide img {
    border-color: #67c6c2;
}

.pd-sale-badge .label_product {
    position: absolute;
    top: 12px;
    left: 12px;
}

.pd-thumbs {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
}

.pd-thumbs img {
    width: 100%;
    height: 72px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid transparent;
    display: block;
    background: #fff;
}

.pd-thumbs a {
    display: block;
    border-radius: 10px;
    overflow: hidden;
}

.pd-thumbs .active img,
.pd-thumbs a:hover img {
    border-color: #67c6c2;
}

.pd-info {
    min-width: 0;
    position: sticky;
    top: 20px;
    align-self: start;
}

.pd-title {
    font-size: 22px;
    line-height: 1.35;
    font-weight: 700;
    color: #222;
    margin: 0 0 10px;
}

.pd-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0 16px;
    color: #777;
}

.pd-stars {
    display: inline-flex;
    gap: 4px;
    color: #cfcfcf;
    font-size: 14px;
}

.pd-rating-count {
    color: #777;
}

.pd-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
    font-size: 14px;
    margin-bottom: 14px;
}

.pd-sep {
    opacity: 0.5;
}

.pd-brandline,
.pd-statusline {
    color: #444;
}

.pd-brand {
    font-weight: 600;
    color: #444;
}

.pd-status {
    color: #28a745;
    font-weight: 700;
}

.pd-priceblock {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
        "discount old"
        "discount current";
    column-gap: 14px;
    row-gap: 6px;
    align-items: center;
    margin: 6px 0 18px;
}

.pd-discount {
    grid-area: discount;
    align-self: start;
}

.pd-discount .label_product {
    position: static;
}

.pd-discount .label_wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    height: 44px;
    padding: 0 10px;
    border-radius: 12px;
    background: #67c6c2;
    /* teal like KBOX */
    color: #fff;
    font-weight: 900;
    font-size: 16px;
}

.pd-price-old {
    grid-area: old;
    justify-self: start;
    color: #9aa3ad;
    text-decoration: line-through;
    font-size: 18px;
    font-weight: 700;
}

.pd-price-current {
    grid-area: current;
    justify-self: start;
    color: #111;
    font-size: 46px;
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.6px;
}

.pd-variants {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.pd-variant {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 12px;
    align-items: center;
}

.pd-variant-label {
    color: #555;
    font-weight: 600;
    font-size: 14px;
}

.pd-variant-control select,
.pd-variant-control input,
.pd-variant-control button {
    max-width: 100%;
}

/* Beautiful color/size options */
.pd-variant-control select {
    width: auto;
    min-width: 160px;
    max-width: 100%;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid #e1e5ea;
    background: #f8f9fb;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.pd-variant-control select:focus {
    border-color: #4fbab4;
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(79, 186, 180, 0.2);
}

/* If backend render options dạng nút/label */
.pd-variant-control .option-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    padding: 6px 12px;
    margin: 0 6px 6px 0;
    border-radius: 999px;
    border: 1px solid #e1e5ea;
    background: #fff;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.15s ease;
}

.pd-variant-control .option-chip:hover {
    border-color: #4fbab4;
    background: #f0fbfb;
    color: #2aa6a0;
}

.pd-variant-control .option-chip.active,
.pd-variant-control .option-chip.selected {
    border-color: #4fbab4;
    background: #4fbab4;
    color: #fff;
    box-shadow: 0 4px 12px rgba(79, 186, 180, 0.35);
}

.pd-actions {
    display: grid;
    gap: 14px;
    margin-bottom: 16px;
}

.pd-qty {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid #e5ecf3;
    background: linear-gradient(135deg, #f9fafb 0%, #eef7f8 100%);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.pd-qty-label {
    font-weight: 800;
    color: #111827;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pd-qty-control {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border-radius: 999px;
    border: 1px solid #d1e5ea;
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.pd-qty-btn {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: none;
    background: #f3f4ff;
    color: #4b2a88;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, transform 0.05s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.pd-qty-btn:hover {
    background: #6a2aa6;
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(106, 42, 166, 0.35);
}

.pd-qty-btn:active {
    transform: translateY(1px) scale(0.97);
    box-shadow: 0 3px 10px rgba(106, 42, 166, 0.28);
}

.pd-qty-input {
    width: 70px;
    height: 34px;
    border: none;
    outline: none;
    text-align: center;
    font-weight: 900;
    font-size: 15px;
    color: #0f172a;
    background: transparent;
}

.pd-qty-input:focus {
    box-shadow: 0 0 0 2px rgba(79, 186, 180, 0.25);
    border-radius: 999px;
}

/* Remove number input spinners (more like TMĐT UI) */
.pd-qty-input::-webkit-outer-spin-button,
.pd-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pd-qty-input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.pd-cta-row {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.1fr) minmax(0, 0.8fr);
    gap: 14px;
    align-items: stretch;
}

.pd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    border: 0;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.18);
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.18s ease;
}

.pd-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.6), transparent 40%);
    transform: translateX(-120%);
    transition: opacity 0.18s ease, transform 0.5s ease;
}

.pd-btn:hover::before {
    opacity: 1;
    transform: translateX(120%);
}

.pd-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.22);
}

.pd-btn:active {
    transform: translateY(1px) scale(0.98);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.26);
}

.pd-btn i {
    font-size: 16px;
}

.pd-btn-cart {
    background: linear-gradient(135deg, #6a2aa6 0%, #8b5ad1 50%, #b794ff 100%);
    color: #fff;
}

.pd-btn-buy {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 40%, #fed7aa 100%);
    color: #ffffff;
}

.pd-btn-primary {
    background: #4fbab4;
    color: #fff;
    border-color: #4fbab4;
}

.pd-btn-primary:disabled,
.pd-btn-primary[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.pd-fav {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #444;
    font-weight: 700;
    font-size: 15px;
    padding: 8px 6px;
}

.pd-fav i {
    color: #e74c3c;
    font-size: 20px;
}

.pd-accordion {
    border-top: 1px solid #f1f1f1;
}

.pd-acc-item {
    border-top: 1px solid #f1f1f1;
}

.pd-acc-item:first-child {
    border-top: none;
}

.pd-acc-head {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 18px;
    background: #fff;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 800;
    color: #222;
}

.pd-acc-left {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.pd-acc-left i {
    color: #6c757d;
}

.pd-acc-arrow {
    color: #9aa3ad;
    transition: transform 0.2s ease;
}

.pd-acc-head.active .pd-acc-arrow {
    transform: rotate(90deg);
}

.pd-acc-body {
    display: none;
    padding: 0 18px 18px;
}

.pd-acc-body.active {
    display: block;
}

.pd-section-title {
    margin: 18px 0 10px;
    font-size: 15px;
    font-weight: 800;
    color: #222;
}

.pd-policy {
    color: #333;
    font-size: 15px;
    line-height: 1.75;
}

.pd-list {
    margin: 0;
    padding-left: 18px;
}

.pd-list li {
    margin: 6px 0;
}

.pd-extra-box {
    margin-top: 20px;
    padding: 16px 18px 14px;
    border-radius: 16px;
    border: 1px solid #e5ecf3;
    background: linear-gradient(135deg, #f9fafc 0%, #f4f7fb 100%);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.pd-extra-title {
    font-size: 15px;
    font-weight: 800;
    color: #222;
    margin-bottom: 12px;
}

.pd-extra-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
    row-gap: 6px;
}

.pd-extra-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    color: #444;
}

.pd-extra-label {
    font-weight: 600;
    color: #6b7280;
}

.pd-extra-value {
    font-weight: 500;
    text-align: right;
    color: #111827;
}

@media (max-width: 1024px) {
    .pd-extra-grid {
        grid-template-columns: 1fr;
    }
}

.pd-tab-panel {
    display: none;
}

.pd-tab-panel.active {
    display: block;
}

.pd-content {
    color: #333;
    font-size: 15px;
    line-height: 1.75;
}

.pd-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

.pd-spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.pd-spec-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f1f1;
    color: #444;
}

.pd-spec-table tr:nth-child(odd) td {
    background: #fafafa;
}

@media (max-width: 1024px) {
    .pd-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .pd-thumbs {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .pd-price-current {
        font-size: 38px;
    }

    .pd-cta-row {
        grid-template-columns: 1fr;
    }
}

.content_detail {
    margin-top: 24px;
    padding: 24px 20px;
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e5ecf3;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    line-height: 1.75;
    font-size: 15px;
    color: #333;
}

.content_detail h2 {
    font-size: 18px;
    font-weight: 800;
    margin: 0 0 14px;
    color: #111827;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
}

.content_detail p {
    margin: 0 0 10px;
}

.content_detail ul {
    margin: 0 0 6px 18px;
    padding: 0;
}

.content_detail li {
    margin-bottom: 6px;
}

.content_detail img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

/* ============ Modal cho pd-acc-item ============ */
.pd-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.pd-modal.active {
    display: flex;
}

.pd-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.pd-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(640px, 94vw);
    max-height: 90vh;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
    padding: 20px 22px 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pd-modal-title {
    font-size: 18px;
    font-weight: 800;
    color: #111827;
    margin: 0 32px 10px 0;
}

.pd-modal-content {
    flex: 1;
    overflow: auto;
    padding-right: 4px;
    font-size: 15px;
    line-height: 1.75;
    color: #374151;
}

.pd-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: none;
    background: rgba(243, 244, 246, 0.9);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    color: #4b5563;
    transition: background 0.15s ease, transform 0.05s ease;
}

.pd-modal-close:hover {
    background: #e5e7eb;
}

.pd-modal-close:active {
    transform: scale(0.96);
}

/* Khi modal mở thì chặn cuộn body một chút cho đẹp */
body.pd-modal-open {
    overflow: hidden;
}

@media (max-width: 1024px) {
    .content_detail {
        margin-top: 18px;
        padding: 18px 16px;
        border-radius: 12px;
        box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
    }

    .content_detail h2 {
        font-size: 16px;
        margin-bottom: 10px;
    }
}