/* ── Email-capture modal ──────────────────────────────────────────────── */
.wrem-modal[hidden] { display: none; }

.wrem-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wrem-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.wrem-modal__box {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 36px 32px 28px;
    width: min(420px, 92vw);
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
    animation: wrem-slide-up .22s ease;
}

@keyframes wrem-slide-up {
    from { transform: translateY(24px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.wrem-modal__close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #9ca3af;
    padding: 4px 8px;
}
.wrem-modal__close:hover { color: #374151; }

.wrem-modal__icon {
    font-size: 36px;
    color: #d50000;
    margin-bottom: 10px;
}

.wrem-modal__box h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: #111827;
}

.wrem-modal__box p {
    margin: 0 0 20px;
    font-size: 14px;
    color: #6b7280;
}

#wrem-capture-form input[type=email] {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}
#wrem-capture-form input[type=email]:focus {
    border-color: #d50000;
    box-shadow: 0 0 0 3px rgba(213, 0, 0, 0.1);
}

.wrem-modal__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.wrem-modal__actions button[type=submit] {
    width: 100%;
    padding: 12px;
    background: #d50000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}
.wrem-modal__actions button[type=submit]:hover { background: #b71c1c; }
.wrem-modal__actions button[type=submit]:disabled { opacity: .6; cursor: default; }

.wrem-modal__skip {
    background: none;
    border: none;
    font-size: 13px;
    color: #9ca3af;
    cursor: pointer;
    text-decoration: underline;
}
.wrem-modal__skip:hover { color: #374151; }

.wrem-modal__success {
    color: #16a34a;
    font-weight: 700;
    font-size: 15px;
}

/* ── Counter ──────────────────────────────────────────────────────────── */
.wrem-counter-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: inherit;
    position: relative;
}
.wrem-counter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.wrem-counter-count {
    font-size: 12px;
    font-weight: 700;
    background: #d50000;
    color: #fff;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    padding: 0 4px;
    margin-left: 2px;
}
.wrem-counter__text {
    font-size: 13px;
    margin-left: 2px;
}

/* ── Add-to-wishlist button ────────────────────────────────────────────── */
.wrem-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
    margin-top: 8px;
    transition: color .2s, border-color .2s, transform .2s ease, opacity .2s ease, box-shadow .2s ease;
}
.wrem-btn:hover,
.wrem-btn--active {
    color: #d50000;
    border-color: #d50000;
}
.wrem-btn--loading {
    opacity: .6;
    pointer-events: none;
}
.wrem-btn svg { flex-shrink: 0; }

/* ── Floating heart over product cards ─────────────────────────────────── */
.woocommerce ul.products li.product {
    position: relative;
}

.wrem-btn--loop {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    border: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
    cursor: pointer;
    color: #374151;
    font-size: 13px;
    font-weight: 700;
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translateY(-6px);
    transition: opacity .2s ease, transform .2s ease, color .2s ease, background .2s ease;
    margin: 0 !important;
}

.wrem-btn--loop .wrem-btn__label { display: none; }

/* visible on hover — show heart + label for any product */
.woocommerce ul.products li.product:hover .wrem-btn--loop {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0);
}

.woocommerce ul.products li.product:hover .wrem-btn--loop .wrem-btn__label {
    display: inline;
}

/* active (already in wishlist) — always visible with text */
.wrem-btn--loop.wrem-btn--active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    color: #d50000;
    background: rgba(255, 255, 255, 0.95);
}

.wrem-btn--loop.wrem-btn--active .wrem-btn__label {
    display: inline;
}

/* ── Wishlist view page ────────────────────────────────────────────────── */
.wrem-wishlist-view { width: 100%; }

.wrem-wishlist-empty {
    text-align: center;
    padding: 40px 0;
    color: #6b7280;
}
.wrem-wishlist-empty a { color: #d50000; }

.wrem-wishlist-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.wrem-wishlist-table th,
.wrem-wishlist-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}
.wrem-wishlist-table thead th {
    font-weight: 700;
    color: #374151;
    text-align: left;
}
.wrem-product-img { width: 60px; height: 60px; object-fit: cover; border-radius: 4px; }
.wrem-product-name a { color: #111827; text-decoration: none; font-weight: 600; }
.wrem-product-name a:hover { color: #d50000; }
.wrem-remove-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    font-size: 18px;
    padding: 4px;
    line-height: 1;
}
.wrem-remove-btn:hover { color: #d50000; }
.wrem-add-to-cart a.button {
    display: inline-block;
    padding: 8px 14px;
    background: #111827;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}
.wrem-add-to-cart a.button:hover { background: #d50000; }
