/* Explain: Styles for reusable UI components like buttons, cards, forms, and badges. */
.btn-app {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.4rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.92rem;
    line-height: 1.3;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}

.btn-app-primary {
    background: var(--primary-color);
    color: #ffffff;
}

.btn-app-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-app-dark {
    background: var(--text-color);
    color: #ffffff;
}

.btn-app-dark:hover {
    background: #000000;
    transform: translateY(-2px);
}

.btn-app-outline {
    background: #ffffff;
    border-color: var(--border-color);
    color: var(--text-color);
}

.btn-app-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-app-wa {
    background: #16a34a;
    color: #ffffff;
}

.btn-app-wa:hover {
    background: #15803d;
    transform: translateY(-2px);
}

.btn-app-danger {
    background: var(--danger-color);
    color: #ffffff;
}

.btn-app-danger:hover {
    filter: brightness(0.92);
    transform: translateY(-2px);
}

.btn-app-sm {
    padding: 0.55rem 1rem;
    font-size: 0.84rem;
    border-radius: 10px;
}

.btn-app-block {
    width: 100%;
}

.btn-app:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Kartu produk */
.product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(79, 70, 229, 0.35);
}

.product-media {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--surface-color);
}

.product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.product-card:hover .product-media img {
    transform: scale(1.07);
}

.product-body {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem;
    flex: 1;
}

.product-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-name:hover {
    color: var(--primary-color);
}

.price {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--text-color);
}

/* Chip filter */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.chip:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.chip.is-active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

/* Badge */
.badge-app {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.badge-accent {
    background: var(--accent-color);
    color: #14161a;
}

.badge-primary {
    background: rgba(79, 70, 229, 0.1);
    color: var(--primary-color);
}

.badge-success {
    background: rgba(22, 163, 74, 0.12);
    color: var(--success-color);
}

.badge-muted {
    background: var(--surface-strong);
    color: var(--text-muted);
}

/* Form */
.field-label {
    display: block;
    font-size: 0.84rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.field-input {
    width: 100%;
    height: 3rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    padding-inline: 0.9rem;
    font-size: 0.94rem;
    font-family: inherit;
    color: var(--text-color);
}

select.field-input {
    padding-inline: 0.8rem;
}

textarea.field-input {
    height: auto;
    min-height: 7.5rem;
    padding: 0.8rem 0.9rem;
    resize: vertical;
    line-height: 1.6;
}

.field-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.field-hint {
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Panel */
.card-panel {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--surface-color);
}

/* Langkah jumlah */
.qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    overflow: hidden;
    background: #ffffff;
}

.qty button {
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-color);
    font-size: 0.85rem;
    transition: background 0.2s ease;
}

.qty button:hover {
    background: var(--surface-color);
    color: var(--primary-color);
}

.qty input {
    width: 3rem;
    height: 2.5rem;
    border: none;
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    font-family: inherit;
    background: transparent;
    color: var(--text-color);
    -moz-appearance: textfield;
}

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

/* Galeri produk */
.gallery-main {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.gallery-thumbs {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.85rem;
    overflow-x: auto;
    padding-bottom: 0.3rem;
}

.gallery-thumb {
    width: 4.5rem;
    height: 4.5rem;
    flex: 0 0 auto;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    background: var(--surface-color);
    cursor: pointer;
    padding: 0;
    transition: border-color 0.2s ease;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumb.is-active {
    border-color: var(--primary-color);
}

/* Daftar isi teks kaya */
.prose-app {
    color: var(--text-muted);
    font-size: 0.96rem;
    line-height: 1.8;
}

.prose-app p {
    margin-bottom: 0.9rem;
}

.prose-app ul {
    list-style: disc;
    padding-left: 1.2rem;
    margin-bottom: 0.9rem;
}

.prose-app li {
    margin-bottom: 0.35rem;
}

.prose-app strong {
    color: var(--text-color);
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.info-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.9rem;
}

.info-list dt {
    color: var(--text-muted);
}

.info-list dd {
    margin: 0;
    font-weight: 600;
}

/* Baris keranjang & pesanan */
.cart-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1.15rem;
    border-bottom: 1px solid var(--border-color);
}

.cart-row:last-child {
    border-bottom: none;
}

@media (min-width: 640px) {
    .cart-row {
        grid-template-columns: 6rem 1fr auto;
        align-items: center;
    }
}

.cart-thumb {
    width: 6rem;
    height: 6rem;
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface-color);
}

.cart-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.order-row:last-child {
    border-bottom: none;
}

.link-danger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: none;
    padding: 0;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--danger-color);
    cursor: pointer;
}

.link-danger:hover {
    text-decoration: underline;
}

/* Kerangka loading */
.skeleton {
    background: linear-gradient(90deg, var(--surface-color) 25%, var(--surface-strong) 37%, var(--surface-color) 63%);
    background-size: 400% 100%;
    animation: shimmer 1.4s infinite linear;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0 50%;
    }
}

/* Notifikasi */
.toast-host {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 90;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    pointer-events: none;
}

.toast-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem 1.1rem;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary-color);
    font-size: 0.89rem;
    font-weight: 600;
    max-width: min(90vw, 22rem);
    transition: opacity 0.3s ease, transform 0.3s ease;
    animation: toast-in 0.3s ease;
}

.toast-item.toast-error {
    border-left-color: var(--danger-color);
}

.toast-item.toast-success {
    border-left-color: var(--success-color);
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* Kartu kategori & keunggulan */
.cat-card {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1.4rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    background: #ffffff;
    height: 100%;
    transition: all 0.3s ease;
}

.cat-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.cat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 14px;
    background: var(--surface-color);
    color: var(--primary-color);
    font-size: 1.15rem;
}

.perk-card {
    display: flex;
    gap: 1rem;
    padding: 1.4rem;
    border-radius: var(--radius);
    background: #ffffff;
    border: 1px solid var(--border-color);
    height: 100%;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-color);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Kartu katalog gaya marketplace — kisi dua kolom */
#produkGrid .product-card {
    border: none;
    background: transparent;
}

#produkGrid .product-card:hover {
    transform: none;
    box-shadow: none;
}

#produkGrid .product-media {
    border-radius: 14px;
    border: 1px solid var(--border-color);
}

#produkGrid .product-body {
    padding: 0.6rem 0.35rem 0.15rem;
    gap: 0.15rem;
}

#produkGrid .product-name {
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.3;
}

#produkGrid .price {
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--primary-color);
}

#produkGrid .product-body .icon-btn {
    width: 2.35rem;
    height: 2.35rem;
    font-size: 0.9rem;
    border-radius: 10px;
}

/* Tombol info katalog */
.katalog-info > summary {
    list-style: none;
    cursor: pointer;
    width: auto;
}

.katalog-info > summary::-webkit-details-marker {
    display: none;
}

.katalog-info[open] > summary {
    background: var(--surface-color);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Baris kategori yang digeser ke samping */
.chip-row {
    scrollbar-width: none;
}

.chip-row::-webkit-scrollbar {
    display: none;
}

/* Pencarian katalog */
.catalog-search {
    position: relative;
    width: 100%;
}

.catalog-search-input {
    width: 100%;
    height: 2.9rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    padding: 0 1rem 0 2.6rem;
    font-size: 0.92rem;
    font-family: inherit;
    color: var(--text-color);
}

.catalog-search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: #ffffff;
}

.catalog-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.88rem;
    pointer-events: none;
}

/* Metode pembayaran & rekening */
.pay-option {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pay-option:hover {
    border-color: var(--primary-color);
}

.pay-option.is-disabled {
    opacity: 0.6;
    filter: blur(0.7px);
    cursor: not-allowed;
    background: var(--surface-color);
}

.pay-option.is-disabled:hover {
    border-color: var(--border-color);
}

.pay-option.is-disabled .pay-option-title {
    color: var(--text-muted);
}

.cart-thumb-link {
    display: block;
    width: 100%;
    height: 100%;
}

.pay-option input {
    margin-top: 0.2rem;
    accent-color: var(--primary-color);
}

.pay-option-body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.pay-option-title {
    font-weight: 600;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.pay-option-note {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.bank-row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(79, 70, 229, 0.22);
    border-radius: 12px;
    background: var(--surface-color);
    font-size: 0.88rem;
}

.bank-info {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
}

.bank-info > i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.bank-number-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-top: 0.7rem;
    border-top: 1px dashed var(--border-color);
}

.bank-number-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.bank-number-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.35rem 0.35rem 0.35rem 0.8rem;
}

.bank-number {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    color: var(--text-color);
    word-break: break-all;
    min-width: 0;
}

.bank-copy {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex: 0 0 auto;
    min-height: 2.3rem;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    background: rgba(79, 70, 229, 0.08);
    color: var(--primary-color);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bank-copy:hover {
    background: var(--primary-color);
    color: #ffffff;
}

.bank-copy i {
    font-size: 0.82rem;
}

/* Kotak centang penandaan Pixel */
.pixel-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
}

.pixel-choice {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
}

.pixel-check {
    -webkit-appearance: checkbox !important;
    appearance: auto !important;
    flex: 0 0 auto;
    width: 1.4rem;
    height: 1.4rem;
    min-width: 1.4rem;
    min-height: 1.4rem;
    margin: 0;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

/* Pemilih varian produk */
.variant-group {
    margin-bottom: 1rem;
}

.variant-head {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
}

.variant-label {
    font-size: 0.84rem;
    font-weight: 700;
}

.variant-picked {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.variant-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.variant-chip {
    min-height: 2.6rem;
    min-width: 2.9rem;
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: #ffffff;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.variant-chip:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.variant-chip.is-active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

.variant-chip.is-disabled {
    opacity: 0.45;
    border-style: dashed;
    cursor: not-allowed;
    text-decoration: line-through;
}

.variant-chip.is-disabled:hover {
    border-color: var(--border-color);
    color: var(--text-color);
}

.variant-stock {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* Kunci pembayaran — rekening & metode bayar pemilik platform */
.lock-note {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(220, 38, 38, 0.35);
    border-radius: 12px;
    background: rgba(220, 38, 38, 0.08);
    color: var(--danger-color);
    font-size: 0.85rem;
    line-height: 1.55;
}

.lock-note > i {
    margin-top: 0.15rem;
    font-size: 1rem;
}

.lock-note strong {
    font-weight: 800;
}

.lock-note-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.95rem;
    border-radius: 9px;
    background: var(--danger-color);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lock-note-btn:hover {
    filter: brightness(0.92);
    transform: translateY(-1px);
}

.lock-note-btn-alt {
    background: #ffffff;
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.locked-bank-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem;
    border: 1px dashed rgba(220, 38, 38, 0.45);
    border-radius: 12px;
    background: var(--surface-color);
}

.locked-bank-row > i {
    color: var(--danger-color);
    font-size: 1.2rem;
}

.locked-bank-row .locked-bank-value {
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--text-color);
}

.pay-option.is-locked {
    opacity: 0.65;
    cursor: not-allowed;
}

/* Hitung mundur tahap harga & batas waktu pembayaran */
.countdown-box {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: #ffffff;
}

.countdown-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.cd-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.cd-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
    padding: 0.35rem 0.45rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
}

.cd-num {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.05rem;
    line-height: 1.1;
    color: var(--primary-color);
    font-variant-numeric: tabular-nums;
}

.cd-cap {
    font-size: 0.6rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.cd-expired {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--danger-color);
}

.domain-opt-tick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    margin-inline: auto;
    border-radius: 50%;
    background: var(--surface-strong);
    color: var(--text-muted);
    font-size: 0.7rem;
    transition: all 0.2s ease;
}

.domain-opt.is-selected .domain-opt-tick {
    background: var(--primary-color);
    color: #ffffff;
}

/* Kolom kode buka kunci fitur toko */
.unlock-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 95;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.unlock-modal.is-open {
    display: flex;
}

.unlock-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 22, 26, 0.55);
    backdrop-filter: blur(2px);
}

.unlock-modal-card {
    position: relative;
    width: min(32rem, 100%);
    max-height: 90vh;
    overflow-y: auto;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    animation: unlock-in 0.24s ease;
}

@keyframes unlock-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}