/* Detail produk - tema e-commerce blue (memakai variabel dari index.css) */

:root {
    --bottom-h: 72px;
}

/* Layout (tanpa container/card) */

.detail-container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 0 calc(var(--bottom-h) + env(safe-area-inset-bottom, 0px) + 20px);
}

.detail-card {
    display: block;
    background: none;
    border: 0;
    box-shadow: none;
    border-radius: 0;
}

/* Gambar full 1:1 */

.detail-gambar {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--abu-muda);
}

.detail-gambar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gambar-kosong {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    color: var(--abu);
    font-size: 14px;
    text-align: center;
}

/* Info */

.detail-info {
    padding: 18px 16px 8px;
}

.detail-kategori {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.detail-kategori span {
    padding: 4px 12px;
    background: var(--aksen-muda);
    border-radius: 999px;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.detail-info h1 {
    margin-bottom: 18px;
    color: var(--teks);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.01em;
    word-break: break-word;
}

.detail-deskripsi {
    padding: 16px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(191, 219, 254, 0.8);
    border-radius: var(--radius);
    box-shadow: var(--bayangan);
}

.detail-deskripsi h2 {
    margin-bottom: 8px;
    color: #1e3a8a;
    font-size: 15px;
    font-weight: 600;
}

.detail-deskripsi p {
    color: var(--abu);
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-line;
    word-break: break-word;
}

/* Bottom nav */

.bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(219, 234, 254, 0.9);
    border-top: 1px solid rgba(147, 197, 253, 0.5);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.bottom-nav-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 960px;
    height: var(--bottom-h);
    margin: 0 auto;
    padding: 0 16px;
}

.btn-kembali,
.btn-beli {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    border: 0;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.btn-kembali {
    flex: 0 0 auto;
    gap: 6px;
    padding: 0 18px;
    background: var(--putih);
    border: 1px solid var(--garis);
    color: #1d4ed8;
}

.btn-kembali:hover {
    background: var(--abu-muda);
}

.btn-beli {
    flex: 1 1 auto;
    gap: 10px;
    padding: 0 18px;
    background: var(--aksen);
    color: #fff;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.btn-beli:hover {
    background: #1d4ed8;
}

.btn-kembali:active,
.btn-beli:active {
    transform: scale(0.98);
}

.beli-harga {
    padding-left: 10px;
    border-left: 1px solid rgba(255, 255, 255, 0.5);
}

/* Desktop: gambar kiri (tetap 1:1), info kanan */

@media (min-width: 768px) {
    .detail-container {
        padding-top: 24px;
    }

    .detail-card {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px;
        align-items: start;
    }

    .detail-gambar {
        border-radius: var(--radius);
        box-shadow: var(--bayangan);
    }

    .detail-info {
        padding: 0 16px 0 0;
    }

    .detail-info h1 {
        font-size: 28px;
    }
}
