:root {
  color-scheme: light;
  --ink: #251b36;
  --muted: #615a6e;
  --accent: #5e348a;
  --deep: #351b56;
  --lavender: #efe7fb;
  --line: #e7e0ee;
  --paper: #fff;
  --ground: #f6f3fa;
  --radius: 14px;
  font: 16px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--ground);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  cursor: pointer; border: 1px solid var(--line); background: var(--paper); color: var(--ink);
  padding: .65rem .85rem; border-radius: 8px; white-space: nowrap;
}
button:hover:not(:disabled), .button:hover { border-color: var(--accent); }
button:disabled { opacity: .43; cursor: default; }
:focus-visible, .order-actions:has(input:focus-visible) label { outline: 2px solid #7e47ab; outline-offset: 3px; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.55rem; letter-spacing: -.035em; }
h2 { font-size: 1.18rem; letter-spacing: -.02em; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; top: -4rem; left: .75rem; padding: .7rem; background: white; z-index: 3; }
.skip:focus { top: .5rem; }
.shell { width: min(100% - 3rem, 1376px); margin-inline: auto; }
.top-strip { padding: .55rem 1rem; text-align: center; background: var(--deep); color: #fcf2ff; font-size: .8125rem; font-weight: 600; }
.top-strip span::before { content: '·'; padding-inline: .65rem; color: #ebd5ff; }
.header { background: var(--paper); border-bottom: 1px solid var(--line); }
.header-main { display: grid; grid-template-columns: 11.75rem minmax(0, 1fr) auto; gap: 1.25rem; align-items: center; padding-block: 1rem; }
.brand { justify-self: start; display: inline-grid; line-height: .85; }
.brand > span { font-family: Georgia, serif; font-size: 2.85rem; letter-spacing: -.09em; font-weight: bold; color: var(--deep); }
.search { display: flex; border: 1px solid #dcd2e8; border-radius: 9px; background: #fcfaff; }
.search input { flex: 1; min-width: 0; padding: .72rem .9rem; border: 0; border-radius: 9px 0 0 9px; color: var(--ink); background: transparent; }
.search button { margin: 3px; padding: .45rem .92rem; background: var(--lavender); color: var(--deep); border-color: transparent; font-weight: 700; }
.main-nav, .sub-inner { display: flex; gap: .4rem; align-items: center; }
.main-nav a { white-space: nowrap; padding: .57rem .75rem; border-radius: 8px; font-weight: 650; font-size: .9rem; }
.main-nav a:hover, .main-nav [aria-current] { background: var(--lavender); color: var(--deep); }
.sub-nav { border-top: 1px solid #f1ecf5; }
.sub-inner { gap: 1.6rem; overflow-x: auto; scrollbar-width: none; }
.sub-inner a { padding-block: .64rem; white-space: nowrap; font-size: .875rem; font-weight: 630; color: var(--muted); }
.sub-inner a:hover, .text-button:hover { color: var(--accent); text-decoration: underline; }
.sub-inner [aria-current] { color: var(--deep); box-shadow: inset 0 -2px var(--accent); }
main { padding-block: 1.125rem 2rem; min-height: 70vh; }
.shop-layout { display: grid; grid-template-columns: 12.6rem minmax(0, 1fr); gap: 1rem; align-items: start; }
.shop-main { min-width: 0; }
.panel { background: var(--paper); border-radius: var(--radius); border: 1px solid var(--line); }
.short-offer { display: grid; align-content: center; color: var(--deep); background: #e9ddfa; border-radius: var(--radius); padding: 1rem; min-height: 8.6rem; margin-bottom: .85rem; }
.short-offer small { font-size: .75rem; letter-spacing: .09em; font-weight: 750; }
.short-offer strong { margin-block: .4rem; font-size: 1.55rem; line-height: 1.06; letter-spacing: -.04em; }
.short-offer > span { font-size: .875rem; text-decoration: underline; text-underline-offset: 3px; }
.category-menu { padding: .8rem .62rem; }
.category-menu h2 { padding: .15rem .42rem .6rem; }
.category-menu button, .category-menu a { display: flex; align-items: center; text-align: left; width: 100%; padding: .44rem; border: 0; background: transparent; white-space: normal; justify-content: flex-start; gap: .62rem; border-radius: 7px; font-size: .875rem; line-height: 1.25; min-height: 2.5rem; }
.category-menu button:hover, .category-menu a:hover, .category-menu [aria-current], .category-menu [aria-pressed="true"] { background: var(--lavender); color: var(--deep); }
.category-menu .all-categories { color: var(--accent); font-weight: 700; }
.category-photo { width: 1.52rem; border-radius: 4px; flex: none; }
.featured-carousel { overflow: hidden; margin-bottom: .85rem; background: white; border: 1px solid var(--line); border-radius: var(--radius); }
.featured-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.featured-track:focus-visible { outline-offset: -3px; }
.featured-slide { position: relative; isolation: isolate; display: flex; align-items: center; min-height: clamp(14.1rem, 26vw, 21rem); flex: 0 0 100%; min-width: 0; padding: clamp(1.1rem, 4vw, 3.4rem); overflow: hidden; scroll-snap-align: start; }
.featured-books { background: radial-gradient(ellipse at 80% 85%, #965ab7 0, #543174 59%, #341c4f 100%); color: white; }
.featured-home { background: radial-gradient(ellipse at 80% 0, #f1f7d7 0, #dae8a7 82%); color: #26331d; }
.featured-beauty { background: radial-gradient(ellipse at 86% 80%, #ffe6dc 0, #fad4df 85%); color: #68273d; }
.featured-tech { background: radial-gradient(ellipse at 80% 10%, #9bb7dd 0, #375479 55%, #213750 100%); color: white; }
.featured-copy { position: relative; z-index: 1; width: 53%; }
.featured-caption { font-size: .81rem; font-weight: 750; text-transform: uppercase; letter-spacing: .075em; }
.featured-copy h2 { margin-block: .45rem .55rem; font: bold clamp(2rem, 5vw, 4.3rem)/1 Georgia, serif; letter-spacing: -.055em; text-wrap: balance; }
.featured-description { max-width: 26ch; margin-bottom: 1.1rem; }
.featured-copy .featured-link { padding: .59rem .85rem; white-space: normal; text-align: center; color: var(--deep); border-color: transparent; font-size: .875rem; font-weight: 720; }
.featured-copy .featured-link:hover { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.featured-art { position: absolute; inset: 8% 4% 7% 54%; pointer-events: none; }
.featured-art::before { content: ''; position: absolute; inset: 0 7%; border-radius: 50%; background: #ffffff29; }
.featured-photo { position: absolute; width: min(66%, 15.5rem); border-radius: 12%; box-shadow: 0 12px 26px #24163f38; }
.featured-photo-0 { right: 0; top: 3%; transform: rotate(12deg); }
.featured-photo-1 { left: 0; bottom: 1%; transform: rotate(-9deg); }
.featured-controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 2.65rem; padding-inline: .6rem; }
.featured-dots { display: flex; grid-column: 2; gap: .1rem; justify-content: center; }
.featured-dots button { width: 1.65rem; height: 2.1rem; padding: 0; border: 0; background: transparent; }
.featured-dots button::before { content: ''; border-radius: 99px; width: .47rem; height: .47rem; background: #b5a7c3; }
.featured-dots [aria-current]::before { background: var(--accent); width: 1rem; }
.featured-toggle { grid-column: 3; justify-self: end; min-height: 2.1rem; padding: .2rem .45rem; border: 0; color: var(--accent); font-size: .8125rem; font-weight: 650; }
.quick-nav { display: grid; grid-template-columns: repeat(10, minmax(5.6rem, 1fr)); padding: .65rem .55rem; gap: .2rem; overflow-x: auto; margin-bottom: .85rem; }
.quick-nav a, .quick-nav button { display: grid; justify-items: center; align-content: start; gap: .45rem; text-align: center; border: 0; border-radius: 9px; background: transparent; padding: .2rem; white-space: normal; font-size: .8125rem; line-height: 1.2; }
.quick-nav a:hover, .quick-nav button:hover { background: var(--lavender); }
.quick-nav img, .quick-nav b { width: 2.2rem; height: 2.2rem; object-fit: contain; border-radius: 9px; }
.quick-nav b { display: grid; place-items: center; font-size: 1.4rem; color: var(--accent); background: var(--lavender); }
.market-section { padding: 1rem; margin-bottom: .85rem; scroll-margin-top: .75rem; }
.section-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .45rem 1rem; margin-bottom: .85rem; }
.text-button { color: var(--accent); font-size: .875rem; font-weight: 700; padding: .15rem 0; background: none; border: 0; }
.shelf-actions, .rail-controls { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; }
.shelf-actions { gap: .65rem; }
.rail-controls button { padding: .35rem .65rem; color: var(--deep); font-size: .8125rem; font-weight: 650; }
.product-rail, .popular-rail { display: grid; grid-auto-flow: column; gap: .65rem; overflow-x: auto; padding: 2px 2px .55rem; scroll-snap-type: x mandatory; scrollbar-width: thin; scrollbar-color: #c6b4d8 transparent; }
.product-rail { grid-auto-columns: calc((100% - 2.6rem) / 4.5); }
.popular-rail { grid-auto-columns: calc((100% - 2.6rem) / 4.5); }
.product-rail > *, .popular-rail > * { scroll-snap-align: start; }
.popular-tile { min-width: 0; display: flex; justify-content: start; text-align: left; gap: .55rem; width: 100%; padding: .5rem; background: #faf8fd; white-space: normal; font-size: .875rem; line-height: 1.2; }
.popular-tile img { width: clamp(1.65rem, 4vw, 3rem); height: clamp(1.65rem, 4vw, 3rem); object-fit: contain; border-radius: 7px; background: white; flex: none; }
.deal-section { border-top: 3px solid #9860c1; }
.flash-section { border-top: 3px solid #d57753; }
.product-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .6rem; }
.essentials-section { border-top: 3px solid #7c9660; }
.essentials-section .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.product-card { min-width: 0; display: flex; position: relative; flex-direction: column; overflow: hidden; border: 1px solid var(--line); padding: 0; text-align: left; align-items: stretch; justify-content: start; gap: 0; white-space: normal; }
.photo { display: block; position: relative; aspect-ratio: 1; overflow: hidden; background: white; }
.photo img { width: 100%; height: 100%; object-fit: contain; }
.photo-tile img { position: absolute; max-width: none; width: 300%; height: 300%; left: calc(var(--tile-x) * -100%); top: calc(var(--tile-y) * -100%); object-fit: fill; }
.product-image { width: 100%; }
.discount { position: absolute; z-index: 1; top: .43rem; left: .43rem; font-size: .75rem; font-weight: 730; border-radius: 5px; color: #7f2944; background: #fbe5ec; padding: .12rem .34rem; }
.product-copy { padding: .6rem .56rem .7rem; display: grid; gap: .33rem; }
.product-name { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: .875rem; line-height: 1.3; min-height: 2.6em; }
.price { color: #762d61; font-size: .98rem; font-weight: 760; overflow-wrap: anywhere; }
.old-price { color: var(--muted); font-size: .79rem; }
.brand-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .6rem; }
.brand-grid .button { white-space: normal; min-height: 3.5rem; background: #f8f2fd; color: var(--deep); font-weight: 730; text-align: center; }
.photo-placeholder { display: grid; place-items: center; color: var(--accent); background: var(--lavender); }
.photo-placeholder b { font: bold clamp(.55rem, 3vw, 2rem)/1 Georgia, serif; }
.category-photo b, .department-photo b { font-size: .85rem; }
.product-description { white-space: pre-wrap; overflow-wrap: anywhere; }
#department-grid { display: grid; gap: 1.2rem; }
.department-group { padding: .9rem; background: var(--ground); border-radius: 11px; }
.department-group h2 { margin-bottom: .65rem; }
.department-cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; }
.department-card { min-width: 0; display: flex; gap: .55rem; align-items: center; padding: .48rem; border: 1px solid var(--line); border-radius: 8px; background: white; line-height: 1.25; }
.department-card:hover { border-color: var(--accent); color: var(--accent); }
.department-photo { width: 2.8rem; flex: none; border-radius: 5px; }
.department-card strong { display: block; font-size: .875rem; overflow-wrap: anywhere; }
.department-card small { color: var(--muted); font-size: .78rem; }
.footer {
  background: var(--paper);
  border-top: 3px solid var(--accent);
  color: var(--muted);
  font-size: .875rem;
  overflow-wrap: anywhere;
}
.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(3, minmax(0, 1fr));
  gap: 1.75rem;
  padding-block: 2rem;
}
.footer-brand .brand { margin-bottom: .9rem; }
.footer-brand .brand span { font-size: 2.5rem; }
.footer-brand p { max-width: 26ch; }
.footer-brand .footer-tagline { color: var(--deep); font-weight: 700; margin-bottom: .4rem; }
.footer h2, .footer h3 { color: var(--ink); letter-spacing: normal; }
.footer h2 { font-size: 1rem; margin-bottom: .55rem; }
.footer h3 { font-size: .875rem; margin-bottom: .3rem; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links a { display: block; }
.footer-links a, .footer summary { padding-block: .3rem; }
.footer a:hover:not(.brand), .footer summary:hover { color: var(--accent); text-decoration: underline; }
.footer summary { display: list-item; cursor: pointer; }
.footer details p { margin: .05rem 0 .55rem; }
.footer details a { color: var(--accent); text-decoration: underline; }
.footer-directory { background: #fcfaff; border-block: 1px solid var(--line); padding-block: 1.25rem; }
.footer-directory-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: .35rem 1.25rem; margin-bottom: .8rem; }
.footer-directory-heading h2 { margin: 0; }
.footer-directory-heading a { color: var(--accent); font-weight: 650; }
.footer-categories {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1rem 1.25rem;
}
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: .75rem 1.25rem; flex-wrap: wrap; padding-block: .8rem; }
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.order-controls { padding: 1.1rem; }
.subtle { color: var(--muted); font-size: .9rem; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem; margin: 1rem 0; }
.stat { padding: .75rem; background: #f7f1fb; border: 1px solid #f0e7fa; border-radius: 10px; color: var(--muted); font-size: .875rem; }
.stat strong { display: block; color: var(--deep); font-size: clamp(1rem, 2vw, 1.45rem); overflow-wrap: anywhere; }
.order-actions, .order-tabs, .filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; }
.primary { background: var(--deep); color: white; border-color: var(--deep); }
.primary:hover { background: var(--accent); }
.source-status { margin-top: .45rem; min-height: 1.3rem; }
.order-tabs { padding-block: .7rem; margin-block: .2rem .55rem; border-bottom: 1px solid var(--line); }
.order-tabs [aria-pressed="true"] { border-color: #d6c1e8; color: var(--deep); background: var(--lavender); font-weight: 730; }
.filters label { display: grid; gap: .27rem; color: var(--muted); font-size: .875rem; }
.filters .stretch { flex: 1; min-width: 12rem; }
.filters input, .price-row input { width: 100%; min-height: 2.65rem; padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); }
.amount-check { margin-top: .85rem; padding: .8rem; background: #faf8fd; border: 1px solid var(--line); border-radius: 10px; }
#amount-results { font-size: .875rem; color: var(--muted); }
#amount-results:empty { display: none; }
#amount-results ul { list-style: none; padding: 0; margin: .5rem 0 0; }
#amount-results li { padding: .2rem 0; }
#amount-results strong { margin-inline-start: .45rem; color: var(--deep); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .875rem; }
th, td { padding: .7rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border: 0; }
th { background: #fbf7ff; color: var(--muted); white-space: nowrap; font-weight: 650; }
td:first-child, td:nth-child(2), td:nth-child(4) { white-space: nowrap; }
td:nth-child(3) { min-width: 13rem; }
.order-item { display: block; text-align: left; white-space: normal; }
.item-qty { color: var(--muted); font-size: .8rem; }
.order-badge { display: inline-block; border-radius: 6px; background: #e6f1eb; color: #25563b; padding: .2rem .4rem; white-space: nowrap; }
.order-badge.pending { background: #fef1db; color: #764e10; }
.list-meta, .pagination { margin-block: .75rem; color: var(--muted); font-size: .875rem; }
.pagination { display: flex; align-items: center; justify-content: end; gap: .9rem; }
.empty { padding: 2.1rem .8rem; text-align: center; color: var(--muted); }
.mobile-prices { display: none; }
.price-row { display: grid; grid-template-columns: 2.5rem minmax(0, 1fr) 8.5rem; gap: .8rem; padding: .65rem 0; align-items: center; border-bottom: 1px solid var(--line); }
.price-row .photo { width: 2.5rem; }
.prices p { margin-bottom: .7rem; }
dialog { position: relative; width: min(90vw, 35rem); border: 0; border-radius: 16px; padding: 1.35rem; color: var(--ink); }
dialog::backdrop { background: #27173888; }
dialog .close { position: absolute; top: .6rem; right: .6rem; width: 2.35rem; height: 2.35rem; font-size: 1.3rem; }
.home-promo { width: min(calc(100% - 2rem), 27rem); max-height: calc(100dvh - 2rem); padding: 0; border-radius: 19px; background: #31152b; color: #fff4de; box-shadow: 0 28px 85px #160b20b3; }
.home-promo::backdrop { background: #201128ae; }
.home-promo-card { position: relative; text-align: center; }
.home-promo .promo-close { z-index: 1; background: #fff8ef; color: #4c223e; border-color: transparent; }
.home-promo-heading { padding: 1.25rem 2.7rem .5rem; background: linear-gradient(160deg, #34192e, #5e2529); }
.home-promo-brand { color: #ffd097; font-size: .78rem; font-weight: 750; letter-spacing: .15em; }
.home-promo h2 { margin-top: .25rem; color: #ffe2ab; font: bold clamp(1.95rem, 8vw, 3.15rem)/1.05 Georgia, serif; letter-spacing: -.035em; }
.home-promo-image { width: 100%; height: auto; max-height: 43dvh; object-fit: cover; }
.home-promo-footer { display: grid; gap: .8rem; justify-items: center; padding: .9rem 1rem 1.25rem; background: linear-gradient(180deg, #3c172a, #290f24); }
.home-promo-footer p { color: #fdebd9; font-size: .94rem; }
.home-promo-footer .button { min-height: 2.7rem; padding-inline: 1.2rem; color: #40192d; background: #ffce80; border: 0; font-weight: 750; }
.home-promo-footer .button:hover { background: #ffdfa4; }
.detail-photo { width: min(17rem, 100%); margin: 0 auto .7rem; }
#detail-content h2 { margin-bottom: .6rem; }
#detail-content .price { font-size: 1.4rem; }
#detail-content p { margin-bottom: .5rem; }
@media (max-width: 1100px) {
  .quick-nav { grid-template-columns: repeat(10, minmax(4.55rem, 1fr)); }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .brand-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .department-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-categories { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .shell { width: calc(100% - 1.5rem); }
  .header-main { grid-template-columns: 1fr auto; gap: .7rem; }
  .search { grid-column: 1 / -1; grid-row: 2; }
  .header-main .brand > span { font-size: 2.35rem; }
  .shop-layout { grid-template-columns: minmax(0, 1fr); gap: .7rem; }
  .short-offer, .category-menu h2, .account-sidebar { display: none; }
  .mobile-prices { display: initial; }
  #category-links { display: flex; gap: .3rem; overflow-x: auto; }
  .category-menu { padding: .27rem; }
  .category-menu button { width: auto; white-space: nowrap; }
  .category-menu .all-categories { width: auto; flex: none; }
  .product-rail, .popular-rail { grid-auto-columns: calc((100% - 1.95rem) / 3.35); }
  .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; }
}
@media (max-width: 560px) {
  .top-strip { font-size: .75rem; }
  .header-main .brand > span { font-size: clamp(1.55rem, 7.5vw, 2.35rem); }
  .main-nav { gap: .25rem; }
  .main-nav a { padding: .5rem .55rem; font-size: .84rem; }
  .featured-slide { min-height: 13.3rem; padding: 1rem; }
  .featured-copy { width: 55%; }
  .featured-copy h2 { font-size: clamp(1.65rem, 7vw, 2.5rem); }
  .featured-description { font-size: .875rem; margin-bottom: .7rem; }
  .featured-caption { font-size: .76rem; }
  .featured-art { inset: 15% 4% 10% 56%; }
  .featured-photo { width: 78%; }
  .product-rail, .popular-rail { grid-auto-columns: calc((100% - 1rem) / 2.14); }
  .rail-controls button { padding: .3rem .45rem; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .essentials-section .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .department-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .department-photo { width: 2.15rem; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-main { gap: 1.25rem .85rem; padding-block: 1.5rem; }
  .footer-brand, .footer-explore { grid-column: 1 / -1; }
  .footer-brand p { max-width: 40ch; }
  .footer-explore .footer-links, .footer-categories {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: .85rem;
  }
  .footer-links a, .footer summary { padding-block: .4rem; }
}
