:root {
    --wl-brand: #1b3c53;
    --wl-brand-dark: #213c51;
    --wl-brand-soft: rgba(27, 60, 83, 0.08);

    --wl-text: #111827;
    --wl-muted: #6b7280;
    --wl-line: #e5e7eb;

    --wl-card: #ffffff;
    --wl-bg: #ffffff;

    --wl-r12: 12px;
    --wl-r14: 14px;
}

/* =========================
   PAGE WRAP
   ========================= */
.rc-wl-page {
    background: transparent;
}

.rc-wl-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.rc-wl-header__title {
    margin: 0;
    font-size: 18px;
    font-weight: 900;
    color: var(--wl-text);
    line-height: 1.2;
}

.rc-wl-header__subtitle {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--wl-muted);
}

.rc-wl-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--wl-line);
    border-radius: 999px;
    background: #fff;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 800;
    color: var(--wl-text);
}
.rc-wl-chip i {
    color: var(--wl-brand);
    font-size: 18px;
}

/* =========================
   GRID (smaller than etalase)
   ========================= */
.rc-wl-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 992px) {
    .rc-wl-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 14px;
    }
}

/* =========================
   CARD
   ========================= */
.rc-wl-card {
    border: 1px solid var(--wl-line);
    border-radius: var(--wl-r14);
    background: var(--wl-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition:
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.rc-wl-card:hover {
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

/* media (keep image sizing similar approach, but compact) */
.rc-wl-card__media {
    position: relative;
    display: block;
    background: #f8f9fa;
    overflow: hidden;
    border-bottom: 1px solid var(--wl-line);
}

.rc-wl-card__img {
    width: 100%;
    height: 150px; /* smaller than etalase */
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.25s ease;
}

.rc-wl-card:hover .rc-wl-card__img {
    transform: scale(1.05);
}

@media (min-width: 992px) {
    .rc-wl-card__img {
        height: 170px; /* compact desktop */
    }
}

/* ribbons */
.rc-wl-ribbon {
    position: absolute;
    top: 10px;
    left: -34px;
    transform: rotate(-45deg);
    font-weight: 900;
    font-size: 11px;
    letter-spacing: 0.3px;
    padding: 6px 46px;
    z-index: 4;
    color: #fff;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}
.rc-wl-ribbon--danger {
    background: #ef4444;
}
.rc-wl-ribbon--muted {
    background: #64748b;
}

/* remove button overlay */
.rc-wl-card__media .rc-wl-iconbtn--danger {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 6;
}

/* =========================
   BODY
   ========================= */
.rc-wl-card__body {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

@media (min-width: 992px) {
    .rc-wl-card__body {
        padding: 12px;
    }
}

/* title */
.rc-wl-title a,
.rc-wl-title__dead {
    font-weight: 900;
    color: var(--wl-text);
    text-decoration: none;
    font-size: 13px;
    line-height: 1.25;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rc-wl-title a:hover {
    color: var(--wl-brand);
}

.rc-wl-title__dead {
    color: #6b7280;
}

/* sub */
.rc-wl-sub {
    font-size: 11px;
    color: var(--wl-muted);
}

/* tags */
.rc-wl-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 2px;
}

.rc-wl-tag {
    border: 1px solid var(--wl-line);
    background: #fff;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 10px;
    color: var(--wl-text);
}

/* =========================
   FOOTER
   ========================= */
.rc-wl-footer {
    margin-top: auto;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 10px;
    padding-top: 4px;
}

.rc-wl-price {
    font-size: 14px;
    font-weight: 900;
    color: var(--wl-brand);
    line-height: 1.1;
}

.rc-wl-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* badge */
.rc-wl-badge {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    border: 1px solid transparent;
    white-space: nowrap;
}
.rc-wl-badge--success {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.25);
    color: #16a34a;
}
.rc-wl-badge--danger {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
    color: #dc2626;
}
.rc-wl-badge--muted {
    background: rgba(100, 116, 139, 0.12);
    border-color: rgba(100, 116, 139, 0.25);
    color: #475569;
}

/* =========================
   ICON BUTTONS
   ========================= */
.rc-wl-iconbtn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--wl-line);
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s ease;
    color: #111;
}

.rc-wl-iconbtn i {
    font-size: 16px;
    line-height: 1;
}

/* cart tint */
.rc-wl-iconbtn--cart {
    border-color: rgba(27, 60, 83, 0.22);
    background: rgba(27, 60, 83, 0.04);
}

.rc-wl-iconbtn--danger {
    border-color: rgba(239, 68, 68, 0.25);
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
}

.rc-wl-iconbtn:hover {
    border-color: rgba(27, 60, 83, 0.45);
    color: var(--wl-brand);
    transform: translateY(-1px);
}

.rc-wl-iconbtn--danger:hover {
    border-color: rgba(239, 68, 68, 0.55);
    color: #b91c1c;
}

/* loading safe */
.rc-wl-iconbtn.is-loading {
    pointer-events: none;
}
.rc-wl-iconbtn.is-loading i {
    font-size: 18px;
}

/* disabled */
.rc-wl-iconbtn.disabled,
.rc-wl-iconbtn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none;
}

/* =========================
   EMPTY STATE
   ========================= */
.rc-wl-empty {
    grid-column: 1 / -1;
    border: 1px dashed var(--wl-line);
    border-radius: 14px;
    background: #fff;
    padding: 26px 16px;
    text-align: center;
    color: var(--wl-muted);
}

.rc-wl-empty__icon i {
    font-size: 52px;
    color: #e5e7eb;
}

.rc-wl-empty__title {
    margin: 10px 0 6px;
    font-size: 16px;
    font-weight: 900;
    color: var(--wl-text);
}

.rc-wl-empty__desc {
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--wl-muted);
}

.rc-wl-empty__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 12px;
    padding: 10px 14px;
    background: var(--wl-brand);
    color: #fff;
    text-decoration: none;
    font-weight: 900;
}
.rc-wl-empty__btn:hover {
    background: var(--wl-brand-dark);
    color: #fff;
}

/* pagination */
.rc-wl-pagination {
    margin-top: 14px;
}
/* =========================================================
   WISHLIST — FINAL FIX
   - Portrait media (tinggi > lebar)
   - Image full width (tidak "kurang lebar")
   - Promo image tidak "rusak" (pakai contain)
   - Content + icons lebih kecil
   Scope: .rc-wishlist-products .etalase-card--wl
   ========================================================= */

/* Grid wishlist */
.rc-wishlist-products {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 992px) {
    .rc-wishlist-products {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 14px;
    }
}

/* Card smaller */
.rc-wishlist-products .etalase-card.etalase-card--wl {
    border-radius: 12px;
}

/* =========================
   MEDIA WRAP (Portrait)
   ========================= */
.rc-wishlist-products .etalase-card.etalase-card--wl .etalase-card__img {
    position: relative;
    display: block; /* ✅ pastikan block */
    width: 100% !important; /* ✅ full lebar card */
    overflow: hidden;

    /* portrait: tinggi > lebar */
    aspect-ratio: 4 / 5; /* bisa 3/4 kalau mau lebih tinggi */

    /* matikan height lama */
    height: auto !important;
    min-height: 0 !important;

    background: #f8f9fa;
    border-bottom: 1px solid var(--line);
}

/* gambar wajib ikut bounding box wrapper */
.rc-wishlist-products .etalase-card.etalase-card--wl .etalase-img {
    width: 100% !important;
    height: 100% !important;
    display: block;
    object-position: center;

    /* ✅ KUNCI: biar promo/banner tidak kepotong */
    object-fit: contain !important;

    /* sedikit padding biar terlihat rapih kalau contain */
    padding: 6px;
    background: #fff;

    transition: transform 0.25s ease;
}

/* hover (jangan terlalu zoom untuk contain) */
.rc-wishlist-products .etalase-card.etalase-card--wl:hover .etalase-img {
    transform: scale(1.01);
}

/* =========================
   Overlay Buttons
   ========================= */

/* Tombol trash overlay (kanan atas) */
.rc-wishlist-products .etalase-card.etalase-card--wl .etalase-iconbtn--danger {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 6;
    border-color: rgba(239, 68, 68, 0.25);
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

/* Badge "Habis" model ribbon */
.rc-wishlist-products .etalase-card.etalase-card--wl .etalase-oos-badge {
    position: absolute;
    top: 10px;
    left: -34px;
    transform: rotate(-45deg);
    background: #ef4444;
    color: #fff;
    font-weight: 900;
    font-size: 11px;
    padding: 6px 46px;
    z-index: 5;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

/* =========================
   BODY smaller
   ========================= */
.rc-wishlist-products .etalase-card.etalase-card--wl .etalase-card__body {
    padding: 10px;
    gap: 6px;
}

.rc-wishlist-products .etalase-card.etalase-card--wl .etalase-title a {
    font-size: 12.5px;
    line-height: 1.25;
    -webkit-line-clamp: 2;
}

.rc-wishlist-products .etalase-card.etalase-card--wl .etalase-sub {
    font-size: 11px;
}

/* pill kecil */
.rc-wishlist-products .etalase-card.etalase-card--wl .etalase-meta__categories {
    gap: 6px;
    margin-top: 2px;
}
.rc-wishlist-products .etalase-card.etalase-card--wl .etalase-pill {
    padding: 2px 8px;
    font-size: 10px;
}

/* bottom row */
.rc-wishlist-products .etalase-card.etalase-card--wl .etalase-bottom-row {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.rc-wishlist-products .etalase-card.etalase-card--wl .etalase-price {
    font-size: 14px;
    font-weight: 900;
}

/* icon buttons lebih kecil */
.rc-wishlist-products .etalase-card.etalase-card--wl .etalase-iconbtn {
    width: 30px;
    height: 30px;
    border-radius: 10px;
}
.rc-wishlist-products .etalase-card.etalase-card--wl .etalase-iconbtn i {
    font-size: 14px;
}

/* loading icon jangan membesar */
.rc-wishlist-products
    .etalase-card.etalase-card--wl
    .etalase-iconbtn.is-loading
    i {
    font-size: 14px !important;
}

/* Desktop tweak */
@media (min-width: 992px) {
    .rc-wishlist-products .etalase-card.etalase-card--wl .etalase-card__body {
        padding: 12px;
    }
    .rc-wishlist-products .etalase-card.etalase-card--wl .etalase-title a {
        font-size: 13px;
    }
    .rc-wishlist-products .etalase-card.etalase-card--wl .etalase-price {
        font-size: 15px;
    }
}
/* =========================================================
   WISHLIST — AUTO IMAGE HEIGHT (ikut rasio gambar)
   Scope: .rc-wishlist-products .etalase-card--wl
   ========================================================= */

/* wrapper media: jangan dipaksa portrait */
.rc-wishlist-products .etalase-card.etalase-card--wl .etalase-card__img {
    position: relative;
    display: block;
    width: 100% !important;

    /* MATIKAN SEMUA YANG NGUNCI */
    aspect-ratio: auto !important;
    height: auto !important;

    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: #fff;
}

/* img ikut ukuran natural + tetap memenuhi lebar card */
.rc-wishlist-products .etalase-card.etalase-card--wl .etalase-img {
    display: block;
    width: 100% !important;
    height: auto !important; /* ✅ ikut rasio asli */
    max-width: 100% !important;

    /* supaya banner tidak kepotong */
    object-fit: contain !important;
    background: #fff;

    /* hilangkan padding yang bikin terlihat "kecil" */
    padding: 0 !important;
}

/* OPTIONAL: supaya kartu tetap rapih walau gambar beda-beda tinggi
   (kalau kamu mau tinggi card sama, KOMENTARI bagian ini) */
.rc-wishlist-products .etalase-card.etalase-card--wl {
    align-self: start;
}
/* =========================================================
   WISHLIST GRID — MOBILE 2 COLUMNS (paksa)
   taruh paling bawah biar menang
   ========================================================= */

/* default mobile: 2 kolom */
.rc-wishlist-products {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    align-items: start;
}

/* kalau layar sangat kecil, tetap 2 kolom tapi rapat */
@media (max-width: 360px) {
    .rc-wishlist-products {
        gap: 10px !important;
    }
}

/* desktop 4 kolom */
@media (min-width: 992px) {
    .rc-wishlist-products {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: 14px !important;
    }
}

/* IMPORTANT: pastikan item grid boleh mengecil */
.rc-wishlist-products > * {
    min-width: 0 !important;
}

/* kalau ada card yang maksa lebar, matikan */
.rc-wishlist-products .etalase-card.etalase-card--wl {
    min-width: 0 !important;
    width: 100%;
}
/* FIX: <=420px tetap 2 kolom */
@media (max-width: 420px) {
    .rc-wishlist-products {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }
}
