/* The shop window. Mobile first (360px), right to left, system fonts only (no external font, no external script). The colours come from the store
   (--sf-primary, --sf-accent, --sf-on-primary are written on the <html> element by the server, after a contrast check). */
:root {
  --sf-bg: #ffffff;
  --sf-text: #1b1b1b;
  --sf-muted: #5a5a5a;
  --sf-border: #dddddd;
  --sf-radius: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--sf-bg);
  color: var(--sf-text);
  font-family: system-ui, 'Segoe UI', Tahoma, Arial, sans-serif;
  line-height: 1.6;
  padding-bottom: 64px;
}

a {
  color: var(--sf-primary);
}

img {
  max-width: 100%;
  height: auto;
}

.topbar {
  background: var(--sf-accent);
  color: #111;
  text-align: center;
  padding: 6px 12px;
  font-size: 14px;
}

.header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  padding: 10px 16px;
  background: var(--sf-primary);
  color: var(--sf-on-primary);
}

.header a {
  color: var(--sf-on-primary);
  text-decoration: none;
}

.brand {
  font-size: 20px;
  font-weight: 700;
}

.search {
  display: flex;
  flex: 1 1 220px;
  gap: 6px;
}

.search input {
  flex: 1;
  min-width: 0;
}

.top-nav {
  display: none;
  gap: 16px;
}

.main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}

.grid,
.collections {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  border: 1px solid var(--sf-border);
  border-radius: var(--sf-radius);
  padding: 8px;
}

.card-link {
  color: inherit;
  text-decoration: none;
  display: block;
}

.card-title {
  display: block;
  margin-top: 6px;
  font-weight: 600;
}

.card-noimage {
  aspect-ratio: 1;
  background: #f1f1f1;
  border-radius: var(--sf-radius);
}

.collections a {
  display: block;
  text-align: center;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--sf-border);
  border-radius: var(--sf-radius);
  padding: 8px;
}

.money {
  font-weight: 700;
}

.money-old {
  color: var(--sf-muted);
  font-weight: 400;
}

.badge {
  display: inline-block;
  font-size: 12px;
  border-radius: 999px;
  padding: 2px 10px;
  margin-inline-end: 6px;
}

.badge-ok {
  background: #e3f4e5;
  color: #1c5b24;
}

.badge-warn {
  background: #fff1d6;
  color: #7a4a00;
}

.badge-out {
  background: #fde3e3;
  color: #8a1c1c;
}

.badge-new {
  background: #e7edfb;
  color: #1f3f8a;
}

.product {
  display: grid;
  gap: 16px;
}

.gallery img {
  border-radius: var(--sf-radius);
  margin-bottom: 8px;
}

.prewrap {
  white-space: pre-wrap;
}

.notice {
  background: #eef3fb;
  border: 1px solid #c9d8f3;
  border-radius: var(--sf-radius);
  padding: 10px 14px;
}

.notice-error {
  background: #fdeaea;
  border-color: #f2b9b9;
  color: #7a1a1a;
}

form label {
  display: block;
  margin: 10px 0;
}

form.inline,
.inline {
  display: inline-block;
  margin-inline-end: 8px;
}

input,
select,
textarea,
button,
.button {
  font: inherit;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--sf-border);
  min-height: 44px;
}

input[type='checkbox'],
input[type='radio'] {
  min-height: 0;
  width: 18px;
  height: 18px;
}

label.check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

button,
.button {
  background: var(--sf-primary);
  color: var(--sf-on-primary);
  border-color: transparent;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.link-button {
  background: none;
  color: var(--sf-primary);
  border: none;
  text-decoration: underline;
  padding: 4px;
  min-height: 0;
}

.narrow {
  max-width: 480px;
  margin: 0 auto;
}

.narrow input:not([type='checkbox']),
.narrow select,
.narrow textarea,
.address-form input:not([type='checkbox']),
.address-form select {
  width: 100%;
}

.hp {
  position: absolute;
  inset-inline-start: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.cart-lines,
.addresses,
.orders,
.timeline {
  list-style: none;
  padding: 0;
}

.cart-line {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--sf-border);
  padding: 12px 0;
}

.totals {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  margin: 16px 0;
}

.totals dd {
  margin: 0;
}

.lines {
  width: 100%;
  border-collapse: collapse;
}

.lines th,
.lines td {
  border-bottom: 1px solid var(--sf-border);
  padding: 6px;
  text-align: start;
}

.pager {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin: 16px 0;
}

.trust ul {
  list-style: none;
  margin: 0;
  padding: 12px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: center;
  background: #f6f6f6;
}

.footer {
  text-align: center;
  padding: 16px;
  color: var(--sf-muted);
}

.bottom-nav {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  display: flex;
  justify-content: space-around;
  background: #fff;
  border-top: 1px solid var(--sf-border);
  padding: 10px 0;
  z-index: 10;
}

.bottom-nav a {
  text-decoration: none;
  font-size: 14px;
}

.whatsapp {
  position: fixed;
  inset-inline-start: 12px;
  bottom: 72px;
  background: #187a3f;
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  padding: 10px 16px;
  z-index: 11;
}

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

@media (min-width: 720px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .collections {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .product {
    grid-template-columns: 1fr 1fr;
  }

  .top-nav {
    display: flex;
  }

  .bottom-nav {
    display: none;
  }

  body {
    padding-bottom: 0;
  }

  .whatsapp {
    bottom: 12px;
  }
}
