/* tm-offers — Watchlist CSS */

/* ── Botones en ficha de producto ───────────────────────────── */
.tm-watchlist-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
    margin-bottom: 8px;
}

.tm-watchlist-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1.5px solid #E0E0E0;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: all .15s;
    font-family: 'Barlow', 'Arial', sans-serif;
    line-height: 1;
}

.tm-watchlist-btn:hover {
    border-color: #5CB82E;
    color: #5CB82E;
    background: #EAF6DF;
}

.tm-watchlist-btn.is-active {
    border-color: #5CB82E;
    background: #EAF6DF;
    color: #2d6e0f;
}

.tm-watchlist-btn.is-active .tm-btn-icon { color: #5CB82E; }

/* ── Botón corazón en listados ──────────────────────────────── */
.tm-loop-favourite {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,.9);
    border: 1px solid #E0E0E0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all .15s;
    z-index: 2;
    line-height: 1;
}

.tm-loop-favourite:hover,
.tm-loop-favourite.is-active {
    background: #EAF6DF;
    border-color: #5CB82E;
    color: #5CB82E;
}

/* Necesita que el item del loop tenga position:relative */
.woocommerce ul.products li.product { position: relative; }

/* ── Grid de favoritos en Mi Cuenta ─────────────────────────── */
.tm-watchlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 8px;
}

.tm-watchlist-card {
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow .15s;
}

.tm-watchlist-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.08); }

.tm-watchlist-card__img {
    display: block;
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f9f9f9;
}

.tm-watchlist-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .2s;
}

.tm-watchlist-card:hover .tm-watchlist-card__img img { transform: scale(1.03); }

.tm-watchlist-card__status-badge {
    position: absolute;
    bottom: 6px;
    left: 6px;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
}

.tm-watchlist-card__body { padding: 12px; }

.tm-watchlist-card__name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #0A0A0A;
    text-decoration: none;
    margin-bottom: 4px;
    line-height: 1.3;
}

.tm-watchlist-card__name:hover { color: #5CB82E; }

.tm-watchlist-card__price {
    font-size: 14px;
    font-weight: 700;
    color: #5CB82E;
    margin-bottom: 8px;
}

/* ── Lista de alertas ───────────────────────────────────────── */
.tm-alerts-list {
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    overflow: hidden;
}

.tm-alert-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    border-bottom: 1px solid #F4F4F2;
    background: #fff;
}

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

.tm-alert-row__info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.tm-alert-row__name a {
    font-size: 14px;
    font-weight: 600;
    color: #0A0A0A;
    text-decoration: none;
}

.tm-alert-row__name a:hover { color: #5CB82E; }

.tm-alert-row__type {
    font-size: 12px;
    color: #888;
}

.tm-alert-row__price {
    font-size: 14px;
    font-weight: 700;
    color: #5CB82E;
    white-space: nowrap;
}

/* ── Notificaciones ─────────────────────────────────────────── */
.tm-tab-header__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.tm-notif-unread-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #E8600A;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    padding: 0 5px;
    margin-left: 8px;
    vertical-align: middle;
}

.tm-notif-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    overflow: hidden;
}

.tm-notif-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    border-bottom: 1px solid #F4F4F2;
    background: #fff;
    transition: background .12s;
    position: relative;
}

.tm-notif-item:last-child { border-bottom: none; }
.tm-notif-item.is-unread  { background: #FAFFF6; }
.tm-notif-item:hover      { background: #F9F9F9; }

.tm-notif-item__icon {
    font-size: 22px;
    flex-shrink: 0;
    width: 36px;
    text-align: center;
}

.tm-notif-item__body { flex: 1; min-width: 0; }

.tm-notif-item__title {
    font-size: 14px;
    font-weight: 700;
    color: #0A0A0A;
    margin-bottom: 3px;
}

.tm-notif-item__message {
    font-size: 13px;
    color: #444;
    line-height: 1.4;
    margin-bottom: 6px;
}

.tm-notif-item__meta {
    font-size: 12px;
    color: #999;
}

.tm-notif-item__meta a {
    color: #5CB82E;
    text-decoration: none;
}

.tm-notif-item__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #5CB82E;
    flex-shrink: 0;
    margin-top: 4px;
}

/* ── Títulos de sección ─────────────────────────────────────── */
.tm-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #0A0A0A;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid #F4F4F2;
}

.tm-section-count {
    font-size: 13px;
    font-weight: 400;
    color: #888;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 480px) {
    .tm-watchlist-grid { grid-template-columns: repeat(2, 1fr); }
    .tm-watchlist-buttons { flex-direction: column; }
    .tm-watchlist-btn { justify-content: center; }
}
