/* Štojs trgovina – mobile first. Brand red sampled from assets/logo_stojs.jpg. */
:root {
  --red: #eb3d02;        /* logo red: thin accents only (header line, badges) */
  --brand: #c23400;      /* THE shop red (same hue, 5.5:1 on white): home banner, buttons, links */
  --red-dark: #9e2a00;
  --black: #111;
  --grey-9: #333;
  --grey-6: #666;
  --grey-3: #d6d6d6;
  --grey-1: #f4f4f4;
  --white: #fff;
  --ok: #1d6b2f;
  --radius: 6px;
  --tap: 44px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--black);
  background: var(--white);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; }
img { max-width: 100%; height: auto; }
a { color: var(--brand); }
a:hover { color: var(--red-dark); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--grey-6); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

/* Header */
.topbar { background: var(--black); color: var(--white); font-size: .85rem; }
.topbar .wrap { display: flex; gap: 16px; justify-content: space-between; align-items: center; padding-top: 6px; padding-bottom: 6px; }
.topbar a { color: var(--white); text-decoration: none; }
.topbar-contact, .topbar-account, .topbar-end { display: flex; gap: 14px; }
.topbar-end { align-items: center; }
/* 40 px touch target inside the bar (it grows to 40 px); the icon lines up with the right edge of the page. */
.topbar .topbar-facebook { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  margin: -6px -11px -6px -8px; }
.topbar .topbar-facebook:hover { color: var(--red); }
.topbar-account a { font-weight: 600; }
@media (max-width: 420px) { .topbar-email { display: none; } }
.site-header { border-bottom: 4px solid var(--red); background: var(--white); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding-top: 10px; padding-bottom: 10px; }
.logo { display: block; line-height: 0; }
.logo img { height: 52px; width: auto; }
.basket-link {
  margin-left: auto; display: inline-flex; align-items: center; gap: 8px; min-height: var(--tap);
  padding: 0 14px; border-radius: var(--radius); background: var(--black); color: var(--white); text-decoration: none; font-weight: 600;
}
.basket-link:hover { color: var(--white); background: var(--grey-9); }
.basket-count { background: var(--red); color: var(--white); border-radius: 999px; padding: 0 8px; font-size: .85rem; min-width: 24px; text-align: center; }
.search { order: 3; flex: 1 1 100%; display: flex; }

/* Trgovina | Soboslikarstvo: one control, active part filled */
.section-switch { order: 2; flex: 1 1 100%; display: flex; border: 2px solid var(--black); border-radius: var(--radius); overflow: hidden; }
.section-switch a {
  flex: 1 1 50%; display: flex; align-items: center; justify-content: center; min-height: var(--tap); padding: 0 14px;
  color: var(--black); text-decoration: none; font-weight: 700; white-space: nowrap; background: var(--white);
}
.section-switch a + a { border-left: 2px solid var(--black); }
.section-switch a:hover { background: var(--grey-1); color: var(--black); }
.section-switch a[aria-current="true"] { background: var(--brand); color: var(--white); }
.search input { flex: 1; min-width: 0; min-height: var(--tap); padding: 0 12px; border: 2px solid var(--grey-3); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); font-size: 1rem; }
.search input:focus { border-color: var(--black); outline: none; }
.search button { min-height: var(--tap); border-radius: 0 var(--radius) var(--radius) 0; }

.catnav { background: var(--grey-1); border-bottom: 1px solid var(--grey-3); }
.catnav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.catnav li { flex: 0 0 auto; }
.catnav a { display: block; padding: 10px 12px; color: var(--black); text-decoration: none; font-weight: 600; font-size: .95rem; border-bottom: 3px solid transparent; }
.catnav a[aria-current="page"], .catnav a:hover { border-bottom-color: var(--red); }

/* Buttons and forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: var(--tap);
  padding: 0 16px; border: 2px solid var(--brand); border-radius: var(--radius); background: var(--brand);
  color: var(--white); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; text-align: center;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); color: var(--white); }
.btn-secondary { background: var(--white); color: var(--black); border-color: var(--black); }
.btn-secondary:hover { background: var(--black); color: var(--white); border-color: var(--black); }
.btn-dark { background: var(--black); border-color: var(--black); }
.btn-dark:hover { background: var(--grey-9); border-color: var(--grey-9); }
.btn-link { background: none; border: 0; color: var(--brand); padding: 0 4px; min-height: 0; font-weight: 600; text-decoration: underline; }
.btn-link:hover { background: none; color: var(--red-dark); }
.btn-block { width: 100%; }
.btn-lg { min-height: 52px; font-size: 1.1rem; }

label { font-weight: 600; display: block; margin-bottom: 4px; }
/* Every text-like field (text, email, password, tel, number, search, url, date, no type…), select and textarea
   share one look. :where() keeps specificity at zero, so component rules (.qty, .search, .has-error) still win. */
:where(input:not([type=checkbox], [type=radio], [type=hidden], [type=file], [type=submit], [type=button],
       [type=reset], [type=image], [type=range], [type=color]), select, textarea) {
  width: 100%; min-height: var(--tap); padding: 8px 10px; border: 2px solid var(--grey-3); border-radius: var(--radius); font: inherit; background: var(--white);
  color: inherit; box-sizing: border-box;
}
input:focus, select:focus, textarea:focus { border-color: var(--black); outline: none; }
.qty { width: 84px !important; text-align: center; }
.field { margin-bottom: 14px; }
.field .help { font-size: .85rem; color: var(--grey-6); margin-top: 2px; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--brand); }
.errorlist { list-style: none; margin: 4px 0 0; padding: 0; color: var(--brand); font-size: .9rem; font-weight: 600; }
fieldset { border: 0; padding: 0; margin: 0 0 20px; }
legend { font-weight: 700; font-size: 1.15rem; margin-bottom: 10px; padding: 0; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 2px solid var(--grey-3); border-radius: var(--radius); margin-bottom: 8px; font-weight: 400; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--black); background: var(--grey-1); }
.choice input { margin-top: 4px; width: 20px; height: 20px; flex: 0 0 auto; accent-color: var(--brand); }
.choice strong { display: block; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.checkbox input { width: 22px; height: 22px; flex: 0 0 auto; accent-color: var(--brand); }

/* Messages */
.messages { list-style: none; padding: 0; margin: 16px 0 0; }
.messages li { padding: 12px 14px; border-radius: var(--radius); background: var(--grey-1); border-left: 5px solid var(--black); margin-bottom: 8px; }
.messages .success { border-left-color: var(--ok); }
.messages .error, .messages .warning { border-left-color: var(--brand); }
.notice { padding: 12px 14px; border-radius: var(--radius); background: var(--grey-1); border-left: 5px solid var(--red); margin: 0 0 16px; }

/* Layout pieces */
.page { padding-top: 20px; padding-bottom: 40px; }
.hero { background: var(--brand); color: var(--white); }
.hero .wrap { padding-top: 20px; padding-bottom: 20px; }
.hero h1 { font-size: 1.5rem; margin-bottom: .3em; }
.hero p { margin: 0; max-width: 46em; }
/* Supplier logo (dark blue and green): on a white tile like the admin logo; beside the text from 720px, below it on phones. */
.hero-logo { width: fit-content; margin-top: 14px; padding: 8px 12px; background: var(--white); border-radius: var(--radius); line-height: 0; }
.hero-logo img { display: block; width: 168px; height: auto; }
.breadcrumbs { font-size: .9rem; margin-bottom: 12px; color: var(--grey-6); }
.breadcrumbs a { color: var(--grey-6); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 28px 0 12px; border-bottom: 2px solid var(--black); padding-bottom: 6px; }
.section-head h2 { margin: 0; }
.vat-note { font-size: .9rem; color: var(--grey-6); }

/* Product grid and cards */
.grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.card { border: 1px solid var(--grey-3); border-radius: var(--radius); background: var(--white); display: grid; grid-template-columns: 96px 1fr; gap: 0 12px; padding: 12px; }
.card-img { grid-row: span 2; align-self: start; }
.card-img img { width: 96px; height: 96px; object-fit: contain; background: var(--white); }
.card h3 { font-size: 1rem; margin: 0 0 2px; }
.card h3 a { color: var(--black); text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.meta { font-size: .85rem; color: var(--grey-6); margin: 0 0 6px; }
.price { font-size: 1.25rem; font-weight: 800; }
.price .unit { font-size: .85rem; font-weight: 600; color: var(--grey-9); }
.price-was { font-size: .85rem; color: var(--ok); font-weight: 600; }
.price-gross { font-size: .85rem; color: var(--grey-6); }
.box-info { font-size: .9rem; margin: 4px 0 0; }
.card-actions { grid-column: 1 / -1; margin-top: 10px; }
.buy { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.buy .qty-group { display: flex; gap: 6px; flex: 1 1 auto; }
.buy .qty-group .btn { flex: 1; }
.buy .box-btn { flex: 1 1 100%; }
.placeholder-img { display: flex; align-items: center; justify-content: center; width: 96px; height: 96px; background: var(--grey-1); color: var(--grey-6); font-size: .75rem; text-align: center; }

/* Product detail */
.product { display: grid; gap: 20px; }
.product-img { background: var(--white); border: 1px solid var(--grey-3); border-radius: var(--radius); padding: 12px; text-align: center; }
.product-img img { width: 100%; max-width: 220px; }
@media (min-width: 900px) { .product-img img { max-width: 360px; } }
.features { margin: 0 0 16px; }
.features ul, .features ol { padding-left: 1.2em; margin: 0 0 .8em; }
.features li { margin-bottom: 4px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0 0 16px; }
.facts dt { color: var(--grey-6); }
.facts dd { margin: 0; font-weight: 600; }
.buybox { border: 2px solid var(--black); border-radius: var(--radius); padding: 14px; margin-bottom: 16px; }
.buybox .price { font-size: 1.6rem; }

/* Filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin-bottom: 14px; }
.filters .field { margin: 0; flex: 1 1 160px; }

/* Basket and totals */
.basket-line { display: grid; grid-template-columns: 64px 1fr; gap: 4px 12px; padding: 14px 0; border-bottom: 1px solid var(--grey-3); }
.basket-line img { width: 64px; height: 64px; object-fit: contain; }
.basket-line h3 { font-size: 1rem; margin: 0; }
.basket-line .line-controls { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.basket-line .line-total { font-weight: 800; font-size: 1.1rem; }
.totals { width: 100%; border-collapse: collapse; margin: 12px 0; }
.totals th { text-align: left; font-weight: 400; padding: 6px 0; }
.totals td { text-align: right; padding: 6px 0; white-space: nowrap; }
.totals .grand th, .totals .grand td { font-weight: 800; font-size: 1.25rem; border-top: 2px solid var(--black); padding-top: 10px; }
.totals .discount td, .totals .discount th { color: var(--ok); font-weight: 700; }
.ok-note { color: var(--ok); font-weight: 700; }
.btn-disabled, .btn-disabled:hover { background: var(--grey-3); border-color: var(--grey-3); color: var(--grey-6); cursor: not-allowed; }
.summary { background: var(--grey-1); border-radius: var(--radius); padding: 14px; }
.summary-items { list-style: none; padding: 0; margin: 0 0 8px; font-size: .9rem; }
.summary-items li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--grey-3); }
.layout-2 { display: grid; gap: 24px; }

.paybox { border: 2px solid var(--black); border-radius: var(--radius); padding: 14px; margin: 16px 0; }
.paybox dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.paybox dt { color: var(--grey-6); }
.paybox dd { margin: 0; font-weight: 700; word-break: break-word; }
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--grey-1); border: 1px solid var(--grey-3); font-weight: 700; font-size: .9rem; }
.status-paid, .status-shipped { background: #e5f3e8; border-color: #a9d3b3; color: var(--ok); }
.status-cancelled { background: #fbe9e4; border-color: #f0b9a8; color: var(--red-dark); }

/* Text pages */
.prose { max-width: 46em; }
.prose h2 { margin-top: 1.4em; font-size: 1.2rem; }
.prose h3 { margin: 1.2em 0 .4em; font-size: 1.05rem; }
.prose p { margin: 0 0 .8em; }
.prose ol { padding-left: 1.4em; }
.prose a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.prose a:hover { color: var(--red-dark); }
.prose > :first-child { margin-top: 0; }
.draft { background: #fff4d6; border-left: 5px solid #c99400; padding: 10px 14px; border-radius: var(--radius); }

/* Footer */
.site-footer { background: var(--black); color: #ddd; margin-top: 32px; font-size: .9rem; }
.site-footer .wrap { padding-top: 24px; padding-bottom: 24px; display: grid; gap: 20px; }
.site-footer a { color: var(--white); }
.site-footer h2 { font-size: 1rem; color: var(--white); margin-bottom: 8px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer address { font-style: normal; }
.footer-facebook { display: inline-flex; align-items: center; gap: 6px; }
.footer-bottom { border-top: 1px solid #333; padding: 12px 0; font-size: .8rem; color: #aaa; }

/* Teaser strip on the shop home page */
.teaser { background: var(--grey-1); border-bottom: 1px solid var(--grey-3); }
.teaser p { margin: 0; padding: 12px 0; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.teaser a { font-weight: 700; white-space: nowrap; }
.draft-inline { background: #fff4d6; box-decoration-break: clone; -webkit-box-decoration-break: clone; padding: 0 3px; }

/* Soboslikarstvo section */
.painting-head { background: var(--grey-1); border-bottom: 1px solid var(--grey-3); }
.painting-head .wrap { display: grid; gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.painting-head h1 { margin-bottom: .3em; }
.lead { font-size: 1.1rem; margin: 0 0 12px; max-width: 40em; }
.lead p { margin: 0 0 .5em; }
.lead p:last-child { margin-bottom: 0; }
.cta-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.cta-row .btn { flex: 1 1 220px; }
.painting-head-img { margin: 0; }
.painting-head-img img, .photo-grid img, .ref-card img { height: auto; display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--grey-3); }
.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 16px 0; }
.photo-grid.single { grid-template-columns: 1fr; }
.photo-grid figure { margin: 0; }
.photo-grid figcaption { font-size: .85rem; color: var(--grey-6); margin-top: 4px; }
.reference { padding: 16px 0 20px; border-bottom: 1px solid var(--grey-3); }
.reference h2 { margin-bottom: .2em; }
.reference .meta { margin: 0 0 6px; color: var(--grey-6); }
.reference .prose { margin-bottom: 4px; }
/* Thumbnail row (DECISIONS 93): native horizontal scrolling with snapping; about 2½ photos visible on a phone and
   4½ on a wide screen, so the cut-off one shows there are more. Arrows only with a mouse (static/js/references.js). */
.photo-row { --per-view: 2.5; --row-gap: 8px; position: relative; margin-top: 12px; }
.photo-row-track {
  display: flex; gap: var(--row-gap); margin: 0; padding: 0 0 8px; list-style: none;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding: 0;
  scrollbar-width: thin; scrollbar-color: var(--grey-3) transparent;
}
.photo-row-track li { flex: 0 0 calc((100% - (var(--per-view) - .5) * var(--row-gap)) / var(--per-view)); scroll-snap-align: start; }
.photo-row-track a { display: block; border-radius: var(--radius); }
.photo-row-track a:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.photo-row-track img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); background: var(--grey-3); }
.photo-row-arrow {
  position: absolute; top: calc(50% - 4px); transform: translateY(-50%); z-index: 1;
  width: var(--tap); height: var(--tap); padding: 0; border: 2px solid var(--black); border-radius: 50%;
  background: var(--white); color: var(--black); font-size: 1.8rem; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
.photo-row-arrow[hidden] { display: none; }
.photo-row-arrow span { margin-top: -4px; }
.photo-row-arrow:hover { background: var(--black); color: var(--white); }
.photo-row-arrow:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.photo-row-arrow:disabled { opacity: .35; cursor: default; background: var(--white); color: var(--black); }
.photo-row-prev { left: 6px; }
.photo-row-next { right: 6px; }
.ref-cards { display: grid; gap: 12px; }
.ref-card { display: block; color: var(--black); text-decoration: none; font-weight: 700; }
.ref-card span { display: block; margin-top: 6px; }
.ref-card:hover span { text-decoration: underline; }
.cta-band { margin-top: 28px; padding: 16px; border-radius: var(--radius); border: 2px solid var(--black); display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.cta-band p { margin: 0; }
.cta-band .btn { flex: 1 1 220px; }
.two-col { display: grid; gap: 0 12px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.contact-box { margin-top: 0; }
.contact-box h2 { font-size: 1.1rem; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 4px; }
.prose li > p, .features li > p { margin: 0; }

/* Login, registration */
.confirm-notice p { margin: 0 0 8px; }
.confirm-notice form { margin: 0; }
.auth-box { max-width: 440px; margin: 0 auto; }

/* Mock payment page */
.mockpay { max-width: 480px; margin: 0 auto; border: 3px dashed var(--grey-6); padding: 20px; border-radius: var(--radius); }

@media (min-width: 600px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .search { order: 0; flex: 1 1 220px; max-width: 420px; }
  .section-switch { order: 0; flex: 0 0 auto; }
  .section-switch:last-child { margin-left: auto; }  /* catalogue mode: no basket button after it */
  .ref-cards { grid-template-columns: repeat(3, 1fr); }
  .photo-grid { grid-template-columns: repeat(3, 1fr); }
  .photo-row { --per-view: 3.5; }
  .two-col { grid-template-columns: 1fr 1fr; }
  .basket-line { grid-template-columns: 80px 1fr auto; }
  .basket-line img { width: 80px; height: 80px; }
  .basket-line .line-controls { grid-column: 2 / -1; }
  .buy .box-btn { flex: 1 1 auto; }
}
@media (min-width: 720px) {
  .hero .wrap { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
  .hero-text { flex: 1 1 auto; min-width: 0; }
  .hero-logo { flex: 0 0 auto; margin-top: 0; padding: 10px 14px; }
  .hero-logo img { width: 240px; }
}
@media (min-width: 900px) {
  h1 { font-size: 2rem; }
  .hero h1 { font-size: 1.9rem; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .card { grid-template-columns: 1fr; text-align: left; }
  .card-img { grid-row: auto; text-align: center; margin-bottom: 8px; }
  .card-img img, .placeholder-img { width: 160px; height: 160px; margin: 0 auto; }
  .product { grid-template-columns: 380px 1fr; align-items: start; }
  .layout-2 { grid-template-columns: 1fr 360px; align-items: start; }
  .site-footer .wrap { grid-template-columns: 2fr 1fr 1fr; }
  .painting-head .wrap { grid-template-columns: 1fr 420px; align-items: center; }
  .painting-head.no-image .wrap { grid-template-columns: 1fr; }
  .photo-row { --per-view: 4.5; --row-gap: 10px; }
  .logo img { height: 64px; }
}
