/* =========================================================
   KANEEZA MOSLEM WEAR — CSS khusus Detail Produk
   (produk-detail.php). Style bersama (header, footer,
   product card, dll) ada di assets/css/style.css.
   ========================================================= */

/* ---------- Breadcrumb ---------- */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 18px 0;
    font-size: 13px;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--maroon);
}

.breadcrumb .sep {
    color: var(--border);
}

.breadcrumb .current {
    color: var(--text-dark);
    font-weight: 500;
}

/* ---------- Layout ---------- */
.pd-layout {
    display: grid;
    grid-template-columns: 96px 1fr 440px;
    gap: 28px;
    padding-bottom: 20px;
    align-items: start;
}

/* ---------- Gallery ---------- */
.pd-thumbs {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pd-thumb {
    width: 84px;
    height: 84px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: var(--cream);
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--maroon);
    padding: 0;
    flex-shrink: 0;
}

.pd-thumb.active {
    border-color: var(--maroon);
}

.pd-thumb .icon {
    width: 34px;
    height: 34px;
}

.pd-thumb.flip .icon {
    transform: scaleX(-1);
}

.pd-thumb.swatch {
    background: var(--swatch-color, var(--maroon));
}

.pd-thumbs-more {
    width: 84px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
}

.pd-gallery-main {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 1/1.05;
}

.pd-slide {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #efe6d8, #e6dac8);
    transition: transform .3s;
}

.pd-slide.active {
    display: flex;
}

.pd-slide.zoomed .icon,
.pd-slide.zoomed .pd-slide-swatch {
    transform: scale(1.28);
}

.pd-slide .icon {
    width: 210px;
    height: 210px;
    color: var(--maroon);
    transition: transform .3s;
}

.pd-slide.flip .icon {
    transform: scaleX(-1);
}

.pd-slide.zoomed.flip .icon {
    transform: scaleX(-1) scale(1.28);
}

.pd-slide-swatch {
    width: 100%;
    height: 100%;
    background: var(--swatch-color, var(--maroon));
    transition: transform .3s;
}

.pd-badge-discount {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--maroon-dark);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 4px;
    z-index: 3;
}

.pd-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
    cursor: pointer;
    color: var(--text-dark);
    border: none;
    z-index: 3;
}

.pd-nav.left {
    left: 16px;
}

.pd-nav.right {
    right: 16px;
}

.pd-zoom-btn {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
    cursor: pointer;
    color: var(--text-dark);
    border: none;
    z-index: 3;
}

/* ---------- Product info ---------- */
.pd-info h1 {
    font-size: 26px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.pd-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.pd-meta .pd-stars {
    display: flex;
    gap: 2px;
    color: var(--gold);
}

.pd-meta .pd-stars .icon {
    width: 15px;
    height: 15px;
}

.pd-meta .pd-rating-num {
    color: var(--text-dark);
    font-weight: 600;
}

.pd-meta .dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--text-muted);
}

.pd-price-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.pd-price {
    font-size: 26px;
    font-weight: 700;
    color: var(--maroon-dark);
    font-family: 'Playfair Display', serif;
}

.pd-price-old {
    font-size: 15px;
    color: var(--text-muted);
    text-decoration: line-through;
}

.pd-save {
    font-size: 11.5px;
    font-weight: 700;
    background: var(--cream);
    color: var(--maroon);
    padding: 6px 10px;
    border-radius: 4px;
}

.pd-desc {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.75;
    margin-bottom: 26px;
    max-width: 460px;
}

.pd-block {
    margin-bottom: 24px;
}

.pd-block-label {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.pd-block-label span {
    font-weight: 400;
    color: var(--text-muted);
}

.pd-colors {
    display: flex;
    gap: 10px;
}

.pd-color {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid transparent;
    padding: 3px;
    cursor: pointer;
    background: none;
    display: flex;
}

.pd-color i {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: block;
    background: var(--sw, var(--maroon));
    border: 1px solid rgba(0, 0, 0, .08);
}

.pd-color.active {
    border-color: var(--maroon);
}

.pd-sizes {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.pd-size {
    width: 46px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-dark);
    background: #fff;
    font-family: 'Poppins', sans-serif;
}

.pd-size.active {
    border-color: var(--maroon);
    color: var(--maroon);
    background: var(--cream);
}

.pd-sizechart-link {
    margin-left: auto;
    font-size: 12.5px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    font-family: 'Poppins', sans-serif;
}

.pd-sizechart-link:hover {
    color: var(--maroon);
}

.pd-sizechart-link .icon {
    width: 14px;
    height: 14px;
}

.pd-qty-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.qty-stepper {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.qty-stepper button {
    width: 38px;
    height: 38px;
    background: #fff;
    border: none;
    cursor: pointer;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-stepper button:hover {
    background: var(--cream);
}

.qty-stepper button:disabled {
    color: var(--border);
    cursor: not-allowed;
}

.qty-stepper button .icon {
    width: 14px;
    height: 14px;
}

.qty-stepper input {
    width: 44px;
    height: 38px;
    text-align: center;
    border: none;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
}

.stock-note {
    font-size: 12.5px;
    color: #2f7a4d;
    font-weight: 500;
}

.pd-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.pd-actions .btn {
    flex: none;
    justify-content: center;
    gap: 7px;
    padding: 11px 18px;
    font-size: 12.5px;
    white-space: nowrap;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex: none;
    padding: 11px 18px;
    border: 1.5px solid var(--maroon);
    color: var(--maroon);
    background: #fff;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .5px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
}

.btn-outline:hover {
    background: var(--cream-light);
}

.btn-wish {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border: 1.5px solid var(--border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background: #fff;
    cursor: pointer;
}

.btn-wish:hover,
.btn-wish.active {
    color: var(--maroon);
    border-color: var(--maroon);
}

.btn-wish.active .icon {
    fill: var(--maroon);
}

.pd-trust {
    display: flex;
    gap: 26px;
    padding-top: 22px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

.pd-trust-item {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 10.5px;
    color: var(--text-muted);
    letter-spacing: .3px;
}

.pd-trust-item strong {
    display: block;
    font-size: 11.5px;
    color: var(--text-dark);
    font-weight: 600;
    letter-spacing: 0;
}

.pd-trust-item .icon {
    color: var(--maroon);
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

/* ---------- Tabs ---------- */
.pd-tabs {
    margin-top: 20px;
    padding: 40px 0 60px;
}

.pd-tab-nav {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 34px;
    overflow-x: auto;
}

.pd-tab-btn {
    padding: 16px 30px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    position: relative;
    background: none;
    border: none;
    font-family: 'Poppins', sans-serif;
    white-space: nowrap;
}

.pd-tab-btn.active {
    color: var(--maroon-dark);
}

.pd-tab-btn.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--maroon);
}

.pd-tab-panel {
    display: none;
}

.pd-tab-panel.active {
    display: block;
}

.pd-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.spec-table {
    width: 100%;
    font-size: 13.5px;
    border-collapse: collapse;
}

.spec-table td {
    padding: 9px 0;
    color: var(--text-dark);
}

.spec-table td:first-child {
    color: var(--text-muted);
    width: 100px;
}

.spec-table td.colon {
    width: 16px;
}

.check-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.check-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13.5px;
    color: var(--text-dark);
    list-style: none;
}

.check-list li .icon {
    color: #2f7a4d;
    flex-shrink: 0;
    margin-top: 2px;
    width: 18px;
    height: 18px;
}

.size-chart-wrap h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--text-dark);
}

.size-chart-scroll {
    overflow-x: auto;
}

.size-chart-table {
    width: 100%;
    min-width: 480px;
    border-collapse: collapse;
    font-size: 13px;
}

.size-chart-table th,
.size-chart-table td {
    padding: 12px 16px;
    text-align: center;
    border: 1px solid var(--border);
    white-space: nowrap;
}

.size-chart-table th {
    background: var(--cream-light);
    font-weight: 600;
    color: var(--text-dark);
}

.size-chart-table td:first-child,
.size-chart-table th:first-child {
    text-align: left;
    font-weight: 500;
}

.size-chart-note {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 10px;
}

.pd-desc-text {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.85;
    max-width: 760px;
}

/* Reviews */
.review-summary {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 30px;
    padding-bottom: 26px;
    border-bottom: 1px solid var(--border);
}

.review-summary .big-num {
    font-family: 'Playfair Display', serif;
    font-size: 42px;
    font-weight: 700;
    color: var(--maroon-dark);
}

.review-summary .pd-stars {
    display: flex;
    gap: 2px;
    color: var(--gold);
    margin-bottom: 4px;
}

.review-summary .pd-stars .icon {
    width: 15px;
    height: 15px;
}

.review-summary .count {
    font-size: 12.5px;
    color: var(--text-muted);
}

.review-item {
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.review-item:last-child {
    border-bottom: none;
}

.review-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.review-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--maroon);
    font-size: 13px;
    font-family: 'Playfair Display', serif;
    flex-shrink: 0;
}

.review-name-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.review-name {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-dark);
}

.review-date {
    font-size: 11.5px;
    color: var(--text-muted);
}

.review-item .pd-stars {
    display: flex;
    gap: 2px;
    color: var(--gold);
    margin-bottom: 6px;
}

.review-item .pd-stars .icon {
    width: 12.5px;
    height: 12.5px;
}

.review-text {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.65;
    max-width: 640px;
}

/* ---------- Related products row ---------- */
.related-section {
    padding: 10px 0 56px;
}

.related-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 26px;
}

.related-head h2 {
    font-size: 20px;
    color: var(--maroon-dark);
    font-weight: 600;
}

.related-head .view-all {
    font-size: 13px;
    color: var(--maroon);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.p-row-wrap {
    position: relative;
}

.p-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
}

.row-arrow {
    position: absolute;
    top: 38%;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-dark);
    box-shadow: 0 6px 14px rgba(0, 0, 0, .06);
    z-index: 2;
}

.row-arrow.left {
    left: -19px;
}

.row-arrow.right {
    right: -19px;
}

/* ---------- Responsive ---------- */
@media(max-width:1080px) {
    .pd-layout {
        grid-template-columns: 84px 1fr 380px;
        gap: 22px;
    }

    .p-row {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media(max-width:900px) {
    .pd-layout {
        grid-template-columns: 1fr;
    }

    .pd-thumbs {
        flex-direction: row;
        order: 2;
        overflow-x: auto;
        padding-top: 12px;
    }

    .pd-gallery-main {
        order: 1;
    }

    .pd-info {
        order: 3;
        padding-top: 26px;
    }

    .pd-detail-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

@media(max-width:720px) {
    .related-section {
        padding-left: 40px;
        padding-right: 40px;
    }

    .breadcrumb {
        padding: 14px 0;
        font-size: 11.5px;
        overflow-x: auto;
        white-space: nowrap;
    }

    .pd-gallery-main {
        aspect-ratio: 1/1;
        border-radius: 10px;
    }

    .pd-slide .icon {
        width: 140px;
        height: 140px;
    }

    .pd-info h1 {
        font-size: 20px;
    }

    .pd-price {
        font-size: 21px;
    }

    .pd-actions {
        flex-wrap: nowrap;
        gap: 8px;
    }

    .pd-actions .btn,
    .pd-actions .btn-outline {
        min-width: 0;
        padding: 11px 10px;
        font-size: 11px;
        gap: 5px;
    }

    .pd-actions .btn {
        flex: 1.4 1 0;
    }

    .pd-actions .btn-outline {
        flex: 1 1 0;
    }

    .pd-actions .btn .icon,
    .pd-actions .btn-outline .icon {
        width: 14px;
        height: 14px;
        flex-shrink: 0;
    }

    .pd-actions .btn-wish {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }

    .pd-trust {
        gap: 16px 20px;
    }

    .pd-tab-btn {
        padding: 14px 18px;
        font-size: 12.5px;
    }

    .p-row {
        grid-template-columns: none;
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 12px;
        padding-bottom: 4px;
    }

    .p-row .p-card {
        flex: 0 0 46%;
        scroll-snap-align: start;
    }

    .row-arrow.left {
        display: none;
    }

    .row-arrow.right {
        right: 4px;
        top: 30%;
        width: 32px;
        height: 32px;
    }
}

@media(max-width:400px) {
    .pd-actions .btn,
    .pd-actions .btn-outline {
        padding: 10px 8px;
        font-size: 10px;
        letter-spacing: 0;
    }
}