:root {
    --bg: #ffffff;
    --text: #000000;
    --border: #000000;
    --accent: #000000;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.45;
    font-size: 13px; /* base font kecil, mirip home */
}

.product-detail-main {
    padding-top: 9rem;
    padding-bottom: 7rem;
}

/* ==========================================================================
   TYPOGRAPHY - disesuaikan agar mirip home
   ========================================================================== */

.product-title {
    font-size: 1.18rem;           /* lebih kecil dari 1.4rem */
    font-weight: 700;             /* agak lebih ringan dari 900 */
    letter-spacing: -0.4px;
    line-height: 1.15;
    margin-bottom: 0.7rem;
    text-transform: uppercase;    /* optional: mirip gaya home */
}

.discount-price {
    font-size: 1.48rem;           /* dari 1.8rem → lebih kecil & proporsional */
    font-weight: 200;             /* sangat tipis seperti di home */
    line-height: 1;
    letter-spacing: -0.5px;
    opacity: 0.95;
}

.original-price {
    font-size: 0.98rem;
    font-weight: 200;
    opacity: 0.65;
    margin-left: 10px;
    text-decoration: line-through;
}

.badge-sold-out {
    background: var(--text);
    color: var(--bg);
    padding: 5px 12px;
    font-size: 0.72rem;
    font-weight: 800;
    display: inline-block;
    margin: 0.9rem 0;
    letter-spacing: 0.5px;
}

.label-heading {
    font-size: 0.68rem;           /* lebih kecil & subtle */
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

/* Size buttons */
.size-btn {
    min-width: 38px;
    height: 38px;
    font-size: 0.74rem;
    font-weight: 600;
    border: 1px solid var(--border);
    background: white;
    transition: all 0.15s;
}

.size-btn:hover:not(:disabled) {
    background: #f8f8f8;
}

.size-btn.active {
    background: var(--text);
    color: var(--bg);
}

.size-btn:disabled,
.size-btn.opacity-40 {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Quantity */
.quantity-input {
    width: 60px;
    text-align: center;
    padding: 5px;
    font-size: 13px;
    border: 1px solid var(--border);
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.qty-btn {
    width: 36px;
    height: 36px;
    font-size: 1.15rem;
    font-weight: bold;
    border: 1px solid var(--border);
    background: white;
}

/* CTA Buttons */
.cta-wrapper {
    display: flex;
    gap: 12px;
    margin: 1.6rem 0 2.2rem;
    flex-wrap: wrap;
}

.btn-primary,
.btn-outline,
.btn-disabled {
    flex: 1;
    padding: 11px 1.6rem;
    font-size: 0.84rem;
    font-weight: 700;
    border-radius: 0;
    min-width: 140px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-primary {
    background: var(--text);
    color: var(--bg);
    border: 1px solid var(--text);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--text);
}

.btn-disabled {
    background: #e0e0e0;
    color: #777;
    border: none;
    cursor: not-allowed;
}

/* Description */
.description-box {
    margin-top: 2.8rem;
    font-size: 0.84rem;           /* lebih kecil & nyaman dibaca */
    line-height: 1.6;
}

.description-box p {
    margin-bottom: 1.1rem;
}

/* Gallery */
.gallery-wrapper {
    position: sticky;
    top: 100px;
}

.main-image-box {

    overflow: hidden;
}

.main-img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: contain;
    transition: opacity 0.2s;
}

.thumbnail-list {
    display: flex;
    gap: 8px;
    margin-top: 14px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.thumbnail {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border: 1px solid transparent;
    cursor: pointer;
    opacity: 0.75;
    transition: all 0.2s;
}

.thumbnail.active,
.thumbnail:hover {
    opacity: 1;
    border-color: var(--border);
}

/* Mobile fixed CTA */
@media (max-width: 1023px) {
    .cta-wrapper {
        /* hapus semua properti fixed */
        position: relative;
        margin: 2rem 0 3rem;
        padding: 0;
        border-top: none;
        box-shadow: none;
        flex-direction: row; /* atau column jika ingin vertikal */
        gap: 12px;
    }

    .btn-primary,
    .btn-outline {
        flex: 1;
        min-width: auto;
    }

    .gallery-wrapper {
        position: static;
        margin-bottom: 2.5rem;
    }
}

@media (max-width: 640px) {
    .product-title {
        font-size: 1.08rem;
    }
    .discount-price {
        font-size: 1.38rem;
    }
    .original-price {
        font-size: 0.92rem;
    }
    .thumbnail {
        width: 58px;
        height: 58px;
    }
    .size-btn {
        min-width: 36px;
        height: 36px;
        font-size: 0.72rem;
    }
}

/* You May Also Like - mobile adjustment */
@media (max-width: 640px) {
    .recommendation-card h3 {
        font-size: 0.72rem;          /* lebih kecil dari 0.88rem */
        line-height: 1.2;
        margin-bottom: 0.35rem;
    }

    .recommendation-card .discount-price {
        font-size: 0.62rem;          /* dari 1.02rem → lebih kecil */
        font-weight: 200;
    }

    .recommendation-card .original-price {
        font-size: 0.62rem;          /* lebih kecil lagi */
        opacity: 0.65;
    }

    /* Opsional: membuat kartu sedikit lebih compact */
    .recommendation-card .p-4 {
        padding: 0.9rem !important;
    }
}

/* Collapsible Description */
.description-box {
    margin-top: 2.8rem;
}

.description-toggle {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    width: 100%;
}

.description-toggle:focus {
    outline: none;
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.description-toggle[aria-expanded="true"] .toggle-icon {
    transform: rotate(180deg);
}

.description-content {
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Opsional: tambah sedikit spacing dan gaya saat terbuka */
.description-content.show {
    display: block !important;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Rekomendasi Produk – disesuaikan agar seragam dengan home */
/* Rekomendasi Produk – You May Also Like */
.recommendation-card {
    opacity: 1 !important;
}

.recommendation-card h3 {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.25;
    margin-bottom: 0.4rem;
}

/* Container harga supaya bisa berdampingan */
.recommendation-card .price-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0.3rem;
}

.recommendation-card .discount-price {
    font-size: 0.72rem;           /* tetap kecil */
    font-weight: 200;             /* sangat tipis */
    line-height: 1;
    opacity: 0.95;
    color: var(--text);
}

.recommendation-card .original-price {
    font-size: 0.62rem;           /* lebih kecil lagi */
    font-weight: 200;
    opacity: 0.65;
    text-decoration: line-through;
    color: var(--text);
}

/* Pastikan tidak ada elemen harga yang naik-turun */
.recommendation-card .discount-price,
.recommendation-card .original-price {
    margin: 0 !important;
}

/* Hilangkan shadow di You May Also Like */
.recommendation-card {
    box-shadow: none !important;
}

.recommendation-card:hover {
    box-shadow: none !important;
}

/* Container Utama Toast (Posisi Tengah Atas) */
#toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Kotak Notifikasi */
.toast-notif {
    background: #000;
    color: #fff;
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
    min-width: 320px;
    pointer-events: auto;
    
    /* Animasi: Muncul dari atas */
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.toast-notif.show {
    opacity: 1;
    transform: translateY(0);
}

/* Gambar di dalam Toast */
.toast-img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    background: #fff;
}

.toast-msg-title {
    font-weight: 700;
    font-size: 14px;
    margin: 0;
    text-transform: uppercase;
}

.toast-msg-body {
    font-size: 12px;
    margin: 0;
    color: #a1a1aa;
}

/* Zoom Container Fix */
.main-image-box {
    overflow: hidden;
    position: relative;
}
#mainProductImage {
    transition: transform 0.1s ease-out;
    width: 100%;
}