/* ── Desktop account wrapper: sembunyikan di mobile, tampil di desktop ─ */
.desktop-account-wrapper {
    display: none;
}

@media (min-width: 768px) {
    .desktop-account-wrapper {
        display: block;
    }
}

/* ── Desktop account dropdown ──────────────────────────────────────── */
#user-account-menu {
    display: block;
    visibility: hidden;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    pointer-events: none;
    z-index: 100;
    position: absolute;
}

#user-account-menu.account-menu-open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ── Grid 6 kolom untuk produk terkait (belum ada di tailwind.min.css) ── */
.grid-cols-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

@media (min-width: 1024px) {
    .lg\:grid-cols-6 {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

/* ─────────────────────────────────────────────────────────────────────────
   Fix sm:hidden — tidak ada di tailwind.min.css (custom/purged build)
   sm:hidden  = display:none  pada ≥640px
   sm:inline  = display:inline pada ≥640px  (sudah ada tapi tambahkan agar aman)
───────────────────────────────────────────────────────────────────────── */
@media (min-width: 640px) {
    .sm\:hidden {
        display: none !important;
    }

    .sm\:inline {
        display: inline !important;
    }

    .sm\:block {
        display: block !important;
    }

    .sm\:flex {
        display: flex !important;
    }
}

/* ─────────────────────────────────────────────────────────────────────────
   Tombol Belanja Detail Produk
   Layout:
     Baris 1 — [- qty +]  [🟢 WhatsApp]  [♥ Wishlist]  [share]
     Baris 2 — [🛒 Tambah ke Keranjang]  [⚡ Beli Sekarang]
───────────────────────────────────────────────────────────────────────── */

/* ─ Qty Stepper ─────────────────────────────────────────────────────────── */
.qty-wrapper {
    display: flex;
    align-items: center;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    flex-shrink: 0;
}

.qty-btn {
    width:  2.3rem;
    height: 2.3rem;
    background: #f3f4f6;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: background .15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: #e5e7eb;
}

.qty-input {
    width: 2.4rem;
    text-align: center;
    font-size: .875rem;
    font-weight: 600;
    border: none;
    outline: none;
    background: #fff;
    color: #111827;
    -moz-appearance: textfield;
    appearance: textfield;
    padding: 0;
}

.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ─ WhatsApp pill (hijau, ada teks) ──────────────────────────────────────── */
.btn-wa-pill {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem 1rem;
    border-radius: 8px;
    background: #22c55e;
    color: #fff;
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background .18s, transform .15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-wa-pill:hover {
    background: #16a34a;
}

.btn-wa-pill:active {
    transform: scale(.97);
}

/* ─ Icon pill: Wishlist & Share (border abu, kotak kecil) ────────────────── */
.btn-icon-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .55rem .75rem;
    border-radius: 8px;
    border: 1.5px solid #d1d5db;
    background: #fff;
    color: #374151;
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: border-color .18s, color .18s, background .18s, transform .15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-icon-pill:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

.btn-icon-pill:active {
    transform: scale(.97);
}

/* Share: hanya icon, padding simetris */
.btn-share-only {
    padding: .55rem .7rem;
}

/* Wishlist aktif */
.btn-icon-pill.btn-wishlist-active {
    color: #ef4444;
    border-color: #fca5a5;
    background: #fef2f2;
}

.btn-icon-pill.btn-wishlist-active:hover {
    border-color: #ef4444;
    background: #fee2e2;
}

/* ─ Tambah ke Keranjang ───────────────────────────────────────────────── */
.btn-cart {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    border: 2px solid #4361ee;
    background: #fff;
    color: #4361ee;
    padding: .75rem 1rem;
    border-radius: .8rem;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s, transform .15s;
    white-space: nowrap;
}

.btn-cart:hover {
    background: #eff6ff;
}

.btn-cart:active {
    transform: scale(.97);
}

/* ─ Beli Sekarang ──────────────────────────────────────────────────────── */
.btn-buynow {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    border: 2px solid #4361ee;
    background: #4361ee;
    color: #fff;
    padding: .75rem 1rem;
    border-radius: .8rem;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s, border-color .18s, transform .15s;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(67, 97, 238, .3);
}

.btn-buynow:hover {
    background: #3451d1;
    border-color: #3451d1;
}

.btn-buynow:active {
    transform: scale(.97);
}

/* ─ Mobile adjustments ───────────────────────────────────────────────────── */
@media (max-width: 639px) {

    /* Baris 1 scrollable jika mepet */
    #blok-belanja .flex.items-center.gap-2 {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap;
    }

    #blok-belanja .flex.items-center.gap-2::-webkit-scrollbar {
        display: none;
    }

    .btn-wa-pill {
        padding: .5rem .8rem;
        font-size: .82rem;
    }

    .btn-icon-pill {
        padding: .5rem .65rem;
        font-size: .82rem;
    }

    .btn-cart,
    .btn-buynow {
        padding: .7rem .75rem;
        font-size: .84rem;
    }
}