/* The default design: neutral, for a satellite with no design of its own yet. A brand design ships its
   own stylesheet under wwwroot/themes/{name}/ and need not load this one. */

:root {
    --color-text: #222;
    --color-muted: #6b6b6b;
    --color-accent: #111;
    --color-accent-contrast: #fff;
    --color-sale: #c62828;
    --color-border: #e3e3e3;
    --color-band: #f5f5f5;
    --color-background: #fff;
    --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --gutter: 16px;
    --max-width: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-background);
    line-height: 1.5;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

.visually-hidden {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: var(--gutter); top: 8px; background: var(--color-background); padding: 8px; z-index: 10; }

.announcement-bar { background: var(--color-accent); color: var(--color-accent-contrast); text-align: center; font-size: 0.85rem; padding: 6px var(--gutter); }
.announcement-bar a { color: inherit; }

.site-header { border-bottom: 1px solid var(--color-border); }
.site-header__inner {
    max-width: var(--max-width); margin: 0 auto; padding: 12px var(--gutter);
    display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
}
.site-header__brand { font-weight: 700; font-size: 1.4rem; text-decoration: none; }
.site-header__search { flex: 1 1 200px; }
.site-header__search input { width: 100%; padding: 8px 12px; border: 1px solid var(--color-border); border-radius: 4px; }
.cart-link { text-decoration: none; white-space: nowrap; }
.cart-link__count { display: inline-block; min-width: 1.5em; text-align: center; background: var(--color-accent); color: var(--color-accent-contrast); border-radius: 999px; font-size: 0.8rem; padding: 0 6px; }

.mega-menu { max-width: var(--max-width); margin: 0 auto; padding: 0 var(--gutter); }
.mega-menu__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.mega-menu__item { position: relative; }
.mega-menu__link { display: block; padding: 10px 0; text-decoration: none; font-weight: 600; }
.mega-menu__panel {
    display: none; position: absolute; left: 0; top: 100%; z-index: 5; min-width: 220px;
    list-style: none; margin: 0; padding: 8px 0; background: var(--color-background); border: 1px solid var(--color-border);
}
.mega-menu__panel a { display: block; padding: 6px 16px; text-decoration: none; }
.mega-menu__item:hover .mega-menu__panel, .mega-menu__item:focus-within .mega-menu__panel { display: block; }

.site-main { max-width: var(--max-width); margin: 0 auto; padding: 24px var(--gutter) 48px; }

.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 16px; font-size: 0.85rem; color: var(--color-muted); }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; }

.page-header h1 { margin: 0 0 12px; }
.subcategories { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.subcategories a { border: 1px solid var(--color-border); border-radius: 999px; padding: 4px 12px; text-decoration: none; }
.listing-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; color: var(--color-muted); }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 24px 16px; }
.product-card { display: flex; flex-direction: column; gap: 6px; }
.product-card__link { text-decoration: none; display: flex; flex-direction: column; gap: 8px; }
.product-card__image { position: relative; aspect-ratio: 1; background: var(--color-band); }
.product-card__image img { width: 100%; height: 100%; object-fit: contain; }
.product-card__name { font-weight: 600; }
.product-card__soldout { color: var(--color-muted); font-size: 0.9rem; }

.badge { display: inline-block; font-size: 0.7rem; font-weight: 700; padding: 2px 6px; letter-spacing: 0.05em; }
.badge--new { background: var(--color-sale); color: #fff; }
.product-card__image .badge { position: absolute; left: 8px; top: 8px; }

.price { display: inline-flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.price__amount { font-weight: 700; }
.price__compare { color: var(--color-muted); font-size: 0.9em; }
.price__from { color: var(--color-muted); font-size: 0.9em; }

.button {
    display: inline-block; border: 1px solid var(--color-accent); background: var(--color-background); color: var(--color-accent);
    padding: 8px 16px; cursor: pointer; text-decoration: none; text-align: center; font: inherit;
}
.button--primary { background: var(--color-accent); color: var(--color-accent-contrast); }
.button--block { display: block; width: 100%; }
.button:disabled { opacity: 0.6; cursor: progress; }
.link-button { background: none; border: none; font-size: 1.4rem; cursor: pointer; }

.product { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .product { grid-template-columns: 1fr 1fr; } }
.product__thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.product__thumbs button { border: 1px solid var(--color-border); padding: 0; background: none; cursor: pointer; width: 64px; }
.product__buy { display: grid; gap: 10px; max-width: 360px; }
.product__buy select { padding: 8px; }
.product__description { margin-top: 40px; }
.product__soldout { color: var(--color-muted); }

.stepper { display: inline-flex; border: 1px solid var(--color-border); width: max-content; }
.stepper button { width: 40px; border: none; background: var(--color-band); cursor: pointer; font-size: 1.1rem; }
.stepper input { width: 60px; text-align: center; border: none; -moz-appearance: textfield; }

.section { margin-top: 48px; }
.section--band { background: var(--color-band); padding: 32px var(--gutter); margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); }
.section__title { text-align: center; margin: 0; }
.section__subtitle { text-align: center; color: var(--color-muted); margin: 4px 0 24px; }

.hero img { width: 100%; }
.hero a { position: relative; display: block; text-decoration: none; }
.hero__caption { display: block; padding: 12px 0; text-align: center; }
.hero__caption strong { display: block; font-size: 1.3rem; }

.tiles, .cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 32px; }
.tile, .card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; text-align: center; }

.notices { list-style: none; padding: 0; max-width: 720px; margin: 16px auto 0; }
.notices li { border-bottom: 1px solid var(--color-border); padding: 10px 0; display: flex; gap: 16px; }
.notices time { color: var(--color-muted); white-space: nowrap; }

.cart { width: 100%; border-collapse: collapse; }
.cart th, .cart td { border-bottom: 1px solid var(--color-border); padding: 12px 8px; text-align: left; vertical-align: middle; }
.cart__product { display: flex; gap: 12px; align-items: center; }
.cart__product img { width: 64px; }
.cart__product small { display: block; color: var(--color-muted); }
.cart__warning { color: var(--color-sale) !important; }
.cart__line--unavailable { opacity: 0.6; }
.cart__quantity input { width: 70px; padding: 4px; }
.cart__summary { margin-top: 24px; text-align: right; }
.cart__note { color: var(--color-muted); font-size: 0.85rem; }
@media (max-width: 640px) {
    .cart thead { display: none; }
    .cart tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--color-border); }
    .cart td { border: none; padding: 0; }
    .cart td.cart__product { grid-column: 1 / -1; }
}

.notice { background: var(--color-band); padding: 10px 14px; }
.empty, .muted { color: var(--color-muted); }

.pagination { display: flex; justify-content: center; gap: 16px; margin-top: 32px; }
.sort-menu { display: flex; gap: 8px; align-items: center; }
.search-form { display: flex; gap: 8px; max-width: 520px; margin-bottom: 24px; }
.search-form input { flex: 1; padding: 8px 12px; border: 1px solid var(--color-border); }

.site-footer { border-top: 1px solid var(--color-border); margin-top: 48px; padding: 32px var(--gutter); color: var(--color-muted); font-size: 0.9rem; }
.site-footer__inner { max-width: var(--max-width); margin: 0 auto; display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.site-footer h2 { font-size: 0.95rem; color: var(--color-text); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer__note, .site-footer__copyright { max-width: var(--max-width); margin: 16px auto 0; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--color-accent); color: var(--color-accent-contrast); padding: 10px 18px; z-index: 20; max-width: calc(100% - 2 * var(--gutter)); }
.toast--error { background: var(--color-sale); }

:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
