/* ================================================================
   WEW WISHLIST — Page Widget CSS
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ----------------------------------------------------------------
   Heart Icon (on product listings)
   ---------------------------------------------------------------- */

.wew-wishlist-heart {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 25;
    width: 34px;
    height: 34px;
    background: var(--wew-wishlist-base, rgba(255, 255, 255, 0.92)) !important;
    border-radius: var(--wew-wishlist-radius, 50%) !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
    backdrop-filter: blur(4px);
}

.wew-wishlist-heart:hover {
    transform: scale(1.15);
    background: var(--wew-wishlist-accent, var(--e-global-color-primary, #e05a5a));
    box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
}

.wew-wishlist-heart svg {
    width: 16px;
    height: 16px;
    stroke: var(--wew-wishlist-icon, #666) !important;
    fill: none;
    transition: stroke 0.2s ease, fill 0.2s ease;
    pointer-events: none;
}

.wew-wishlist-heart:hover svg {
    stroke: var(--wew-wishlist-icon-hover, #fff) !important;
    fill: none;
}

.wew-wishlist-heart.active {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.wew-wishlist-heart.active svg {
    stroke: var(--wew-wishlist-accent, var(--e-global-color-primary, #e05a5a));
    fill: var(--wew-wishlist-accent, var(--e-global-color-primary, #e05a5a));
}

.wew-wishlist-heart.active:hover svg {
    stroke: #fff;
    fill: #fff;
}

.wew-wishlist-heart.wew-loading svg {
    animation: wew-pulse 0.8s ease infinite;
}

@keyframes wew-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* ----------------------------------------------------------------
   Wishlist Popup (bocadillo)
   ---------------------------------------------------------------- */

.wew-wishlist-popup {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 200;
    width: 240px;
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
    transition: opacity 0.22s ease, transform 0.22s ease;
    pointer-events: none;
}

.wew-wishlist-popup.wew-popup-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.wew-wishlist-popup-inner {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
    padding: 20px 18px 16px;
    position: relative;
    font-family: 'Inter', sans-serif;
}

.wew-popup-heart {
    text-align: center;
    margin-bottom: 12px;
}

.wew-popup-heart svg {
    width: 36px;
    height: 36px;
    stroke: #e05a5a;
    fill: none;
}

.wew-popup-subtitle {
    font-size: 13px;
    color: #666;
    text-align: center;
    margin: 0 0 14px;
    line-height: 1.5;
}

.wew-popup-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    font-size: 18px;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 4px;
    transition: color 0.2s;
}

.wew-popup-close:hover {
    color: #333;
}

/* Tabs */
.wew-popup-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 14px;
    border-bottom: 2px solid #f0f0f0;
}

.wew-tab {
    flex: 1;
    background: none;
    border: none;
    padding: 8px 4px;
    font-size: 12px;
    font-weight: 600;
    color: #aaa;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
    font-family: 'Inter', sans-serif;
}

.wew-tab.active {
    color: #1a1a1a;
    border-bottom-color: #1a1a1a;
}

.wew-tab-content {
    display: none;
}

.wew-tab-content.active {
    display: block;
}

/* List items */
.wew-popup-lists {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 180px;
    overflow-y: auto;
}

.wew-popup-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.18s;
    font-size: 13px;
    color: #333;
}

.wew-popup-list-item:hover {
    background: #f5f5f5;
}

.wew-popup-list-item.active {
    color: #e05a5a;
    font-weight: 600;
}

.wew-list-check {
    font-size: 14px;
    width: 18px;
    text-align: center;
    color: #e05a5a;
    flex-shrink: 0;
}

.wew-popup-list-item:not(.active) .wew-list-check {
    color: #ccc;
}

/* Create form */
.wew-popup-create-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 0;
}

.wew-new-list-name {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #e8e8e8;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.wew-new-list-name:focus {
    border-color: #1a1a1a;
}

.wew-btn-primary {
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.wew-btn-primary:hover {
    background: #333;
    transform: translateY(-1px);
}

/* Success state */
.wew-popup-success .wew-wishlist-popup-inner {
    background: #f0faf0;
}

/* ----------------------------------------------------------------
   Single product page wishlist button
   ---------------------------------------------------------------- */

.wew-single-wishlist-btn {
    display: flex;
    align-items: center;
    margin-top: 20px;
    /* space below quantity + add-to-cart row */
    position: relative;
}

.wew-single-wishlist-trigger,
.wew-single-wishlist-link {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 14px !important;
    font-family: inherit !important;
    color: #666 !important;
    cursor: pointer !important;
    text-decoration: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    outline: none !important;
    transition: color 0.2s !important;
    width: auto !important;
    height: auto !important;
    line-height: normal !important;
}

.wew-single-wishlist-trigger:hover,
.wew-single-wishlist-link:hover {
    color: #333 !important;
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
}

/* === Heart circle wrapper === */
.wew-heart-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--wew-wishlist-radius, 50%) !important;
    border: 1.5px solid #ccc;
    background: var(--wew-wishlist-base, transparent) !important;
    flex-shrink: 0;
    transition: background 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.wew-single-wishlist-trigger:hover .wew-heart-circle,
.wew-single-wishlist-link:hover .wew-heart-circle {
    background: var(--wew-wishlist-accent, var(--e-global-color-primary, #e05a5a));
    border-color: var(--wew-wishlist-accent, var(--e-global-color-primary, #e05a5a));
    box-shadow: 0 3px 10px rgba(0, 0, 0, .15);
}

/* Heart SVG inside the circle */
.wew-single-wishlist-trigger .wew-heart-icon,
.wew-single-wishlist-link .wew-heart-icon {
    width: 15px;
    height: 15px;
    stroke: var(--wew-wishlist-icon, #999) !important;
    fill: none;
    transition: stroke 0.22s ease, fill 0.22s ease;
    pointer-events: none;
    display: block;
}

/* Text view mode (Product page) */
.wew-single-wishlist-trigger.view-text .wew-heart-circle {
    width: 26px !important;
    height: 26px !important;
    margin-right: 10px !important;
    border-color: rgba(0,0,0,0.1) !important;
}

.wew-single-wishlist-trigger.view-text .wew-heart-icon {
    width: 13px !important;
    height: 13px !important;
}

.wew-single-wishlist-trigger:hover .wew-heart-icon,
.wew-single-wishlist-link:hover .wew-heart-icon {
    stroke: var(--wew-wishlist-icon-hover, #fff) !important;
}

/* Active (already in a wishlist) */
.wew-single-wishlist-trigger.active .wew-heart-circle {
    background: transparent;
    border-color: var(--wew-wishlist-accent, var(--e-global-color-primary, #e05a5a));
}

.wew-single-wishlist-trigger.active .wew-heart-icon {
    stroke: var(--wew-wishlist-accent, var(--e-global-color-primary, #e05a5a));
    fill: var(--wew-wishlist-accent, var(--e-global-color-primary, #e05a5a));
}

/* ----------------------------------------------------------------
   Wishlist Page Widget
   ---------------------------------------------------------------- */

.wew-wishlist-page-wrapper {
    font-family: 'Inter', sans-serif;
}

/* Top bar */
.wew-wishlist-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 30px;
}

.wew-wishlist-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.wew-wishlist-selector select {
    padding: 9px 14px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    background: #fff;
    color: #333;
    cursor: pointer;
    outline: none;
    min-width: 200px;
}

.wew-wishlist-selector select:focus {
    border-color: #1a1a1a;
}

.wew-create-list-inline-btn {
    background: none;
    border: 1.5px solid #1a1a1a;
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: #1a1a1a;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.wew-create-list-inline-btn:hover {
    background: #1a1a1a;
    color: #fff;
}

/* Create new list inline form */
.wew-create-list-form {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: #f9f9f9;
    border-radius: 10px;
    border: 1.5px solid #eee;
}

.wew-create-list-form.visible {
    display: flex;
}

.wew-create-list-form input {
    flex: 1;
    padding: 9px 12px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
}

.wew-create-list-form input:focus {
    border-color: #1a1a1a;
}

/* Items table */
.wew-wishlist-table-wrapper {
    overflow-x: auto;
}

.wew-wishlist-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    /* Borde inferior de cierre de la tabla */
    border-bottom: 2px solid #f0f0f0;
}

/* Anchos de columna:
   1: Product  2: Price  3: Quantity  4: Stock  5: Added  6: Action  7: Extra */
.wew-wishlist-table th:nth-child(1),
.wew-wishlist-table td:nth-child(1) {
    width: auto;
    min-width: 180px;
}

.wew-wishlist-table th:nth-child(2),
.wew-wishlist-table td:nth-child(2) {
    width: 90px;
    white-space: nowrap;
}

.wew-wishlist-table th:nth-child(3),
.wew-wishlist-table td:nth-child(3) {
    width: 72px;
    text-align: center;
}

.wew-wishlist-table th:nth-child(4),
.wew-wishlist-table td:nth-child(4) {
    width: 90px;
    white-space: nowrap;
}

.wew-wishlist-table th:nth-child(5),
.wew-wishlist-table td:nth-child(5) {
    width: 100px;
    white-space: nowrap;
}

.wew-wishlist-table th:nth-child(6),
.wew-wishlist-table td:nth-child(6) {
    width: 130px;
}

.wew-wishlist-table th:nth-child(7),
.wew-wishlist-table td:nth-child(7) {
    width: 160px;
}

.wew-wishlist-table th {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #999;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 2px solid #f0f0f0;
    white-space: nowrap;
}

.wew-wishlist-table td {
    padding: 16px 16px;
    border-bottom: 1px solid #f5f5f5;
    vertical-align: middle;
    color: #333;
}

/* Última fila: borde inferior visible para cerrar la tabla */
.wew-wishlist-table tr:last-child td {
    border-bottom: 1px solid #f5f5f5;
}

.wew-wishlist-table tr:hover td {
    background: #fafafa;
}

/* Product cell */
.wew-item-product {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 200px;
}

.wew-item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    background: #f5f5f5;
    flex-shrink: 0;
}

.wew-item-title {
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
    transition: color 0.2s;
}

.wew-item-title:hover {
    color: #e05a5a;
}

/* Stock badge */
.wew-stock-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wew-stock-badge.in-stock {
    background: #e8f5e9;
    color: #388e3c;
}

.wew-stock-badge.out-of-stock {
    background: #fce4ec;
    color: #c62828;
}

/* Quantity — muy compacto */
.wew-item-qty {
    width: 48px;
    padding: 5px 6px;
    border: 1.5px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    text-align: center;
    font-family: 'Inter', sans-serif;
    outline: none;
}

/* Date */
.wew-item-date {
    font-size: 12px;
    color: #aaa;
    white-space: nowrap;
}

/* Cart button */
.wew-item-add-cart {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 12px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s, transform 0.15s;
}

.wew-item-add-cart:hover {
    background: #333;
    color: #fff;
    transform: translateY(-1px);
}

.wew-item-add-cart:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Move/Remove links */
.wew-item-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}

.wew-move-link,
.wew-remove-link {
    font-size: 11px;
    color: #999;
    cursor: pointer;
    text-decoration: none;
    background: none;
    border: none;
    padding: 2px 6px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    line-height: 1.4;
    border-radius: 4px;
    display: inline-block;
}

.wew-move-link:hover {
    color: #fff;
    background: var(--e-global-color-primary, #e05a5a);
}

.wew-remove-link:hover {
    color: #fff;
    background: #e11d48; /* Un rojo más vibrante e intenso */
}

/* Move to list popup */
.wew-move-popup {
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 100;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .14);
    padding: 10px 0;
    min-width: 180px;
    display: none;
}

.wew-move-popup.visible {
    display: block;
}

.wew-move-popup-item {
    display: block;
    padding: 9px 16px;
    font-size: 13px;
    color: #333;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: 'Inter', sans-serif;
    transition: background 0.15s;
}

.wew-move-popup-item:hover {
    background: #f5f5f5;
}

/* Empty state */
.wew-wishlist-empty {
    text-align: center;
    padding: 60px 20px;
    color: #aaa;
}

.wew-wishlist-empty svg {
    width: 64px;
    height: 64px;
    stroke: #ddd;
    fill: none;
    margin-bottom: 16px;
}

.wew-wishlist-empty h3 {
    font-size: 18px;
    color: #999;
    margin: 0 0 8px;
    font-weight: 600;
}

.wew-wishlist-empty p {
    font-size: 14px;
    color: #bbb;
    margin: 0;
}

/* Not logged in */
.wew-wishlist-login-notice {
    text-align: center;
    padding: 50px 20px;
}

.wew-wishlist-login-notice h3 {
    font-size: 20px;
    color: #333;
    margin: 0 0 10px;
}

.wew-wishlist-login-notice p {
    font-size: 14px;
    color: #888;
    margin: 0 0 20px;
}

/* Feedbacks */
.wew-wishlist-notice {
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
}

.wew-wishlist-notice.visible {
    display: block;
}

.wew-wishlist-notice.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.wew-wishlist-notice.error {
    background: #fce4ec;
    color: #c62828;
}

/* Responsive */
@media (max-width: 768px) {

    .wew-wishlist-table th:nth-child(5),
    .wew-wishlist-table td:nth-child(5) {
        display: none;
    }

    /* hide date */

    .wew-item-product {
        min-width: 160px;
    }

    .wew-item-image {
        width: 46px;
        height: 46px;
    }

    .wew-item-add-cart {
        padding: 8px 12px;
        font-size: 11px;
    }
}