/* ==========================================================================
   favoritos.css -- "Mis favoritos" de detallesdepia.cl. S535 2026-10-19 NOVA
   Archivo APARTE (igual que tienda.css): para revertir basta con no cargarlo.
   Usa las variables del sitio: --color-primary #2c2c2c, --color-accent #c9a961.
   El sitio no tiene tema oscuro: colores explicitos para que se vea igual siempre.
   ========================================================================== */

/* --- corazon sobre la ficha --- */
.product-card { position: relative; }
.fav-btn {
    position: absolute; top: .75rem; left: .75rem; z-index: 3;
    width: 44px; height: 44px; padding: 0; margin: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid rgba(0,0,0,.10); border-radius: 50%;
    background: rgba(255,255,255,.95); color: #2c2c2c;
    box-shadow: 0 2px 6px rgba(0,0,0,.14); cursor: pointer;
    -webkit-tap-highlight-color: transparent; transition: transform .15s ease;
}
.fav-btn[hidden] { display: none; }
.fav-btn svg { width: 24px; height: 24px; display: block; pointer-events: none; }
.fav-btn svg path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.fav-btn[aria-pressed="true"] { color: #b83256; }
.fav-btn[aria-pressed="true"] svg path { fill: currentColor; }
.fav-btn:hover { transform: scale(1.06); }
.fav-btn:focus-visible { outline: 3px solid #1a5fb4; outline-offset: 2px; }

/* --- foco visible en los controles nuevos --- */
.fav-quitar:focus-visible, .fav-wa:focus-visible, .fav-compartir .btn-tienda:focus-visible,
.fav-acciones .btn-carro:focus-visible, .nav-fav:focus-visible, #fav-enlace:focus-visible {
    outline: 3px solid #1a5fb4; outline-offset: 2px;
}

/* --- lista --- */
.fav-cargando { color: #666; padding: 2rem 0; }
.fav-lista { list-style: none; margin: 0; padding: 0; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.fav-fila {
    display: grid; grid-template-columns: 96px minmax(0, 1fr) minmax(190px, auto);
    gap: 1rem; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid #eee;
}
.fav-fila:last-child { border-bottom: none; }
.fav-foto {
    width: 96px; height: 96px; border-radius: 8px; overflow: hidden; background: #f3f1ec;
    display: flex; align-items: center; justify-content: center;
}
.fav-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fav-datos h3 { font-size: 1rem; font-weight: 600; color: #2c2c2c; margin: .15rem 0 .3rem; line-height: 1.35; overflow-wrap: anywhere; }
.fav-precio { display: block; font-weight: 700; color: #2c2c2c; }
.fav-estado { display: inline-block; margin-top: .4rem; padding: .15rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 600; line-height: 1.5; }
.fav-estado.ok      { background: #e7f6ec; color: #1c5133; }
.fav-estado.reserva { background: #fff1d6; color: #6b4300; }
.fav-estado.no      { background: #efede8; color: #4a4a4a; }
.fav-nota { color: #555; font-size: .9rem; line-height: 1.5; }
.fav-fuera .fav-foto { background: #f7f6f3; }

.fav-acciones { display: flex; flex-direction: column; gap: .5rem; align-items: stretch; }
.fav-acciones form { margin: 0; }
.fav-acciones .btn-carro { min-height: 44px; }
.fav-en-carro { display: flex; align-items: center; justify-content: center; text-decoration: none; text-align: center; min-height: 44px; }
.fav-wa {
    display: flex; align-items: center; justify-content: center; min-height: 44px;
    border: 1px solid #b7e0c5; border-radius: 8px; color: #1c5133; background: #f3fbf6;
    text-decoration: none; font-size: .85rem; font-weight: 600; text-align: center; padding: .4rem .8rem;
}
.fav-wa:hover { background: #e7f6ec; }
.fav-quitar {
    min-height: 44px; background: #fff; border: 1px solid #ddd; color: #8c2b2b;
    padding: .5rem .9rem; border-radius: 8px; cursor: pointer; font-family: inherit; font-size: .85rem; font-weight: 600;
}
.fav-quitar:hover { background: #fdecec; border-color: #f2c2c2; }
.fav-quitar:disabled { opacity: .6; cursor: default; }
.fav-btn.fav-btn-fila { position: static; align-self: flex-end; box-shadow: none; }

/* --- compartir --- */
.fav-compartir { background: #fff; border-radius: 12px; padding: 1.25rem 1.5rem; box-shadow: 0 2px 10px rgba(0,0,0,.05); margin-top: 1.5rem; }
.fav-compartir h3 { font-size: 1.2rem; color: #2c2c2c; margin-bottom: .4rem; }
.fav-compartir p { color: #555; font-size: .9rem; line-height: 1.55; margin-bottom: .75rem; }
.fav-enlace-lbl { display: block; font-size: .8rem; font-weight: 600; color: #444; margin-bottom: .3rem; }
#fav-enlace {
    width: 100%; padding: .65rem .8rem; border: 1.5px solid #e2e2e2; border-radius: 8px;
    font-family: inherit; font-size: .85rem; color: #222; background: #faf9f6;
}
.fav-botones { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .9rem; }
.fav-botones .btn-tienda { min-height: 44px; }
.fav-botones [hidden] { display: none; }

/* --- mensaje breve --- */
.fav-aviso {
    position: fixed; left: 50%; bottom: 5.25rem; transform: translateX(-50%); z-index: 95;
    max-width: calc(100% - 2rem); background: #2c2c2c; color: #fff; padding: .7rem 1.1rem;
    border-radius: 8px; font-size: .9rem; line-height: 1.4; text-align: center;
    box-shadow: 0 6px 20px rgba(0,0,0,.25); opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.fav-aviso.on { opacity: 1; }

@media (max-width: 640px) {
    .fav-fila { grid-template-columns: 72px minmax(0, 1fr); padding: 1rem; }
    .fav-foto { width: 72px; height: 72px; }
    .fav-acciones { grid-column: 1 / -1; }
    .fav-btn.fav-btn-fila { align-self: flex-start; }
    .fav-botones .btn-tienda { flex: 1 1 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
    .fav-btn, .fav-aviso { transition: none; }
    .fav-btn:hover { transform: none; }
}

/* --- S536 avisos por correo --- */
.fav-avisos { background: #fff; border-radius: 12px; padding: 1.25rem 1.5rem; box-shadow: 0 2px 10px rgba(0,0,0,.05); margin-top: 1.5rem; }
.fav-avisos h3 { font-size: 1.2rem; color: #2c2c2c; margin-bottom: .4rem; }
.fav-avisos p { color: #555; font-size: .9rem; line-height: 1.55; margin-bottom: .75rem; }
.fav-av-form label[for] { display: block; font-size: .8rem; font-weight: 600; color: #444; margin-bottom: .3rem; }
#fav-av-email {
    width: 100%; max-width: 420px; padding: .65rem .8rem; min-height: 44px; border: 1.5px solid #e2e2e2; border-radius: 8px;
    font-family: inherit; font-size: .95rem; color: #222; background: #fff;
}
#fav-av-email:focus-visible { outline: 3px solid #1a5fb4; outline-offset: 2px; }
.fav-av-acepto { display: flex; gap: .6rem; align-items: flex-start; margin: .9rem 0; font-size: .85rem; color: #444; line-height: 1.5; cursor: pointer; }
.fav-av-acepto input { width: 22px; height: 22px; flex: 0 0 22px; margin-top: .1rem; accent-color: #2c2c2c; }
.fav-av-acepto input:focus-visible { outline: 3px solid #1a5fb4; outline-offset: 2px; }
.fav-av-form .btn-tienda { min-height: 44px; }
.fav-av-form .btn-tienda:focus-visible { outline: 3px solid #1a5fb4; outline-offset: 2px; }
.fav-av-nota { font-size: .8rem !important; color: #595959 !important; margin-top: .75rem; }
.fav-avisos-pag .fav-av-lista { margin: 0 0 1.25rem 1.2rem; color: #2c2c2c; line-height: 1.7; }
.fav-avisos-pag form { margin: 1rem 0; }
.fav-avisos-pag .btn-tienda { min-height: 44px; }
@media (max-width: 640px) { .fav-av-form .btn-tienda { width: 100%; } }
