/* White Fox · área de cuenta: piezas compartidas.
   Migas de pan, menú lateral (solo computadora), link de volver (solo celular) y título de página.
   Se carga desde templates/_partials/head.tpl en las páginas que ya usan el nuevo diseño. */

:root {
    --wfacc-navy: #1E2A3A;
    --wfacc-gold: #B3956A;
    --wfacc-cream: #F9F4F0;
    --wfacc-muted: #5E6672;
    --wfacc-line: rgba(30, 42, 58, .12);
}

/* ---------- Migas de pan: "Inicio / Mi cuenta / Pedidos" ---------- */
#wrapper .breadcrumb.wf-account-crumb {
    max-width: 1120px;
    margin: 28px auto 44px;
    padding: 0;
    background: transparent;
    border: 0;
    text-align: left;
    font-size: 14px;
    line-height: 1.5;
}
#wrapper .breadcrumb.wf-account-crumb ol { margin: 0; padding: 0; list-style: none; }
#wrapper .breadcrumb.wf-account-crumb li { display: inline; }
/* Sin el ícono de casita que el tema pone en el primer elemento. */
#wrapper .breadcrumb.wf-account-crumb li:first-child a:before { content: none; margin: 0; }
#wrapper .breadcrumb.wf-account-crumb li:after { content: "/"; margin: 0 10px; color: #BDBDBD; }
#wrapper .breadcrumb.wf-account-crumb li:last-child:after { content: none; }
#wrapper .breadcrumb.wf-account-crumb a,
#wrapper .breadcrumb.wf-account-crumb li:last-child a { color: var(--wfacc-muted); text-decoration: none; }
#wrapper .breadcrumb.wf-account-crumb a:hover,
#wrapper .breadcrumb.wf-account-crumb a:focus-visible { color: var(--wfacc-navy); text-decoration: underline; text-underline-offset: 3px; }
#wrapper .breadcrumb.wf-account-crumb span { line-height: inherit; vertical-align: baseline; text-transform: none; letter-spacing: 0; }
#wrapper .breadcrumb.wf-account-crumb li > span[aria-current] { color: var(--wfacc-navy); }

/* ---------- Estructura de la página ---------- */
.wfacc {
    display: flex;
    align-items: flex-start;
    gap: 64px;
    max-width: 1120px;
    margin: 0 auto 64px;
    font-family: 'PT Serif', serif;
    color: var(--wfacc-navy);
}
.wfacc__main { flex: 1 1 0; min-width: 0; }

/* Título principal (H1) */
#wrapper .wfacc__title {
    margin: 0;
    padding: 0;
    color: var(--wfacc-navy);
    font-family: inherit;
    font-size: 40px;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: 0;
    text-transform: none;
    text-align: left;
}
#wrapper .wfacc__title::before,
#wrapper .wfacc__title::after { content: none; }
#wrapper .wfacc--detail .wfacc__title { font-size: 28px; line-height: 1.2; }

/* Cabecera de la página: título (+ subtítulo) y, si hay, una acción a la derecha */
.wfacc__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 0 0 36px;
}
.wfacc--detail .wfacc__head { margin: 18px 0 32px; }
.wfacc__headtext { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.wfacc__sub { font-size: 15px; line-height: 1.4; color: var(--wfacc-muted); }

/* Textos que cambian entre computadora y celular */
.wfo-only-mobile { display: none; }

/* El contenido interno (hasta que se rediseñe cada página) no hereda el recuadro de tarjeta del tema. */
.wfacc__content { margin: 0; padding: 0; background: transparent; border: 0; box-shadow: none; }

/* ---------- Menú lateral (computadora) ---------- */
.wfacc__nav {
    flex: 0 0 240px;
    width: 240px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.wfacc__list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 2px; }
.wfacc__list li { margin: 0; padding: 0; list-style: none; }

#wrapper .wfacc__nav a {
    display: flex;
    align-items: center;
    box-sizing: border-box;
    text-decoration: none;
    text-transform: none;
    letter-spacing: 0;
    font-family: inherit;
    font-weight: 400;
    transition: background-color .15s ease, color .15s ease;
}
#wrapper .wfacc__nav-home {
    height: 32px;
    padding: 0 14px;
    font-size: 14px;
    color: var(--wfacc-muted);
}
#wrapper .wfacc__link {
    gap: 12px;
    height: 44px;
    padding: 0 14px;
    font-size: 16px;
    color: var(--wfacc-navy);
}
#wrapper .wfacc__link svg { flex: none; width: 20px; height: 20px; color: var(--wfacc-gold); }
#wrapper .wfacc__link.is-current { background: var(--wfacc-cream); }
.wfacc__sep {
    height: 1px;
    margin: 16px 14px;
    padding: 0;
    border: 0;
    background: rgba(30, 42, 58, .10);
}
#wrapper .wfacc__out {
    min-height: 44px;
    padding: 0 14px;
    font-size: 15px;
    color: var(--wfacc-muted);
}

#wrapper .wfacc__nav a:hover,
#wrapper .wfacc__nav a:focus-visible { color: var(--wfacc-navy); }
#wrapper .wfacc__link:hover,
#wrapper .wfacc__link:focus-visible { background: rgba(249, 244, 240, .7); }
#wrapper .wfacc__link.is-current:hover,
#wrapper .wfacc__link.is-current:focus-visible { background: var(--wfacc-cream); }
#wrapper .wfacc__nav a:focus-visible,
#wrapper .wfacc__back:focus-visible { outline: 2px solid var(--wfacc-navy); outline-offset: 2px; }

/* Link de volver: solo en celular (en computadora lo reemplazan las migas de pan y el menú lateral) */
#wrapper .wfacc__back { display: none; }

/* ---------- Celular y tablet (menos de 992 px) ---------- */
@media (max-width: 991px) {
    /* Las migas se ocultan: las reemplaza el link de volver. */
    #wrapper .breadcrumb.wf-account-crumb { display: none; }

    .wfacc {
        display: block;
        margin: 0 auto 48px;
        padding: 0 5px;   /* suma al margen del tema para dejar unos 20 px a cada lado */
    }
    .wfacc__nav { display: none; }

    #wrapper .wfacc__back {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        box-sizing: border-box;
        min-height: 44px;
        margin-top: 8px;
        color: var(--wfacc-muted);
        font-size: 15px;
        text-decoration: none;
        text-transform: none;
        letter-spacing: 0;
    }
    #wrapper .wfacc__back:hover { color: var(--wfacc-navy); }
    #wrapper .wfacc__back svg { flex: none; }

    .wfacc__head,
    .wfacc--detail .wfacc__head { margin: 8px 0 24px; flex-direction: column; align-items: flex-start; gap: 16px; }
    #wrapper .wfacc__title { margin: 0; font-size: 30px; }
    #wrapper .wfacc--detail .wfacc__title { font-size: 24px; }
    .wfo-only-desktop { display: none; }
    .wfo-only-mobile { display: inline; }
}

/* =========================================================
   MI CUENTA · página principal (/mi-cuenta)
   Computadora: 6 tarjetas en 3 columnas. Celular: lista vertical.
   ========================================================= */
.wfhome {
    max-width: 1120px;
    margin: 0 auto 64px;
    font-family: 'PT Serif', serif;
    color: var(--wfacc-navy);
}
#wrapper .wfhome__title {
    margin: 0;
    padding: 0;
    color: var(--wfacc-navy);
    font-family: inherit;
    font-size: 44px;
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: 0;
    text-transform: none;
    text-align: left;
}
#wrapper .wfhome__title::before,
#wrapper .wfhome__title::after { content: none; }
.wfhome__mail { margin: 10px 0 0; color: var(--wfacc-muted); font-size: 16px; line-height: 1.5; text-align: left; }
.wfhome__content { margin: 44px 0 0; padding: 0; background: transparent; border: 0; box-shadow: none; }

.wfhome__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}
#wrapper .wfhome__tile {
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-sizing: border-box;
    min-height: 196px;
    padding: 32px;
    background: #fff;
    border: 1px solid var(--wfacc-line);
    color: var(--wfacc-navy);
    text-decoration: none;
    text-transform: none;
    letter-spacing: 0;
    transition: border-color .15s ease, background-color .15s ease;
}
#wrapper .wfhome__tile:hover,
#wrapper .wfhome__tile:focus-visible { border-color: rgba(30, 42, 58, .35); color: var(--wfacc-navy); }
#wrapper .wfhome__tile:focus-visible,
#wrapper .wfhome__alerts:focus-visible,
#wrapper .wfhome__out:focus-visible { outline: 2px solid var(--wfacc-navy); outline-offset: 2px; }
.wfhome__ico { flex: none; width: 28px; height: 28px; color: var(--wfacc-gold); }
.wfhome__text { display: flex; flex-direction: column; gap: 14px; min-width: 0; flex: 1; }
.wfhome__name { font-size: 22px; font-weight: 500; line-height: 1.25; }
.wfhome__desc { color: var(--wfacc-muted); font-size: 15px; line-height: 1.55; }
.wfhome__cta { margin-top: auto; font-size: 14px; text-decoration: underline; text-underline-offset: 4px; }
.wfhome__chev,
.wfhome__meta { display: none; }
/* Mascotas sin cargar: tarjeta destacada */
#wrapper .wfhome__tile--empty { background: var(--wfacc-cream); border-color: rgba(179, 149, 106, .45); }
/* "Avisos de stock" dentro de la grilla: solo en celular */
#wrapper .wfhome__tile--alerts { display: none; }
/* Separador entre grupos de la lista: solo celular */
.wfhome__sep { display: none; }

.wfhome__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(30, 42, 58, .10);
}
#wrapper .wfhome__alerts {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    color: var(--wfacc-navy);
    font-size: 15px;
    text-decoration: none;
    text-transform: none;
    letter-spacing: 0;
}
.wfhome__alerts svg { flex: none; width: 20px; height: 20px; color: var(--wfacc-gold); }
#wrapper .wfhome__out {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-left: auto;
    color: var(--wfacc-muted);
    font-size: 15px;
    text-decoration: none;
    text-transform: none;
    letter-spacing: 0;
}
#wrapper .wfhome__alerts:hover,
#wrapper .wfhome__out:hover { color: var(--wfacc-navy); }

/* ---------- Celular y tablet: lista vertical ---------- */
@media (max-width: 991px) {
    .wfhome { margin: 0 auto 48px; padding: 0 5px; }
    #wrapper .wfhome__head { margin-top: 24px; }
    #wrapper .wfhome__title { font-size: 32px; }
    .wfhome__content { margin-top: 24px; }

    .wfhome__grid { display: block; border-top: 1px solid rgba(30, 42, 58, .10); }
    #wrapper .wfhome__tile {
        flex-direction: row;
        align-items: center;
        gap: 16px;
        min-height: 64px;
        padding: 10px 0;
        border: 0;
        border-bottom: 1px solid rgba(30, 42, 58, .10);
    }
    #wrapper .wfhome__tile:hover,
    #wrapper .wfhome__tile:focus-visible { border-color: rgba(30, 42, 58, .10); }
    .wfhome__ico { width: 22px; height: 22px; }
    .wfhome__text { gap: 2px; }
    .wfhome__name { font-size: 17px; font-weight: 400; }
    .wfhome__desc { display: none; }
    .wfhome__cta { display: none; }
    .wfhome__chev { display: block; flex: none; width: 18px; height: 18px; color: var(--wfacc-muted); opacity: .7; }
    .wfhome__meta { display: block; color: var(--wfacc-muted); font-size: 15px; }

    /* Mascotas: sin cargar, fila crema con la frase debajo; con mascotas, los nombres a la derecha (en gris). */
    #wrapper .wfhome__tile--empty { margin: 0 -10px; padding: 10px 10px; background: var(--wfacc-cream); border-color: rgba(30, 42, 58, .10); }
    .wfhome__tile--empty .wfhome__desc { display: block; font-size: 14px; line-height: 1.4; }
    #wrapper #pets-link:not(.wfhome__tile--empty) .wfhome__text { flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
    #wrapper #pets-link:not(.wfhome__tile--empty) .wfhome__desc { display: block; font-size: 15px; text-align: right; }

    #wrapper .wfhome__tile--alerts { display: flex; }
    /* Los grupos (Pedidos…Cupones | Mascotas, Perfil, Direcciones | Cerrar sesión) se separan con la línea de cada fila, sin espacios en blanco. */
    .wfhome__sep { display: none; }
    #wrapper .wfhome__alerts { display: none; }
    .wfhome__foot { margin-top: 0; padding-top: 0; border-top: 0; }
    #wrapper .wfhome__out { margin-left: 0; }
}
