/* Rubik (SIL Open Font License 1.1, see fonts/OFL.txt), the same font as anhoch.com,
   served from the shop itself: Cyrillic and Latin, every weight in one file each. */
@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("fonts/rubik-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("fonts/rubik-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("fonts/rubik-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Rubik";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("fonts/rubik-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* NikomTrade storefront — mobile first, no framework, no inline styles (CSP). */
:root {
  color-scheme: light;
  --blue: #0b5cad;
  --blue-dark: #073b6e;
  --blue-soft: #e8f1fb;
  --accent: #f28c18; /* one warm accent: sale badges, highlights */
  --accent-dark: #c96d05;
  --ink: #172033;
  --muted: #5b6575;
  --line: #e1e6ee;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --white: #ffffff; /* text on coloured buttons; surfaces use --surface */
  --sale: #c4231b;
  --sale-bg: #fbeaea;
  --ok: #1d7a3b;
  --ok-bg: #e7f4ec;
  --warn: #8a5800;
  --warn-bg: #fff4e0;
  --disabled: #9aa7b8;
  --glass: rgb(255 255 255 / 88%);
  --shadow-sm: 0 1px 2px rgb(16 24 40 / 6%), 0 1px 3px rgb(16 24 40 / 8%);
  --shadow-md: 0 8px 24px rgb(16 24 40 / 10%);
  --shadow-lg: 0 18px 48px rgb(16 24 40 / 16%);
  --radius: 10px;
  --radius-lg: 16px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Dark theme: chosen with the switch (data-theme), or the device setting. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --blue: #4b9bff;
  --blue-dark: #2f7fe6;
  --blue-soft: #16273d;
  --accent: #ffa23a;
  --accent-dark: #ff8a00;
  --ink: #e7ecf3;
  --muted: #9ba8ba;
  --line: #273243;
  --bg: #0c1118;
  --surface: #141b25;
  --surface-2: #1a2330;
  --sale: #ff7468;
  --sale-bg: #3a1714;
  --ok: #5ccf8a;
  --ok-bg: #12301f;
  --warn: #f3b74d;
  --warn-bg: #352812;
  --disabled: #4a5668;
  --glass: rgb(20 27 37 / 88%);
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 40%);
  --shadow-md: 0 8px 24px rgb(0 0 0 / 45%);
  --shadow-lg: 0 18px 48px rgb(0 0 0 / 55%);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
}

a {
  color: var(--blue);
}

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

h1 {
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 1rem 0 0.75rem;
}

h2 {
  font-size: 1.2rem;
  margin: 1.5rem 0 0.75rem;
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

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

.skip {
  position: absolute;
  left: -999px;
}

.skip:focus {
  left: 16px;
  top: 8px;
  z-index: 10;
  background: var(--surface);
  padding: 0.5rem 1rem;
}

/* Header ------------------------------------------------------------------ */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}

.header-row {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "logo links" "search search";
  gap: 0.5rem 1rem;
  align-items: center;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.logo {
  grid-area: logo;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--blue);
  text-decoration: none;
  letter-spacing: 0.01em;
  margin: 0;
}

.logo img {
  display: block;
  height: 32px; /* the logo is about 5:1, so 157 px wide on phones */
  width: auto;
}

.footer-logo img {
  height: 36px;
  margin-bottom: 0.5rem;
}

.holding .logo img {
  height: 56px;
  margin: 0 auto 1rem;
}

.search {
  grid-area: search;
  position: relative;
  display: flex;
}

.search input {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  font: inherit;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: var(--radius) 0 0 var(--radius);
}

.search button {
  font: inherit;
  padding: 0 1rem;
  border: 0;
  background: var(--blue);
  color: var(--white);
  border-radius: 0 var(--radius) var(--radius) 0;
  cursor: pointer;
}

.suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
  margin-top: 4px;
  z-index: 6;
  max-height: 70vh;
  overflow: auto;
}

.suggest-list {
  list-style: none;
  margin: 0;
  padding: 0.25rem 0;
}

.suggest-list a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  color: var(--ink);
  text-decoration: none;
}

.suggest-list a:hover,
.suggest-list a:focus {
  background: var(--bg);
}

.suggest-list span {
  flex: 1;
}

.suggest-list .thumb {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.suggest-list .all a {
  color: var(--blue);
  font-weight: 600;
}

.tag {
  flex: 0 !important;
  font-size: 0.75rem;
  background: var(--bg);
  border-radius: 4px;
  padding: 0 0.35rem;
  color: var(--muted);
}

.suggest-empty {
  margin: 0;
  padding: 0.75rem;
  color: var(--muted);
}

.header-links {
  grid-area: links;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.header-links a {
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}

.disabled-link {
  opacity: 0.6;
  pointer-events: none;
}

.count {
  display: inline-block;
  min-width: 1.4rem;
  text-align: center;
  background: var(--blue);
  color: var(--white);
  border-radius: 999px;
  font-size: 0.8rem;
}

/* Menu ------------------------------------------------------------------ */
.menu {
  border-top: 1px solid var(--line);
}

.menu-toggle {
  font: inherit;
  background: none;
  border: 0;
  padding: 0.6rem 0;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

.menu-list {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0 0 0.75rem;
  columns: 1;
}

.menu-list.open {
  display: block;
}

.menu-list > li {
  break-inside: avoid;
  padding: 0.25rem 0;
}

.menu-list > li > a {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}

.menu-list ul {
  list-style: none;
  margin: 0.15rem 0 0.35rem;
  padding-left: 0.75rem;
  font-size: 0.92rem;
}

.menu-list ul a {
  color: var(--muted);
  text-decoration: none;
}

/* Product grid ------------------------------------------------------------ */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.card-link {
  color: var(--ink);
  text-decoration: none;
}

.card-img,
.noimg {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: var(--surface);
}

/* A product without a photo (18.11.2026): a soft panel with the NI-COM power mark, in the
   theme's own colours. The full rule is at the end of this file, so it wins over the white
   backgrounds photos get. */
.noimg {
  border-radius: var(--radius);
}

.card-title {
  font-size: 0.95rem;
  font-weight: 500;
  margin: 0.5rem 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.price {
  margin: 0;
}

.price .old {
  color: var(--muted);
  font-size: 0.9rem;
}

.price .sale {
  color: var(--sale);
}

.price.big {
  font-size: 1.6rem;
}

.stock {
  font-size: 0.85rem;
  font-weight: 600;
}

.stock-in {
  color: var(--ok);
}

.stock-low,
.stock-order {
  color: var(--warn);
}

.stock-out {
  color: var(--sale);
}

.btn {
  font: inherit;
  display: inline-block;
  border: 0;
  border-radius: var(--radius);
  background: var(--blue);
  color: var(--white);
  padding: 0.55rem 1rem;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
}

.btn:hover {
  background: var(--blue-dark);
}

.btn[disabled] {
  background: var(--disabled);
  cursor: not-allowed;
}

.btn.ghost {
  background: var(--surface);
  color: var(--blue);
  border: 1px solid var(--blue);
}

.card .add {
  margin-top: auto;
  font-size: 0.9rem;
}

/* Lists, filters, paging ---------------------------------------------------- */
.crumbs {
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 1rem;
}

.lead {
  color: var(--muted);
}

.tiles {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tiles a {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  text-decoration: none;
}

.listing {
  display: grid;
  gap: 1rem;
}

.filters {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem;
}

.filters fieldset {
  border: 0;
  margin: 0 0 0.75rem;
  padding: 0;
}

.filters legend {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.filters label {
  display: block;
  font-size: 0.92rem;
}

.filters input[type="number"],
.filters select {
  font: inherit;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  max-width: 100%;
}

.price-range {
  display: flex;
  gap: 0.5rem;
}

.price-range input {
  width: 50%;
}

.facet-list {
  max-height: 14rem;
  overflow: auto;
}

.n {
  color: var(--muted);
}

.filter-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}

.reset {
  margin-left: 0.75rem;
}

.results .count {
  background: none;
  color: var(--muted);
  min-width: 0;
  overflow-x: auto;
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
}

.empty {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: var(--radius);
}

.pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
}

/* Product page --------------------------------------------------------------- */
.product {
  display: grid;
  gap: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
}

.main-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}

.thumbs {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
}

.thumbs .thumb {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.thumbs a[aria-current="true"] .thumb {
  border-color: var(--blue);
}

.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.75rem;
  margin: 0 0 0.75rem;
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  margin: 0;
}

.add-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0;
}

.add-form input {
  font: inherit;
  width: 5rem;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.details {
  grid-column: 1 / -1;
}

.description {
  overflow-wrap: anywhere;
}

.description table,
.specs {
  border-collapse: collapse;
  width: 100%;
}

.description td,
.description th,
.specs th,
.specs td {
  border-bottom: 1px solid var(--line);
  padding: 0.4rem 0.5rem;
  text-align: left;
  vertical-align: top;
}

.specs th {
  width: 40%;
  color: var(--muted);
  font-weight: 500;
}

.banners {
  display: grid;
  gap: 12px;
  margin-top: 1rem;
}

.banner img {
  width: 100%;
  border-radius: var(--radius);
}

/* Footer -------------------------------------------------------------------- */
.site-footer {
  margin-top: 3rem;
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 1.5rem 0 1rem;
}

.footer-grid {
  display: grid;
  gap: 1rem;
}

.site-footer h2 {
  font-size: 1rem;
  margin: 0 0 0.35rem;
}

.site-footer p {
  margin: 0.15rem 0;
  color: var(--muted);
}

.small {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Wider screens --------------------------------------------------------------- */
@media (min-width: 700px) {
  .logo img {
    height: 44px;
  }

  .header-row {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "logo search links";
  }

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

  .menu-list {
    columns: 3;
  }

  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

  .listing {
    grid-template-columns: 260px 1fr;
    align-items: start;
  }

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

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

  .menu-list {
    columns: 4;
  }

  h1 {
    font-size: 1.8rem;
  }
}

/* Content pages, cookie choice, maintenance (TDD-07) ---------------------------------- */
.info-page {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem 1.5rem;
  margin-top: 1rem;
  max-width: 50rem;
}

.map iframe {
  width: 100%;
  height: 360px;
  border: 0;
  border-radius: var(--radius);
}

.map-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 360px;
  padding: 1rem;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}

.map-placeholder .map-address {
  font-weight: 600;
  font-size: 1.05rem;
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 1rem auto 0.5rem;
  font-size: 0.92rem;
}

.consent {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45; /* above the cart and checkout "Нарачај" bars until a choice is made */
  background: var(--surface);
  border-top: 2px solid var(--blue);
  box-shadow: 0 -6px 24px rgb(0 0 0 / 12%);
}

.consent-inner {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.consent-inner p {
  margin: 0 0 0.5rem;
}

/* Equal weight for every choice: same look, same size. */
.consent-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.consent-buttons .btn {
  flex: 1 1 10rem;
}

.consent-row {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}

.consent-form .consent-buttons {
  margin-top: 1rem;
}

.holding {
  text-align: center;
  padding-top: 15vh;
}
/* Home-page banner slider ------------------------------------------------------------------ */
.carousel {
  position: relative;
  margin-top: 1rem;
}

.slides {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  border-radius: var(--radius);
  scrollbar-width: none;
}

.slides::-webkit-scrollbar {
  display: none;
}

.slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
}

.slide img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1920 / 806;
  object-fit: cover;
  background: var(--surface);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  border: 0;
  border-radius: 999px;
  background: var(--glass);
  color: var(--ink);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 8px rgb(0 0 0 / 20%);
}

.carousel-btn.prev {
  left: 0.5rem;
}

.carousel-btn.next {
  right: 0.5rem;
}

.dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.dots button {
  width: 0.75rem;
  height: 0.75rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: var(--line);
  cursor: pointer;
}

.dots button[aria-current="true"] {
  background: var(--blue);
}
.dots[hidden],
.carousel-btn[hidden] {
  display: none;
}

/* Phones: the arrows covered the banner headline; swipe and the dots move the slides. */
@media (max-width: 599px) {
  .carousel-btn {
    display: none;
  }
}

/* Forms: accounts and contact (TDD-08) ------------------------------------------ */

.narrow {
  max-width: 34rem;
}

.form {
  display: grid;
  gap: 0.9rem;
  margin: 1rem 0 1.5rem;
}

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.field.check label {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  font-weight: 400;
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="tel"],
.field select,
.field textarea {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  background: var(--surface);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

.field .help {
  color: var(--muted);
  font-size: 0.88rem;
  margin: 0.25rem 0 0;
}

.error {
  color: var(--sale);
  font-size: 0.92rem;
  margin: 0.25rem 0 0;
}

.has-error input,
.has-error select,
.has-error textarea {
  border-color: var(--sale);
}

/* Hidden from people; bots fill it in. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.messages {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.messages li {
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  background: var(--ok-bg);
  color: var(--ok);
  margin-bottom: 0.5rem;
}

.messages .msg-error {
  background: var(--sale-bg);
  color: var(--sale);
}

.btn.danger {
  background: var(--sale);
}

.linklike {
  background: none;
  border: 0;
  padding: 0;
  color: var(--blue);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}

.account {
  display: grid;
  gap: 1.5rem;
  margin: 1rem 0 2rem;
}

.account-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
}

.account-nav a[aria-current="page"] {
  font-weight: 700;
  text-decoration: none;
}

.account-main {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem 1.5rem;
  min-width: 0;
  overflow-x: auto;
}

.address-list {
  list-style: none;
  padding: 0;
}

.address-list li {
  border-bottom: 1px solid var(--line);
  padding: 0.5rem 0;
}

.row-actions,
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.orders-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.orders-table th,
.orders-table td {
  text-align: left;
  padding: 0.45rem 0.4rem;
  border-bottom: 1px solid var(--line);
}

.orders-table .num {
  text-align: right;
  white-space: nowrap;
}

.history {
  padding-left: 1.2rem;
}

@media (min-width: 800px) {
  .account {
    grid-template-columns: 14rem 1fr;
    align-items: start;
  }

  .account-nav {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Cart and checkout (TDD-09) ------------------------------------------------------ */

.cart-page,
.checkout {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem 1.5rem;
  margin: 1rem 0 2rem;
  max-width: 56rem;
  overflow-x: auto;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.cart-table th,
.cart-table td {
  text-align: left;
  padding: 0.5rem 0.4rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.cart-table .num {
  text-align: right;
  white-space: nowrap;
}

.qty-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.qty-form input {
  width: 4.5rem;
  padding: 0.35rem 0.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
}

.cart-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.notices {
  background: var(--warn-bg);
  color: var(--warn);
  border-radius: var(--radius);
  padding: 0.75rem 1rem 0.75rem 2rem;
  margin: 1rem 0;
}

.notices p {
  margin: 0 0 0.4rem -1rem;
}

.step {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem 1rem 1rem;
  display: grid;
  gap: 0.8rem;
  min-width: 0;
}

.step legend {
  font-weight: 700;
  padding: 0 0.4rem;
}

.choice {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin-bottom: 0.4rem;
}

.big-btn {
  font-size: 1.1rem;
  padding: 0.8rem 1.6rem;
  justify-self: start;
}

.card-add {
  margin: 0;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  max-width: 26rem;
  margin-left: auto;
  z-index: 50;
  background: #172033;
  color: #ffffff;
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  box-shadow: 0 4px 16px rgb(0 0 0 / 20%);
}

.toast a {
  color: #9cc8ff;
  font-weight: 600;
}

.toast.toast-error {
  background: var(--sale);
}

.toast[hidden] {
  display: none;
}

[data-courier-only][hidden] {
  display: none;
}

.cart-product {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  min-width: 12rem;
}

.cart-thumb {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.thumb-link {
  flex: 0 0 64px;
  line-height: 0;
}

.available {
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 600px) {
  .cart-table thead {
    display: none;
  }

  .cart-table tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.4rem 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--line);
  }

  .cart-table td,
  .cart-table th {
    border: 0;
    padding: 0;
  }

  .cart-table td:first-child {
    grid-column: 1 / -1;
  }

  .cart-table tr > * {
    min-width: 0;
  }

  .cart-product {
    min-width: 0;
  }

  .cart-product span {
    overflow-wrap: anywhere;
  }

  .qty-form {
    flex-wrap: wrap;
  }

  .cart-page,
  .checkout {
    padding: 1rem 0.85rem 1.25rem;
  }
}

/* ========================================================================================
   Design 2026 (19.10.2026): modern look, dark theme, clearer category menu.
   Everything above still applies; the rules below refine it. Restore point: the git tag
   design-before-redesign (see README, "Shop design").
   ======================================================================================== */

:root {
  --btn-bg: #0b5cad;
  --btn-bg-hover: #084a8c;
  --topbar-bg: linear-gradient(90deg, #073b6e, #0b5cad 55%, #1a73c9);
  --footer-bg: #0f1724;
  --footer-ink: #c9d3e0;
  --focus: 0 0 0 3px rgb(11 92 173 / 35%);
}

:root[data-theme="dark"] {
  --btn-bg: #2b6fd1;
  --btn-bg-hover: #3b7fe0;
  --topbar-bg: linear-gradient(90deg, #0a1a2e, #10325a 55%, #174a80);
  --footer-bg: #090d13;
  --footer-ink: #aab6c6;
  --focus: 0 0 0 3px rgb(75 155 255 / 45%);
}

body {
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

h1,
h2 {
  letter-spacing: -0.01em;
}

h1 {
  font-weight: 750;
}

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

.theme-fade,
.theme-fade * {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

/* Top strip --------------------------------------------------------------------------- */
.topbar {
  background: var(--topbar-bg);
  color: #eaf2ff;
  font-size: 0.8rem;
}

.topbar-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
}

.topbar-row span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.topbar a {
  color: #ffffff;
  text-decoration: none;
  white-space: nowrap;
  font-weight: 600;
}

/* Header ------------------------------------------------------------------------------ */
.site-header {
  /* Solid, not blurred: a backdrop filter would trap the fixed menu drawer inside it. */
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  z-index: 30;
}

.header-row {
  grid-template-columns: auto auto 1fr;
  grid-template-areas: "menu logo links" "search search search";
  gap: 0.6rem 0.5rem;
}

.header-row .menu-toggle {
  grid-area: menu;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.icon-btn:hover {
  background: var(--surface-2);
}

.icon-btn:active {
  transform: scale(0.94);
}

/* Moon in the light theme, sun in the dark one. */
.theme-toggle .icon-sun,
:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
  color: #ffd166;
}

.theme-toggle svg {
  transition: transform 0.5s var(--ease);
}

.theme-toggle:hover svg {
  transform: rotate(-20deg);
}

.header-links {
  align-items: center;
  gap: 0.15rem;
}

.header-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.55rem;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.header-link:hover {
  background: var(--surface-2);
  color: var(--blue);
}

.header-link .link-text {
  display: none;
}

.cart-icon {
  position: relative;
  display: inline-grid;
}

.cart-icon .count {
  position: absolute;
  top: -8px;
  right: -10px;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  line-height: 1.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--accent);
  color: #1d1300;
  box-shadow: 0 0 0 2px var(--surface);
}

.count.bump {
  animation: bump 0.45s var(--ease);
}

@keyframes bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.45); }
  100% { transform: scale(1); }
}

/* Search ------------------------------------------------------------------------------ */
.search {
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 0.9rem;
  color: var(--muted);
  pointer-events: none;
}

.search input {
  padding: 0.7rem 0.9rem 0.7rem 2.6rem;
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 999px 0 0 999px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background-color 0.2s;
}

.search input:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--blue);
  box-shadow: var(--focus);
}

.search button {
  align-self: stretch;
  padding: 0 1.2rem;
  font-weight: 600;
  background: var(--btn-bg);
  border-radius: 0 999px 999px 0;
  transition: background-color 0.2s var(--ease);
}

.search button:hover {
  background: var(--btn-bg-hover);
}

.suggestions {
  background: var(--surface);
  border-color: var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: drop 0.18s var(--ease);
}

.suggest-list a:hover,
.suggest-list a:focus {
  background: var(--surface-2);
}

/* Category menu ----------------------------------------------------------------------- */
.menu {
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.menu-row {
  display: none;
}

.menu-list {
  display: block;
  columns: auto;
  padding: 0;
}

.menu-panel {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(88vw, 360px);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform: translateX(-105%);
  transition: transform 0.3s var(--ease);
  z-index: 40;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 2rem;
}

.menu-panel.open {
  transform: none;
}

.menu-panel-head {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.6rem 0.6rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  z-index: 1;
}

.menu-panel-head strong {
  font-size: 1.05rem;
}

.menu-list > li {
  padding: 0;
  border-bottom: 1px solid var(--line);
}

.menu-item {
  display: flex;
  align-items: center;
}

.menu-item a {
  flex: 1;
  padding: 0.75rem 1rem;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.menu-item a:hover {
  color: var(--blue);
}

.sub-toggle {
  width: 46px;
  height: 46px;
  border: 0;
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.sub-toggle svg {
  transition: transform 0.25s var(--ease);
}

.has-sub.expanded .sub-toggle svg {
  transform: rotate(180deg);
}

.menu-list .sub {
  display: none;
  margin: 0;
  padding: 0 0 0.6rem 1rem;
  font-size: 0.93rem;
}

.has-sub.expanded .sub {
  display: block;
  animation: drop 0.2s var(--ease);
}

.menu-list .sub a {
  display: block;
  padding: 0.35rem 1rem 0.35rem 0.6rem;
  border-left: 2px solid var(--line);
  color: var(--muted);
}

.menu-list .sub a:hover {
  color: var(--blue);
  border-left-color: var(--blue);
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgb(5 10 20 / 45%);
  z-index: 35;
  animation: fade 0.25s ease;
}

.menu-backdrop[hidden] {
  display: none;
}

body.menu-open {
  overflow: hidden;
}

@keyframes drop {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: none; }
}

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

/* Buttons, prices, badges ---------------------------------------------------------------- */
.btn {
  background: var(--btn-bg);
  border-radius: var(--radius);
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.2s var(--ease), transform 0.15s var(--ease), box-shadow 0.2s var(--ease);
}

.btn:hover {
  background: var(--btn-bg-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

.btn.ghost {
  background: var(--surface);
  color: var(--blue);
  border: 1px solid currentColor;
  box-shadow: none;
}

.btn[disabled],
.btn[disabled]:hover {
  background: var(--disabled);
  transform: none;
  box-shadow: none;
}

.price {
  font-weight: 750;
  color: var(--ink);
}

.price .old {
  font-weight: 400;
}

.price .sale {
  color: var(--sale);
}

/* Section titles: a short accent line under the heading. */
main section > h2 {
  position: relative;
  padding-bottom: 0.45rem;
  margin-top: 2rem;
}

main section > h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 42px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--blue), var(--accent));
}

/* Product cards ----------------------------------------------------------------------- */
.grid {
  gap: 14px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 0.85rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s;
  animation: rise 0.45s var(--ease) both;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: color-mix(in srgb, var(--blue) 35%, var(--line));
}

.card-link {
  display: block;
}

.card-img,
.card .noimg {
  border-radius: var(--radius);
  transition: transform 0.35s var(--ease);
}

.card:hover .card-img {
  transform: scale(1.04);
}

:root[data-theme="dark"] .card-img,
:root[data-theme="dark"] .main-img,
:root[data-theme="dark"] .cart-thumb,
:root[data-theme="dark"] .thumbs .thumb {
  background: #ffffff; /* product photos have white backgrounds */
  border-radius: var(--radius);
}

.card-title {
  font-weight: 550;
  line-height: 1.35;
}

.card-link:hover .card-title {
  color: var(--blue);
}

.card .add {
  width: 100%;
}

.card-add {
  margin-top: auto;
}

/* Category tiles on the home page ---------------------------------------------------------- */
.cat-tiles {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.cat-tiles a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  height: 100%;
  padding: 0.75rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s, color 0.2s;
}

.cat-tiles .cat-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  padding: 6px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: background-color 0.2s, color 0.2s, transform 0.25s var(--ease);
}

.cat-tiles a:hover .cat-icon {
  background: var(--blue);
  color: #ffffff;
  transform: rotate(-6deg) scale(1.06);
}

.cat-tiles a:hover {
  transform: translateY(-2px);
  border-color: var(--blue);
  color: var(--blue);
  box-shadow: var(--shadow-sm);
}

.cat-tiles .all a {
  background: var(--blue-soft);
  color: var(--blue);
  border-color: transparent;
}

/* Lists, filters, product page, info pages --------------------------------------------------- */
.filters,
.product,
.info-page,
.empty,
.account-main,
.cart-page,
.checkout {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.tiles a {
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}

.tiles a:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.filters input[type="number"],
.filters select,
.add-form input,
.qty-form input,
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="tel"],
.field select,
.field textarea {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}

.thumbs a[aria-current="true"] .thumb {
  border-color: var(--blue);
  box-shadow: var(--focus);
}

.main-image img {
  transition: transform 0.4s var(--ease);
}

.main-image:hover img {
  transform: scale(1.03);
}

.main-image {
  cursor: zoom-in;
}

/* Lightbox: the product photo big, over the page (shop.js builds it). Dark in both
   themes, so the photo stands out; the photo keeps its own white background. */
.lightbox-open {
  overflow: hidden;
}

.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffffff;
  overscroll-behavior: contain;
}

.lightbox::backdrop {
  background: rgba(8, 12, 20, 0.92);
}

.lightbox[open] {
  animation: lightbox-in 0.2s var(--ease);
}

@keyframes lightbox-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 0.75rem 3rem;
  touch-action: pan-y pinch-zoom;
}

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #ffffff;
  border-radius: var(--radius);
  transition: transform 0.2s var(--ease);
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-img.dragging {
  transition: none;
}

.lightbox-count {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.75rem;
  margin: 0;
  text-align: center;
  font-size: 0.95rem;
  opacity: 0.85;
  pointer-events: none;
}

.lightbox-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  cursor: pointer;
  transition: background 0.15s var(--ease);
}

.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-btn:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.lightbox-btn[hidden] {
  display: none;
}

.lightbox-btn svg {
  width: 1.4rem;
  height: 1.4rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.lightbox-close {
  top: 0.75rem;
  right: 0.75rem;
  width: 3rem;
  height: 3rem;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev {
  left: 0.75rem;
}

.lightbox-next {
  right: 0.75rem;
}

/* Phones: the arrows sit at the bottom beside the counter, so they never cover the photo. */
@media (max-width: 640px) {
  .lightbox-prev,
  .lightbox-next {
    top: auto;
    bottom: 0.4rem;
    transform: none;
  }

  .lightbox-prev {
    left: 1rem;
  }

  .lightbox-next {
    right: 1rem;
  }

  .lightbox-count {
    bottom: 1.2rem;
  }

  .lightbox-stage {
    padding: 4rem 0.5rem 3.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox[open],
  .lightbox-img {
    animation: none;
    transition: none;
  }
}

/* Banner slider ------------------------------------------------------------------------- */
.slides {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.carousel-btn {
  background: var(--glass);
  color: var(--ink);
  transition: transform 0.2s var(--ease), background-color 0.2s;
}

.carousel-btn:hover {
  transform: translateY(-50%) scale(1.08);
}

.dots button {
  transition: width 0.3s var(--ease), background-color 0.3s;
}

.dots button[aria-current="true"] {
  width: 1.8rem;
}

/* Footer -------------------------------------------------------------------------------- */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-ink);
  border-top: 0;
  padding-top: 2rem;
  margin-top: 3.5rem;
}

.site-footer h2 {
  color: #ffffff;
}

.site-footer p,
.site-footer .small {
  color: var(--footer-ink);
}

.site-footer a {
  color: #ffffff;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}



.footer-links {
  border-top: 1px solid rgb(255 255 255 / 10%);
  padding-top: 1rem;
}

/* Small things -------------------------------------------------------------------------- */
.consent {
  border-top-color: var(--blue);
}

.messages li {
  animation: rise 0.35s var(--ease);
}

main {
  animation: fade 0.35s ease;
}

/* Wider screens ------------------------------------------------------------------------- */
@media (min-width: 700px) {
  .header-row {
    grid-template-columns: auto auto 1fr auto;
    grid-template-areas: "menu logo search links";
  }

  .header-link .link-text {
    display: inline;
  }

  .cat-tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .header-row {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "logo search links";
    gap: 1rem 1.5rem;
  }

  .header-row .menu-toggle {
    display: none;
  }

  .search {
    max-width: 640px;
    width: 100%;
    justify-self: center;
  }

  .menu-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
  }

  .all-cats {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
    padding: 0.5rem 1rem;
    border: 0;
    border-radius: 999px;
    background: var(--btn-bg);
    color: #ffffff;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
    transition: background-color 0.2s var(--ease), transform 0.15s var(--ease);
  }

  .all-cats:hover,
  .all-cats[aria-expanded="true"] {
    background: var(--btn-bg-hover);
  }

  .quick-links {
    display: flex;
    gap: 0.25rem;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow: hidden;
    white-space: nowrap;
  }

  .quick-links a {
    display: block;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    color: var(--ink);
    font-size: 0.92rem;
    font-weight: 550;
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
  }

  .quick-links a:hover {
    background: var(--blue-soft);
    color: var(--blue);
  }

  /* The panel drops down under the bar, with every category and its subcategories. */
  .menu {
    position: relative;
  }

  .menu-panel {
    position: absolute;
    inset: 100% 0 auto;
    width: auto;
    max-width: 1200px;
    max-height: min(72vh, 640px);
    margin: 0 auto;
    padding: 1rem 1.5rem 1.5rem;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    transform: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s var(--ease), visibility 0.2s, transform 0.2s var(--ease);
  }

  .menu-panel.open {
    opacity: 1;
    visibility: visible;
    animation: drop 0.22s var(--ease);
  }

  .menu-panel-head {
    display: none;
  }

  .menu-list {
    columns: 4;
    column-gap: 2rem;
  }

  .menu-list > li {
    break-inside: avoid;
    border-bottom: 0;
    margin-bottom: 0.9rem;
  }

  .menu-item a {
    padding: 0.2rem 0;
  }

  .sub-toggle {
    display: none;
  }

  .menu-list .sub {
    display: block;
    padding: 0.15rem 0 0;
  }

  .menu-list .sub a {
    padding: 0.15rem 0 0.15rem 0.6rem;
  }

  body.menu-open {
    overflow: auto;
  }

  .cat-tiles {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

/* Visitors who prefer less movement get none. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Two transparent logos: dark letters for the light theme, white letters for the dark one. */
.logo-dark,
:root[data-theme="dark"] .logo-light {
  display: none;
}

:root[data-theme="dark"] .logo-dark {
  display: block;
}

@media (min-width: 1000px) {
  /* Quick links fade out at the edge instead of being cut. */
  .quick-links {
    -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent);
    mask-image: linear-gradient(90deg, #000 85%, transparent);
  }
}

@media (min-width: 1000px) {
  /* On computers the panel hangs under the bar; the page behind is not dimmed. */
  .menu-backdrop {
    background: transparent;
  }
}

/* Product tiles: the photo stays still; on hover the text panel slides up a little
   and the "Додај во кошничка" button appears under it. Phones (no hover) and keyboard
   users always get the button. */
.card {
  position: relative;
  overflow: hidden;
  padding: 0;
  gap: 0;
}

.card:hover {
  transform: none;
}

.card:hover .card-img {
  transform: none;
}

.card-media {
  display: block;
  padding: 0.85rem 0.85rem 0;
}

.card-body {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.55rem 0.85rem 0.85rem;
  background: var(--surface);
  transition: transform 0.3s var(--ease);
}

.card-body .card-title {
  margin: 0;
}

.card-actions {
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  top: 100%;
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

.card:hover .card-body,
.card:focus-within .card-body {
  transform: translateY(-3.25rem);
}

.card:hover .card-actions,
.card:focus-within .card-actions {
  opacity: 1;
}

@media (hover: none) {
  .card:hover .card-body,
  .card:focus-within .card-body {
    transform: none;
  }

  .card-actions {
    position: static;
    opacity: 1;
    margin-top: auto;
    padding-top: 0.4rem;
  }
}

/* Listing toolbar: product count on the left, sorting on the right. */
.results-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem 1rem;
  margin: 0 0 0.9rem;
  padding: 0.6rem 0.8rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.results-bar .count {
  margin: 0;
  font-weight: 600;
  color: var(--ink);
}

.sorters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  font-size: 0.92rem;
}

.sorters label {
  color: var(--muted);
  white-space: nowrap;
}

.sorters select {
  font: inherit;
  padding: 0.4rem 2rem 0.4rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
}

.sorters select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: var(--focus);
}

@media (max-width: 520px) {
  .sorters {
    width: 100%;
    display: grid;
    grid-template-columns: auto 1fr;
  }
}

/* Quick links next to "Сите категории" (computers) and at the bottom of the drawer (phones). */
@media (min-width: 1000px) {
  .quick-links {
    -webkit-mask-image: none;
    mask-image: none;
  }

  .quick-links .hot {
    color: var(--sale);
    font-weight: 700;
  }

  .quick-links .hot::before {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 0.4rem;
    border-radius: 999px;
    background: var(--accent);
    vertical-align: 1px;
  }

  .drawer-links {
    display: none;
  }
}

.drawer-links {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0.5rem 1rem;
  border-top: 1px solid var(--line);
}

.drawer-links a {
  display: block;
  padding: 0.5rem 0;
  color: var(--blue);
  font-weight: 600;
  text-decoration: none;
}

/* Brands A to Z. */
.brand-list {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 10px;
}

.brand-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s, transform 0.2s var(--ease);
}

.brand-list a:hover {
  border-color: var(--blue);
  color: var(--blue);
  transform: translateY(-2px);
}

/* Icon sprite (hidden) and the cart icon on buttons. */
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.btn.add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.btn-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cat-tiles .all .cat-icon {
  background: var(--surface);
}

@media (max-width: 480px) {
  .card .add {
    font-size: 0.84rem;
    padding: 0.5rem 0.55rem;
    gap: 0.3rem;
  }

  .card .btn-icon {
    width: 16px;
    height: 16px;
  }
}

/* Quick links in the thin top strip ------------------------------------------------------ */
.topbar .quick-links {
  display: none;
  gap: 0.15rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
  -webkit-mask-image: none;
  mask-image: none;
}

.topbar .quick-links a {
  display: inline;
  padding: 0;
  border-radius: 0;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  background: none;
}

.topbar .quick-links a:hover {
  background: none;
  color: #ffd9a8;
  text-decoration: underline;
}

.topbar .quick-links .hot {
  color: #ffd9a8;
}

.topbar .quick-links .hot::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 0.35rem;
  border-radius: 999px;
  background: var(--accent);
  vertical-align: 1px;
}

@media (min-width: 1000px) {
  .topbar .quick-links {
    display: flex;
  }
}

/* The earlier bar holds only the "Сите категории" button now. */
.menu-row .quick-links {
  display: none;
}

/* The footer shows the full logo with its tagline. */
.footer-logo img {
  height: 72px;
  width: auto;
}

.holding .logo img {
  height: 80px;
}

/* Small category icons in the "Сите категории" panel (nothing else changes). */
.menu-icon {
  width: 1.05em;
  height: 1.05em;
  margin-right: 0.45em;
  vertical-align: -0.15em;
  color: var(--blue);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Employees only: the link to the admin (shown by the server, never to customers). */
.header-link.admin-link {
  color: var(--blue);
}

@media (max-width: 699px) {
  .header-link.admin-link {
    display: none; /* on phones it is in the ☰ drawer */
  }
}

/* Home: "Ново во понудата" five per row (20.10.2026) --------------------------------------- */
@media (min-width: 600px) and (max-width: 999px) {
  /* A swipeable row of whole tiles instead of an uneven last row. */
  .grid.grid-5 {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(200px, 30%);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 0.5rem;
  }

  .grid.grid-5 > .card {
    scroll-snap-align: start;
  }
}

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

/* My account: side menu, panels and buttons (20.10.2026) ---------------------------------- */
.nav-icon,
.btn-ico {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn-ico {
  width: 1em;
  height: 1em;
}

.account-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.account-nav form {
  margin: 0;
}

.account-hello {
  display: none;
}

.account-nav a,
.account-logout {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  background: none;
  border: 0;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

.account-nav a:hover,
.account-logout:hover {
  background: var(--blue-soft);
  color: var(--blue);
}

.account-nav a[aria-current="page"] {
  background: var(--blue);
  color: var(--white);
  font-weight: 700;
}

.account-nav a[aria-current="page"] .nav-icon {
  stroke: var(--white);
}

.account-logout {
  color: var(--sale);
}

.account-logout:hover {
  background: var(--sale-bg);
  color: var(--sale);
}

.account-nav a:focus-visible,
.account-logout:focus-visible,
.account-shortcuts a:focus-visible,
.confirm > summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

@media (min-width: 800px) {
  .account-nav {
    flex-direction: column;
    align-items: stretch;
    overflow: visible;
    padding: 0.6rem;
    position: sticky;
    top: 1rem;
  }

  .account-nav a,
  .account-logout {
    width: 100%;
  }

  .account-nav form {
    border-top: 1px solid var(--line);
    margin-top: 0.3rem;
    padding-top: 0.3rem;
  }

  .account-hello {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0 0 0.3rem;
    padding: 0.5rem 0.85rem 0.7rem;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.account-main h1 {
  margin-top: 0.25rem;
}

.account-lead {
  color: var(--muted);
  margin-top: -0.4rem;
}

.account-shortcuts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
}

.account-shortcuts a {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.7rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.account-shortcuts a:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.account-shortcuts .nav-icon {
  grid-row: span 2;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0.45rem;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
}

.account-shortcuts span {
  color: var(--muted);
  font-size: 0.85rem;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  padding: 1rem 1.15rem 1.15rem;
  margin: 1rem 0;
}

.panel h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.panel-danger {
  border-color: color-mix(in srgb, var(--sale) 35%, var(--line));
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-top: 0.75rem;
}

/* Buttons: primary .btn, secondary .btn.ghost, danger .btn.danger / .danger-ghost */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-decoration: none;
}

a.btn {
  color: var(--white);
}

a.btn.ghost {
  color: var(--blue);
}

.btn.ghost:hover {
  background: var(--blue-soft);
}

.btn.danger:hover {
  background: color-mix(in srgb, var(--sale) 85%, black);
}

.btn.danger-ghost {
  background: var(--surface);
  color: var(--sale);
  border: 1px solid currentColor;
  box-shadow: none;
}

.btn.danger-ghost:hover {
  background: var(--sale-bg);
}

.btn.sm {
  padding: 0.38rem 0.75rem;
  font-size: 0.88rem;
}

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

/* Addresses as cards */
.address-list {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  margin: 1rem 0;
}

.address-list li.address-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
}

.address-card.is-default {
  border-color: var(--blue);
  box-shadow: inset 3px 0 0 var(--blue);
}

.address-card p {
  margin: 0;
}

.address-card .tag {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 600;
}

.row-actions {
  gap: 0.5rem;
}

.row-actions form {
  margin: 0;
}

/* A no-script confirmation: the real delete button appears only after a first click. */
.confirm {
  position: relative;
}

.confirm > summary {
  list-style: none;
  cursor: pointer;
}

.confirm > summary::-webkit-details-marker {
  display: none;
}

.confirm[open] > summary {
  background: var(--sale-bg);
}

.confirm-box {
  margin-top: 0.5rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--sale);
  border-radius: var(--radius);
  background: var(--surface);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
}

.confirm-box p {
  margin: 0;
  font-weight: 600;
}

.empty-note {
  color: var(--muted);
  padding: 0.75rem 1rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.pager a {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
}

.pager a:hover {
  border-color: var(--blue);
}

/* Phone and tablet: the account menu as a swipeable tab bar under the header; sign-out
   moves to the bottom of the page (20.10.2026). */
.bottom-logout {
  display: none;
}

.account-head {
  margin: 1rem 0 0;
}

.account-head h1 {
  margin: 0;
}

.account-head .account-lead {
  margin: 0.2rem 0 0;
}

@media (max-width: 799px) {
  .account {
    gap: 1rem;
  }

  .account-nav {
    position: sticky;
    top: var(--header-h, 0px);
    z-index: 5;
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    padding: 0.4rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    box-shadow: var(--shadow-md);
  }

  .account-nav::-webkit-scrollbar {
    display: none;
  }

  .account-nav a {
    flex: none;
    min-height: 44px;
    padding: 0 1rem;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    font-size: 0.9rem;
    scroll-snap-align: center;
  }

  .account-nav a[aria-current="page"] {
    background: var(--blue);
    border-color: var(--blue);
  }

  .account-nav .nav-logout {
    display: none;
  }

  .bottom-logout {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0 0.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
  }

  .bottom-logout .btn {
    min-height: 44px;
    width: 100%;
    max-width: 20rem;
  }
}

@media (min-width: 800px) {
  .account-nav {
    top: calc(var(--header-h, 0px) + 1rem);
  }
}

/* Checkout: steps on the left, a sticky summary on the right (20.10.2026) --------------- */
.checkout-page {
  margin: 1rem 0 2rem;
}

.checkout-login {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--blue-soft);
}

.checkout-grid {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}

.checkout-steps {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.checkout-steps .step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1rem 1.1rem 1.1rem;
  gap: 0.7rem;
}

.checkout-steps .step legend,
.checkout-summary h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  padding: 0 0.3rem;
}

.checkout-summary h2 {
  margin: 0 0 0.75rem;
  padding: 0;
}

.step-no {
  display: inline-grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--blue);
  color: var(--white);
  font-size: 0.85rem;
}

.field-grid {
  display: grid;
  gap: 0 0.9rem;
}

.field-grid .field {
  margin: 0;
}

.contact-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.contact-summary p {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

/* Choice tiles: real radio buttons, styled as cards. */
.tile-group {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.tile-label {
  margin: 0.3rem 0 0;
  font-weight: 600;
}

.choice-tile {
  position: relative;
  display: block;
  cursor: pointer;
}

.choice-tile input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.tile-body {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.7rem;
  align-items: center;
  height: 100%;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.tile-body > span,
.tile-body > strong {
  grid-column: 2;
}

.tile-body > span {
  color: var(--muted);
  font-size: 0.88rem;
}

.tile-icon {
  grid-row: span 3;
  width: 2rem;
  height: 2rem;
  padding: 0.35rem;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.choice-tile:hover .tile-body {
  border-color: var(--blue);
}

.choice-tile input:checked + .tile-body {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: inset 0 0 0 1px var(--blue);
}

.choice-tile input:focus-visible + .tile-body {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.new-tile .tile-body {
  border-style: dashed;
}

.delivery-address {
  display: grid;
  gap: 0.6rem;
}

/* The order summary */
.checkout-summary {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.1rem 1.15rem 1.25rem;
  min-width: 0;
}

.summary-lines {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
  max-height: 22rem;
  overflow-y: auto;
}

.summary-lines li {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 0.6rem;
  align-items: center;
}

.summary-thumb {
  width: 56px;
  height: 56px;
  object-fit: contain;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.summary-name {
  font-size: 0.9rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.summary-name small {
  display: block;
  color: var(--muted);
}

.summary-price {
  font-weight: 700;
  white-space: nowrap;
}

.summary-edit {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
}

.summary-totals {
  margin: 0.9rem 0;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.35rem;
}

.summary-totals div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.summary-totals dt,
.summary-totals dd {
  margin: 0;
}

.summary-delivery dd {
  color: var(--muted);
  font-size: 0.88rem;
  text-align: right;
}

.summary-total {
  margin-top: 0.4rem;
  padding-top: 0.6rem;
  border-top: 1px dashed var(--line);
  font-size: 1.1rem;
  font-weight: 700;
}

.pay-tiles {
  display: grid;
  gap: 0.5rem;
  margin: 0.4rem 0 0.9rem;
}

.pay-tile {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.6rem;
  align-items: center;
  padding: 0.6rem 0.8rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  opacity: 0.55;
}

.pay-tile .tile-icon {
  grid-row: auto;
  width: 1.8rem;
  height: 1.8rem;
}

.pay-tile small {
  display: block;
  color: var(--muted);
}

.pay-tile.is-active {
  opacity: 1;
  border-color: var(--blue);
  background: var(--blue-soft);
}

.order-btn {
  width: 100%;
  justify-content: center;
  margin-top: 0.5rem;
}

@media (min-width: 640px) {
  .field-grid {
    grid-template-columns: 1fr 1fr;
  }

  .field-grid .span-2 {
    grid-column: span 2;
  }
}

@media (min-width: 1000px) {
  .checkout-grid {
    grid-template-columns: minmax(0, 1fr) 24rem;
  }

  .checkout-summary {
    position: sticky;
    top: 1rem;
  }
}

/* Breadcrumbs (20.10.2026) ------------------------------------------------------------------ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.crumbs {
  margin: 1rem 0 0.75rem;
  font-size: 0.88rem;
}

.crumbs ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.1rem 0.15rem;
  line-height: 1.4;
}

/* Long names wrap onto more lines (21.10.2026): no "…", no sideways scroll. The chevron
   sits on the first line of the item it introduces. */
.crumbs li {
  display: flex;
  align-items: flex-start;
  min-width: 0;
  max-width: 100%;
}

.crumbs li + li::before {
  content: "";
  flex: none;
  width: 0.4rem;
  height: 0.4rem;
  margin: 0.62rem 0.55rem 0 0.35rem;
  border-top: 1.5px solid var(--muted);
  border-right: 1.5px solid var(--muted);
  transform: rotate(45deg);
  opacity: 0.6;
}

.crumbs a,
.crumbs [aria-current="page"] {
  display: inline-block;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 0.2rem 0.15rem;
  border-radius: 4px;
}

.crumbs a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

.crumbs a:hover {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.crumbs a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.crumbs [aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}

.crumb-home {
  display: inline-flex !important;
  align-items: center;
  height: 1.63rem;
}

.crumb-icon {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* Checkout, simpler (20.10.2026): two calm cards and the summary; courier only. */
.checkout-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem 1.35rem 1.4rem;
  display: grid;
  gap: 0.9rem;
  min-width: 0;
}

.checkout-card h2 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  font-size: 1.1rem;
}

.checkout-card h2 .nav-icon,
.checkout-summary h2 .nav-icon {
  color: var(--blue);
}

.delivery-info {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius);
  background: var(--blue-soft);
  font-size: 0.9rem;
}

.delivery-info .tile-icon {
  grid-row: auto;
  flex: none;
  background: var(--surface);
}

.note-toggle > summary {
  cursor: pointer;
  color: var(--blue);
  font-weight: 600;
  font-size: 0.92rem;
  width: max-content;
}

.note-toggle > summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.note-toggle[open] > summary {
  margin-bottom: 0.5rem;
}

.checkout-summary {
  box-shadow: var(--shadow-md);
  border: 0;
}

.summary-delivery dt {
  color: var(--muted);
  font-size: 0.88rem;
}

.checkout-summary .field.check {
  margin: 0.4rem 0 0.25rem;
}


/* Listings (categories, Ново, sale, brand, search): 4 per row on a large screen,
   3 on a small laptop, 2-3 on a tablet, 2 on a phone (20.10.2026). */
@media (min-width: 1000px) {
  .listing {
    grid-template-columns: 236px minmax(0, 1fr);
    gap: 1.1rem;
  }
}

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

/* Parts the scripts hide stay hidden whatever their display (checkout, account). */
.checkout-form [hidden],
.account [hidden] {
  display: none !important;
}

.summary-totals dd {
  white-space: nowrap;
}

.summary-total dt {
  font-size: 0.95rem;
}

.tile-body strong,
.pay-tile strong {
  color: var(--ink);
}

/* Search with no results: "Можеби барате" (21.10.2026). */
.search-near {
  margin-top: 1.5rem;
}

.search-near h2 {
  font-size: 1.15rem;
  margin: 0 0 0.75rem;
}

.near-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.chip {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}

.chip:hover {
  border-color: var(--blue);
  color: var(--blue);
}

/* Friendly 404 (21.10.2026). */
.not-found {
  margin: 1.5rem 0;
}

.not-found-section {
  margin-top: 1.75rem;
}

.not-found-section h2 {
  font-size: 1.15rem;
  margin: 0 0 0.75rem;
}

/* Кошничка, redesigned (21.10.2026): cards, a summary that follows on the side, a
   bar with the total on phones, and honest reasons to finish the order. */
.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22rem;
  gap: 1.25rem;
  align-items: start;
  margin: 1rem 0 2rem;
}

.cart-layout .cart-page {
  max-width: none;
  margin: 0;
  overflow: visible;
  border-radius: var(--radius-lg);
}

.cart-items h1 {
  margin: 0 0 0.75rem;
}

.cart-count {
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
}

.notices {
  list-style: none;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--warn);
}

.notices li + li {
  margin-top: 0.35rem;
}

.cart-undo {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 0.75rem;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius);
  background: var(--blue-soft);
  color: var(--ink);
}

.cart-undo-btn {
  border: 0;
  background: none;
  color: var(--blue);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.cart-lines {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cart-line {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto auto auto;
  grid-template-areas: "media info qty total remove";
  gap: 0.5rem 1rem;
  align-items: center;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.cart-line:first-child {
  border-top: 0;
}

.cart-line-media {
  grid-area: media;
}

.cart-line .cart-thumb {
  width: 96px;
  height: 96px;
  flex-basis: 96px;
  border-radius: 12px;
  background: #fff;
}

.cart-line-info {
  grid-area: info;
  min-width: 0;
}

.cart-line-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--ink);
  font-weight: 650;
  line-height: 1.35;
  text-decoration: none;
}

.cart-line-name:hover {
  color: var(--blue);
}

.cart-line-name:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.cart-line-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.6rem;
  align-items: center;
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
}

.sku-chip {
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
}

.cart-line-unit {
  margin: 0.3rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.cart-line-qty {
  grid-area: qty;
  display: inline-flex;
  gap: 0;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
}

.cart-line-qty input {
  width: 3rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  text-align: center;
  background: transparent;
  color: var(--ink);
  font-weight: 650;
  -moz-appearance: textfield;
  appearance: textfield;
}

.cart-line-qty input::-webkit-outer-spin-button,
.cart-line-qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty-step {
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
}

.qty-step svg {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.qty-step:hover:not([disabled]) {
  background: var(--blue-soft);
  color: var(--blue);
}

.qty-step[disabled] {
  opacity: 0.4;
  cursor: default;
}

.qty-step:focus-visible,
.cart-line-qty input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.cart-line-total {
  grid-area: total;
  margin: 0;
  min-width: 6.5rem;
  text-align: right;
  font-size: 1.05rem;
  white-space: nowrap;
}

.cart-line-remove {
  grid-area: remove;
}

.cart-remove {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
  padding: 0.45rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.cart-remove svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cart-remove:hover,
.cart-remove:focus-visible {
  color: var(--sale);
  background: var(--sale-bg);
  border-color: color-mix(in srgb, var(--sale) 30%, transparent);
}

/* Summary */
.cart-summary {
  position: sticky;
  top: calc(var(--header-h, 0px) + 1rem);  /* below the sticky shop header */
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
}

.cart-summary h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.cart-sums {
  margin: 0 0 1rem;
}

.cart-sums div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  color: var(--muted);
}

.cart-sums dd {
  margin: 0;
  color: var(--ink);
  text-align: right;
}

.cart-sums .cart-sum-total {
  margin-top: 0.4rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-weight: 700;
}

.cart-sums .cart-sum-total dd {
  font-size: 1.35rem;
  font-weight: 800;
}

.btn-checkout {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  padding: 0.95rem 1.2rem;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 750;
  text-decoration: none;
  color: var(--white);
  background: linear-gradient(135deg, var(--blue), var(--blue-dark));
  box-shadow: 0 10px 24px color-mix(in srgb, var(--blue) 35%, transparent);
}

.btn-checkout:hover {
  background: linear-gradient(135deg, var(--blue-dark), var(--blue-dark));
  box-shadow: 0 14px 30px color-mix(in srgb, var(--blue) 45%, transparent);
}

.btn-checkout svg,
.btn-continue svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s var(--ease);
}

.btn-checkout:hover svg {
  transform: translateX(3px);
}

.btn-continue {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.6rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  text-decoration: none;
}

.btn-continue:hover svg {
  transform: translateX(-3px);
}

.cart-trust {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 1rem 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.55rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.cart-trust li {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.cart-trust svg {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: var(--ok);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cart-trust a {
  color: var(--blue);
  font-weight: 600;
}

.cart-mobilebar {
  display: none;
}

.cart-related {
  margin: 0 0 2.5rem;
}

.cart-related h2 {
  margin: 0 0 0.9rem;
  font-size: 1.2rem;
}

/* Empty cart */
.cart-empty {
  max-width: 34rem;
  margin: 1.5rem auto 2rem;
  text-align: center;
  border-radius: var(--radius-lg);
}

.cart-empty-icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0.5rem auto 0;
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.cart-empty p {
  color: var(--muted);
}

.cart-empty .btn-checkout {
  width: auto;
  display: inline-flex;
  margin-top: 0.5rem;
}

@media (max-width: 900px) {
  .cart-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .cart-summary {
    position: static;
  }

  .cart-mobilebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom));
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px rgb(16 24 40 / 10%);
  }

  .cart-mobilebar p {
    display: grid;
    margin: 0;
    line-height: 1.2;
  }

  .cart-mobilebar span {
    font-size: 0.8rem;
    color: var(--muted);
  }

  .cart-mobilebar strong {
    font-size: 1.2rem;
    color: var(--ink);
  }

  .cart-mobilebar .btn-checkout {
    width: auto;
    padding: 0.8rem 1.4rem;
  }

  body:has(.cart-mobilebar) {
    padding-bottom: 5rem;
  }
}

@media (max-width: 600px) {
  .cart-line {
    grid-template-columns: 76px minmax(0, 1fr) auto;
    grid-template-areas:
      "media info remove"
      "qty qty total";
    gap: 0.6rem 0.75rem;
    align-items: start;
  }

  .cart-line-qty {
    flex-wrap: nowrap;
  }

  .cart-line .cart-thumb {
    width: 76px;
    height: 76px;
    flex-basis: 76px;
  }

  .cart-line-qty {
    justify-self: start;
  }

  .cart-line-total {
    align-self: center;
    min-width: 0;
  }

  .cart-remove span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .cart-remove {
    padding: 0.45rem;
  }
}

/* Profile made at checkout (23.10.2026): a note at checkout and the set-password reminder. */
.checkout-account-note {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.account-setpw {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  background: var(--blue-soft);
  border-left: 4px solid var(--blue);
}

.account-setpw p {
  margin: 0;
  max-width: 48ch;
}

/* Grouped category menu (24.10.2026) ---------------------------------------------------
   Phones: a row of group chips under the header and an accordion in the drawer.
   Computers: "Сите категории" and the groups in one row; one panel with the groups
   on the left and the chosen group's categories in columns on the right. */
.chip-icon,
.mega-tab-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.menu-grouped .menu-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.45rem;
  padding-bottom: 0.45rem;
}

.menu-grouped .all-cats {
  display: none;
}

.group-bar {
  display: flex;
  gap: 0.4rem;
  margin: 0;
  padding: 0 0 2px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.group-bar::-webkit-scrollbar {
  display: none;
}

.group-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 36px;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 550;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.group-chip .chip-icon {
  color: var(--blue);
}

.group-chip .chip-caret {
  display: none;
  transition: transform 0.2s var(--ease);
}

.group-chip:hover,
.group-chip[aria-expanded="true"] {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}

.group-chip[aria-expanded="true"] .chip-caret {
  transform: rotate(180deg);
}

.group-chip:focus-visible,
.mega-tab:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* The panel: on phones the drawer (from the classic menu) with an accordion. */
.mega-groups {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mega-group {
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 64px; /* below the drawer's sticky title */
}

.mega-tab {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.mega-tab-icon {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
}

.mega-tab-name {
  flex: 1;
}

.mega-tab-caret {
  color: var(--muted);
  transition: transform 0.25s var(--ease);
}

.mega-group.open .mega-tab-caret {
  transform: rotate(180deg);
}

.mega-pane {
  display: none;
  padding: 0 0.5rem 0.6rem 1rem;
}

.mega-group.open .mega-pane {
  display: block;
  animation: drop 0.2s var(--ease);
}

.mega-pane-title {
  display: none;
}

.mega-cats {
  margin: 0;
  padding: 0;
  list-style: none;
}

.mega-cat-row {
  display: flex;
  align-items: center;
}

.mega-cat {
  flex: 1;
  padding: 0.5rem 0.5rem 0.5rem 0;
  color: var(--ink);
  font-weight: 550;
  text-decoration: none;
}

.mega-cat:hover {
  color: var(--blue);
}

.mega-sub {
  display: none;
  margin: 0 0 0.4rem;
  padding: 0 0 0 1.55rem;
  list-style: none;
  font-size: 0.92rem;
}

.mega-cats .has-sub.expanded .mega-sub {
  display: block;
}

.mega-cats .has-sub.expanded .sub-toggle svg {
  transform: rotate(180deg);
}

.mega-sub a {
  display: block;
  padding: 0.3rem 0;
  color: var(--muted);
  text-decoration: none;
}

.mega-sub a:hover {
  color: var(--blue);
}

.mega-sub .mega-more {
  color: var(--blue);
  font-weight: 600;
}

@media (min-width: 1000px) {
  .menu-grouped .menu-row {
    gap: 0.75rem;
  }

  .menu-grouped .all-cats {
    display: inline-flex;
  }

  .group-bar {
    flex: 1;
    min-width: 0;
    gap: 0.1rem;
    flex-wrap: nowrap;
  }

  .group-chip {
    min-height: 38px;
    padding: 0.4rem 0.65rem;
    border-color: transparent;
    background: none;
    font-size: 0.92rem;
  }

  .group-chip .chip-caret {
    display: inline;
    color: var(--muted);
  }

  /* One panel under the bar: groups on the left, categories on the right. */
  .menu-panel.mega {
    padding: 0;
    overflow: hidden;
    max-height: none;
  }

  .mega-groups {
    position: relative;
    height: min(74vh, 520px);
    padding: 0.75rem 0;
  }

  .mega-group {
    width: 310px;
    border: 0;
  }

  .mega-tab {
    gap: 0.65rem;
    padding: 0.45rem 0.75rem;
    margin: 0 0.75rem;
    width: calc(100% - 1.5rem);
    border-radius: 12px;
    font-size: 0.92rem;
    white-space: nowrap;
    transition: background-color 0.15s var(--ease), color 0.15s var(--ease);
  }

  .mega-tab-icon {
    width: 32px;
    height: 32px;
  }

  .mega-tab-caret {
    transform: rotate(-90deg);
    opacity: 0;
    transition: opacity 0.15s var(--ease);
  }

  .mega-group.current .mega-tab {
    background: var(--blue-soft);
    color: var(--blue);
  }

  .mega-group.current .mega-tab-caret,
  .mega-group.open .mega-tab-caret {
    opacity: 1;
    transform: rotate(-90deg);
    color: var(--blue);
  }

  .mega-group.current .mega-tab-icon {
    background: var(--blue);
    color: #ffffff;
  }

  .mega-pane,
  .mega-group.open .mega-pane {
    display: none;
    animation: none;
  }

  .mega-group.current .mega-pane {
    position: absolute;
    inset: 0 0 0 310px;
    display: block;
    padding: 1rem 1.75rem 1.25rem;
    overflow-y: auto;
    border-left: 1px solid var(--line);
    animation: fade-in 0.18s var(--ease);
  }

  .mega-pane-title {
    display: block;
    margin: 0 0 0.9rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
  }

  .mega-cats {
    columns: 3;
    column-gap: 2rem;
  }

  .mega-cats > li {
    break-inside: avoid;
    margin-bottom: 1rem;
  }

  .mega-cat {
    padding: 0.15rem 0;
    font-weight: 650;
  }

  .mega-cats .sub-toggle {
    display: none;
  }

  .mega-sub {
    display: block;
    margin: 0.2rem 0 0;
    padding-left: 1.5rem;
  }

  .mega-sub a {
    padding: 0.18rem 0;
  }

  .menu-grouped .drawer-links {
    display: none;
  }
}

@media (min-width: 1000px) and (max-width: 1279px) {
  .group-chip {
    gap: 0.25rem;
    padding: 0.4rem 0.5rem;
    font-size: 0.86rem;
  }

  .group-chip .chip-caret {
    display: none;
  }
}

@media (min-width: 1000px) and (max-width: 1199px) {

  .mega-cats {
    columns: 2;
  }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Cleaner bar without "Сите категории" (24.10.2026, evening): the groups spread
   over the row as plain text and icons; a thin blue line marks hover and the open
   group. Each group opens a panel with only its own categories. */
.mega-all {
  display: none;
}

@media (min-width: 1000px) {
  .menu-grouped .menu-row {
    padding-top: 0;
    padding-bottom: 0;
  }

  .group-bar {
    justify-content: space-between;
    gap: 0;
  }

  .group-chip {
    position: relative;
    gap: 0.45rem;
    min-height: 46px;
    padding: 0.5rem 0.7rem;
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--ink);
    font-weight: 550;
  }

  .group-chip::after {
    content: "";
    position: absolute;
    left: 0.7rem;
    right: 0.7rem;
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--blue);
    transform: scaleX(0);
    transition: transform 0.2s var(--ease);
  }

  .group-chip:hover,
  .group-chip[aria-expanded="true"] {
    background: none;
    color: var(--blue);
  }

  .group-chip:hover::after,
  .group-chip[aria-expanded="true"]::after {
    transform: scaleX(1);
  }

  .group-chip .chip-icon {
    color: var(--muted);
    transition: color 0.2s var(--ease);
  }

  .group-chip:hover .chip-icon,
  .group-chip[aria-expanded="true"] .chip-icon {
    color: var(--blue);
  }

  .group-chip .chip-caret {
    display: none;
  }

  /* The panel: one group, full width. */
  .mega-groups {
    height: auto;
    padding: 0;
  }

  .mega-group {
    width: auto;
  }

  .mega-tab {
    display: none;
  }

  .mega-group.current .mega-pane {
    position: static;
    max-height: min(70vh, 560px);
    padding: 1.25rem 1.75rem 1rem;
    border-left: 0;
  }

  .mega-cats {
    columns: 4;
  }

  .mega-all {
    display: inline-flex;
    gap: 0.35rem;
    margin-top: 0.25rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
    width: 100%;
    color: var(--blue);
    font-weight: 600;
    text-decoration: none;
  }

  .mega-all:hover {
    text-decoration: underline;
  }
}

@media (min-width: 1000px) and (max-width: 1279px) {
  .group-chip {
    padding: 0.5rem 0.45rem;
  }

  .group-chip::after {
    left: 0.45rem;
    right: 0.45rem;
  }

  .group-chip .chip-icon {
    display: inline;
  }

  .mega-cats {
    columns: 3;
  }
}

/* Сите категории page */
.all-groups-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1.5rem;
}

.all-groups-jump a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 550;
  text-decoration: none;
}

.all-groups-jump a:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.all-groups-jump .chip-icon {
  color: var(--blue);
}

.all-group {
  margin: 0 0 1.5rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  scroll-margin-top: 140px;
}

.all-group h2 {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0 0 1rem;
  font-size: 1.2rem;
}

.all-cats-grid {
  margin: 0;
  padding: 0;
  list-style: none;
  columns: 1;
  column-gap: 2rem;
}

.all-cats-grid > li {
  break-inside: avoid;
  margin-bottom: 1rem;
}

.all-sub {
  margin: 0.2rem 0 0;
  padding: 0 0 0 1.5rem;
  list-style: none;
  font-size: 0.93rem;
}

.all-sub a {
  display: block;
  padding: 0.2rem 0;
  color: var(--muted);
  text-decoration: none;
}

.all-sub a:hover {
  color: var(--blue);
}

@media (min-width: 600px) {
  .all-cats-grid {
    columns: 2;
  }
}

@media (min-width: 1000px) {
  .all-cats-grid {
    columns: 4;
  }
}

/* Home page on phones and tablets (25.10.2026): the 8 groups as a 4 × 2 grid at the
   top instead of a sideways row; each opens a bottom sheet. Other pages keep the row,
   with a fade on the side that has more. */
.home-groups {
  margin: 0.75rem 0 1rem;
}

.home-groups ul {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-group {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 0.35rem;
  width: 100%;
  min-height: 76px;
  padding: 0.6rem 0.15rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease), transform 0.1s var(--ease);
}

.home-group:active {
  transform: scale(0.97);
  border-color: var(--blue);
  background: var(--blue-soft);
}

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

.home-group-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue);
}

.home-group-icon svg,
.sheet-cat-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-group-name {
  max-width: 100%;
  font-size: clamp(0.68rem, 3.05vw, 0.82rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-align: center;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

@media (max-width: 999px) {
  /* On the home page the grid replaces the row under the search box. */
  .page-home .menu-grouped .menu-row {
    display: none;
  }

  .menu-grouped {
    border-top: 0;
  }
}

@media (min-width: 600px) and (max-width: 999px) {
  .home-groups ul {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .home-groups,
  .group-sheet,
  .sheet-backdrop {
    display: none !important;
  }
}

/* The bottom sheet */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgb(5 10 20 / 45%);
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

.sheet-backdrop.open {
  opacity: 1;
}

.group-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 61;
  display: flex;
  flex-direction: column;
  max-height: 86vh;
  max-height: 86dvh;
  border-radius: 20px 20px 0 0;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform: translateY(100%);
  transition: transform 0.28s var(--ease);
}

.group-sheet.open {
  transform: translateY(0);
}

.group-sheet.dragging {
  transition: none;
}

body.sheet-open {
  overflow: hidden;
}

.sheet-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1.1rem 0.5rem 0.6rem 1.1rem;
  border-bottom: 1px solid var(--line);
  touch-action: none;
}

.sheet-handle {
  position: absolute;
  top: 0.45rem;
  left: 50%;
  width: 40px;
  height: 4px;
  margin-left: -20px;
  border-radius: 4px;
  background: var(--line);
}

.sheet-title {
  flex: 1;
  margin: 0;
  font-size: 1.1rem;
}

.sheet-close {
  width: 44px;
  height: 44px;
}

.sheet-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0.25rem 0 calc(1rem + env(safe-area-inset-bottom));
}

.sheet-cats {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sheet-cat {
  border-bottom: 1px solid var(--line);
}

.sheet-row {
  display: flex;
  align-items: center;
}

.sheet-row a {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 0.75rem;
  min-height: 52px;
  padding: 0.35rem 0.5rem 0.35rem 1.1rem;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.sheet-cat-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
}

.sheet-toggle {
  display: grid;
  place-items: center;
  flex: none;
  width: 52px;
  height: 52px;
  border: 0;
  border-left: 1px solid var(--line);
  background: none;
  color: var(--muted);
  cursor: pointer;
}

.sheet-toggle svg {
  transition: transform 0.2s var(--ease);
}

.sheet-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
  color: var(--blue);
}

.sheet-sub {
  margin: 0;
  padding: 0 0 0.5rem 3.9rem;
  list-style: none;
}

.sheet-sub a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  text-decoration: none;
}

.sheet-sub a:active,
.sheet-row a:active {
  color: var(--blue);
}

.sheet-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 48px;
  margin: 0.9rem 1.1rem 0;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 650;
  text-decoration: none;
}

/* The row of groups on other pages: snaps to each chip and fades where there is more. */
@media (max-width: 999px) {
  .group-bar {
    scroll-snap-type: x proximity;
    scroll-padding-inline: 1rem;
  }

  .group-bar > li {
    scroll-snap-align: start;
  }

  .group-chip {
    min-height: 40px;
  }

  .group-bar.more-right {
    -webkit-mask-image: linear-gradient(90deg, #000 80%, transparent);
    mask-image: linear-gradient(90deg, #000 80%, transparent);
  }

  .group-bar.more-left {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 20%);
    mask-image: linear-gradient(90deg, transparent, #000 20%);
  }

  .group-bar.more-left.more-right {
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
  }
}

/* Small laptops: the longer group names ("Лаптопи и компјутери", "Телефони и таблети")
   still fit in one row without the icons. */
@media (min-width: 1000px) and (max-width: 1179px) {
  .group-chip .chip-icon {
    display: none;
  }
}

/* "Продолжи со Google" (TDD-15): Google's button look; their logo is never recoloured. */
.google-or {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.google-or::before,
.google-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 46px;
  padding: 0 1rem;
  box-sizing: border-box;
  border: 1px solid #747775;
  border-radius: 999px;
  background: #ffffff;
  color: #1f1f1f;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.btn-google:hover {
  background: #f8faff;
  box-shadow: 0 1px 3px rgb(60 64 67 / 25%);
}

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

.btn-google-logo {
  flex: none;
}

:root[data-theme="dark"] .btn-google {
  border-color: #8e918f;
  background: #131314;
  color: #e3e3e3;
}

:root[data-theme="dark"] .btn-google:hover {
  background: #1e1f20;
}

.google-person {
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.btn.btn-ghost {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}

.form label.check {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin: 0.6rem 0;
  font-weight: 400;
}

.form label.check input {
  margin-top: 0.2rem;
}

/* "Цена на барање" (07.11.2026): no price, a request form instead of the cart. */
.price .on-request {
  color: var(--blue);
}

.quote {
  margin: 1rem 0;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
}

.quote h2 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
}

.quote-form .btn {
  margin-top: 0.5rem;
}

.quote-form input[type="number"] {
  width: 8rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  background: var(--surface);
}

/* Share buttons on the product page (TDD-28, 08.11.2026): quiet outline pills; brand
   colours only on hover, never on the logo. */
.share {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.share-title {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.share-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 40px;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.875rem;
  text-decoration: none;
  cursor: pointer;
}

.share-btn[hidden] {
  display: none;
}

.share-btn:hover,
.share-btn:focus-visible {
  border-color: var(--blue);
  color: var(--blue);
}

.share-fb:hover { border-color: #1877f2; color: #1877f2; }
.share-viber:hover { border-color: #7360f2; color: #7360f2; }
.share-wa:hover { border-color: #1fa855; color: #1fa855; }

.share-ico {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentcolor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.share-status:empty {
  display: none;
}

.share-status {
  margin: 0.5rem 0 0;
  color: var(--muted);
}

.share-copy-area {
  position: fixed;
  top: -1000px;
  opacity: 0;
}

/* Checkout (11.11.2026, Angela): the cart page's "Нарачај" bar, always in view on phones and
   tablets (below 1000px, where the summary is not sticky). It belongs to the order form. */
.checkout-mobilebar small {
  color: var(--muted);
  font-size: 0.75rem;
}

@media (min-width: 901px) and (max-width: 999px) {
  .checkout-mobilebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 1.5rem calc(0.7rem + env(safe-area-inset-bottom));
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px rgb(16 24 40 / 10%);
  }

  .checkout-mobilebar p {
    display: grid;
    margin: 0;
    line-height: 1.2;
  }

  .checkout-mobilebar span {
    font-size: 0.8rem;
    color: var(--muted);
  }

  .checkout-mobilebar strong {
    font-size: 1.2rem;
    color: var(--ink);
  }

  .checkout-mobilebar .btn-checkout {
    width: auto;
    padding: 0.8rem 1.4rem;
  }

  body:has(.checkout-mobilebar) {
    padding-bottom: 5rem;
  }
}

@media (max-width: 999px) {
  /* A field the browser jumps to (missing or wrong) is never hidden under the bar. */
  html:has(.checkout-mobilebar) {
    scroll-padding-bottom: 6rem;
  }
}

.btn-checkout:disabled,
.order-btn:disabled {
  opacity: 0.6;
  cursor: progress;
}

/* Private preview strip (11.11.2026, docs/AWS-SETUP.md): only on a server before launch. */
.preview-strip {
  margin: 0;
  padding: 0.4rem 1rem;
  background: #b3261e;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

/* YouTube in the Опис (15.11.2026): a 16:9 box; the player loads on a click. */
.description .video {
  position: relative;
  max-width: 720px;
  margin: 1rem 0;
}
.description .video-play,
.description .video iframe {
  display: flex;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.description .video-play {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 1rem;
  background: var(--surface-2);
  color: var(--ink);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.description .video-play small {
  color: var(--muted);
  font-weight: 400;
}
.description .video-play:hover .video-icon,
.description .video-play:focus-visible .video-icon {
  transform: scale(1.06);
}
.description .video-play:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.description .video-icon {
  width: 64px;
  height: 44px;
  border-radius: 12px;
  background: #e62117;
  position: relative;
  transition: transform 0.15s;
}
.description .video-icon::after {
  content: "";
  position: absolute;
  left: 26px;
  top: 13px;
  border-style: solid;
  border-width: 9px 0 9px 15px;
  border-color: transparent transparent transparent #fff;
}
.description .video iframe {
  display: block;
  height: auto;
  background: #000;
}
.description .video figcaption {
  margin-top: 0.35rem;
  font-size: 0.85rem;
}

/* Filters behind a button on phones and tablets (16.11.2026, Angela): products first. */
.filters-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.filters-on {
  margin-left: 0.4rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
}

.filters-chevron {
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s;
  margin-right: 0.2rem;
}

.filters-toggle:checked + .filters-button .filters-chevron {
  transform: rotate(-135deg);
}

.filters-toggle:focus-visible + .filters-button {
  border-color: var(--blue);
  box-shadow: var(--focus);
}

@media (max-width: 999px) {
  .listing {
    gap: 0.7rem;
  }

  .filters-toggle:not(:checked) ~ .filters {
    display: none;
  }
}

@media (min-width: 1000px) {
  .filters-button {
    display: none;
  }
}

/* Phones: one slim row above the products: the count and the sort box. */
@media (max-width: 520px) {
  .results-bar {
    flex-wrap: nowrap;
    margin-bottom: 0.7rem;
  }

  .results-bar .count {
    white-space: nowrap;
  }

  .sorters {
    width: auto;
    min-width: 0;
    display: flex;
    flex-wrap: nowrap;
  }

  .sorters label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .sorters #sort {
    min-width: 0;
    max-width: 100%;
  }

  .sorters #per_page {
    display: none;
  }
}

/* Checkout: the terms box (17.11.2026, Angela). A larger box to tap; when "Нарачај" is
   pressed without it, the page scrolls here and the box lights up and nudges. */
.checkout-summary .field.check {
  position: relative;
  padding: 0.7rem 0.8rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  transition: border-color 0.25s, background-color 0.25s, box-shadow 0.25s;
}

.checkout-summary .field.check label {
  cursor: pointer;
  line-height: 1.4;
}

.checkout-summary .field.check input[type="checkbox"] {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--blue);
  cursor: pointer;
}

.checkout-summary .field.check.terms-done {
  border-color: color-mix(in srgb, var(--ok) 55%, var(--line));
  background: var(--ok-bg);
}

.terms-hint {
  margin: 0.5rem 0 0;
  padding-left: calc(22px + 0.5rem);
  color: var(--sale);
  font-size: 0.88rem;
  font-weight: 600;
}

.terms-attention {
  border-color: var(--accent) !important;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface)) !important;
  animation: terms-nudge 0.55s var(--ease) 0.35s both, terms-glow 1.6s ease-out 0.35s 2;
}

.terms-attention input[type="checkbox"] {
  animation: terms-pop 0.6s var(--ease) 0.5s 2;
}

@keyframes terms-nudge {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(2px); }
}

@keyframes terms-glow {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  100% { box-shadow: 0 0 0 14px color-mix(in srgb, var(--accent) 0%, transparent); }
}

@keyframes terms-pop {
  0%, 100% { transform: scale(1); }
  45% { transform: scale(1.3); }
}

@media (prefers-reduced-motion: reduce) {
  .terms-attention,
  .terms-attention input[type="checkbox"] {
    animation: none;
  }
}

/* The separate offers box under the terms (17.11.2026): optional, quieter. */
.checkout-newsletter .field.check {
  margin: 0.5rem 0 0.25rem;
  padding: 0.55rem 0.8rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  font-size: 0.92rem;
  color: var(--muted);
}

.checkout-newsletter .field.check label {
  cursor: pointer;
}

.checkout-newsletter input[type="checkbox"] {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--blue);
  cursor: pointer;
}

/* The group's title in the menu panel opens the group's page with all its products
   (17.11.2026, Angela). Phones keep the accordion, where the title is not shown. */
@media (min-width: 1000px) {
  a.mega-pane-title {
    display: inline-flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.2rem 0.7rem;
    color: var(--ink);
    text-decoration: none;
    border-radius: 6px;
  }

  .mega-pane-all {
    color: var(--blue);
    font-size: 0.85rem;
    font-weight: 600;
  }

  .mega-pane-all span {
    display: inline-block;
    transition: transform 0.2s var(--ease);
  }

  a.mega-pane-title:hover {
    color: var(--blue);
    text-decoration: underline;
    text-underline-offset: 4px;
  }

  a.mega-pane-title:hover .mega-pane-all span {
    transform: translateX(3px);
  }

  a.mega-pane-title:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
  }
}

.all-group h2 a.all-group-link {
  color: inherit;
  text-decoration: none;
}

.all-group h2 a.all-group-link:hover {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Order confirmation (19.11.2026): a warm thank-you, the ordered products with their
   photos (or the NI-COM placeholder), delivery and next steps. Light and dark use the
   theme tokens; on phones the cards run edge to edge. */
.thanks {
  max-width: 44rem;
  margin: 1.5rem auto 2.5rem;
  display: grid;
  gap: 1rem;
}

.thanks-hero {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 2rem 1.5rem 1.6rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--ok) 14%, transparent), transparent 70%),
    linear-gradient(180deg, var(--surface), var(--surface-2));
  box-shadow: var(--shadow-sm);
}

.thanks-check {
  display: inline-grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--ok) 16%, transparent);
  animation: thanks-pop 0.5s var(--ease) both;
}

.thanks-check svg {
  width: 2rem;
  height: 2rem;
  fill: none;
  stroke: var(--white);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  animation: thanks-tick 0.45s 0.3s var(--ease) forwards;
}

@keyframes thanks-pop {
  from {
    transform: scale(0.6);
    opacity: 0;
  }
}

@keyframes thanks-tick {
  to {
    stroke-dashoffset: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .thanks-check,
  .thanks-check svg {
    animation: none;
    stroke-dashoffset: 0;
  }
}

.thanks-hero h1 {
  margin: 1rem 0 0.4rem;
  font-size: clamp(1.5rem, 4.5vw, 2rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.thanks-sub {
  margin: 0 0 0.75rem;
  color: var(--muted);
}

.thanks-number {
  display: inline-block;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.thanks-note {
  margin: 0 auto;
  max-width: 34rem;
  overflow-wrap: anywhere;
}

.thanks-card {
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.thanks-card h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.thanks-lines {
  list-style: none;
  margin: 0;
  padding: 0;
}

.thanks-line {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.thanks-thumb {
  width: 64px;
  height: 64px;
  object-fit: contain;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.thanks-line-info {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.thanks-line-name {
  font-weight: 500;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.thanks-line-qty {
  color: var(--muted);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}

.thanks-line-total {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.thanks-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 0.8rem 0 0;
  font-size: 1.15rem;
}

.thanks-total strong {
  color: var(--blue);
  font-size: 1.3rem;
  font-variant-numeric: tabular-nums;
}

.thanks-delivery {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  background: var(--blue-soft);
  border-color: color-mix(in srgb, var(--blue) 25%, var(--line));
}

.thanks-delivery p {
  margin: 0;
}

.thanks-delivery-icon {
  flex: none;
  width: 1.6rem;
  height: 1.6rem;
  fill: none;
  stroke: var(--blue);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.thanks-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin: 0.5rem 0 0;
}

@media (max-width: 600px) {
  .thanks {
    margin-top: 0.75rem;
  }

  .thanks-hero {
    padding: 1.5rem 1rem 1.25rem;
  }

  .thanks-card {
    padding: 0.9rem 1rem;
  }

  .thanks-line {
    grid-template-columns: 56px 1fr;
    gap: 0.2rem 0.75rem;
  }

  .thanks-thumb {
    width: 56px;
    height: 56px;
    grid-row: span 2;
  }

  .thanks-line-total {
    grid-column: 2;
  }

  .thanks-actions .btn {
    flex: 1 1 100%;
    justify-content: center;
  }
}

/* Мои нарачки and one order (19.11.2026): the thank-you page's cards, with photos. */
.thanks-thumb-link {
  line-height: 0;
}

a.thanks-line-name {
  color: inherit;
  text-decoration: none;
}

a.thanks-line-name:hover {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.thanks-total-minor {
  margin-top: 0.35rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.order-status {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  background: var(--warn-bg);
  color: var(--warn);
}

.order-status-delivered {
  background: var(--ok-bg);
  color: var(--ok);
}

.order-status-shipped,
.order-status-ready_for_pickup {
  background: var(--blue-soft);
  color: var(--blue);
}

.order-status-cancelled,
.order-status-returned {
  background: var(--surface-2);
  color: var(--muted);
}

.order-cards {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.order-card {
  display: grid;
  gap: 0.7rem;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: inherit;
  text-decoration: none;
  transition:
    box-shadow 0.2s var(--ease),
    border-color 0.2s var(--ease),
    transform 0.2s var(--ease);
}

.order-card:hover {
  border-color: color-mix(in srgb, var(--blue) 40%, var(--line));
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

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

.order-card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}

.order-card-date {
  color: var(--muted);
  font-size: 0.9rem;
}

.order-card-head .order-status {
  margin-left: auto;
}

.order-card-body {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.order-card-thumbs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.order-card-thumb {
  width: 56px;
  height: 56px;
  flex: none;
  object-fit: contain;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.order-card-more {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 600;
}

.order-card-sum {
  display: grid;
  margin-left: auto;
  text-align: right;
}

.order-card-count {
  color: var(--muted);
  font-size: 0.9rem;
}

.order-card-sum strong {
  font-size: 1.1rem;
  font-variant-numeric: tabular-nums;
}

.order-card-go {
  flex: none;
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: var(--blue);
  stroke-width: 2;
  transition: transform 0.2s var(--ease);
}

.order-card:hover .order-card-go {
  transform: translateX(3px);
}

.order-empty {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.order-empty p {
  margin: 0;
}

.order-detail {
  display: grid;
  gap: 1rem;
}

.order-detail > p {
  margin: 0;
}

.order-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
}

.order-detail-head h1 {
  margin: 0;
}

.order-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.8rem 1.5rem;
  margin: 0;
}

.order-facts dt {
  color: var(--muted);
  font-size: 0.85rem;
}

.order-facts dd {
  margin: 0.1rem 0 0;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.order-timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 1.1rem;
  border-left: 2px solid var(--line);
}

.order-timeline li {
  position: relative;
  display: grid;
  gap: 0.1rem;
  padding: 0 0 0.9rem 0.6rem;
}

.order-timeline li::before {
  content: "";
  position: absolute;
  left: -1.55rem;
  top: 0.3rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 3px var(--surface);
}

.order-timeline li:last-child {
  padding-bottom: 0;
}

.order-timeline time {
  color: var(--muted);
  font-size: 0.85rem;
}

.order-detail-actions {
  justify-content: flex-start;
}

@media (max-width: 600px) {
  .order-card {
    padding: 0.9rem 1rem;
  }

  .order-card-body {
    flex-wrap: wrap;
    gap: 0.6rem;
  }

  .order-card-thumb,
  .order-card-more {
    width: 48px;
    height: 48px;
  }

  .order-card-go {
    display: none;
  }

  .order-detail-actions form,
  .order-detail-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* A product without a photo (18.11.2026): the NI-COM power mark on a soft panel, in light
   and dark. Last in the file and doubled, so it wins over the white photo backgrounds. */
:root .noimg.noimg {
  position: relative;
  display: block;
  overflow: hidden;
  background: linear-gradient(160deg, var(--blue-soft), var(--surface-2));
}

.noimg-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 34%;
  height: 34%;
  transform: translate(-50%, -50%);
  color: color-mix(in srgb, var(--blue) 32%, transparent);
}

:root[data-theme="dark"] .noimg-mark {
  color: color-mix(in srgb, var(--blue) 42%, transparent);
}
