/* ===============================
   DETAIL BUKU ONLY
================================ */

.detail-buku {
    background: #ffffff;
    padding:  20px;
    font-family: Arial, Helvetica, sans-serif;
    color: #333;
    border: #111;
}

.detail-buku .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
/* Layout */
.detail-buku .product-wrapper {
    display: flex;
    gap: 40px;
    background: #fff;
    padding: 0;
    border-radius: 6 px;
}

/* Image */
.detail-buku .product-image {
    flex: 1;
}

.detail-buku .product-image img {
    width: 100%;
    border-radius: 6px;
    border: 1px solid #eee;
}

/* Info */
.detail-buku .product-info {
    flex: 1.5;
}

.detail-buku .title {
    font-family: 'Varela Round', sans-serif;
    font-size: 24px;
    line-height: 1.2em;
    font-weight: 800;
    margin-bottom: 10px;
    color: #25344E;
}

.detail-buku .price {
    font-family: "Roboto", Varela Round;
    font-size: 22px;
    color: #47A880;
    font-weight: 600;
    margin-bottom: 14px;
}

/* Tags */
.detail-buku .meta-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.detail-buku .meta-links a {
    font-size: 12px;
    color: #47A880;
    text-decoration: none;
    border: 1px solid #47A880;
    padding: 4px 10px;
    border-radius: 20px;
}

/* Button */
.detail-buku .buy-btn {
    width: 100%;
    background: #47A880;
    color: #fff;
    border: none;
    padding: 14px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
}

.detail-buku .buy-btn:hover {
    background: #e64a19;
}

/* Responsive */
@media (max-width: 768px) {
    .detail-buku .product-wrapper {
        flex-direction: column;
    }

    .detail-buku .spec-row span:first-child {
        width: 120px;
    }
}
.detail-buku .image-gallery {
    max-width: 420px;
}

.detail-buku .main-image {
    position: relative;
}

.detail-buku .zoom-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fff;
    border-radius: 50%;
    padding: 6px;
    cursor: pointer;
}

.detail-buku .thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.detail-buku .thumbnails img {
    width: 70px;
    cursor: pointer;
    border: 1px solid #ddd;
}

.detail-buku .image-zoom-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}
/* === MARKETPLACE ZOOM === */
.detail-buku .zoom-container {
    position: relative;
    overflow: hidden;
    cursor: zoom-in;
}

.detail-buku .zoom-container img {
    width: 100%;
    transition: transform .2s ease;
}

.detail-buku .zoom-container:hover img {
    transform: scale(2);
    /* tingkat zoom */
}

.detail-buku .zoom-container:hover {
    cursor: zoom-in;
}

/* === ZOOM ICON === */
.detail-buku .zoom-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    z-index: 5;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}

.detail-buku .zoom-icon:hover {
    background: #ff5722;
    color: #fff;
}

/* === FULL IMAGE MODAL === */
.detail-buku .image-zoom-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.detail-buku .image-zoom-modal img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    width: auto;
    height: auto;
    border-radius: 8px;
}

.detail-buku .image-zoom-modal .close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 32px;
    color: #fff;
    cursor: pointer;
}
.detail-buku .image-zoom-modal .nav {
    position: absolute;
    top: 50%;
    font-size: 40px;
    color: #fff;
    cursor: pointer;
    user-select: none;
    padding: 10px;
    transform: translateY(-50%);
}

.detail-buku .image-zoom-modal .prev {
    left: 20px;
}

.detail-buku .image-zoom-modal .next {
    right: 20px;
}
/* === SPEC TABLE DETAIL BUKU === */
.detail-buku .spec-card {
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 18px;
    background: #fff;
}

.detail-buku .spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.detail-buku .spec-table th,
.detail-buku .spec-table td {
    border: 1px solid #e5e5e5;
    padding: 12px 14px;
    vertical-align: top;
}

.detail-buku .spec-table th {
    width: 180px;
    background: #fafafa;
    font-weight: 500;
    text-align: left;
    color: #333;
}

.detail-buku .spec-table td {
    color: #444;
}

.detail-buku .spec-table a {
    color: #0d6efd;
    text-decoration: none;
}

.detail-buku .spec-table a:hover {
    text-decoration: underline;
}
/* ===============================
   TAB DETAIL BUKU
================================ */

.detail-buku-tabs {
    margin-top: 40px;
    background: #fff;
    border-radius: 6px;
    padding: 0;
}

/* Header Tabs */
.detail-buku-tabs .tab-header {
    display: flex;
    border-bottom: 1px solid #ddd;
}

.detail-buku-tabs .tab-btn {
    padding: 14px 22px;
    font-size: 14px;
    background: #f5f5f5;
    border: none;
    border-right: 1px solid #ddd;
    cursor: pointer;
    font-weight: 500;
}

.detail-buku-tabs .tab-btn.active {
    background: #fff;
    border-bottom: 2px solid #47A880;
    color: #47A880;
}

/* Content */
.detail-buku-tabs .tab-content {
    padding: 30px;
}

.detail-buku-tabs .tab-panel {
    display: none;
}

.detail-buku-tabs .tab-panel.active {
    display: block;
}

.detail-buku-tabs h3 {
    margin-bottom: 12px;
}

.detail-buku-tabs h4 {
    margin: 18px 0 10px;
}

.detail-buku-tabs p {
    line-height: 1.7;
    margin-bottom: 12px;
}

.detail-buku-tabs ul {
    padding-left: 18px;
}

.detail-buku-tabs ul li {
    margin-bottom: 6px;
}

/* Table */
.detail-buku-tabs .info-table {
    width: 100%;
    border-collapse: collapse;
}

.detail-buku-tabs .info-table td {
    padding: 10px 14px;
    border: 1px solid #eee;
    font-size: 14px;
}

.detail-buku-tabs .info-table td:first-child {
    width: 200px;
    color: #666;
}
/* === FIX MOBILE OVERFLOW DETAIL BUKU === */
@media (max-width: 768px) {

    body {
        overflow-x: hidden;
    }

    .detail-buku {
        overflow-x: hidden;
    }

    .detail-buku .container {
        max-width: 100%;
        padding: 0 16px;
    }

    .detail-buku .product-wrapper {
        padding: 16px;
        gap: 20px;
    }

    .detail-buku .image-gallery {
        max-width: 100%;
    }

    .detail-buku .product-image img {
        max-width: 100%;
        height: auto;
    }

    /* Disable hover zoom di mobile */
    .detail-buku .zoom-container:hover img {
        transform: none;
    }
}

/* ===============================
   PRODUK TERKAIT
================================= */
.related-products {
    margin-top: 60px;
}

.related-header {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.badge {
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
}

.badge.orange {
    background: #47A880;
    color: #fff;
}

.badge.gray {
    background: #f1f1f1;
    color: #333;
}

.related-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
}

.related-item {
    transition: transform 0.2s ease;
}

.related-item:hover {
    transform: translateY(-4px);
}

.related-item img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 10px;
}

.related-item h4 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 6px;
    color: #111;
}

.related-item .price {
    font-size: 14px;
    font-weight: 700;
    color: #47A880;
}
.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}
.old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
}

.final-price {
    color: #e63946;
    font-weight: 700;
    font-size: 22px;
}

/* Mobile */
@media (max-width: 768px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .related-item img {
        width: 100%;
        height: auto;
    }

    .related-item h4 {
        font-size: 14px;
    }

    .related-item .price {
        font-size: 13px;
    }
}