.browse-shortcuts { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; margin: 1rem 0; }
.browse-shortcuts:has(> #best-sellers-shortcut[hidden]) { display: none; }
.browse-shortcuts > button, .browse-shortcuts > a, .discovery-action { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .55rem .85rem; border: 1px solid var(--line); border-radius: 99px; background: var(--theme-surface); color: var(--ink); font-family: inherit; font-size: .875rem; font-weight: 600; cursor: pointer; text-decoration: none; }
.browse-shortcuts .icon { width: 18px; height: 18px; }
.browse-shortcuts b { font-size: .8rem; min-width: 1.3rem; text-align: center; }
.product-card, .discovery-product { position: relative; }
.favorite-button { position: absolute; inset-block-start: .55rem; inset-inline-end: .55rem; z-index: 2; display: inline-grid; place-items: center; width: 44px; height: 44px; padding: .6rem; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: var(--theme-surface); box-shadow: 0 2px 8px #1111; cursor: pointer; }
.favorite-button .icon { width: 21px; height: 21px; }
.favorite-button:not(.detail-favorite) { inset-block-start: .35rem; inset-inline-end: .35rem; padding: 0; border: 0; background: transparent; box-shadow: none; }
/* Keep a 44px tap target around the smaller visible control. */
.favorite-button:not(.detail-favorite)::before { content: ''; position: absolute; inset: 6px; border: 1px solid var(--line); border-radius: inherit; background: var(--theme-surface); box-shadow: 0 1px 4px #1111; pointer-events: none; }
.favorite-button:not(.detail-favorite) .icon { position: relative; width: 17px; height: 17px; }
.favorite-button[aria-pressed="true"] { color: #c44253; }
.favorite-button[aria-pressed="true"] .icon { fill: currentColor; }
.favorite-button:not(.detail-favorite):hover::before, .detail-favorite:hover, .discovery-action:hover, .browse-shortcuts > button:hover { background: var(--theme-raised); }
.favorite-button:focus-visible, .discovery-product a:focus-visible, .discovery-action:focus-visible, .browse-shortcuts > :focus-visible { outline: 3px solid #168fb7; outline-offset: 3px; }
.discovery-section { margin-block: 2rem; min-width: 0; }
.discovery-section[hidden], .browse-shortcuts > [hidden] { display: none; }
.discovery-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 1rem; }
.discovery-heading h3 { font: 650 1.35rem "DM Sans", "Noto Sans Arabic", sans-serif; margin: 0; letter-spacing: -.02em; }
.discovery-heading p { color: var(--muted); font-size: .875rem; line-height: 1.6; margin: .3rem 0 0; }
.discovery-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(155px, 21%); gap: .8rem; overflow-x: auto; overscroll-behavior-x: contain; padding: .25rem .2rem .8rem; scroll-snap-type: x proximity; }
.discovery-product { min-width: 0; border: 1px solid var(--line); border-radius: 1rem; overflow: hidden; background: var(--theme-surface); scroll-snap-align: start; }
.discovery-product > a { display: block; text-decoration: none; color: var(--ink); }
.discovery-product img, .discovery-placeholder { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: contain; background: var(--theme-raised); }
.discovery-placeholder { display: grid; place-items: center; font-size: .8rem; color: var(--muted); }
.discovery-product-copy { display: grid; gap: .4rem; padding: .8rem; }
.discovery-product h4 { margin: 0; font-size: .9rem; line-height: 1.45; overflow-wrap: anywhere; }
.discovery-product strong { color: var(--theme-price); font-size: .875rem; line-height: 1.4; }
.discovery-product-copy > span { color: var(--muted); font-size: .875rem; }
.saved-products-dialog { width: min(860px, calc(100vw - 1.5rem)); max-height: calc(100dvh - 1.5rem); padding: 0; border: 1px solid var(--line); border-radius: 1.3rem; background: var(--theme-surface); color: var(--ink); overflow-y: auto; overscroll-behavior: contain; }
.saved-products-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
.saved-products-dialog::backdrop { background: #111a; backdrop-filter: blur(4px); }
.saved-products-header { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.2rem; border-bottom: 1px solid var(--line); }
.saved-products-header > div { min-width: 0; }
.saved-products-header > button { flex: 0 0 auto; }
.saved-products-header h2 { font-size: clamp(1.8rem, 7vw, 2.7rem); line-height: 1.3; overflow-wrap: anywhere; }
.saved-products-header p { margin: .4rem 0 0; color: var(--muted); font-size: .875rem; line-height: 1.6; }
.saved-products-body { min-height: 0; padding: 1.2rem; overflow-y: auto; overscroll-behavior: contain; }
.saved-products-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: .8rem; }
#clear-view-history { margin-top: 1rem; max-width: 100%; line-height: 1.45; }
#saved-products-empty { text-align: center; padding-block: 2rem; color: var(--muted); line-height: 1.7; }
.detail-favorite { position: static; display: flex; align-items: center; justify-content: center; gap: .6rem; width: 100%; height: auto; min-height: 44px; border-radius: .75rem; margin-top: .75rem; box-shadow: none; font: inherit; }
.complete-outfit { border-top: 1px solid var(--line); padding-top: 1.25rem; margin-top: 1.5rem; }
.complete-outfit .discovery-heading h3 { font-size: 1.1rem; }
.complete-outfit .discovery-rail { grid-auto-columns: minmax(140px, 45%); }
body.discovery-open { overflow: hidden; }
@media(max-width:540px) { .saved-products-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .saved-products-body, .saved-products-header { padding: 1rem; } .discovery-rail { grid-auto-columns: 46%; gap: .65rem; } .discovery-product-copy { padding: .65rem; } }
@media(max-width:350px) { .saved-products-grid { grid-template-columns: 1fr; } .discovery-rail { grid-auto-columns: 70%; } }
@media(forced-colors:active) { .favorite-button, .favorite-button::before { box-shadow: none; border-color: ButtonText; } .favorite-button::before { background: Canvas; } .favorite-button[aria-pressed="true"] { color: Highlight; } }
