/* Favoritos: extensión de los controles y superficies de RedPerfumes. */
[data-favorite-toggle][hidden], [data-favorites-open][hidden], .rp-favorites [hidden] { display: none !important; }
.rp-public-header .topbar-inner { grid-template-columns: auto minmax(0, 1fr) auto !important; }
.rp-favorites-open, .rp-favorite-toggle, .rp-favorites__icon {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-width: 44px; min-height: 44px; padding: 10px; border: 0;
    border-radius: var(--rp-radius-control); background: transparent; color: var(--rp-burgundy);
    font: 650 .875rem/1.3 var(--rp-sans); cursor: pointer;
    transition: background-color 150ms ease, color 150ms ease;
}
.rp-favorites-open { position: relative; justify-self: end; }
.rp-favorites-open:hover, .rp-favorites__icon:hover { background: var(--rp-rose); }
.rp-favorite-toggle { background: var(--rp-surface); border: 1px solid var(--rp-line); }
.rp-favorite-toggle:hover, .rp-favorite-toggle[aria-pressed="true"] { color: var(--rp-primary); background: var(--rp-rose); }
.rp-favorite-toggle[aria-pressed="true"] svg { fill: currentColor; }
.rp-favorites-open:focus-visible, .rp-favorite-toggle:focus-visible,
.rp-favorites :is(button,a):focus-visible { outline: 2px solid var(--rp-primary); outline-offset: 3px; }
.rp-favorites-count {
    position: absolute; top: 0; right: 0; min-width: 19px; height: 19px; padding: 0 4px;
    border-radius: 12px; background: var(--rp-primary); color: var(--rp-white);
    font: 700 .75rem/19px var(--rp-sans); text-align: center; font-variant-numeric: tabular-nums;
}
.rp-card__photo { position: relative; }
.rp-card__photo > .rp-favorite-toggle { position: absolute; top: 8px; right: 8px; z-index: 2; }
.rp-favorite-toggle--detail { margin-block: 8px 12px; padding-inline: 12px; }
.rp-favorites {
    position: fixed; inset: 0 0 0 auto; margin: 0; padding: 0; border: 0;
    width: 440px; max-width: 100%; height: 100%; height: 100dvh; max-height: 100dvh;
    background: var(--rp-surface); color: var(--rp-ink);
    box-shadow: -12px 0 40px rgb(36 25 28 / .16); overflow: hidden;
    font-family: var(--rp-sans); text-align: left;
}
.rp-favorites[open] { display: flex; flex-direction: column; }
.rp-favorites::backdrop { background: rgb(36 25 28 / .45); }
.rp-favorites.is-entering { animation: rp-favorites-enter 180ms cubic-bezier(.16,1,.3,1); }
.rp-favorites.is-closing { animation: rp-favorites-exit 150ms ease-in forwards; }
@keyframes rp-favorites-enter { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes rp-favorites-exit { to { transform: translateX(100%); } }
.rp-favorites__header {
    display: flex; justify-content: space-between; align-items: center; gap: 16px;
    padding: 24px; border-bottom: 1px solid var(--rp-line); flex: 0 0 auto;
}
.rp-favorites__header h2 { margin: 0; font: 400 1.75rem/1.15 var(--rp-display); letter-spacing: -.02em; }
.rp-favorites__header p { margin: 6px 0 0; font-size: .875rem; color: var(--rp-muted); }
.rp-favorites__content { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 20px 24px 8px; scrollbar-color: var(--rp-field-line) var(--rp-paper); }
.rp-favorites__intro { margin: 0 0 16px; font-size: .875rem; line-height: 1.5; color: var(--rp-muted); }
.rp-favorites__feedback { font-size: .875rem; line-height: 1.5; color: var(--rp-muted); }
.rp-favorites__feedback:not(:empty) { padding: 12px; background: var(--rp-paper); margin-bottom: 12px; }
.rp-favorites__list { list-style: none; padding: 0; margin: 0; }
.rp-favorites__item { display: grid; grid-template-columns: 76px minmax(0,1fr) 44px; column-gap: 12px; padding: 20px 0; border-bottom: 1px solid var(--rp-line); }
.rp-favorites__item:first-child { padding-top: 8px; }
.rp-favorites__photo { display: grid; place-items: center; align-self: start; width: 76px; min-height: 96px; background: var(--rp-white); }
.rp-favorites__photo img { display: block; width: 76px; height: 96px; object-fit: contain; }
.rp-favorites__photo span { font-size: .75rem; color: var(--rp-muted); text-align: center; }
.rp-favorites__item h3 { margin: 0 0 8px; font: 650 .9375rem/1.4 var(--rp-sans); overflow-wrap: anywhere; }
.rp-favorites__brand { margin: 0 0 4px; color: var(--rp-primary); font-size: .75rem; line-height: 1.4; }
.rp-favorites__price { margin: 0; font: 700 1.25rem/1.4 var(--rp-sans); font-variant-numeric: tabular-nums; }
.rp-favorites__stock { margin: 3px 0; font-size: .75rem; line-height: 1.5; color: var(--rp-muted); }
.rp-favorites__stock--available { color: var(--rp-positive); }
.rp-favorites__compare { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; color: var(--rp-primary); font: 650 .875rem/1.4 var(--rp-sans); text-underline-offset: .22em; }
.rp-favorites__compare:hover { color: var(--rp-primary-hover); }
.rp-favorites__remove { align-self: start; margin-top: -8px; }
.rp-favorites__empty { padding: 24px 0 36px; }
.rp-favorites__empty > svg { width: 36px; height: 36px; color: var(--rp-primary); }
.rp-favorites__empty h3 { margin: 20px 0 12px; font: 400 1.75rem/1.15 var(--rp-display); letter-spacing: -.02em; }
.rp-favorites__empty p { margin: 0 0 24px; max-width: 32ch; color: var(--rp-muted); font-size: .9375rem; line-height: 1.6; }
.rp-favorites__footer { margin-top: auto; padding: 16px 24px max(16px, env(safe-area-inset-bottom)); background: var(--rp-paper); flex: 0 0 auto; }
.rp-favorites__footer p { margin: 0; font-size: .75rem; line-height: 1.5; color: var(--rp-muted); }
.rp-favorites__footer p + p { margin-top: 6px; }
.rp-favorites-announcement { position: fixed; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
body.rp-favorites-lock { overflow: hidden; }
.rp-favorites ::selection { background: var(--rp-rose); color: var(--rp-burgundy); }
@media (max-width: 1100px) {
    .rp-public-header .topbar-inner { grid-template-columns: minmax(0,1fr) 44px 44px !important; gap: 8px !important; }
    .rp-public-header .desktop-links { display: none !important; }
    .rp-public-header .brand-logo { grid-column: 1; grid-row: 1; justify-self: start; min-width: 0; }
    .rp-public-header .rp-favorites-open { grid-column: 2; grid-row: 1; }
    .rp-favorites-open__label { display: none; }
    .rp-public-header .mobile-menu-toggle { display: flex !important; grid-column: 3; grid-row: 1; justify-self: end; width: 44px; height: 44px; border: 1px solid var(--rp-field-line); border-radius: var(--rp-radius-control); }
}
@media (max-width: 599px) {
    .rp-public-header .brand-logo img { max-width: 100%; height: auto !important; max-height: 40px; }
    .rp-favorites__header { padding: 20px 16px; }
    .rp-favorites__content { padding: 16px 16px 8px; }
    .rp-favorites__footer { padding-inline: 16px; }
}
@media (prefers-reduced-motion: reduce) { .rp-favorites.is-entering, .rp-favorites.is-closing { animation: none; } }

.rp-card--spotlight .rp-card__photo > .rp-favorite-toggle { position: static; justify-self: end; }
.rp-favorites-announcement.is-visible { clip-path: none; width: max-content; max-width: calc(100% - 32px); height: auto; padding: 12px 16px; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; background: var(--rp-burgundy); color: var(--rp-white); border-radius: var(--rp-radius-control); white-space: normal; font: 500 .875rem/1.5 var(--rp-sans); }

@media (max-width: 1100px) {
    .rp-public-header .mobile-menu-panel { position: absolute; top: 100%; left: 0; width: 100%; z-index: 40; background: var(--rp-surface); border-bottom: 1px solid var(--rp-line); }
    .rp-public-header .mobile-menu-panel.open { display: block !important; }
    .rp-public-header .mobile-menu-links { display: flex; flex-direction: column; gap: 8px; padding: 16px 24px; }
}
