/* Layout and components are independent of the original site's CSS. */
:root {
  --page-width: 1200px;
  --blue: #2a55e5;
  --ink: #212121;
  --muted: #777;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #fff; font: 14px Arial, Helvetica, sans-serif; }
button, input, summary { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button, a { color: inherit; }
a { text-decoration: none; }
button { border: 0; background: none; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #2a55e5; outline-offset: 3px; }
.header-inner { max-width: var(--page-width); margin: auto; }
.topbar { height: 68px; display: flex; align-items: center; gap: 16px; padding: 0 4px; }
.brand-tab { display: flex; align-items: center; justify-content: center; gap: 8px; width: 130px; height: 44px; background: #f0f0f0; border-radius: 12px; }
.brand-tab.active { background: #ffdf20; }
.brand-tab img:first-child { height: 22px; width: auto; }
.brand-tab img:last-child { height: 18px; width: auto; }
.delivery { margin-left: auto; font-size: 14px; }
.blue { color: #2455eb; }
.searchbar { display: flex; gap: 24px; height: 64px; align-items: center; padding: 0 16px 8px; }
#search-form { display: flex; align-items: center; flex: 1; height: 44px; border: 1.6px solid #2175ff; border-radius: 12px; padding: 0 18px; min-width: 0; }
#search-input { border: 0; outline: none; width: 100%; background: transparent; font-size: 16px; padding: 8px 12px; }
.search-icon { width: 18px; height: 18px; border: 1.5px solid #80858c; border-radius: 50%; position: relative; flex-shrink: 0; }
.search-icon:after { content: ''; height: 8px; width: 1.5px; background: #80858c; position: absolute; right: -4px; bottom: -5px; transform: rotate(-40deg); }
.header-action { display: flex; align-items: center; gap: 9px; white-space: nowrap; font-size: 16px; padding: 8px 0; }
.header-action > span:first-child { font-size: 24px; }
.more-menu { position: relative; }
.more-menu summary { cursor: pointer; list-style: none; }
.more-menu > div { position: absolute; right: 0; top: 28px; width: 160px; padding: 8px; background: white; box-shadow: 0 4px 20px #0002; z-index: 5; border-radius: 8px; }
.more-menu button { display: block; padding: 12px; text-align: left; width: 100%; }
.main-navigation { display: flex; overflow-x: auto; border-block: 1px solid #eee; height: 78px; scrollbar-width: none; }
.department { flex: 1 0 80px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-width: 0; font-size: 12px; padding: 8px 3px; position: relative; }
.department img { width: 32px; height: 32px; object-fit: contain; }
.department span { max-width: 78px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.department.active:after { content: ''; position: absolute; bottom: 0; height: 3px; background: var(--blue); left: 12px; right: 12px; border-radius: 3px; }
.storefront { max-width: var(--page-width); margin: auto; padding-top: 16px; }
.store-section { margin: 0 16px 24px; position: relative; }
.image-link { display: block; padding: 0; text-align: left; flex-shrink: 0; }
.image-link img { width: 100%; height: auto; display: block; }
.hero { margin-bottom: 24px; }
.rail-track { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; }
.rail-track::-webkit-scrollbar { display: none; }
.rail-track > * { scroll-snap-align: start; }
.hero .rail-track { gap: 32px; }
.hero .image-link { width: 460px; }
.hero img { aspect-ratio: 1600/780; object-fit: cover; border-radius: 16px; }
.hero-dots { display: flex; justify-content: center; gap: 5px; padding-top: 12px; }
.hero-dots button { background: #ddd; width: 5px; height: 5px; padding: 0; border-radius: 5px; }
.hero-dots button.active { width: 12px; background: #888; }
.rail-arrow { position: absolute; right: -4px; top: 45%; background: white; border: 1px solid #eee; border-radius: 50%; width: 48px; height: 48px; box-shadow: 0 1px 4px #0001; z-index: 1; font-size: 32px; line-height: 1; }
.rail-arrow.previous { right: auto; left: -4px; }
.category-row { display: flex; gap: 16px; overflow-x: auto; scrollbar-width: none; margin-bottom: 16px; }
.category { width: calc((100% - 160px)/11); min-width: calc((100% - 160px)/11); text-align: center; padding: 0; }
.category img { display: block; width: 100%; aspect-ratio: 1; border-radius: 14px; }
.category span { display: block; font-size: 12px; white-space: nowrap; margin-top: 8px; }
.categories { padding-bottom: 8px; }
.banner { margin-bottom: 12px; }
.offer-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin-inline: 0; margin-bottom: 12px; }
.edge { margin-inline: 0; margin-bottom: 0; }
.product-rail .image-link { width: 251px; }
.product-rail img { aspect-ratio: 350/530; object-fit: contain; }
.product-title { display: block; padding-top: 8px; font-size: 16px; text-align: center; }
.deals { min-height: 368px; border-radius: 16px; overflow: hidden; background-color: #ff6400; background-size: 100% 100%; padding: 20px 12px; }
.deals h2 { font-size: 20px; margin: 0 4px 16px; color: #fff; font-weight: 500; }
.deals .image-link { width: 201px; color: white; }
.deals img { aspect-ratio: 400/600; object-fit: contain; }
.deals .product-title { text-align: left; }
.site-footer { background: #212121; color: #fff; margin-top: 48px; font-size: 12px; }
.footer-columns { display: grid; grid-template-columns: repeat(4,1fr) 1.5fr 1.5fr; gap: 28px; padding: 40px 60px; }
.footer-columns h2 { font-size: 12px; font-weight: 400; color: #878787; margin: 0 0 12px; }
.footer-columns a, .footer-columns span { display: block; line-height: 1.5; }
.footer-columns a { font-weight: 600; }
.footer-columns p { line-height: 1.6; margin: 0 0 16px; }
.footer-contact { border-left: 1px solid #454d5e; padding-left: 28px; }
.footer-bottom { display: flex; justify-content: space-around; padding: 24px; border-top: 1px solid #454d5e; gap: 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
dialog { border: 0; border-radius: 14px; padding: 32px; width: min(480px,90vw); max-height: 85vh; overflow: auto; box-shadow: 0 20px 80px #0003; }
dialog::backdrop { background: #0006; }
.dialog-close { float: right; font-size: 28px; }
.dialog-product { max-height: 300px; display: block; margin: auto; }
.primary-button { background: var(--blue); color: white; border-radius: 8px; padding: 12px 20px; margin-top: 16px; }
.dialog-field { display: block; width: 100%; padding: 12px; margin-top: 16px; border: 1px solid #aaa; border-radius: 6px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); padding: 14px 24px; background: #212121; color: white; border-radius: 8px; z-index: 20; }
.search-results { max-width: 1200px; margin: 24px auto; padding: 16px; }
.results-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(160px,1fr)); gap: 20px; }
.results-grid .image-link { width: 100%; }
.results-grid img { height: 230px; object-fit: contain; }
@media (max-width: 800px) {
  .topbar { height: 58px; padding-inline: 12px; gap: 8px; }
  .brand-tab { width: 98px; height: 36px; }
  .delivery { font-size: 11px; text-align: right; max-width: 180px; }
  .delivery .blue { display: block; }
  .searchbar { gap: 14px; padding-inline: 12px; height: 60px; flex-wrap: wrap; }
  #search-form { height: 40px; }
  #search-input { font-size: 13px; padding-inline: 8px; }
  .header-action { font-size: 13px; gap: 4px; }
  .more-menu { display: none; }
  .main-navigation { height: 72px; }
  .department { flex-basis: 75px; }
  .store-section { margin-inline: 12px; margin-bottom: 16px; }
  .hero .image-link { width: 80vw; max-width: 460px; }
  .hero .rail-track { gap: 12px; }
  .category { width: 72px; min-width: 72px; }
  .category span { font-size: 10px; }
  .category-row { gap: 12px; }
  .offer-grid, .edge { margin-inline: 0; }
  .product-rail .image-link { width: 180px; }
  .product-title { font-size: 13px; }
  .deals { min-height: 290px; }
  .deals .image-link { width: 150px; }
  .deals h2 { font-size: 16px; }
  .rail-arrow { width: 36px; height: 36px; }
  .footer-columns { grid-template-columns: repeat(2,1fr); padding: 30px 20px; gap: 24px; }
  .footer-contact { padding: 0; border: 0; }
  .footer-bottom { flex-wrap: wrap; font-size: 10px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* The source artwork already includes product names and offer text. */
.hero { margin-bottom: 12px; }
@media (min-width: 801px) {
  .category { width: 97.5px; min-width: 97.5px; }
  .category-row { margin-bottom: 6px; }
}
