.favorites-open, .favorites-palette-open { display: inline-flex; align-items: center; justify-content: flex-start; gap: 10px; min-height: 44px; padding: 10px 14px; border: 1px solid #b6cdbb; border-radius: 100px; color: var(--green-dark); background: #eef3ef; font-size: .95rem; font-weight: 550; cursor: pointer; white-space: nowrap; }
.favorites-open svg, .favorite-heart svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.favorites-open [data-favorites-count] { min-width: 20px; }
.palette-product-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.palette-product-title h4 { flex: 1; min-width: 0; }
.favorite-heart { flex: 0 0 44px; width: 44px; height: 44px; display: grid; place-items: center; margin-top: -7px; padding: 10px; border: 1px solid #b8cebd; border-radius: 50%; color: var(--green-dark); background: #fff; cursor: pointer; }
.favorite-heart:hover { background: #edf3ee; }
.favorite-heart[aria-pressed="true"] { background: #e6efe6; border-color: var(--green); }
.favorite-heart[aria-pressed="true"] svg { fill: var(--green); }
.favorites-is-open { overflow: hidden; }
.favorites-dialog { width: min(740px, calc(100% - 32px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 1px solid #d4ded5; border-radius: 28px; color: var(--text); background: #fff; box-shadow: 0 30px 100px #132c2740; }
.favorites-dialog[open] { display: flex; flex-direction: column; }
.favorites-dialog::backdrop { background: #17362cd0; backdrop-filter: blur(4px); }
.favorites-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-shrink: 0; padding: 24px 28px; border-bottom: 1px solid var(--line); }
.favorites-dialog h2 { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.3; }
.favorites-dialog h2 span { display: inline-block; font-size: 1rem; font-weight: 600; padding: 3px 12px; border-radius: 100px; background: var(--yellow); vertical-align: middle; }
#favorites-close { min-width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: #eff3ee; color: var(--green-dark); font-size: 2rem; text-align: center; cursor: pointer; }
.favorites-dialog-body { min-height: 100px; overflow-y: auto; padding: 0 28px; overscroll-behavior: contain; }
#favorites-empty { padding: 32px 0; }
#favorites-empty h3 { font-size: 1.5rem; margin-bottom: 16px; }
#favorites-empty p { color: var(--muted); font-size: 1rem; }
.favorite-item { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.favorite-item:last-child { border-bottom: 0; }
.favorite-item img { width: 120px; height: 92px; object-fit: cover; border-radius: 13px; background: #edf1e9; }
.favorite-item-copy { min-width: 0; }
.favorite-item-copy p { margin: 0 0 5px; color: var(--muted); font-size: .85rem; line-height: 1.35; }
.favorite-item-copy a { font-size: 1.3rem; font-weight: 550; line-height: 1.35; overflow-wrap: anywhere; }
.favorite-item-copy a:hover { text-decoration: underline; text-underline-offset: 4px; }
.favorite-remove { min-height: 44px; padding: 6px; border: 0; border-radius: 6px; background: transparent; color: var(--green-dark); font-size: .9rem; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.favorites-dialog-footer { flex-shrink: 0; padding: 24px 28px; border-top: 1px solid var(--line); background: #f5f7f2; }
.favorites-dialog-footer p { margin: 14px 0 0; color: var(--muted); font-size: .85rem; line-height: 1.5; }
.favorites-dialog button:disabled { opacity: .5; cursor: not-allowed; }
:where(.favorites-dialog, .header-actions, .dealer-selection) button:focus-visible, .favorite-heart:focus-visible { outline: 3px solid var(--green-dark); outline-offset: 3px; }
.dealer-selection { padding: 18px; margin-bottom: 22px; background: #f1f5ee; border: 1px solid #d0dfd0; border-radius: 18px; }
.dealer-form { scroll-margin-top: 110px; }
.dealer-selection[hidden], #favorites-empty[hidden] { display: none; }
.dealer-selection-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 1rem; }
.dealer-selection-heading button { padding: 8px 0; border: 0; background: none; color: var(--green-dark); cursor: pointer; text-decoration: underline; text-underline-offset: 4px; font-size: .9rem; }
#dealer-selection-list { max-height: 300px; overflow-y: auto; overscroll-behavior: contain; }
.dealer-selection .favorite-item { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding-block: 14px; }
.dealer-selection .favorite-item img { width: 72px; height: 65px; border-radius: 9px; }
.dealer-selection .favorite-item-copy a { font-size: 1rem; }
.dealer-selection .favorite-item-copy p { font-size: .8rem; }
.dealer-selection > p { margin: 10px 0 0; color: var(--muted); font-size: .85rem; }
.dealer-form textarea { display: block; width: 100%; resize: vertical; margin-top: 7px; padding: 14px; border: 1px solid #bdccbd; border-radius: 12px; font: inherit; font-size: 1rem; line-height: 1.5; color: var(--text); background: #fff; }
.field-optional { font-size: .85rem; font-weight: 400; }
@media (min-width: 1321px) and (max-width: 1580px) { .header-actions .favorites-open-text { display: none; } }
@media (max-width: 620px) {
  .header-shell { gap: 8px; grid-template-columns: 1fr auto auto; }
  .header-actions { gap: 8px; }
  .favorites-open { padding: 8px 10px; gap: 6px; }
  .favorites-open-text { display: none; }
  .favorites-dialog { width: calc(100% - 20px); max-height: calc(100dvh - 20px); border-radius: 22px; }
  .favorites-dialog-header, .favorites-dialog-footer { padding: 20px; }
  .favorites-dialog-body { padding-inline: 20px; }
  .favorite-item { grid-template-columns: 76px minmax(0,1fr); gap: 12px; }
  .favorite-item img { width: 76px; height: 76px; }
  .favorite-item-copy a { font-size: 1.1rem; }
  .favorite-remove { grid-column: 2; justify-self: start; margin-top: -10px; min-height: 36px; }
  .favorites-dialog-footer .button { width: 100%; }
}
