:root {
    color-scheme: light;
    --ink: #18283d;
    --muted: #617082;
    --blue: #0754a5;
    --blue-deep: #063b76;
    --red: #e52535;
    --yellow: #ffd327;
    --paper: #f6f7f8;
    --surface: #fff;
    --line: #e1e6eb;
    --shadow: 0 12px 32px rgba(14, 40, 72, .1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-height: 100vh; margin: 0; background: var(--paper); color: var(--ink); font-family: Arial, Helvetica, sans-serif; line-height: 1.45; }
a { color: inherit; }
button, input { font: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid #f5a700; outline-offset: 3px; }
.offer-strip { display: flex; justify-content: space-between; gap: 12px; padding: 7px max(18px, calc((100% - 1180px) / 2)); background: var(--blue-deep); color: #fff; font-size: .72rem; font-weight: 700; }
.site-header { position: relative; z-index: 5; background: var(--surface); box-shadow: 0 2px 8px rgba(15, 44, 77, .07); }
.header-main { width: min(1180px, calc(100% - 36px)); min-height: 78px; margin: 0 auto; display: grid; grid-template-columns: auto auto minmax(220px, 1fr) auto; align-items: center; gap: 25px; }
.store-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--blue-deep); text-decoration: none; font-size: 1.08rem; font-weight: 900; letter-spacing: -.045em; white-space: nowrap; }
.brand-mark { display: grid; width: 37px; height: 37px; place-items: center; border: 3px solid var(--blue); border-radius: 50%; color: var(--red); font-size: 1.2rem; font-weight: 900; }
.brand-accent { color: var(--red); }
.delivery-link { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.delivery-icon { color: var(--red); font-size: 1.4rem; font-weight: 900; }
.delivery-link small, .delivery-link strong { display: block; line-height: 1.2; }
.delivery-link small { color: var(--muted); font-size: .68rem; }
.delivery-link strong { color: var(--blue-deep); font-size: .82rem; }
.search-form { display: flex; width: 100%; height: 44px; overflow: hidden; border: 1px solid #9aabc0; border-radius: 7px; background: white; }
.search-form input { flex: 1; min-width: 0; padding: 0 13px; border: 0; outline: 0; color: var(--ink); font-size: .84rem; }
.search-form input::placeholder { color: #77869a; }
.search-form button { min-width: 76px; padding: 0 12px; border: 0; background: var(--yellow); color: var(--blue-deep); cursor: pointer; font-size: .82rem; font-weight: 800; }
.search-form button:hover { background: #f5bf00; }
.cart-link { display: flex; align-items: center; gap: 7px; color: var(--blue-deep); text-decoration: none; font-size: .86rem; }
.cart-link > .cart-icon { position: relative; display: block; width: 17px; height: 14px; margin-top: 4px; border: 2px solid var(--red); border-radius: 2px; }
.cart-link > .cart-icon::before { position: absolute; top: -7px; left: 3px; width: 7px; height: 6px; border: 2px solid var(--red); border-bottom: 0; border-radius: 6px 6px 0 0; content: ""; }
.cart-active { color: var(--red); }
.category-nav { display: flex; width: min(1180px, calc(100% - 36px)); min-height: 44px; margin: 0 auto; align-items: stretch; gap: clamp(18px, 3vw, 36px); overflow-x: auto; border-top: 1px solid #f0f2f4; scrollbar-width: none; }
.category-nav::-webkit-scrollbar { display: none; }
.category-link { position: relative; display: flex; flex: 0 0 auto; align-items: center; color: #34475e; text-decoration: none; font-size: .8rem; font-weight: 700; }
.category-link:hover, .category-active { color: var(--red); }
.category-active::after { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; background: var(--red); content: ""; }
.hero-banner { position: relative; display: flex; width: min(1180px, calc(100% - 36px)); min-height: 385px; margin: 24px auto 0; align-items: center; padding: clamp(30px, 6vw, 72px); overflow: hidden; border-radius: 10px; background: linear-gradient(90deg, rgba(5, 35, 72, .91) 0%, rgba(5, 48, 88, .75) 42%, rgba(6, 48, 83, .05) 100%), url("https://images.unsplash.com/photo-1542838132-92c53300491e?auto=format&fit=crop&w=1800&q=85") center 54%/cover no-repeat; color: white; }
.hero-content { position: relative; z-index: 1; max-width: 510px; }
.hero-kicker, .section-eyebrow { margin: 0 0 9px; color: var(--red); font-size: .68rem; font-weight: 900; letter-spacing: .11em; }
.hero-kicker { display: flex; align-items: center; gap: 8px; color: var(--yellow); }
.deal-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }
.hero-banner h1 { margin: 0 0 12px; font-size: clamp(2.35rem, 6vw, 4.1rem); font-weight: 900; letter-spacing: -.055em; line-height: 1.02; }
.hero-banner h1 span { color: var(--yellow); }
.hero-copy { max-width: 400px; margin: 0 0 24px; color: rgba(255,255,255,.92); font-size: .98rem; }
.primary-button, .card-button { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 10px; padding: 0 18px; border: 0; border-radius: 5px; background: var(--yellow); color: var(--blue-deep); text-decoration: none; font-size: .84rem; font-weight: 800; transition: background .2s ease, transform .2s ease; }
.primary-button:hover, .card-button:hover { transform: translateY(-1px); background: #f5bf00; }
.hero-badge { position: absolute; right: clamp(20px, 7vw, 82px); bottom: 34px; display: flex; width: 92px; height: 92px; flex-direction: column; align-items: center; justify-content: center; transform: rotate(8deg); border-radius: 50%; background: var(--yellow); color: var(--blue-deep); box-shadow: 0 9px 20px rgba(0,0,0,.15); }
.hero-badge strong { font-size: 1.16rem; line-height: 1.05; }
.hero-badge span { font-size: .76rem; font-weight: 700; }
.benefit-row { display: flex; width: min(1180px, calc(100% - 36px)); margin: 17px auto 0; padding: 17px 22px; justify-content: space-between; gap: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.benefit { display: flex; align-items: center; gap: 10px; }
.benefit-icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border-radius: 50%; background: #fff1d0; color: var(--red); font-size: 1rem; font-weight: 900; }
.benefit strong, .benefit small { display: block; }
.benefit strong { font-size: .77rem; }
.benefit small { color: var(--muted); font-size: .66rem; }
.home-products { width: min(1180px, calc(100% - 36px)); margin: 44px auto 64px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 19px; }
.section-heading h2, .page-heading h1 { margin: 0; color: var(--blue-deep); font-size: clamp(1.65rem, 4vw, 2.15rem); font-weight: 900; letter-spacing: -.04em; line-height: 1.1; }
.text-link { flex: 0 0 auto; color: var(--blue); text-decoration: none; font-size: .82rem; font-weight: 800; }
.container { width: min(1180px, calc(100% - 36px)); margin: 32px auto 70px; }
.page-heading { margin-bottom: 23px; }
.page-heading p:last-child { margin: 9px 0 0; color: var(--muted); font-size: .9rem; }
.search-result-status { margin: -8px 0 14px; color: var(--muted); font-size: .85rem; }
.products { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 205px), 1fr)); gap: 16px; margin-top: 22px; }
.home-product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.product-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: 0 3px 11px rgba(16, 42, 72, .045); transition: box-shadow .18s ease, transform .18s ease; }
.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.product-image { display: flex; min-height: 166px; align-items: center; justify-content: center; overflow: hidden; background: #f3f6f8; }
.product-image img { display: block; width: 100%; height: 100%; min-height: 166px; object-fit: cover; }
.home-product-grid .product-image img { height: 186px; }
.milk-image { background: #eff7fc; }
.bread-image { background: #fff5e5; }
.apple-image { background: #fff1ed; }
.product-info { padding: 12px 14px 14px; }
.product-category { margin: 0 0 5px !important; color: var(--muted) !important; font-size: .61rem; font-weight: 800; letter-spacing: .075em; }
.product-card h3 { margin: 0 0 5px; color: var(--ink); font-size: .95rem; }
.product-price { margin: 0 0 12px !important; color: var(--blue-deep) !important; font-size: 1rem; font-weight: 900; }
.card-button { width: 100%; min-height: 38px; border: 1px solid #b6c6d8; background: #fff; color: var(--blue); font-size: .78rem; }
.card-button:hover { border-color: var(--blue); background: #f2f7fd; }
.product-card button, button { min-height: 42px; padding: 10px 15px; border: 0; border-radius: 5px; background: var(--blue); color: #fff; cursor: pointer; font: inherit; font-size: .82rem; font-weight: 800; }
.product-card button { width: calc(100% - 28px); margin: 0 14px 14px; }
.product-card button:hover, button:hover { background: var(--blue-deep); }
#cart-items { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; }
.cart-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.cart-item h3 { margin: 0; font-size: .95rem; }
.cart-item p { margin: 3px 0 0; color: var(--muted); font-size: .82rem; }
.cart-item button { min-height: 36px; padding: 7px 12px; background: #fff; color: var(--red); border: 1px solid #efbcc2; }
.cart-item button:hover { background: #fff3f4; }
#cart-total { margin: 22px 0 16px; color: var(--blue-deep); font-size: 1.25rem; font-weight: 900; }
main > button + button { margin-left: 8px; }
.checkout-dialog { width: min(460px, calc(100% - 28px)); max-width: none; margin: auto; padding: 0; overflow: visible; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: 0 28px 90px rgba(11, 38, 71, .24); }
.checkout-dialog::backdrop { background: rgba(13, 34, 59, .6); backdrop-filter: blur(3px); }
.checkout-form { position: relative; display: flex; flex-direction: column; padding: clamp(23px, 6vw, 38px); }
.dialog-close { position: absolute; top: 12px; right: 12px; width: 38px; min-height: 38px; padding: 0; border: 0; background: transparent; color: var(--muted); font-size: 1.45rem; }
.dialog-close:hover { background: #f0f3f6; color: var(--ink); }
.checkout-form .eyebrow { margin: 0 0 7px; color: var(--red); font-size: .69rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.checkout-form h2 { margin: 0 0 8px; color: var(--blue-deep); font-size: 1.95rem; font-weight: 900; letter-spacing: -.04em; line-height: 1.1; }
.checkout-intro { margin: 0 0 20px; color: var(--muted); font-size: .85rem; }
.checkout-form label { margin-bottom: 7px; font-size: .86rem; font-weight: 700; }
.checkout-form input { width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid #bcc8d5; border-radius: 5px; background: white; color: var(--ink); }
.checkout-form input:focus-visible { outline: 3px solid #f5a700; outline-offset: 2px; }
.checkout-hint { margin: 7px 0 0; color: var(--muted); font-size: .78rem; }
.checkout-status { min-height: 24px; margin: 15px 0 9px; color: var(--blue-deep); font-size: .86rem; font-weight: 650; }
.checkout-status[data-state="error"] { color: #b42332; }
.checkout-status[data-state="success"] { color: #16753d; }
.checkout-submit { width: 100%; background: var(--red); }
.checkout-submit:hover { background: #c91627; }
.checkout-submit:disabled { cursor: wait; opacity: .65; }
.site-footer { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 18px; border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); text-align: center; }
.footer-brand { margin-bottom: 2px; }
.site-footer p { margin: 0; font-size: .82rem; }
.site-footer > small { font-size: .7rem; }
@media (max-width: 680px) {
    .offer-strip { padding: 6px 14px; font-size: .64rem; }
    .header-main { width: calc(100% - 28px); min-height: auto; padding: 12px 0 10px; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; }
    .store-brand { gap: 6px; font-size: .92rem; }
    .brand-mark { width: 32px; height: 32px; font-size: 1rem; }
    .delivery-link { display: none; }
    .search-form { grid-column: 1 / -1; grid-row: 2; height: 40px; }
    .search-form input { padding: 0 10px; font-size: .76rem; }
    .search-form button { min-width: 62px; padding: 0 8px; font-size: .75rem; }
    .cart-link { gap: 4px; font-size: .76rem; }
    .cart-link > .cart-icon { width: 15px; height: 12px; }
    .category-nav { width: calc(100% - 28px); min-height: 40px; gap: 22px; }
    .category-link { font-size: .75rem; }
    .hero-banner { width: calc(100% - 24px); min-height: 318px; margin-top: 12px; padding: 25px 20px; border-radius: 8px; background-position: 60% center; }
    .hero-banner h1 { font-size: clamp(2rem, 10vw, 2.75rem); }
    .hero-copy { max-width: 245px; font-size: .83rem; }
    .hero-badge { right: 14px; bottom: 15px; width: 64px; height: 64px; }
    .hero-badge strong { font-size: .9rem; }
    .hero-badge span { font-size: .64rem; }
    .benefit-row { width: calc(100% - 24px); margin-top: 12px; padding: 12px 10px; gap: 7px; }
    .benefit { flex: 1; gap: 6px; }
    .benefit-icon { width: 26px; height: 26px; font-size: .78rem; }
    .benefit strong { font-size: .64rem; }
    .benefit small { font-size: .55rem; }
    .home-products, .container { width: calc(100% - 24px); }
    .home-products { margin: 30px auto 44px; }
    .container { margin: 24px auto 48px; }
    .section-heading { margin-bottom: 14px; }
    .section-heading h2, .page-heading h1 { font-size: 1.55rem; }
    .section-eyebrow { font-size: .6rem; }
    .products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
    .home-product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .product-image { min-height: 112px; }
    .product-image img, .home-product-grid .product-image img { height: 112px; min-height: 112px; }
    .product-info { padding: 9px 10px 11px; }
    .product-card h3 { font-size: .82rem; }
    .product-category { font-size: .53rem; }
    .product-price { font-size: .9rem; }
    .card-button { min-height: 34px; padding: 0 8px; font-size: .71rem; }
    .product-card button { width: calc(100% - 20px); margin: 0 10px 10px; font-size: .74rem; }
    .cart-item { align-items: flex-start; flex-wrap: wrap; padding: 14px; }
    .cart-item button { margin-left: auto; }
    main > button + button { margin: 10px 0 0; }
    .checkout-form { padding: 27px 21px 21px; }
    .checkout-form h2 { font-size: 1.75rem; }
}
@media (max-width: 340px) {
    .offer-strip span:last-child { display: none; }
    .benefit-row { padding-inline: 7px; }
    .benefit { flex-direction: column; align-items: flex-start; }
    .benefit small { display: none; }
    .hero-banner { min-height: 300px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
