/* ==========================================================================
   Public site stylesheet. Admin panel styling lives separately in
   admin_style.css and is never loaded here. See .claude/conventions.md
   for the BEM/js__ conventions used throughout this file.
   ========================================================================== */

/* ---- Base ---- */
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  background-color: #f1ebda;
}

/* Background picture fixed to the window (a pseudo-element, background-attachment: fixed doesn't work on phones) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: url('../img/site_background.jpg') center / cover no-repeat;
}

/* ---- Layout ---- */
.layout-body {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  margin: 24px auto;
  padding: 0 16px;
}

.content {
  min-width: 0;
}

.layout-body--full {
  grid-template-columns: 1fr;
}


@media (max-width: 768px) {
  .layout-body {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ---- Messages (flashes) ---- */
/* Alerts */
/* Flashes Container */
.flashes {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    font-family: "Inter", system-ui, sans-serif;
}

/* Base Flash Item */
.flashes .flashes__item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    border: 1px solid transparent;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    animation: flashFadeIn 0.25s ease-out;
}

/* Temporary flash (js__flash-autohide, see initFlashAutoHide() in script.js) */
.flashes .flashes__item.is-hiding {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.4s ease-in, transform 0.4s ease-in;
}

.flashes .flashes__icon {
    display: flex;
    align-items: center;
    font-size: 18px;
    flex-shrink: 0;
}

.flashes .flashes__message {
    flex-grow: 0;
}

/* A link/button inside a flash message (on its own line), e.g. "send a new
   verification e-mail" — inherits the colour of the message type */
.flashes .flashes__action {
    display: inline-block;
    margin-top: 6px;
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

.flashes .flashes__action:hover {
    text-decoration: none;
}

/* Success Type */
.flashes .flashes__item--success {
    background-color: #f0fdf4;
    color: #15803d;
    border-color: #bbf7d0;
}

.flashes .flashes__item--success .flashes__icon {
    color: #16a34a;
}

/* Danger / Error Type */
.flashes .flashes__item--danger,
.flashes .flashes__item--error {
    background-color: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.flashes .flashes__item--danger .flashes__icon,
.flashes .flashes__item--error .flashes__icon {
    color: #dc2626;
}

/* Warning Type */
.flashes .flashes__item--warning {
    background-color: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}

.flashes .flashes__item--warning .flashes__icon {
    color: #d97706;
}

/* Info Type (default) */
.flashes .flashes__item--info {
    background-color: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.flashes .flashes__item--info .flashes__icon {
    color: #2563eb;
}

/* Smooth enter animation */
@keyframes flashFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- Header / Navigation (menu.latte) ---- */
.header {
  padding-top: 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.header__bar {
  background-color: #f2eee2;
  box-shadow: 0 4px 14px rgba(90, 80, 50, 0.08);
  border-radius: 28px;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.header__logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
}

.header__logo-img {
  height: 80px;
  width: auto;
  display: block;
}

@media (max-width: 768px) {
    .header {
        padding-top: 12px;
    }

    .header__bar {
        padding: 12px 16px;
    }

    .header__logo-img {
        height: 40px;
    }
}

.header__nav {
  display: flex;
  list-style: none;
  gap: 28px;
  margin: 0;
  padding: 0;
}

.header__nav a {
  position: relative;
  padding-bottom: 6px;
  text-decoration: none;
  color: #2b2a1f;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

/* olive underline that grows from the middle on hover */
.header__nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 1px;
  background: #9a9979;
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

.header__nav a:hover::after {
  transform: scaleX(1);
}

.header__mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
}

.header__mobile-toggle span {
  width: 20px;
  height: 2px;
  background-color: #383919;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Cart icon */
.header__cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: none;
  color: #111111;
  text-decoration: none;
  font-size: 1.1rem;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.header__cart:hover {
  background: #b04a54;
  color: #ffffff;
}

.header__cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: #8d2932;
  border: 2px solid #f2eee2;
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

/* User menu */
.header__user {
  position: relative;
}

/* Union of the former .user-profile__avatar (below) + the former inline
   .user-menu-btn rules, so the trigger button renders identically to
   before now that it's a single class instead of two. */
.header__user-trigger {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 600;
  border: none;
  background: #c8c5a2;
  color: #383919;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.header__user-trigger:hover {
  background: #b9b690;
}

.user-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 210px;
  background: #f2eee2;
  border: 1px solid #e4e4e7;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  padding: 8px 0;
  z-index: 1000;
}

.user-dropdown--open {
  display: block;
}

.user-dropdown__header {
  padding: 10px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: #18181b;
}

.user-dropdown__header strong {
  font-size: 14px;
  color: #18181b;
}

.user-dropdown__header .role {
  font-size: 12px;
  color: #71717a;
  padding-top: 6px;
}

.user-dropdown__divider {
  border: 0;
  border-top: 1px solid #f4f4f5;
  margin: 6px 0;
}

.user-dropdown__link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 14px;
  color: #52525b;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.user-dropdown__link:hover {
  background-color: #e8e3d2;
  color: #18181b;
}

.user-dropdown__link--danger {
  color: #dc2626;
}

.user-dropdown__link--danger:hover {
  background-color: #fef2f2;
}

.header__login-link {
  text-decoration: none;
  color: #383919;
  font-weight: 600;
  font-size: 0.95rem;
}

/* Language switcher (<details>, left of the user menu; initLangSwitcher() in script.js).
   The menu looks like .user-dropdown. */
.lang-switcher {
  position: relative;
}

.lang-switcher__trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 10px;
  border-radius: 17px;
  background: #c8c5a2;
  cursor: pointer;
  list-style: none; /* no disclosure triangle */
  user-select: none;
  transition: background-color 0.15s ease;
}

.lang-switcher__trigger::-webkit-details-marker {
  display: none;
}

.lang-switcher__trigger:hover,
.lang-switcher[open] > .lang-switcher__trigger {
  background: #b9b690;
}

.lang-switcher__trigger:focus-visible {
  outline: 2px solid #8b263e;
  outline-offset: 2px;
}

.lang-switcher__flag {
  display: block;
  width: 22px;
  height: 16px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.lang-switcher__chevron {
  font-size: 0.7rem;
  color: #383919;
  transition: transform 0.15s ease;
}

.lang-switcher[open] .lang-switcher__chevron {
  transform: rotate(180deg);
}

.lang-switcher__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 170px;
  margin: 0;
  padding: 8px 0;
  list-style: none;
  background: #f2eee2;
  border: 1px solid #e4e4e7;
  border-radius: 14px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  z-index: 1000;
}

.lang-switcher__option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  font-size: 14px;
  color: #52525b;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.lang-switcher__option:hover {
  background-color: #e8e3d2;
  color: #18181b;
}

.lang-switcher__option--active {
  color: #8b263e;
  font-weight: 600;
  background-color: #fdf2f4;
}

@media (max-width: 480px) {
  .lang-switcher__trigger {
    padding: 0 8px;
    gap: 4px;
  }

  .lang-switcher__chevron {
    display: none;
  }
}

/* Below 850px the header gets a second row: the three page links become
   buttons side by side under the logo / cart / user row. */
@media (max-width: 850px) {
  .header__bar {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    row-gap: 12px;
  }

  .header__brand {
    grid-column: 1;
    grid-row: 1;
  }

  .header__actions {
    grid-column: 2;
    grid-row: 1;
  }

  .header__nav {
    grid-column: 1 / -1;
    grid-row: 2;
    gap: 8px;
  }

  .header__nav li {
    display: flex;
    flex: 1 1 auto;
  }

  .header__nav a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 10px;
    box-sizing: border-box;
    border-radius: 10px;
    background: #e4dfca;
    color: #2b2a1f;
    font-size: 0.9rem;
    line-height: 1.2;
    text-align: center;
    transition: background-color 0.15s ease, color 0.15s ease;
  }

  .header__nav a:hover {
    background: #c8c5a2;
    color: #2b2a1f;
  }

  /* buttons here, no underline */
  .header__nav a::after {
    display: none;
  }
}

/* ---- Side menu (sideMenu.latte) ---- */
.sidebar-menu {
  width: 280px;
  background: #f2eee2;
  border: 1px solid var(--border-color);
  border-radius: 28px;
  /* only the category list scrolls, so the scrollbar stays under the header */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  position: sticky;
  top: 20px;
  max-height: calc(100vh - 40px);
}

.sidebar-header {
  flex-shrink: 0;
  /* Solid background so the category list scrolls underneath the sticky header */
  background-color: #f2eee2;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-color);
  color: var(--primary-color);
  position: sticky;
  top: 0;
  z-index: 2;
}

.sidebar-header h2 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-main);
  flex: 1;
}

/* Search in the side menu: reuses the .hero-search-form look, just compact.
   Results are shown in the content area, so there is no dropdown here. */
.sidebar-menu .sidebar-search {
  flex-shrink: 0;
  padding: 12px 16px 4px;
}

.sidebar-menu .sidebar-search .hero-search-form {
  padding: 3px 3px 3px 16px;
  box-shadow: none;
}

.sidebar-menu .sidebar-search .hero-search-form__input {
  min-width: 0;
}

.sidebar-menu .sidebar-search .hero-search-form__submit {
  width: 32px;
  height: 32px;
}

/* "Close this menu to see the products" - only needed when the menu is the mobile overlay */
.sidebar-search__hint {
  display: none;
  margin: 6px 4px 0;
  font-size: 0.8rem;
  color: #dc2626;
  text-align: center;
}

@media (max-width: 768px) {
  .sidebar-search__hint:not([hidden]) {
    display: block;
  }
}

.category-tree {
  list-style: none;
  padding: 8px 0;
  margin: 0;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

summary::-webkit-details-marker { display: none; }

.category-title {
  padding: 12px 20px;
  font-weight: 600;
  font-size: 0.925rem;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
  list-style: none;
}

/* the main category's name, a link that looks like the former plain text; the rest of the row toggles */
.category-title__link {
  flex: 1;
  color: inherit;
  text-decoration: none;
}

.category-title:hover {
  background-color: #8b263e;
  color: #ffffff;
}

.category-title:hover .chevron {
  color: #ffffff;
}

.chevron {
  transition: transform 0.2s ease;
  color: var(--text-muted);
}

details[open] .chevron {
  transform: rotate(180deg);
}

.subcategory-list {
  list-style: none;
  padding: 4px 0 8px 0;
  margin: 0;
  background-color: #ebe6d6;
}

.subcategory-list a {
  display: block;
  padding: 8px 20px 8px 36px;
  font-size: 0.875rem;
  color: #43464b;
  text-decoration: none;
  transition: all 0.2s;
}

.subcategory-list a:hover {
  background-color: #8b263e;
  color: #ffffff;
  padding-left: 40px;
}

.subcategory-list a.highlight-link {
  font-weight: 600;
  color: var(--primary-color);
}

.single-category a {
  display: block;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 0.925rem;
  color: var(--text-main);
  text-decoration: none;
  transition: background 0.2s;
}

.single-category a:hover {
  background-color: #8b263e;
  color: #ffffff;
}

/* "All products": not a category, so it gets an icon, the brand colour and a divider below it */
.single-category--all {
  margin: 0 12px 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border-color);
}

.single-category--all a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  color: #8b263e;
}

.single-category--all a .bi {
  font-size: 1rem;
}

.tree-controls {
  display: flex;
}

.btn-tree-toggle--collapse {
  display: inline-flex;
}

.btn-tree-toggle--expand {
  display: none;
}

.btn-tree-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  color: var(--text-muted, #6b7280);
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

/* Mobile side menu: the open/close buttons only exist on small screens. Below
   768px (same breakpoint as .layout-body) the menu leaves the grid, is hidden
   off-screen by default and slides in as a full-screen overlay when
   .sidebar-menu--open is set (initMobileSideMenu in script.js). */
.sidebar-toggle,
.sidebar-header__close {
  display: none;
}

@media (max-width: 768px) {
  /* sits in its own row of .layout-body right under the header and
     sticks to the top of the viewport while scrolling */
  .sidebar-toggle {
    position: sticky;
    top: 12px;
    z-index: 900;
    justify-self: start;
    align-self: start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    background: #f2eee2;
    color: #1f2937;
    font-size: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    cursor: pointer;
  }

  .sidebar-menu {
    position: fixed;
    inset: 0;
    z-index: 1100;
    width: auto;
    max-height: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overscroll-behavior: contain;
    /* visibility keeps the hidden menu's links out of the tab order */
    visibility: hidden;
    transform: translateX(-100%);
    transition: transform 0.25s ease, visibility 0s linear 0.25s;
  }

  .sidebar-menu--open {
    visibility: visible;
    transform: none;
    transition-delay: 0s;
  }

  .side-menu-open {
    overflow: hidden;
  }

  .sidebar-header__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #374151;
    font-size: 1.15rem;
    cursor: pointer;
  }

  .sidebar-header__close:hover {
    background: rgba(0, 0, 0, 0.06);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar-menu {
    transition: none;
  }
}

/* ---- Footer (footer.latte) ---- */
.site-footer {
  position: relative;
  width: 100%;
  /* half of the arrow (.site-footer__top) sticks out above + 5px gap to the page */
  margin-top: 40px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0, #f2eee2 90px);
  color: #475569;
  font-size: 0.9rem;
  padding: 48px 0 28px 0;
}

.site-footer__container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.site-footer__main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.site-footer__logo {
  display: inline-block;
  margin-bottom: 12px;
}

.site-footer__logo-img {
  height: 64px;
  width: auto;
  display: block;
}

.site-footer__brand-desc {
  line-height: 1.6;
  color: #475569;
  margin: 0;
  max-width: 420px;
}

.site-footer__brand-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.site-footer__contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #1e293b;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer__contact-link i {
  font-size: 1rem;
  line-height: 1;
}

.site-footer__contact-link:hover {
  color: #2d6a4f;
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.85rem;
}

.site-footer__external-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.site-footer__external-links a {
  color: #1e293b;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer__external-links a:hover {
  color: #2d6a4f;
}

.site-footer__copyright {
  color: #4b5563;
}

/* centred on the top edge, half over the page and half over the footer */
.site-footer__top {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: #a8324f;
  box-shadow: 0 2px 6px rgba(139, 38, 62, 0.25);
  color: #ffffff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

/* same look as .product-card__add-btn: lifted with a wine-coloured glow, pressed = darker */
/* With the side menu the content's centre is half of (menu 280px + gap 24px) right of the page's centre */
.has-side-menu .site-footer__top {
  left: calc(50% + 152px);
}

@media (max-width: 768px) {
  .has-side-menu .site-footer__top {
    left: 50%;
  }
}

.site-footer__top:hover {
  background: #8b263e;
  box-shadow: 0 8px 18px rgba(139, 38, 62, 0.4);
  transform: translate(-50%, calc(-50% - 2px));
}

.site-footer__top:active {
  background: #731e33;
  box-shadow: 0 2px 6px rgba(139, 38, 62, 0.3);
  transform: translate(-50%, -50%);
}

@media (max-width: 600px) {
  .site-footer {
    padding: 36px 0 24px 0;
  }

  .site-footer__container {
    padding: 0 16px;
  }

  .site-footer__main {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    padding-bottom: 24px;
  }

  .site-footer__logo-img {
    height: 48px;
  }

  .site-footer__contact-link {
    overflow-wrap: anywhere;
  }

  .site-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 20px;
  }

  .site-footer__external-links {
    gap: 10px 16px;
  }
}

/* ---- Product (Home/category.latte — live product listing) ---- */
/* heading "Parent - Child" and the one-line description above the products, same look as .search-results__header */
.category-page__header {
  margin-bottom: 8px;
}

.category-page__header h1 {
  font-size: 1.6rem;
  color: #1b4332;
  margin-bottom: 6px;
}

.category-page__description {
  color: #6b7280;
  font-size: 0.95rem;
}

.category-page__description p {
  margin: 0 0 0.4em;
}

.category-page__description > :last-child {
  margin-bottom: 0;
}

/* a main category: one section per subcategory, its heading links to the subcategory */
.category-page__group {
  margin-top: 32px;
}

.category-page__group-title {
  font-size: 1.25rem;
  margin: 0;
}

.category-page__group-title a {
  color: #1b4332;
  text-decoration: none;
}

.category-page__group-title a:hover {
  color: #8b263e;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 20px;
}

.product-card {
  position: relative;
  background: linear-gradient(170deg, #f2eee2 0%, #f2eee2 45%, #ebe6d6 100%);
  border: 1px solid #d8d1bc;
  border-radius: 22px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 6px 18px rgba(60, 56, 36, 0.07);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

/* accent strip along the top edge, grows on hover */
.product-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  right: 22px;
  height: 4px;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(135deg, #a3a27f 0%, #6f6e4f 100%);
  transform: scaleX(0.25);
  transition: transform 0.3s ease;
  z-index: 3;
}

.product-card:hover::before {
  transform: scaleX(1);
}

.product-card:hover {
  transform: translateY(-6px);
  border-color: #a3a27f;
  box-shadow: 0 22px 40px -10px rgba(60, 56, 36, 0.32), 0 8px 16px -6px rgba(60, 56, 36, 0.12);
}

.product-card__image-wrap {
  position: relative;
  width: 100%;
  height: 240px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(160deg, #ebe6d6 0%, #ddd6c0 100%);
}

.product-card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #524545;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  z-index: 2;
}

/* (i) "Ilustrativní obrázek" (products.illustrative_image), bottom right: on a phone the modal's close button takes the top right */
.product-card__illustrative {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #524545;
  font-size: 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  cursor: help;
}

.product-card__illustrative[hidden] {
  display: none;
}

.product-card__image {
  display: block;
  width: 100%;
  height: 100%;
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

/* More pictures of a product (Home/productGrid.latte, initProductGallery() in script.js):
   arrows show on hover / keyboard focus, always on touch screens */
.product-card__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: #111827;
  font-size: 1.1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 0.2s, background 0.2s;
}

.product-card__nav--prev { left: 10px; }
.product-card__nav--next { right: 10px; }

.product-card:hover .product-card__nav,
.product-card__nav:focus-visible {
  opacity: 1;
}

.product-card__nav:hover {
  background: #ffffff;
  color: #6b5c5c;
}

@media (hover: none) {
  .product-card__nav { opacity: 1; }
}

/* Picture dots (renderGalleryDots() in script.js): every dot has a fixed 14px slot,
   the track slides by whole slots so at most --dots-visible are seen */
.gallery-dots {
  --dot-slot: 14px;
  position: absolute;
  bottom: 10px;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  width: calc(var(--dots-visible, 5) * var(--dot-slot));
  box-sizing: content-box;
  padding: 5px 6px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.35);
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* only while the pointer is over the picture; always on touch screens, like the arrows */
.product-card__image-wrap:hover .gallery-dots,
.product-modal__media:hover .gallery-dots,
.gallery-dots:focus-within {
  opacity: 1;
}

@media (hover: none) {
  .gallery-dots { opacity: 1; }
}

.gallery-dots[hidden] {
  display: none;
}

.gallery-dots__track {
  display: flex;
  transform: translateX(calc(var(--dots-start, 0) * var(--dot-slot) * -1));
  transition: transform 0.25s ease;
}

.gallery-dots__dot {
  flex: 0 0 var(--dot-slot);
  height: 6px;
  padding: 0;
  border: none;
  background: none;
  display: flex;
  justify-content: center;
}

.gallery-dots__dot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.55);
  transition: width 0.25s ease, background 0.25s ease, transform 0.25s ease, opacity 0.25s ease;
}

.gallery-dots__dot.is-active::before {
  width: 12px;
  background: #ffffff;
}

.gallery-dots__dot.is-edge::before {
  transform: scale(0.6);
}

.gallery-dots__dot.is-out::before {
  opacity: 0;
}

button.gallery-dots__dot {
  cursor: pointer;
}

button.gallery-dots__dot:hover::before {
  background: #ffffff;
}

button.gallery-dots__dot:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 1px;
  border-radius: 999px;
}

/* clickable in the modal: a taller hit area than the 6px dot */
.product-modal .gallery-dots {
  padding: 2px 6px;
}

.product-modal .gallery-dots__dot {
  height: 16px;
  align-items: center;
}

.product-card__info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 14px 4px 2px;
}

.product-card__info h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  line-height: 1.35;
}

.product-card__info h3 a {
  text-decoration: none;
  color: #111827;
}

.product-card__info h3 a:hover {
  color: #6b5c5c;
}

.product-card__description {
  font-size: 0.88rem;
  color: #43464b;
  line-height: 1.45;
  margin-bottom: 16px;
  min-height: 76px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* A product with colour variants: one description line less for their row, so the card keeps
   its height (3 lines + 7px + 22px row + 7px = 4 lines + 16px) */
.product-card__description--with-variants {
  -webkit-line-clamp: 3;
  min-height: 56px;
  margin-bottom: 7px;
}

/* ---- Colour variants (productGrid.latte, initColorVariants() in script.js) ----
   circles as tall as the price digits, the picked one has a ring; the admin's text only on hover */
.product-variants {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 22px;
  margin-bottom: 7px;
  padding-left: 5px;
}

.product-variants__swatch {
  position: relative;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(17, 24, 39, 0.3);
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.product-variants__swatch:hover {
  transform: scale(1.1);
}

/* ring with a gap, on the card's and the modal's background alike */
.product-variants__swatch--selected {
  outline: 3px solid #8b263e;
  outline-offset: 2px;
}

.product-variants__swatch:focus-visible {
  box-shadow: 0 0 0 8px rgba(139, 38, 62, 0.25);
}

/* the admin's text above the circle on hover */
.product-variants__swatch::after {
  content: attr(data-label);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  z-index: 4;
  transform: translateX(-50%);
  padding: 4px 9px;
  border-radius: 6px;
  background: #111827;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
}

.product-variants__swatch:hover::after,
.product-variants__swatch:focus-visible::after {
  opacity: 1;
  visibility: visible;
}

.product-variants__swatch[data-label=""]::after {
  display: none;
}

.product-modal__variants[hidden] {
  display: none;
}

/* detail modal: under the description, above the dashed line next to the picture;
   the hover text goes up over the description */
.product-modal__variants {
  flex-shrink: 0;
  margin-top: auto;
  padding-top: 14px;
}

.product-modal__variants .product-variants {
  margin: 0;
}

.product-card__pricing {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px dashed #d9d0d0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}

.product-card__price-label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #43464b;
}

.product-card__price-value {
  font-weight: 800;
  font-size: 1.35rem;
  color: #524545;
  letter-spacing: -0.02em;
}

.product-card__actions {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 10px;
}

.product-card__qty-stepper {
  display: flex;
  align-items: center;
  background: #e4dfca;
  border: 1px solid #d9d0d0;
  border-radius: 12px;
  padding: 3px;
}

.product-card__qty-stepper button {
  width: 28px;
  height: 32px;
  border: none;
  background: #f2eee2;
  border-radius: 9px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  color: #374151;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.15s;
}

.product-card__qty-stepper button:hover {
  background: #e4dfca;
  color: #6b5c5c;
}

.product-card__qty-stepper input {
  width: 100%;
  border: none;
  background: transparent;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #111827;
  -moz-appearance: textfield;
}

.product-card__qty-stepper input::-webkit-outer-spin-button,
.product-card__qty-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.product-card__add-btn {
  background: #a8324f;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(139, 38, 62, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}

/* hover: brighter, lifted, wine-coloured glow; pressed: darker and back down */
.product-card__add-btn:hover {
  background: #8b263e;
  box-shadow: 0 8px 18px rgba(139, 38, 62, 0.4);
  transform: translateY(-2px);
}

.product-card__add-btn:active {
  background: #731e33;
  box-shadow: 0 2px 6px rgba(139, 38, 62, 0.3);
  transform: translateY(0);
}

/* Unavailable product (products.is_unavailable = 1): still listed, but the
   image is greyed out with a red "Nedostupné" tag in the middle and the
   cart controls are inert (see Home/productGrid.latte). */
.product-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(156, 163, 175, 0.55);
  pointer-events: none;
}

.product-card__overlay-label {
  background: #ffffff;
  color: #dc2626;
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 16px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.product-card--unavailable .product-card__image img {
  filter: grayscale(1);
}

.product-card--unavailable:hover .product-card__image img {
  transform: none;
}

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

.product-card__add-btn:disabled,
.product-card__add-btn:disabled:hover {
  background: #d1d5db;
  color: #6b7280;
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
}

/* the whole card opens the detail modal (initProductModal() in script.js) */
.product-card {
  cursor: pointer;
}

.product-card:focus-visible {
  outline: 2px solid #8b263e;
  outline-offset: 3px;
}

/* ---- Product detail modal (productModal.latte, initProductModal() in script.js) ----
   Always the same size: a long name is cut after two lines, a long price after one,
   the description scrolls inside its own box. */
.modal.product-modal {
  z-index: 1200;
}

.product-modal-open {
  overflow: hidden;
}

/* parts filled in or not by JS are toggled with the hidden attribute */
.product-modal [hidden] {
  display: none !important;
}

.product-modal .product-modal__content {
  width: min(920px, calc(100vw - 32px));
  max-width: none;
  height: min(560px, calc(100vh - 32px));
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: minmax(0, 1fr) auto;
  grid-template-areas:
    "media info"
    ". buy";
  overflow: hidden;
  border-radius: 22px;
  box-sizing: border-box;
}

.product-modal .product-modal__close {
  z-index: 4;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e4dfca;
  color: #374151;
  font-size: 24px;
  line-height: 1;
  transition: background-color 0.2s, color 0.2s;
}

.product-modal .product-modal__close:hover {
  background: #8b263e;
  color: #ffffff;
}

.product-modal__media {
  position: relative;
  min-height: 0;
  grid-area: media;
  /* ends just above the dashed line, which runs under it too */
  margin: 16px 0 14px 16px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(160deg, #ebe6d6 0%, #ddd6c0 100%);
}

.product-modal__image {
  width: 100%;
  height: 100%;
}

.product-modal__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-modal .product-card__nav {
  opacity: 1;
}

.product-modal__info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  grid-area: info;
  padding: 32px 28px 16px;
}

.product-modal__title {
  max-height: 2.6em;
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  color: #111827;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.product-modal .product-modal__pricing {
  flex-shrink: 0;
  gap: 12px;
  margin: 0 0 14px;
  padding: 14px 0 0;
  border-top: 1px dashed #d9d0d0;
  border-bottom: none;
}

.product-modal__pricing .product-card__price-label,
.product-modal__pricing .product-card__price-value {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-modal__pricing .product-card__price-label {
  flex-shrink: 0;
  max-width: 45%;
}

.product-modal__pricing .product-card__price-value {
  font-size: 1.6rem;
}

/* room for two lines of name and the tag, the same for every product */
.product-modal__head {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: calc(2 * 1.3 * 1.5rem + 8px + 1.7rem);
  margin: 0 44px 16px 0;
}

/* the product's category as a tag under the name */
.product-modal__category {
  flex-shrink: 0;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 4px 12px;
  border-radius: 20px;
  background: #fdf2f4;
  color: #8b263e;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-modal__category span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-modal__subtitle {
  flex-shrink: 0;
  margin: 0 0 8px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #5f7f7a;
}

.product-modal__empty {
  flex-shrink: 0;
  margin: 0;
  font-size: 0.95rem;
  font-style: italic;
  color: #6b7280;
}

.product-modal__description {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 8px;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #374151;
  overflow-wrap: anywhere;
}

/* The description is the admin's Markdown (headings, lists, links...) */
.product-modal__description > :first-child {
  margin-top: 0;
}

.product-modal__description > :last-child {
  margin-bottom: 0;
}

.product-modal__description h1,
.product-modal__description h2,
.product-modal__description h3,
.product-modal__description h4 {
  color: #8b263e;
  line-height: 1.3;
  margin: 18px 0 8px;
  text-align: left;
}

.product-modal__description h1 { font-size: 1.3rem; }
.product-modal__description h2 { font-size: 1.15rem; }
.product-modal__description h3 { font-size: 1.05rem; }
.product-modal__description h4 { font-size: 0.95rem; }

.product-modal__description p,
.product-modal__description ul,
.product-modal__description ol,
.product-modal__description blockquote {
  margin: 0 0 10px;
}

.product-modal__description ul,
.product-modal__description ol {
  padding-left: 22px;
}

.product-modal__description li {
  margin-bottom: 2px;
}

.product-modal__description blockquote {
  padding: 6px 12px;
  border-left: 4px solid #cbd5e1;
  color: #475569;
}

.product-modal__description hr {
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 16px 0;
}

.product-modal__description a {
  color: #8b263e;
  text-decoration: underline;
}

.product-modal__buy {
  grid-area: buy;
  min-width: 0;
  padding: 0 28px 24px;
}

/* the dashed line above the price runs across the whole modal, under the picture too */
.product-modal .product-modal__content::after {
  content: "";
  grid-row: 2;
  grid-column: 1 / -1;
  align-self: start;
  margin: 0 28px 0 16px;
  border-top: 1px dashed #d9d0d0;
}

.product-modal .product-modal__buy .product-modal__pricing {
  border-top-color: transparent;
}

.product-modal__actions {
  flex-shrink: 0;
  margin-top: 0;
}

@media (max-width: 700px) {
  .product-modal .product-modal__content {
    grid-template-columns: 1fr;
    grid-template-rows: 220px minmax(0, 1fr) auto;
    grid-template-areas:
      "media"
      "info"
      "buy";
    /* on a phone always the same height too; a long description scrolls inside its box */
    height: min(640px, calc(100vh - 32px));
  }

  .product-modal__media {
    margin: 12px 12px 0;
  }

  .product-modal__info {
    padding: 18px 18px 12px;
  }

  .product-modal__head {
    height: auto;
    margin: 0 0 14px;
  }

  .product-modal__buy {
    padding: 0 18px 16px;
  }

  .product-modal .product-modal__close {
    top: 18px;
    right: 17px;
  }

  /* on a phone the picture is on top, the line stays only above the price */
  .product-modal .product-modal__content::after {
    display: none;
  }

  .product-modal .product-modal__buy .product-modal__pricing {
    border-top-color: #d9d0d0;
  }

  .product-modal__title {
    margin-right: 0;
    font-size: 1.2rem;
  }

  .product-modal__pricing .product-card__price-value {
    font-size: 1.35rem;
  }
}

/* ---- Search results (Home/search.latte) ---- */
.search-results__header {
  margin-bottom: 8px;
}

.search-results__header h1 {
  font-size: 1.6rem;
  color: #1b4332;
  margin-bottom: 6px;
}

.search-results__count {
  color: #6b7280;
  font-size: 0.9rem;
}

.search-results__hint,
.search-results__empty {
  color: #6b7280;
  font-size: 0.95rem;
  padding: 20px 0;
}

/* ---- Login (UserControl/login.latte — public storefront login) ---- */
.login-wrapper {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-box {
    width: 100%;
    max-width: 400px;
    background: #f2eee2;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.login-box h1 {
    margin: 0 0 4px;
    font-size: 24px;
    color: #111827;
}

.login-box .subtitle {
    margin: 0 0 24px;
    color: #6b7280;
    font-size: 14px;
}

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.field input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
    box-sizing: border-box;
}

.field input:focus {
    outline: none;
    border-color: #8b263e;
}

.btn-submit {
    width: 100%;
    padding: 12px;
    background: #8b263e;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.btn-submit:hover {
    background: #731e32;
}

/* Grey "*" after a label = required field (explained by .login-box__note) */
.field__required {
    color: #9ca3af;
    font-weight: 400;
}

/* Consent checkbox on registration (UserControl/@privacyConsent.latte) */
.consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: #374151;
    line-height: 1.45;
    cursor: pointer;
}

.field .consent__input {
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    padding: 0;
    flex-shrink: 0;
    accent-color: #8b263e;
    cursor: pointer;
}

/* One-line checkbox (settings: name-day greetings): box centred on the text.
   .field label would make it display: block, hence the .field prefix */
.field .consent--inline {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

.field .consent--inline .consent__input {
    margin: 0;
}

.consent--inline .consent__text {
    line-height: 18px;
}

.btn-submit:disabled {
    background: #c4a3ab;
    cursor: not-allowed;
}

/* "Zásady zpracování osobních údajů" under the consent checkbox */
.consent__link {
    display: inline-flex;
    gap: 5px;
    margin: 4px 0 0 28px;
    font-size: 13px;
    color: var(--primary-color);
}

.consent__link i {
    font-size: 11px;
}

/* Privacy notice under the "Dokončit objednávku" bar */
.checkout-privacy {
    margin-top: 10px;
    font-size: 13px;
    color: #6b7280;
    text-align: right;
}

.checkout-privacy a {
    color: inherit;
    text-decoration: underline;
}

.login-box__note {
    margin: 12px 0 0;
    text-align: center;
    font-size: 0.82rem;
    color: #6b7280;
}

.field__error {
    display: block;
    margin-top: 6px;
    font-size: 0.82rem;
    color: #dc2626;
    font-weight: 500;
}

/* Control that failed validation (set by initInlineFormErrors() in script.js);
   !important so it wins over the many per-form :focus border colours */
input.is-invalid,
select.is-invalid,
textarea.is-invalid,
.flag-select__button.is-invalid {
    border-color: #dc2626 !important;
    background-color: #fef2f2;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

input[type="checkbox"].is-invalid,
input[type="radio"].is-invalid {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
}

/* "?" help icon next to a label; tooltip shows on hover / keyboard focus.
   The tooltip is positioned against the surrounding .field (not the icon)
   so it always spans the field width and can't overflow the box on mobile. */
.login-box .field {
    position: relative;
}

.field__label-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.field__label-row label {
    margin-bottom: 0;
}

.field__help {
    display: inline-flex;
    color: #6b7280;
    font-size: 15px;
    line-height: 1;
    cursor: help;
}

.field__help:hover,
.field__help:focus {
    color: #8b263e;
    outline: none;
}

.field__tooltip {
    display: none;
    position: absolute;
    top: 30px;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 10px 12px;
    background: #1f2937;
    color: #fff;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 400;
    line-height: 1.4;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.field__help:hover .field__tooltip,
.field__help:focus .field__tooltip {
    display: block;
}

/* Password input with the show/hide "eye" button inside its right edge */
.field__input-wrap {
    position: relative;
}

.field__input-wrap input {
    padding-right: 46px;
}

.field__toggle {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 0 10px 10px 0;
    color: #6b7280;
    font-size: 18px;
    cursor: pointer;
}

.field__toggle:hover,
.field__toggle:focus-visible {
    color: #8b263e;
    outline: none;
}

/* Password strength meter + requirement checklist (register.latte).
   Level classes (pw-strength--weak ... --very-strong) are set by
   initPasswordStrength() in script.js and only recolor the bar/label. */
.pw-strength {
    margin-top: 10px;
    --pw-color: #dc2626;
}

.pw-strength--weak { --pw-color: #dc2626; }
.pw-strength--fair { --pw-color: #f59e0b; }
.pw-strength--good { --pw-color: #84cc16; }
.pw-strength--strong { --pw-color: #16a34a; }
.pw-strength--very-strong { --pw-color: #15803d; }

.pw-strength__head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pw-strength__track {
    flex: 1;
    height: 6px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
}

.pw-strength__fill {
    width: 0;
    height: 100%;
    background: var(--pw-color);
    border-radius: 999px;
    transition: width 0.25s ease, background-color 0.25s ease;
}

.pw-strength__label {
    min-width: 84px;
    text-align: right;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--pw-color);
}

.pw-strength__rules {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
}

.pw-strength__rule {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: #6b7280;
}

.pw-strength__rule--met {
    color: #16a34a;
}

/* Registration variant: wider box, grouped sections, side-by-side fields */
.login-box--wide {
    max-width: 520px;
}

.login-box__section {
    margin: 26px 0 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 15px;
    font-weight: 700;
    color: #8b263e;
}

.login-box__section:first-of-type {
    margin-top: 0;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 12px;
}

.field-row--city {
    grid-template-columns: 2fr 1fr;
}

/* Phone: prefix select + number; the .field around it supplies the bottom margin */
.field-row--phone {
    grid-template-columns: 160px 1fr;
    gap: 12px;
}

/* Small flag image (files in assets/flags/, MIT-licensed set from flag-icons).
   Class is flag--<data-flag>, built by initFlagSelect() in script.js. */
.flag {
    display: inline-block;
    flex-shrink: 0;
    width: 20px;
    height: 15px;
    border-radius: 2px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.flag--cz { background-image: url('../flags/cz.svg'); }
.flag--sk { background-image: url('../flags/sk.svg'); }
.flag--pl { background-image: url('../flags/pl.svg'); }
.flag--de { background-image: url('../flags/de.svg'); }
.flag--at { background-image: url('../flags/at.svg'); }
.flag--hu { background-image: url('../flags/hu.svg'); }
.flag--gb { background-image: url('../flags/gb.svg'); }
.flag--fr { background-image: url('../flags/fr.svg'); }
.flag--it { background-image: url('../flags/it.svg'); }
.flag--us { background-image: url('../flags/us.svg'); }

/* Dropdown with flags that replaces the phone prefix <select> */
.flag-select {
    position: relative;
}

.flag-select__button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 10px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    color: inherit;
    font: inherit;
    font-size: 15px;
    text-align: left;
    box-sizing: border-box;
    cursor: pointer;
}

.flag-select__button:focus-visible,
.flag-select__button[aria-expanded="true"] {
    outline: none;
    border-color: #8b263e;
}

.flag-select__button .bi {
    margin-left: auto;
    font-size: 12px;
    color: #6b7280;
}

.flag-select__list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 100%;
    z-index: 20;
    margin: 0;
    padding: 4px;
    list-style: none;
    max-height: 380px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    box-sizing: border-box;
}

.flag-select__option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
}

.flag-select__option--active {
    background: #f3f4f6;
}

.flag-select__option[aria-selected="true"] {
    font-weight: 600;
    color: #8b263e;
}

.login-box .field select {
    width: 100%;
    padding: 12px 10px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    background: #fff;
    font-size: 15px;
    box-sizing: border-box;
}

.login-box .field select:focus {
    outline: none;
    border-color: #8b263e;
}

@media (max-width: 480px) {
    .field-row {
        grid-template-columns: 1fr;
    }

    .field-row--phone {
        gap: 8px;
    }
}

.login-box__switch {
    margin: 20px 0 0;
    text-align: center;
    font-size: 14px;
    color: #6b7280;
}

.login-box__switch a {
    color: #8b263e;
    font-weight: 600;
    text-decoration: none;
}

/* ---- Social login (UserControl/@socialLogin.latte, googleRegister.latte) ----
   Light divider with a caption, then round icon buttons. */
.social-login {
    margin-top: 24px;
}

/* Above the registration form: icons first, divider under them */
.social-login--top {
    margin: 0 0 8px;
}

.social-login--top .social-login__buttons {
    margin: 0 0 16px;
}

.social-login__divider {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #9ca3af;
}

.social-login__divider::before,
.social-login__divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.social-login__buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 16px;
}

.social-login__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.social-login__btn:hover,
.social-login__btn:focus-visible {
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.social-login__btn--disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.social-login__btn--disabled:hover {
    border-color: #e5e7eb;
    box-shadow: none;
}

.social-login__icon {
    width: 22px;
    height: 22px;
    font-size: 22px;
    line-height: 1;
}

.social-login__icon--facebook {
    color: #1877f2;
}

/* "Google account: x@gmail.com" box above the Google registration form */
.social-login__account {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ebe6d6;
    font-size: 14px;
    color: #374151;
    overflow-wrap: anywhere;
}

/* ---- Account settings (UserControl/settings.latte) ----
   Reuses the .login-box / .field / .pw-strength markup of the registration
   form; only the hint under a section title and the "delete account" block
   are new. */
.login-box__hint {
    margin: -6px 0 14px;
    font-size: 0.85rem;
    color: #6b7280;
}

.danger-zone {
    margin-top: 32px;
    padding: 18px 20px;
    border: 1px solid #fecaca;
    border-radius: 12px;
    background: #fef2f2;
}

.danger-zone__title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
    color: #b91c1c;
}

.danger-zone__text {
    margin: 0 0 14px;
    font-size: 0.88rem;
    color: #7f1d1d;
}

.danger-zone__btn {
    padding: 10px 18px;
    background: #fff;
    color: #b91c1c;
    border: 1px solid #dc2626;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.danger-zone__btn:hover {
    background: #dc2626;
    color: #fff;
}

/* ---- Modals — Formular (Formular/default.latte + MujFormular) ---- */
.modal {
    display: none;

    position: fixed;
    inset: 0;

    background: rgba(0, 0, 0, 0.5);

    align-items: center;
    justify-content: center;

    z-index: 1000;
}

.modal.is-open {
    display: flex;
}

.modal-content {
    position: relative;

    width: 500px;
    max-width: calc(100vw - 40px);

    padding: 30px;

    background: #f2eee2;
    border-radius: 12px;

    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.close-form {
    position: absolute;

    top: 10px;
    right: 15px;

    border: 0;
    background: none;

    font-size: 28px;
    cursor: pointer;
}

.open-form {
    padding: 10px 20px;
    cursor: pointer;
}

/* ---- "Zapomněli jste heslo?" (UserControl/login.latte, initPasswordResetModal()) ---- */
.field__forgot {
    display: inline-block;
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: none;
    color: #8b263e;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.field__forgot:hover {
    text-decoration: underline;
}

.forgot-modal__content {
    width: 440px;
}

.forgot-modal h2 {
    margin: 0 0 12px;
    font-size: 22px;
    color: #111827;
}

.forgot-modal__text {
    margin: 0 0 18px;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.5;
}

.forgot-modal__text .bi {
    color: #16a34a;
    margin-right: 4px;
}

.forgot-modal__email {
    margin: -10px 0 14px;
    font-weight: 600;
    color: #111827;
    overflow-wrap: anywhere;
}

.forgot-modal__hint {
    margin: 0 0 18px;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.5;
}

.forgot-modal .field__error {
    margin: 0 0 10px;
}

.forgot-modal .field .field__error {
    margin: 6px 0 0;
}

.forgot-modal__other {
    display: block;
    margin: 14px auto 0;
    padding: 0;
    border: 0;
    background: none;
    color: #6b7280;
    font-size: 13px;
    cursor: pointer;
}

.forgot-modal__other:hover {
    color: #111827;
    text-decoration: underline;
}

/* .field__error and the form steps are toggled with the hidden attribute */
.forgot-modal [hidden] {
    display: none;
}

/* ---- Cart / Checkout (Cart/*.latte) ----
   default.latte, shipping.latte, payment.latte and confirmation.latte
   originally each carried their own copy of this shared checkout chrome
   (identical values) — consolidated into one definition per class here.
   .checkout-form scopes the shipping-step address fields so they don't
   collide with any other page's .form-group/.form-control. */
.checkout-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 10px 0 40px;
}

.checkout-page--narrow {
    max-width: 700px;
}

.checkout-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 24px 0;
    color: #111827;
}

/* Step indicator (Cart/steps.latte) */
.checkout-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0 0 32px 0;
    flex-wrap: wrap;
}

.checkout-step {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #9ca3af;
    font-weight: 600;
    font-size: 0.9rem;
}

.checkout-step__number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e4dfca;
    color: #9ca3af;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.checkout-step--active {
    color: #111827;
}

.checkout-step--active .checkout-step__number {
    background: #8b263e;
    color: #ffffff;
}

.checkout-step--done .checkout-step__number {
    background: #2d6a4f;
    color: #ffffff;
}

.checkout-step__sep {
    width: 32px;
    height: 2px;
    background: #e5e7eb;
}

/* Step 1: Cart */
.cart-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.cart-empty i {
    font-size: 3rem;
    color: #d1d5db;
}

.cart-empty p {
    margin: 12px 0 20px 0;
    font-size: 1.05rem;
}

.btn-secondary-cart {
    display: inline-block;
    background: #1f2937;
    color: #fff;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-item {
    display: grid;
    grid-template-columns: 64px 1fr auto auto auto auto;
    align-items: center;
    gap: 16px;
    background: #f2eee2;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 16px;
}

.cart-item--unavailable {
    border-color: #fecaca;
    background: #fef2f2;
}

.cart-item__image img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    background: #e4dfca;
}

.cart-item__info h3 {
    margin: 0 0 4px 0;
    font-size: 1rem;
}

/* circle of the picked colour variant before the name */
.cart-item__variant {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 4px;
    border: 1px solid rgba(17, 24, 39, 0.25);
    border-radius: 50%;
    vertical-align: middle;
}

.cart-item__desc {
    margin: 0;
    font-size: 0.82rem;
    color: #6b7280;
}

.cart-item__badge {
    display: inline-block;
    margin-top: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #b91c1c;
}

.cart-item__qty {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #e4dfca;
    border-radius: 8px;
    padding: 4px 8px;
}

.cart-item__qty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #f2eee2;
    color: #374151;
    text-decoration: none;
    font-weight: 700;
}

.cart-item__qty-btn:hover {
    background: #8b263e;
    color: #fff;
}

.cart-item__qty-value {
    min-width: 18px;
    text-align: center;
    font-weight: 700;
}

.cart-item__price {
    color: #6b7280;
    font-size: 0.9rem;
    white-space: nowrap;
}

.cart-item__subtotal {
    font-weight: 700;
    color: #8b263e;
    white-space: nowrap;
}

.cart-item__remove {
    color: #9ca3af;
    text-decoration: none;
    font-size: 1.1rem;
}

.cart-item__remove:hover {
    color: #b91c1c;
}

.cart-warning {
    margin-top: 16px;
    padding: 12px 16px;
    background: #fef2f2;
    color: #b91c1c;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Shared totals bar / buttons (steps 1-3) */
.checkout-totals-bar {
    position: sticky;
    bottom: 0;
    margin-top: 24px;
    background: #f2eee2;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.04);
}

.checkout-totals-bar__total {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 1rem;
    color: #374151;
}

.checkout-totals-bar__total strong {
    font-size: 1.4rem;
    color: #111827;
}

.btn-back-cart {
    color: #6b7280;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-primary-cart {
    display: inline-block;
    background: #8b263e;
    color: #fff;
    text-decoration: none;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary-cart:hover {
    background: #731e33;
}

.btn-primary-cart--disabled {
    background: #d1d5db;
    color: #6b7280;
    cursor: not-allowed;
}

/* Shared card / form chrome (steps 2-3) */
.checkout-card {
    background: #f2eee2;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.checkout-card h2 {
    font-size: 1.05rem;
    margin: 0 0 16px 0;
}

.shipping-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shipping-option {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 14px;
    cursor: pointer;
    font-weight: 500;
}

.shipping-option:has(input:checked) {
    border-color: #8b263e;
    background: #fdf2f4;
}

/* Nothing picked (initInlineFormErrors() in script.js / server-side error): every row red, as other invalid fields */
.shipping-options.is-invalid .shipping-option {
    border-color: #dc2626;
    background-color: #fef2f2;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

/* Pickup point (Zásilkovna/Balíkovna map) — Cart/shipping.latte + pickup-point.js */
.pickup-point {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.pickup-point[hidden] {
    display: none;
}

.pickup-point .btn-secondary-cart {
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.pickup-point .btn-secondary-cart:disabled {
    background: #d1d5db;
    color: #6b7280;
    cursor: not-allowed;
}

.pickup-point__selected {
    display: flex;
    gap: 10px;
    margin: 0;
    padding: 10px 14px;
    border-radius: 8px;
    background: #ebe6d6;
    font-size: 0.9rem;
    color: #4b5563;
}

.pickup-point__selected .bi {
    color: #8b263e;
}

.pickup-point__unavailable {
    margin: 0;
    font-size: 0.88rem;
    color: #92400e;
}

.pickup-point__selected[hidden],
.pickup-point__unavailable[hidden] {
    display: none;
}

.pickup-point-modal__content {
    width: 1000px;
    height: 85vh;
    padding: 44px 0 0 0;
    overflow: hidden;
}

.pickup-point-modal__frame {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.checkout-form .field-error {
    color: #dc2626;
    font-size: 0.82rem;
    font-weight: 500;
}

.checkout-form .form-errors {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
}

/* Step 2: shipping/address form */
.checkout-form .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.checkout-form .col-full { grid-column: span 2; }
.checkout-form .col-half { grid-column: span 1; }

.checkout-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.checkout-form .form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.checkout-form .form-control {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 0.95rem;
}

.checkout-form .form-control:focus {
    outline: 2px solid #8b263e;
    border-color: transparent;
}

/* Earlier addresses of a logged-in customer (shipping.latte) */
.checkout-form .saved-address-picker {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px dashed #e5e7eb;
}

/* Steps 3-4: order summary (payment.latte + confirmation.latte) */
.summary-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.92rem;
    color: #374151;
}

.summary-item__qty {
    color: #9ca3af;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    color: #374151;
    font-size: 0.92rem;
}

.summary-row--total {
    border-top: 1px solid #e5e7eb;
    margin-top: 8px;
    padding-top: 12px;
    font-weight: 700;
    font-size: 1.15rem;
    color: #111827;
}

.summary-address {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
    font-size: 0.9rem;
    color: #4b5563;
}

.summary-address strong {
    display: block;
    margin-bottom: 6px;
    color: #111827;
}

/* Step 4: confirmation */
.confirmation-box {
    text-align: center;
    padding: 32px 20px;
}

.confirmation-icon {
    font-size: 3.5rem;
    color: #16a34a;
}

.confirmation-box h1 {
    font-size: 1.6rem;
    margin: 12px 0 20px 0;
    color: #111827;
}

.confirmation-number, .confirmation-total {
    font-size: 1rem;
    color: #374151;
    margin: 4px 0;
}

.confirmation-actions {
    text-align: center;
    margin-top: 24px;
}

/* Confetti over the whole window, one burst on page load. Colours and timing
   copy the .howto-confetti demo on the "Jak nakupovat" page. */
.order-confetti {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1200;
}

.order-confetti span {
    position: absolute;
    top: 0;
    left: var(--cx);
    width: 12px;
    height: 22px;
    border-radius: 3px;
    background: var(--c);
    opacity: 0;
    animation: order-confetti 3.2s cubic-bezier(0.3, 0.6, 0.6, 1) var(--d) both;
}

.order-confetti span:nth-child(1)  { --cx: 4%;  --c: #8b263e; --d: 0.3s;  --r: 420deg;  --dx: 6vw; }
.order-confetti span:nth-child(2)  { --cx: 11%; --c: #2d6a4f; --d: 0.7s;  --r: -300deg; --dx: -4vw; }
.order-confetti span:nth-child(3)  { --cx: 18%; --c: #f59e0b; --d: 0.45s; --r: 520deg;  --dx: 4vw; }
.order-confetti span:nth-child(4)  { --cx: 25%; --c: #c89b6d; --d: 1s;    --r: -460deg; --dx: -6vw; }
.order-confetti span:nth-child(5)  { --cx: 32%; --c: #3b82f6; --d: 0.35s; --r: 380deg;  --dx: 2vw; }
.order-confetti span:nth-child(6)  { --cx: 39%; --c: #8b263e; --d: 0.85s; --r: -540deg; --dx: -3vw; }
.order-confetti span:nth-child(7)  { --cx: 46%; --c: #2d6a4f; --d: 0.5s;  --r: 300deg;  --dx: 5vw; }
.order-confetti span:nth-child(8)  { --cx: 53%; --c: #f59e0b; --d: 1.2s;  --r: -400deg; --dx: -4vw; }
.order-confetti span:nth-child(9)  { --cx: 60%; --c: #c89b6d; --d: 0.4s;  --r: 480deg;  --dx: 6vw; }
.order-confetti span:nth-child(10) { --cx: 67%; --c: #3b82f6; --d: 0.95s; --r: -360deg; --dx: -2vw; }
.order-confetti span:nth-child(11) { --cx: 74%; --c: #8b263e; --d: 0.6s;  --r: 440deg;  --dx: 4vw; }
.order-confetti span:nth-child(12) { --cx: 81%; --c: #2d6a4f; --d: 1.1s;  --r: -500deg; --dx: -6vw; }
.order-confetti span:nth-child(13) { --cx: 88%; --c: #f59e0b; --d: 0.55s; --r: 340deg;  --dx: 3vw; }
.order-confetti span:nth-child(14) { --cx: 95%; --c: #c89b6d; --d: 0.8s;  --r: -420deg; --dx: -5vw; }

@keyframes order-confetti {
    0% { opacity: 1; transform: translate(0, -30px) rotate(0deg); }
    85% { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--dx), 100vh) rotate(var(--r)); }
}

@media (prefers-reduced-motion: reduce) {
    .order-confetti {
        display: none;
    }
}

/* Step 2: files & note (Cart/files.latte) */
.checkout-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 0 16px 0;
    padding: 12px 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    color: #1e3a8a;
    font-size: 0.92rem;
}

.checkout-notice i {
    margin-top: 2px;
    color: #2563eb;
}

.checkout-notice p {
    margin: 0;
}

.checkout-hint {
    margin: 0 0 14px 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #6b7280;
}

.file-upload {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.file-upload__input {
    flex: 1 1 260px;
    min-width: 0;
    padding: 8px;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    background: #ebe6d6;
    font-family: inherit;
    font-size: 0.9rem;
}

.file-upload__button {
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
}

.file-upload__button:hover {
    background: #111827;
}

.file-upload__selected {
    margin: 8px 0 0 0;
    font-size: 0.85rem;
    color: #374151;
}

.checkout-form .field-errors {
    list-style: none;
    margin: 10px 0 0 0;
    padding: 0;
    color: #dc2626;
    font-size: 0.85rem;
    font-weight: 500;
}

.file-list__counter {
    margin: 16px 0 0 0;
    font-size: 0.85rem;
    color: #6b7280;
}

.file-list {
    list-style: none;
    margin: 10px 0 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-list__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ebe6d6;
}

.file-list__icon {
    color: #8b263e;
    font-size: 1.1rem;
}

.file-list__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.file-list__name {
    font-weight: 600;
    color: #111827;
    overflow-wrap: anywhere;
}

.file-list__meta {
    font-size: 0.8rem;
    color: #6b7280;
}

.file-list__remove {
    color: #9ca3af;
    text-decoration: none;
    font-size: 1.1rem;
}

.file-list__remove:hover {
    color: #b91c1c;
}

.checkout-card h2 label {
    font-weight: inherit;
}

.checkout-form .checkout-note {
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
}

.summary-files {
    list-style: none;
    margin: 0;
    padding: 0;
}

.summary-files li {
    margin: 2px 0;
    overflow-wrap: anywhere;
}

@media (max-width: 700px) {
    .cart-item {
        grid-template-columns: 56px 1fr auto;
        grid-template-areas:
            "image info remove"
            "qty qty price"
            "subtotal subtotal subtotal";
        row-gap: 10px;
    }
    .cart-item__image { grid-area: image; }
    .cart-item__info { grid-area: info; }
    .cart-item__remove { grid-area: remove; }
    .cart-item__qty { grid-area: qty; justify-self: start; }
    .cart-item__price { grid-area: price; justify-self: end; }
    .cart-item__subtotal { grid-area: subtotal; text-align: right; }

    .checkout-totals-bar {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        text-align: center;
    }

    /* col-full keeps span 2 from the desktop rule otherwise — that spawns an
       implicit 2nd column and pushes the whole page wider than the screen */
    .checkout-form .form-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .checkout-form .col-full,
    .checkout-form .col-half { grid-column: 1 / -1; }

    .checkout-form .form-group { min-width: 0; }
    .checkout-form .form-control {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        font-size: 1rem; /* 16px+ stops iOS from zooming in on focus */
    }

    .checkout-totals-bar__total { justify-content: center; }
    .checkout-totals-bar .btn-primary-cart { width: 100%; }
    .checkout-totals-bar .btn-back-cart { order: 3; }

    .pickup-point .btn-secondary-cart { width: 100%; text-align: center; }
    .pickup-point-modal__content { height: 80vh; }
}

@media (max-width: 500px) {
    .checkout-step__label { display: none; }
    .checkout-step__sep { width: 16px; }

    .checkout-page { padding-top: 0; }
    .checkout-steps { margin-bottom: 20px; }
    .checkout-title { font-size: 1.3rem; margin-bottom: 16px; }

    .checkout-card { padding: 14px; border-radius: 10px; }
    .checkout-card h2 { font-size: 1rem; margin-bottom: 12px; }

    .shipping-option { padding: 12px; gap: 10px; }
    .shipping-option input { flex-shrink: 0; margin: 0; }
    .shipping-option span { min-width: 0; overflow-wrap: anywhere; }

    .checkout-totals-bar { padding: 12px 14px; margin-top: 16px; }
}

/* ---- Order history detail (Order/detail.latte) ----
   Reuses the checkout card / summary classes above; only the header facts
   grid and the action row belong to this page. */
.order-detail-page .btn-back-cart {
    display: inline-block;
    margin-bottom: 12px;
}

.order-detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px 20px;
}

.order-detail-meta span {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
}

.order-detail-meta strong {
    display: block;
    font-size: 0.95rem;
    color: #111827;
}

.order-detail-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}

.order-detail-actions i {
    margin-right: 6px;
}

/* ---- Terms page (Terms/default.latte) ---- */
.terms-page {
  max-width: 860px;
  margin: 8px auto 48px;
  padding: 0 20px;
  color: #1f2937;
  line-height: 1.7;
}

.terms-page h1 {
  font-size: 2.4rem;
  line-height: 1.15;
  margin: 0 0 28px;
  text-align: center;
}

.terms-page__content {
  background: #f2eee2;
  border: 1px solid #efe4e7;
  border-radius: 16px;
  padding: 32px 36px;
}

.terms-page__content > :first-child {
  margin-top: 0;
}

.terms-page__content > :last-child {
  margin-bottom: 0;
}

.terms-page__content h1,
.terms-page__content h2,
.terms-page__content h3,
.terms-page__content h4 {
  color: #8b263e;
  line-height: 1.3;
  margin: 28px 0 12px;
  text-align: left;
}

.terms-page__content h1 { font-size: 1.6rem; }
.terms-page__content h2 { font-size: 1.35rem; }
.terms-page__content h3 { font-size: 1.15rem; }
.terms-page__content h4 { font-size: 1rem; }

.terms-page__content p,
.terms-page__content ul,
.terms-page__content ol,
.terms-page__content blockquote {
  margin: 0 0 14px;
}

.terms-page__content ul,
.terms-page__content ol {
  padding-left: 24px;
}

.terms-page__content li {
  margin-bottom: 4px;
}

.terms-page__content blockquote {
  padding: 8px 14px;
  border-left: 4px solid #cbd5e1;
  color: #475569;
}

.terms-page__content hr {
  border: 0;
  border-top: 1px solid #e2e8f0;
  margin: 24px 0;
}

.terms-page__content a {
  color: #8b263e;
}

.terms-page__empty {
  text-align: center;
  color: #6b7280;
}

@media (max-width: 600px) {
  .terms-page {
    padding: 0 16px;
  }

  .terms-page h1 {
    font-size: 1.8rem;
    margin-bottom: 20px;
  }

  .terms-page__content {
    padding: 20px 18px;
  }
}

/* ---- Contact page (ContactPage/default.latte) ----
   No own background bands: hero, cards and map sit on the site
   background as one surface, accented with the burgundy brand (as .howto). */
.contact-page{
    --contact-brand:#8b263e;
    --contact-brand-soft:#f7e9ed;
    --contact-border:#ddd6c0;
}

.contact-hero{
    color:#1f2937;
    text-align:center;
}

.contact-hero__content{
    max-width:1100px;
    margin:8px auto 0;
    padding:0 20px;
}

.contact-hero h1{
    font-size:2.8rem;
    margin:0;
    line-height:1.15;
}

/* short brand-coloured underline under the page title */
.contact-hero h1::after{
    content:"";
    display:block;
    width:56px;
    height:4px;
    margin:14px auto 0;
    border-radius:2px;
    background:var(--contact-brand);
}

.contact-hero p{
    max-width:620px;
    margin:0 auto;
    font-size:18px;
    line-height:1.7;
    color:#4b5563;
}

.contact-grid{
    max-width:1100px;
    margin:32px auto 0;
    display:grid;
    /* 3rd column (links) never shrinks below its unwrappable content */
    grid-template-columns:repeat(2,minmax(0,1fr)) minmax(min-content,1fr) minmax(0,1fr);
    gap:24px;
    padding:0 20px;
}

.contact-card{
    background:#f2eee2;
    padding:30px;
    border:1px solid var(--contact-border);
    border-radius:18px;
    box-shadow:0 8px 24px rgba(60,56,36,.10);
    text-align:center;
    transition:transform .2s ease, box-shadow .2s ease;
}

.contact-card:hover{
    transform:translateY(-3px);
    box-shadow:0 14px 32px rgba(60,56,36,.18);
}

.contact-card .icon{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:64px;
    height:64px;
    border-radius:50%;
    background:none;
    font-size:28px;
    color:var(--contact-brand);
    margin-bottom:15px;
}

.contact-card h3{
    margin:0 0 12px;
    color:#1f2937;
}

.contact-card p{
    color:#4b4a38;
    margin-bottom:12px;
}

.contact-card a{
    color:var(--contact-brand);
    font-weight:600;
    text-decoration:none;
}

.contact-card address{
    font-style:normal;
    font-weight:600;
    line-height:1.6;
}

.contact-card__links a{
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:8px;
    margin-bottom:6px;
    white-space:nowrap; /* e-mail / phone must never wrap onto a second line */
}

.contact-card__links a i{
    font-size:.95em;
    line-height:1;
}

.company-info__ids{
    margin:0;
}

.company-info__ids > div{
    display:grid;
    grid-template-columns:1fr auto 1fr;
    column-gap:6px;
    align-items:baseline;
    margin-bottom:6px;
}

.company-info__ids dt{
    grid-column:1;
    justify-self:start;
    color:#4b4a38;
}

.company-info__ids dt::after{
    content:":";
}

.company-info__ids dd{
    grid-column:2;
    margin:0;
    font-weight:600;
}

/* Foreign languages have longer labels – value goes on its own line */
.company-info__ids--stacked > div{
    display:block;
    margin-bottom:10px;
}

.company-info__ids--stacked dd{
    margin-top:2px;
}

.map-section{
    max-width:1100px;
    margin:40px auto 70px;
    padding:0 20px;
}

.map-section h2{
    margin-bottom:22px;
    text-align:center;
    color:#1f2937;
}

.map-placeholder{
    border-radius:18px;
    overflow:hidden;
    border:1px solid var(--contact-border);
    box-shadow:0 8px 24px rgba(139,38,62,.06);
    background:#f2eee2;
}

.map-placeholder a{
    display:block;
}

.map-placeholder img{
    width:100%;
    height:auto;
    aspect-ratio:1424 / 725;
    max-height:380px;
    object-fit:cover;
    object-position:40% 60%; /* keeps the pin in view when the image is cropped */
    display:block;
    transition:transform .3s ease;
}

.map-placeholder:hover img{
    transform:scale(1.02);
}

/* Contact cards: 4 in a row -> 2 + 2 -> stacked; the map scales with them */
@media(max-width:1100px){
    .contact-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media(max-width:900px){
    .contact-hero h1{
        font-size:2.3rem;
    }
}

@media(max-width:640px){
    .contact-grid{
        grid-template-columns:1fr;
        gap:16px;
    }

    .contact-card{
        padding:24px 20px;
    }

    .map-section{
        margin:28px auto 40px;
    }

    .map-section h2{
        font-size:1.4rem;
        margin-bottom:16px;
    }

    .map-placeholder{
        border-radius:14px;
    }

    .map-placeholder img{
        aspect-ratio:4 / 3;
        max-height:none;
    }
}

@media(max-width:480px){
    .contact-hero h1{
        font-size:1.9rem;
    }
}

@media(max-width:360px){
    .contact-card{
        padding:24px 12px;
    }
}

/* ---- How to buy (HowToBuy/default.latte, initHowToBuy() in script.js) ----
   The mock browser screen is 64em x 38em and its font-size is 1/64 of the
   device width (1.5625cqw), so the hard-coded cursor/click coordinates keep
   hitting their targets at any width. Rule: a mock element positioned in em
   never sets its own font-size (that would shift its position) — text sizes
   go on its children; the few that need both position via calc(var(--u) * n).
   Every animation's resting (non-animated) state is the scene's FINAL state,
   so prefers-reduced-motion just switches the animations off. */
.howto {
    --howto-duration: 6s;
    --howto-brand: #8b263e;
    --howto-brand-dark: #6f1d31;
    --howto-brand-soft: #f7e9ed;
    --howto-green: #2d6a4f;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0 48px;
    color: #111827;
}

.howto-hero {
    max-width: 720px;
    margin: 8px auto 36px;
    text-align: center;
}

.howto-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--howto-brand-soft);
    color: var(--howto-brand);
    font-weight: 600;
    font-size: 0.9rem;
}

.howto-hero h1 {
    margin: 16px 0 12px;
    font-size: 2.8rem;
    line-height: 1.15;
}

.howto-hero p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #4b5563;
}

.howto-player {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
}

/* Mock browser window */
.howto-device {
    container-type: inline-size;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(17, 24, 39, 0.12), 0 4px 12px rgba(17, 24, 39, 0.06);
}

.howto-device__bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    background: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
}

.howto-device__dots {
    display: flex;
    gap: 6px;
}

.howto-device__dots i {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #f87171;
}

.howto-device__dots i:nth-child(2) {
    background: #fbbf24;
}

.howto-device__dots i:nth-child(3) {
    background: #34d399;
}

.howto-device__url {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: #ffffff;
    color: #6b7280;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
}

.howto-device__url .bi-lock-fill {
    color: var(--howto-green);
    font-size: 0.75rem;
}

.howto-screen {
    --u: 1.5625cqw;
    position: relative;
    height: 38em;
    overflow: hidden;
    font-size: var(--u);
    line-height: 1.3;
    background: #f8fafc;
}

.howto-screen p {
    margin: 0;
}

.howto-scene {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.howto-scene.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.35s ease;
}

/* Cursor + click ripple */
.howto-cursor {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 5;
    width: 2.6em;
    height: 2.6em;
    /* puts the arrow's tip on (0, 0), so the keyframes translate the tip itself */
    margin: -0.22em 0 0 -0.43em;
    transform-origin: 0.43em 0.22em;
    opacity: 0;
    pointer-events: none;
    filter: drop-shadow(0 0.2em 0.3em rgba(0, 0, 0, 0.25));
}

.howto-cursor svg {
    display: block;
    width: 100%;
    height: 100%;
}

.howto-cursor path {
    fill: #111827;
    stroke: #ffffff;
    stroke-width: 1.5;
    stroke-linejoin: round;
}

.howto-click {
    position: absolute;
    left: var(--x);
    top: var(--y);
    z-index: 4;
    width: 4.4em;
    height: 4.4em;
    margin: -2.2em 0 0 -2.2em;
    border-radius: 50%;
    background: rgba(139, 38, 62, 0.2);
    border: 0.25em solid rgba(139, 38, 62, 0.55);
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
}

.is-active .howto-click {
    animation: howto-click 0.6s ease-out var(--d) forwards;
}

/* Shared mock pieces */
.howto-coin {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 8em;
    height: 8em;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #e2bd8f 0%, #c48f5b 45%, #8a5a33 100%);
    box-shadow: inset 0 0 0 0.5em rgba(90, 55, 25, 0.25), inset 0 0 0 1.1em rgba(255, 235, 205, 0.18), 0 0.6em 1.2em rgba(90, 55, 25, 0.3);
}

.howto-coin b {
    font-size: 1.7em;
    letter-spacing: 0.05em;
    color: rgba(60, 35, 15, 0.7);
}

.howto-coin--dark {
    background: radial-gradient(circle at 35% 30%, #c9876b 0%, #a0522d 45%, #5c2c16 100%);
}

.howto-coin--small {
    flex-shrink: 0;
    width: 5em;
    height: 5em;
}

.howto-coin--small b {
    font-size: 1.05em;
}

.howto-mock-card {
    position: absolute;
    box-sizing: border-box;
    padding: 1.4em 1.8em;
    background: #ffffff;
    border-radius: 1.2em;
    box-shadow: 0 0.4em 1.6em rgba(17, 24, 39, 0.08);
}

.howto-mock-card__title {
    padding-bottom: 0.5em;
    font-size: 1.3em;
    font-weight: 700;
}

.howto-mock-stepper {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1fr;
    align-items: center;
    box-sizing: border-box;
    overflow: hidden;
    background: #ffffff;
    border: 0.1em solid #d1d5db;
    border-radius: 0.8em;
}

.howto-mock-stepper > span {
    font-size: 1.4em;
    text-align: center;
    color: #374151;
}

.howto-mock-stepper__qty {
    position: relative;
    font-weight: 700;
}

.howto-mock-stepper__qty b {
    display: block;
}

.howto-qty-old {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.howto-mock-btn {
    position: absolute;
    left: 40em;
    top: 32em;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20em;
    height: 4.4em;
    color: #ffffff;
    background: var(--howto-brand);
    border-radius: 0.9em;
    box-shadow: 0 0.5em 1.2em rgba(139, 38, 62, 0.3);
}

.howto-mock-btn > span {
    display: flex;
    align-items: center;
    gap: 0.4em;
    font-size: 1.35em;
    font-weight: 700;
}

.is-active .howto-mock-btn {
    animation: howto-press 0.3s ease var(--press) both;
}

.howto-mock-steps {
    position: absolute;
    top: 1.6em;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1em;
}

.howto-mock-steps__item {
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-size: 1.15em;
    font-weight: 600;
    color: #9ca3af;
}

.howto-mock-steps__item b {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2em;
    height: 2em;
    border-radius: 50%;
    font-size: 0.9em;
    color: #6b7280;
    background: #e5e7eb;
}

.howto-mock-steps__item.is-current {
    color: #111827;
}

.howto-mock-steps__item.is-current b {
    color: #ffffff;
    background: var(--howto-brand);
    box-shadow: 0 0 0 0.35em rgba(139, 38, 62, 0.15);
}

.howto-mock-steps__item.is-done b {
    color: #ffffff;
    background: var(--howto-green);
}

.is-active .howto-mock-steps__item.is-current b {
    animation: howto-pop 0.4s cubic-bezier(0.3, 1.6, 0.5, 1) 0.15s both;
}

.howto-mock-steps__sep {
    width: 2.6em;
    height: 0.15em;
    border-radius: 1em;
    background: #e5e7eb;
}

.howto-mock-option {
    position: absolute;
    left: 4em;
    display: flex;
    align-items: center;
    gap: 1em;
    box-sizing: border-box;
    width: 30em;
    height: 5em;
    padding: 0 1.5em;
    background: #ffffff;
    border: 0.15em solid #e5e7eb;
    border-radius: 1em;
}

.howto-mock-option--1 {
    top: 7em;
}

.howto-mock-option--2 {
    top: 12.8em;
}

.howto-mock-option--3 {
    top: 18.6em;
}

.howto-mock-option__radio {
    flex-shrink: 0;
    box-sizing: border-box;
    width: 1.8em;
    height: 1.8em;
    border: 0.18em solid #d1d5db;
    border-radius: 50%;
}

.howto-mock-option__name {
    flex: 1;
    font-size: 1.25em;
    font-weight: 600;
}

.howto-mock-option__price {
    font-size: 1.2em;
    font-weight: 600;
    color: #6b7280;
}

.howto-mock-option--picked {
    background: #fdf2f5;
    border-color: var(--howto-brand);
}

.howto-mock-option--picked .howto-mock-option__radio {
    border-width: 0.55em;
    border-color: var(--howto-brand);
}

.is-active .howto-mock-option--picked {
    animation: howto-pick-card 0.3s ease var(--pick) both;
}

.is-active .howto-mock-option--picked .howto-mock-option__radio {
    animation: howto-pick-radio 0.3s ease var(--pick) both;
}

.howto-mock-summary p {
    display: flex;
    justify-content: space-between;
    gap: 1em;
    padding: 0.3em 0;
    font-size: 1.2em;
}

.howto-mock-summary .howto-mock-card__title {
    display: block;
    font-size: 1.3em;
}

.howto-mock-summary .howto-mock-summary__muted {
    color: #9ca3af;
}

.howto-mock-summary .howto-mock-summary__total {
    margin-top: 0.3em;
    padding-top: 0.6em;
    font-size: 1.4em;
    font-weight: 800;
    border-top: 0.08em solid #e5e7eb;
}

/* Scene 1: products */
.howto-scene--products {
    --press: 2.7s;
}

.howto-mock-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5em;
    background: #ffffff;
    border-bottom: 0.1em solid #e5e7eb;
}

.howto-mock-header__logo {
    position: absolute;
    left: calc(var(--u) * 2.5);
    top: calc(var(--u) * 1.3);
    font-size: 1.6em;
    font-weight: 800;
    color: var(--howto-brand);
}

.howto-mock-header__nav {
    position: absolute;
    left: calc(var(--u) * 22);
    top: calc(var(--u) * 1.8);
    font-size: 1.15em;
    color: #6b7280;
}

.howto-mock-header__cart {
    position: absolute;
    left: 57.5em;
    top: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.4em;
    height: 3em;
    color: #374151;
}

.howto-mock-header__cart i {
    font-size: 2.2em;
}

.howto-mock-header__badge {
    position: absolute;
    top: -0.3em;
    right: -0.4em;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 1.7em;
    height: 1.7em;
    border-radius: 999px;
    font-size: 1.05em;
    color: #ffffff;
    background: var(--howto-brand);
}

.is-active .howto-mock-header__badge {
    animation: howto-pop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1) 3.45s both;
}

.is-active .howto-mock-header__cart i {
    animation: howto-wiggle 0.5s ease 3.4s both;
}

.howto-mock-product {
    position: absolute;
    top: 7em;
    width: 26em;
    height: 29em;
    overflow: hidden;
    background: #ffffff;
    border-radius: 1.2em;
    box-shadow: 0 0.4em 1.6em rgba(17, 24, 39, 0.08);
}

.howto-mock-product--a {
    left: 4em;
}

.howto-mock-product--b {
    left: 34em;
}

.is-active .howto-mock-product {
    animation: howto-rise 0.5s ease both;
}

.is-active .howto-mock-product--b {
    animation-delay: 0.12s;
}

.howto-mock-product__image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 13.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5ede4, #ead9c6);
}

.howto-mock-product--b .howto-mock-product__image {
    background: linear-gradient(135deg, #eef2f7, #dfe5ee);
}

.howto-mock-product__body {
    position: absolute;
    top: 15em;
    left: 1.6em;
    right: 1.6em;
}

.howto-mock-product__name {
    font-size: 1.4em;
    font-weight: 700;
}

.howto-mock-product__price {
    padding-top: 0.3em;
    font-size: 1.6em;
    font-weight: 800;
    color: var(--howto-brand);
}

.howto-mock-product__price small {
    font-size: 0.6em;
    font-weight: 500;
    color: #6b7280;
}

.howto-mock-product__stepper {
    position: absolute;
    left: 1.5em;
    top: 23em;
    width: 10.5em;
    height: 3.6em;
}

.howto-mock-product__add {
    position: absolute;
    left: 13em;
    top: 23em;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 11.5em;
    height: 3.6em;
    color: #ffffff;
    background: var(--howto-brand);
    border-radius: 0.8em;
}

.howto-mock-product__add span {
    font-size: 1.2em;
    font-weight: 600;
    white-space: nowrap;
}

.is-active .howto-mock-product--a .howto-mock-product__add {
    animation: howto-press 0.3s ease var(--press) both;
}

.is-active .howto-qty-old {
    animation: howto-fade-out 0.2s ease 1.44s both;
}

.is-active .howto-qty-new {
    animation: howto-fade-in 0.25s ease 1.5s both;
}

.howto-fly {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 3;
    width: 1.6em;
    height: 1.6em;
    margin: -0.8em 0 0 -0.8em;
    border-radius: 50%;
    background: var(--howto-brand);
    box-shadow: 0 0 0 0.4em rgba(139, 38, 62, 0.2);
    opacity: 0;
}

.is-active .howto-fly {
    animation: howto-fly 0.65s cubic-bezier(0.5, 0, 0.8, 0.6) 2.8s forwards;
}

.howto-mock-toast {
    position: absolute;
    right: calc(var(--u) * 2);
    top: calc(var(--u) * 6);
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.6em 1em;
    border-radius: 0.7em;
    font-size: 1.15em;
    font-weight: 600;
    color: #065f46;
    background: #ecfdf5;
    box-shadow: 0 0.4em 1.2em rgba(17, 24, 39, 0.12);
}

.is-active .howto-mock-toast {
    animation: howto-drop-in 0.4s ease 3.55s both;
}

.is-active .howto-cursor--products {
    animation: howto-cursor-products var(--howto-duration) ease-in-out both;
}

/* Scene 2: cart */
.howto-scene--cart {
    --press: 2.95s;
}

.howto-mock-cart-row {
    position: absolute;
    left: 4em;
    top: 7.5em;
    display: flex;
    align-items: center;
    gap: 1.6em;
    box-sizing: border-box;
    width: 56em;
    height: 8em;
    padding: 0 2em;
    background: #ffffff;
    border-radius: 1.2em;
    box-shadow: 0 0.4em 1.6em rgba(17, 24, 39, 0.08);
}

.is-active .howto-mock-cart-row {
    animation: howto-rise 0.5s ease 0.15s both;
}

.howto-mock-cart-row__name {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2em;
    font-size: 1.35em;
    font-weight: 700;
}

.howto-mock-cart-row__name small {
    font-size: 0.75em;
    font-weight: 500;
    color: #6b7280;
}

.howto-mock-cart-row__stepper {
    width: 9em;
    height: 3.2em;
}

.howto-mock-cart-row__price {
    min-width: 4.5em;
    font-size: 1.5em;
    font-weight: 800;
    text-align: right;
}

.howto-scene--cart__summary {
    left: 34em;
    top: 17.5em;
    width: 26em;
}

.is-active .howto-scene--cart__summary {
    animation: howto-rise 0.5s ease 0.45s both;
}

.is-active .howto-cursor--cart {
    animation: howto-cursor-cart var(--howto-duration) ease-in-out both;
}

/* Scene 3: files + note */
.howto-scene--files {
    --press: 4.75s;
}

.howto-mock-notice {
    position: absolute;
    left: calc(var(--u) * 4);
    top: calc(var(--u) * 6.6);
    display: flex;
    align-items: center;
    gap: 0.6em;
    box-sizing: border-box;
    width: calc(var(--u) * 56);
    padding: 0.6em 1em;
    border-radius: 0.7em;
    font-size: 1.15em;
    color: #1e40af;
    background: #eff6ff;
}

.howto-scene--files__upload {
    left: 4em;
    top: 10.8em;
    width: 56em;
    height: 10em;
}

.howto-mock-upload-btn {
    position: absolute;
    left: 6em;
    top: 15.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 13em;
    height: 3.6em;
    color: var(--howto-brand);
    background: #fdf2f5;
    border: 0.12em dashed var(--howto-brand);
    border-radius: 0.8em;
}

.howto-mock-upload-btn span {
    font-size: 1.2em;
    font-weight: 600;
}

.howto-mock-file {
    position: absolute;
    left: calc(var(--u) * 21);
    top: calc(var(--u) * 15.9);
    display: flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.55em 0.9em;
    border-radius: 0.6em;
    font-size: 1.15em;
    font-weight: 600;
    background: #f3f4f6;
}

.howto-mock-file small {
    font-weight: 400;
    color: #6b7280;
}

.is-active .howto-mock-file {
    animation: howto-rise 0.4s ease 1.6s both;
}

.howto-scene--files__note {
    left: 4em;
    top: 21.8em;
    width: 56em;
    height: 9.2em;
}

.howto-mock-textarea {
    box-sizing: border-box;
    height: 3.8em;
    padding: 0.9em 1em;
    border: 0.1em solid #d1d5db;
    border-radius: 0.6em;
}

.is-active .howto-mock-textarea {
    animation: howto-focus 2.3s ease 2.05s both;
}

.howto-typing {
    display: inline-block;
    max-width: 40ch;
    padding-right: 0.1em;
    overflow: hidden;
    vertical-align: top;
    white-space: nowrap;
    font-size: 1.2em;
    border-right: 0.1em solid var(--howto-brand);
}

.is-active .howto-typing {
    animation: howto-type 1.9s steps(38) 2.2s both, howto-caret 0.8s step-end 2.2s 5;
}

.is-active .howto-cursor--files {
    animation: howto-cursor-files var(--howto-duration) ease-in-out both;
}

/* Scene 4: shipping */
.howto-scene--shipping {
    --pick: 1.1s;
    --press: 4.63s;
}

.howto-mock-hint {
    position: absolute;
    left: calc(var(--u) * 4.4);
    top: calc(var(--u) * 25);
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-size: 1.1em;
    color: #6b7280;
}

.howto-mock-map {
    position: absolute;
    left: 37em;
    top: 7em;
    width: 23em;
    height: 23em;
    overflow: hidden;
    border-radius: 1.2em;
    background-color: #eef2e6;
    background-image:
        linear-gradient(90deg, rgba(255, 255, 255, 0.95) 0.5em, transparent 0.5em),
        linear-gradient(0deg, rgba(255, 255, 255, 0.95) 0.5em, transparent 0.5em),
        linear-gradient(90deg, rgba(255, 255, 255, 0.6) 0.2em, transparent 0.2em),
        linear-gradient(0deg, rgba(255, 255, 255, 0.6) 0.2em, transparent 0.2em);
    background-size: 11.5em 11.5em, 11.5em 11.5em, 3.8em 3.8em, 3.8em 3.8em;
    box-shadow: inset 0 0 0 0.1em #d9e0cf;
}

.is-active .howto-mock-map {
    animation: howto-map-in 0.5s ease 1.2s both;
}

.howto-mock-map__river {
    position: absolute;
    left: -3em;
    top: 14em;
    width: 32em;
    height: 2.4em;
    border-radius: 2em;
    background: #bfdbfe;
    transform: rotate(-18deg);
}

.howto-mock-map__pin {
    position: absolute;
    left: var(--px);
    top: var(--py);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 2.4em;
    height: 2.4em;
    /* the pin's tip sits on (--px, --py) */
    margin: -2.4em 0 0 -1.2em;
}

.howto-mock-map__pin i {
    display: block;
    font-size: 2.4em;
    line-height: 1;
    color: #94a3b8;
}

.is-active .howto-mock-map__pin {
    animation: howto-pin-drop 0.45s cubic-bezier(0.3, 1.5, 0.6, 1) var(--d) both;
}

.howto-mock-map__pin--selected {
    z-index: 1;
}

.howto-mock-map__pin--selected i {
    color: var(--howto-brand);
    transform: scale(1.35);
    transform-origin: 50% 100%;
}

.is-active .howto-mock-map__pin--selected i {
    animation: howto-pin-select 0.5s ease 2.7s both;
}

.howto-mock-map__label {
    position: absolute;
    left: calc(var(--u) * 1.2);
    right: calc(var(--u) * 1.2);
    bottom: calc(var(--u) * 1.2);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2em 0.5em;
    padding: 0.6em 0.8em;
    border-radius: 0.7em;
    font-size: 1.1em;
    font-weight: 700;
    color: var(--howto-green);
    background: #ffffff;
    box-shadow: 0 0.4em 1.2em rgba(17, 24, 39, 0.12);
}

.howto-mock-map__label small {
    width: 100%;
    padding-left: 1.6em;
    font-size: 0.85em;
    font-weight: 500;
    color: #6b7280;
}

.is-active .howto-mock-map__label {
    animation: howto-rise 0.4s ease 2.95s both;
}

.is-active .howto-cursor--shipping {
    animation: howto-cursor-shipping var(--howto-duration) ease-in-out both;
}

/* Scene 5: payment */
.howto-scene--payment {
    --pick: 1.3s;
    --press: 3.55s;
}

.howto-scene--payment__summary {
    left: 37em;
    top: 7em;
    width: 23em;
}

.is-active .howto-mock-summary__payment {
    animation: howto-slide-in 0.4s ease 1.35s both;
}

.howto-mock-btn--pay {
    display: grid;
    place-items: center;
}

.howto-mock-btn--pay > span {
    grid-area: 1 / 1;
}

.howto-pay-old {
    opacity: 0;
}

.is-active .howto-pay-old {
    animation: howto-fade-out 0.2s ease 3.75s both;
}

.is-active .howto-pay-new {
    animation: howto-fade-in 0.25s ease 3.8s both;
}

.is-active .howto-pay-new i {
    animation: howto-spin 1s linear infinite;
}

.is-active .howto-cursor--payment {
    animation: howto-cursor-payment var(--howto-duration) ease-in-out both;
}

/* Scene 6: done */
.howto-done {
    position: absolute;
    top: 6.2em;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1em;
    text-align: center;
}

.howto-done__check {
    width: 9em;
    height: 9em;
}

.howto-done__check circle {
    --len: 151;
    fill: #ecfdf5;
    stroke: var(--howto-green);
    stroke-width: 3;
    stroke-dasharray: 151;
}

.howto-done__check path {
    --len: 36;
    fill: none;
    stroke: var(--howto-green);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 36;
}

.is-active .howto-done__check circle {
    animation: howto-draw 0.6s ease 0.2s both;
}

.is-active .howto-done__check path {
    animation: howto-draw 0.4s ease 0.75s both;
}

.howto-done__title {
    font-size: 2.2em;
    font-weight: 800;
}

.howto-done__number {
    font-size: 1.3em;
    color: #4b5563;
}

.is-active .howto-done__title {
    animation: howto-rise 0.5s ease 0.8s both;
}

.is-active .howto-done__number {
    animation: howto-rise 0.5s ease 1.05s both;
}

.howto-done__mail {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-top: 0.4em;
    padding: 0.7em 1.2em;
    border-radius: 999px;
    font-size: 1.2em;
    color: #374151;
    background: #ffffff;
    box-shadow: 0 0.4em 1.2em rgba(17, 24, 39, 0.1);
}

.howto-done__mail i {
    color: var(--howto-brand);
}

.is-active .howto-done__mail {
    animation: howto-mail 0.6s cubic-bezier(0.3, 1.4, 0.6, 1) 1.8s both;
}

.howto-confetti {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.howto-confetti span {
    position: absolute;
    top: 0;
    left: var(--cx);
    width: 0.8em;
    height: 1.4em;
    border-radius: 0.2em;
    background: var(--c);
    opacity: 0;
}

.is-active .howto-confetti span {
    animation: howto-confetti 2.8s cubic-bezier(0.3, 0.6, 0.6, 1) var(--d) both;
}

.howto-confetti span:nth-child(1)  { --cx: 3em;  --c: #8b263e; --d: 0.3s;  --r: 420deg;  --dx: 3em; }
.howto-confetti span:nth-child(2)  { --cx: 8em;  --c: #2d6a4f; --d: 0.7s;  --r: -300deg; --dx: -2em; }
.howto-confetti span:nth-child(3)  { --cx: 13em; --c: #f59e0b; --d: 0.45s; --r: 520deg;  --dx: 2em; }
.howto-confetti span:nth-child(4)  { --cx: 18em; --c: #c89b6d; --d: 1s;    --r: -460deg; --dx: -3em; }
.howto-confetti span:nth-child(5)  { --cx: 22em; --c: #3b82f6; --d: 0.35s; --r: 380deg;  --dx: 1em; }
.howto-confetti span:nth-child(6)  { --cx: 27em; --c: #8b263e; --d: 0.85s; --r: -540deg; --dx: -1.5em; }
.howto-confetti span:nth-child(7)  { --cx: 31em; --c: #2d6a4f; --d: 0.5s;  --r: 300deg;  --dx: 2.5em; }
.howto-confetti span:nth-child(8)  { --cx: 35em; --c: #f59e0b; --d: 1.2s;  --r: -400deg; --dx: -2em; }
.howto-confetti span:nth-child(9)  { --cx: 40em; --c: #c89b6d; --d: 0.4s;  --r: 480deg;  --dx: 3em; }
.howto-confetti span:nth-child(10) { --cx: 44em; --c: #3b82f6; --d: 0.95s; --r: -360deg; --dx: -1em; }
.howto-confetti span:nth-child(11) { --cx: 49em; --c: #8b263e; --d: 0.6s;  --r: 440deg;  --dx: 2em; }
.howto-confetti span:nth-child(12) { --cx: 53em; --c: #2d6a4f; --d: 1.1s;  --r: -500deg; --dx: -3em; }
.howto-confetti span:nth-child(13) { --cx: 57em; --c: #f59e0b; --d: 0.55s; --r: 340deg;  --dx: 1.5em; }
.howto-confetti span:nth-child(14) { --cx: 61em; --c: #c89b6d; --d: 0.8s;  --r: -420deg; --dx: -2.5em; }

/* Player controls + step list */
.howto-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

.howto-controls__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    font-size: 1.2rem;
    color: #374151;
    background: #f2eee2;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.howto-controls__btn:hover {
    color: var(--howto-brand);
    border-color: var(--howto-brand);
}

.howto-controls__btn--play {
    width: 52px;
    height: 52px;
    font-size: 1.5rem;
    color: #ffffff;
    background: var(--howto-brand);
    border-color: var(--howto-brand);
}

.howto-controls__btn--play:hover {
    color: #ffffff;
    background: var(--howto-brand-dark);
}

.howto-controls__btn:focus-visible,
.howto-steps__item:focus-visible {
    outline: 3px solid rgba(139, 38, 62, 0.35);
    outline-offset: 2px;
}

.howto-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.howto-steps__item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    width: 100%;
    padding: 14px 16px;
    overflow: hidden;
    font: inherit;
    text-align: left;
    color: inherit;
    background: #f2eee2;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.howto-steps__item:hover {
    border-color: #d1a3b0;
    transform: translateX(3px);
}

.howto-steps__item.is-active {
    border-color: var(--howto-brand);
    box-shadow: 0 8px 24px rgba(139, 38, 62, 0.12);
}

.howto-steps__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 1.15rem;
    color: #6b7280;
    background: #e4dfca;
    transition: color 0.2s, background 0.2s;
}

.howto-steps__item.is-active .howto-steps__icon {
    color: #ffffff;
    background: var(--howto-brand);
}

.howto-steps__item.is-done .howto-steps__icon {
    color: var(--howto-green);
    background: #e7f3ec;
}

.howto-steps__text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.howto-steps__text strong {
    font-size: 1rem;
}

.howto-steps__text span {
    font-size: 0.88rem;
    line-height: 1.45;
    color: #6b7280;
}

.howto-steps__progress {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 3px;
    background: var(--howto-brand);
}

/* its animationend is what advances the player (initHowToBuy()) */
.howto-steps__item.is-active .howto-steps__progress {
    width: 100%;
    animation: howto-progress var(--howto-duration) linear both;
}

.howto.is-paused .howto-screen *,
.howto.is-paused .howto-steps__progress {
    animation-play-state: paused;
}

/* "Good to know" cards + CTA */
.howto-info {
    margin-top: 56px;
}

.howto-info h2 {
    margin: 0 0 24px;
    font-size: 1.8rem;
    text-align: center;
}

.howto-info__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.howto-info__card {
    padding: 24px;
    background: #f2eee2;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.howto-info__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 14px;
    border-radius: 14px;
    font-size: 1.4rem;
    color: var(--howto-brand);
    background: var(--howto-brand-soft);
}

.howto-info__card h3 {
    margin: 0 0 10px;
    font-size: 1.1rem;
}

.howto-info__card p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4b5563;
}

.howto-info__card a {
    font-weight: 600;
    color: var(--howto-brand);
}

.howto-info__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.howto-info__list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    font-size: 0.95rem;
    color: #4b5563;
    border-bottom: 1px dashed #e5e7eb;
}

.howto-info__list li:last-child {
    border-bottom: none;
}

.howto-info__list strong {
    color: #111827;
    white-space: nowrap;
}

.howto-cta {
    margin-top: 36px;
    text-align: center;
}

.howto-cta__btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    border-radius: 999px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    background: var(--howto-brand);
    box-shadow: 0 10px 24px rgba(139, 38, 62, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.howto-cta__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(139, 38, 62, 0.35);
}

@media (max-width: 1100px) {
    .howto-info__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .howto-player {
        grid-template-columns: 1fr;
    }

    .howto-hero h1 {
        font-size: 2.2rem;
    }

    /* keep the list short under the player: only the current step's description */
    .howto-steps__item:not(.is-active) .howto-steps__text span {
        display: none;
    }
}

@media (max-width: 560px) {
    .howto-hero h1 {
        font-size: 1.9rem;
    }

    .howto-hero p {
        font-size: 1rem;
    }

    .howto-info__grid {
        grid-template-columns: 1fr;
    }

    .howto-device__bar {
        gap: 10px;
        padding: 8px 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .howto-screen *,
    .howto-steps__progress {
        animation: none !important;
    }

    .howto-cursor,
    .howto-click,
    .howto-fly,
    .howto-controls__btn--play {
        display: none;
    }

    .howto-scene,
    .howto-scene.is-active {
        transition: none;
    }
}

/* Keyframes — most only define "from": "to" is the element's own (final) style */
@keyframes howto-click {
    from { opacity: 1; transform: scale(0.2); }
    to { opacity: 0; transform: scale(1); }
}

@keyframes howto-press {
    50% { transform: scale(0.94); filter: brightness(0.88); }
}

@keyframes howto-pop {
    from { transform: scale(0); }
}

@keyframes howto-wiggle {
    25% { transform: rotate(-14deg); }
    50% { transform: rotate(10deg); }
    75% { transform: rotate(-6deg); }
}

@keyframes howto-rise {
    from { opacity: 0; transform: translateY(1.5em); }
}

@keyframes howto-drop-in {
    from { opacity: 0; transform: translateY(-0.8em); }
}

@keyframes howto-slide-in {
    from { opacity: 0; transform: translateX(1em); }
}

@keyframes howto-fade-in {
    from { opacity: 0; transform: translateY(0.5em); }
    to { opacity: 1; transform: none; }
}

@keyframes howto-fade-out {
    from { opacity: 1; transform: none; }
    to { opacity: 0; transform: translateY(-0.5em); }
}

@keyframes howto-fly {
    0% { opacity: 1; transform: translate(22.75em, 31.8em) scale(1); }
    90% { opacity: 1; }
    100% { opacity: 0; transform: translate(59.2em, 2.5em) scale(0.4); }
}

@keyframes howto-pick-card {
    from { background: #ffffff; border-color: #e5e7eb; }
}

@keyframes howto-pick-radio {
    from { border-width: 0.18em; border-color: #d1d5db; }
}

@keyframes howto-focus {
    0%, 100% { border-color: #d1d5db; box-shadow: none; }
    10%, 90% { border-color: var(--howto-brand); box-shadow: 0 0 0 0.3em rgba(139, 38, 62, 0.12); }
}

@keyframes howto-type {
    from { max-width: 0; }
}

@keyframes howto-caret {
    50% { border-right-color: transparent; }
}

@keyframes howto-map-in {
    from { opacity: 0.45; filter: grayscale(1); }
}

@keyframes howto-pin-drop {
    from { opacity: 0; transform: translateY(-3em); }
}

@keyframes howto-pin-select {
    from { color: #94a3b8; transform: none; }
    50% { transform: translateY(-0.3em) scale(1.5); }
}

@keyframes howto-spin {
    to { transform: rotate(360deg); }
}

@keyframes howto-draw {
    from { stroke-dashoffset: var(--len); }
}

@keyframes howto-mail {
    from { opacity: 0; transform: translateY(2em) scale(0.9); }
}

@keyframes howto-confetti {
    0% { opacity: 1; transform: translate(0, -2em) rotate(0deg); }
    85% { opacity: 1; }
    100% { opacity: 0; transform: translate(var(--dx), 38em) rotate(var(--r)); }
}

@keyframes howto-progress {
    from { width: 0; }
}

/* Cursor paths — (x, y) is the arrow's tip on the 64em x 38em screen; a
   scale(0.8) keyframe is a click, matched by a .howto-click --d in the template */
@keyframes howto-cursor-products {
    0% { opacity: 0; transform: translate(44em, 24em) scale(1); }
    6% { opacity: 1; transform: translate(44em, 24em) scale(1); }
    20% { transform: translate(14.25em, 31.8em) scale(1); }
    23% { transform: translate(14.25em, 31.8em) scale(0.8); }
    26%, 30% { transform: translate(14.25em, 31.8em) scale(1); }
    42% { transform: translate(22.75em, 31.8em) scale(1); }
    46% { transform: translate(22.75em, 31.8em) scale(0.8); }
    49%, 56% { transform: translate(22.75em, 31.8em) scale(1); }
    75%, 100% { opacity: 1; transform: translate(46em, 22em) scale(1); }
}

@keyframes howto-cursor-cart {
    0% { opacity: 0; transform: translate(28em, 22em) scale(1); }
    6% { opacity: 1; transform: translate(28em, 22em) scale(1); }
    44% { transform: translate(50em, 34.2em) scale(1); }
    50% { transform: translate(50em, 34.2em) scale(0.8); }
    54%, 100% { opacity: 1; transform: translate(50em, 34.2em) scale(1); }
}

@keyframes howto-cursor-files {
    0% { opacity: 0; transform: translate(44em, 8em) scale(1); }
    6% { opacity: 1; transform: translate(44em, 8em) scale(1); }
    18% { transform: translate(12.5em, 17.3em) scale(1); }
    21.5% { transform: translate(12.5em, 17.3em) scale(0.8); }
    25%, 28% { transform: translate(12.5em, 17.3em) scale(1); }
    34% { transform: translate(40em, 27.6em) scale(1); }
    36% { transform: translate(40em, 27.6em) scale(0.8); }
    38% { transform: translate(40em, 27.6em) scale(1); }
    45%, 66% { transform: translate(54em, 20em) scale(1); }
    76% { transform: translate(50em, 34.2em) scale(1); }
    80% { transform: translate(50em, 34.2em) scale(0.8); }
    83%, 100% { opacity: 1; transform: translate(50em, 34.2em) scale(1); }
}

@keyframes howto-cursor-shipping {
    0% { opacity: 0; transform: translate(40em, 5em) scale(1); }
    6% { opacity: 1; transform: translate(40em, 5em) scale(1); }
    15% { transform: translate(6.5em, 9.5em) scale(1); }
    18% { transform: translate(6.5em, 9.5em) scale(0.8); }
    21%, 26% { transform: translate(6.5em, 9.5em) scale(1); }
    40% { transform: translate(46.8em, 13.4em) scale(1); }
    44% { transform: translate(46.8em, 13.4em) scale(0.8); }
    47%, 54% { transform: translate(46.8em, 13.4em) scale(1); }
    72% { transform: translate(50em, 34.2em) scale(1); }
    78% { transform: translate(50em, 34.2em) scale(0.8); }
    81%, 100% { opacity: 1; transform: translate(50em, 34.2em) scale(1); }
}

@keyframes howto-cursor-payment {
    0% { opacity: 0; transform: translate(40em, 5em) scale(1); }
    6% { opacity: 1; transform: translate(40em, 5em) scale(1); }
    17% { transform: translate(6.5em, 9.5em) scale(1); }
    21% { transform: translate(6.5em, 9.5em) scale(0.8); }
    24%, 30% { transform: translate(6.5em, 9.5em) scale(1); }
    54% { transform: translate(50em, 34.2em) scale(1); }
    60% { transform: translate(50em, 34.2em) scale(0.8); }
    63%, 100% { opacity: 1; transform: translate(50em, 34.2em) scale(1); }
}

/* ---- Home — hero (Home/default.latte) ---- */
/* no overflow: hidden, the search dropdown reaches out over the hero; z-index keeps it above the next sections */
.hero-section {
  position: relative;
  z-index: 5;
  padding: 50px 20px 20px;
  border-radius: 16px;
  color: #2c3e50;
}

.hero-section__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

/* Veil over the picture, chosen in the admin (PageComponentService::HERO_OVERLAYS):
   light = on the text side, fading out so the photo shows fully on the right;
   soft = the photo only faintly visible under the whole block */
.hero-section--overlay-light::before,
.hero-section--overlay-soft::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.hero-section--overlay-light::before {
  background: linear-gradient(90deg, rgba(241, 235, 218, 0.92) 0%, rgba(241, 235, 218, 0.75) 40%, rgba(241, 235, 218, 0) 75%);
}

.hero-section--overlay-soft::before {
  background: rgba(241, 235, 218, 0.86);
}

.hero-container {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  /* half of the centring gap, so the text sits a bit to the left */
  margin: 0 auto 0 max(0px, calc((100% - 1200px) / 4));
}

.hero-content {
  max-width: 620px;
}

.hero-content h1 {
  font-size: 2.8rem;
  line-height: 1.2;
  margin: 0 0 20px;
  color: #1b4332;
}

.hero-content p {
  font-size: 1.15rem;
  line-height: 1.6;
  color: #555;
  margin-bottom: 30px;
}

/* search + "browse catalogue" button on one row (hero.latte) */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.hero-search {
  position: relative;
  flex: 1 1 280px;
  max-width: 480px;
}

.hero-search-form {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 18px;
  background: #f2eee2;
  border: 1px solid #d8dee2;
  border-radius: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.hero-search-form__input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 0.95rem;
  color: #1b4332;
  background: transparent;
}

.hero-search-form__input::placeholder {
  color: #8a94a6;
}

.hero-search-form__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 50%;
  background: #a8324f;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.hero-search-form__submit:hover {
  background: #8b263e;
  box-shadow: 0 4px 12px rgba(139, 38, 62, 0.4);
  transform: scale(1.08);
}

.hero-search-form__submit:active {
  background: #731e33;
  transform: scale(1);
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 20;
  background: #f2eee2;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 16px 32px -8px rgba(0, 0, 0, 0.15);
  padding: 8px;
  text-align: left;
}

.search-suggestions__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  transition: background-color 0.15s ease;
}

.search-suggestions__item:hover {
  background-color: #e4dfca;
}

.search-suggestions__thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  background: #e4dfca;
  flex-shrink: 0;
}

.search-suggestions__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.search-suggestions__name {
  font-size: 0.9rem;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-suggestions__price {
  font-size: 0.82rem;
  color: #6b7280;
}

.search-suggestions__message {
  margin: 0;
  padding: 12px 8px;
  font-size: 0.88rem;
  color: #6b7280;
  text-align: center;
}

.hero-buttons {
  display: flex;
  gap: 15px;
}

.hero-btn {
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.hero-btn--primary {
  background-color: #a8324f;
  color: white;
}

.hero-btn--primary:hover {
  background-color: #8b263e;
  box-shadow: 0 8px 18px rgba(139, 38, 62, 0.4);
  transform: translateY(-2px);
}

.hero-btn--primary:active {
  background-color: #731e33;
  box-shadow: 0 2px 6px rgba(139, 38, 62, 0.3);
  transform: translateY(0);
}

.hero-btn--secondary {
  background-color: transparent;
  color: #2d6a4f;
  border: 2px solid #2d6a4f;
}

.hero-btn--secondary:hover {
  background-color: #2d6a4f;
  color: white;
}

@media (max-width: 768px) {
  .hero-section--overlay-light::before {
    background: rgba(241, 235, 218, 0.8);
  }

  .hero-container {
    text-align: center;
  }

  .hero-content,
  .hero-search {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-content h1 {
    font-size: 2rem;
  }
}

/* ---- Home — page components (PageComponents/*.latte, see PageComponentService) ----
   Admin-managed blocks drawn above the hero (pageComponents.latte). Same look as the
   hero: badge, h1, paragraph — optionally over a picture. .banner-hero = the generic
   "Banner" component. Its colours (background, badge, heading, text) are set inline by the
   template from what the administrator chose; the --overlay-* modifiers exist only with a
   picture and keep the text readable on it. */
.banner-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  padding: 60px 20px;
  border-radius: 16px;
  color: #2c3e50;
}

.banner-hero__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
}

/* Veil on the text side so the copy stays readable over the picture */
.banner-hero--overlay-light::before,
.banner-hero--overlay-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.banner-hero--overlay-light::before {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.75) 40%, rgba(255, 255, 255, 0) 72%);
}

.banner-hero--overlay-dark::before {
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.6) 40%, rgba(15, 23, 42, 0) 72%);
}

.banner-hero__content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.banner-hero__content > * {
  max-width: 560px;
}

.banner-hero__badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.banner-hero__content h1 {
  font-size: 2.8rem;
  line-height: 1.2;
  margin: 0 0 20px;
}

.banner-hero__content p {
  font-size: 1.15rem;
  line-height: 1.6;
  margin: 0;
}

@media (max-width: 768px) {
  .banner-hero--overlay-light::before {
    background: rgba(255, 255, 255, 0.78);
  }

  .banner-hero--overlay-dark::before {
    background: rgba(15, 23, 42, 0.7);
  }

  .banner-hero__content {
    text-align: center;
  }

  .banner-hero__content > * {
    margin-left: auto;
    margin-right: auto;
  }

  .banner-hero__content h1 {
    font-size: 2rem;
  }
}

/* ---- Home — "Série CWG" page component (PageComponents/series.latte) ---- */
.series-section {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
  text-align: center;
  box-sizing: border-box;
}

.series-tag {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #2d6a4f;
  background-color: #e8f5e9;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.series-header h2 {
  font-size: 2.5rem;
  color: #1b4332;
  margin: 0 0 16px 0;
  font-weight: 700;
}

.series-content {
  max-width: 800px;
  margin: 0 auto 35px auto;
}

.series-content p {
  font-size: 1.15rem;
  line-height: 1.6;
  color: #4a5568;
  margin: 0 0 1em;
}

.series-content p:last-child {
  margin-bottom: 0;
}

.series-image {
  margin: 0 auto 35px auto;
}

/* Every picture fits in the box of the planets one (550 × 561), keeping its own shape */
.series-image img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 550px);
  max-height: 561px;
  margin: 0 auto;
  border-radius: 12px;
}

.series-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.series-footer p {
  margin: 0;
  font-size: 1.1rem;
  color: #2c3e50;
  font-weight: 500;
}

.btn-extra {
  display: inline-block;
  padding: 10px 24px;
  background-color: #a8324f;
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.btn-extra:hover {
  background-color: #8b263e;
  box-shadow: 0 8px 18px rgba(139, 38, 62, 0.4);
  transform: translateY(-2px);
}

.btn-extra:active {
  background-color: #731e33;
  box-shadow: 0 2px 6px rgba(139, 38, 62, 0.3);
  transform: translateY(0);
}

@media (max-width: 768px) {
  .series-section {
    padding: 40px 15px;
  }

  .series-header h2 {
    font-size: 1.8rem;
  }

}

/* ---- Home — "Typy dřeva" page component (PageComponents/woodTypes.latte) ---- */
.wood-section {
  --wood-1: #b07d4f;
  --wood-2: #2d6a4f;
  --wood-3: #a8324f;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
  box-sizing: border-box;
}

.wood-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 35px auto;
}

.wood-header h2 {
  font-size: 2.5rem;
  color: #1b4332;
  margin: 0 0 16px 0;
  font-weight: 700;
}

.wood-header__intro p {
  font-size: 1.15rem;
  line-height: 1.6;
  color: #4a5568;
  margin: 0 0 1em;
}

.wood-header__intro p:last-child {
  margin-bottom: 0;
}

.wood-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 0.9rem;
  background-color: var(--wood-color, #2d6a4f);
}

/* multiply: the white background of the picture takes the colour of the card behind it */
.wood-card__image {
  display: block;
  width: 140px;
  height: 140px;
  object-fit: contain;
  margin: 0 auto;
  mix-blend-mode: multiply;
  transition: transform 0.2s ease;
}

/* The picture as a button that opens it in full screen */
.wood-card__zoom {
  display: block;
  margin: 0 auto 14px;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
}

.wood-card__zoom:hover .wood-card__image,
.wood-card__zoom:focus-visible .wood-card__image {
  transform: scale(1.06);
}

/* ---- Full-screen picture (initImageLightbox() in script.js) ---- */
.image-lightbox {
  max-width: min(92vw, 900px);
  max-height: 92vh;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: #f2ebd9;
  overflow: visible;
}

.image-lightbox::backdrop {
  background: rgba(15, 23, 42, 0.85);
}

.image-lightbox__image {
  display: block;
  max-width: 100%;
  max-height: 92vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  cursor: zoom-out;
  /* multiply: the white background of the picture takes the colour of the panel */
  mix-blend-mode: multiply;
}

.image-lightbox__close {
  position: absolute;
  top: -14px;
  right: -14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: #a8324f;
  color: #ffffff;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.image-lightbox__close:hover {
  background: #8b263e;
}

@media (max-width: 600px) {
  .image-lightbox__close {
    top: 8px;
    right: 8px;
  }
}

.wood-num--1, .wood-card--1 { --wood-color: var(--wood-1); }
.wood-num--2, .wood-card--2 { --wood-color: var(--wood-2); }
.wood-num--3, .wood-card--3 { --wood-color: var(--wood-3); }

.wood-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

/* Column = picture, heading, text and the button pinned to the bottom, so the buttons line up */
.wood-card {
  display: flex;
  flex-direction: column;
}

.wood-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 2px solid var(--wood-color);
}

.wood-card__head .wood-num {
  width: 38px;
  height: 38px;
  font-size: 1.1rem;
}

.wood-card__badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--wood-color);
  margin-bottom: 2px;
}

.wood-card h3 {
  margin: 0;
  font-size: 1.35rem;
  color: #1b4332;
}

.wood-card__text p {
  margin: 0 0 10px;
  font-size: 0.95rem;
  line-height: 1.55;
  color: #4a5568;
}

.wood-card__text p:last-child {
  margin-bottom: 0;
}

.wood-card__text strong {
  color: #1b4332;
}

.wood-card__footer {
  margin-top: auto;
  padding-top: 20px;
  text-align: center;
}

@media (max-width: 900px) {
  .wood-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .wood-section {
    padding: 40px 15px;
  }

  .wood-header h2 {
    font-size: 1.8rem;
  }
}

/* ---- Home — "Výběr produktů" page component (PageComponents/productShowcase.latte) ---- */
.showcase-products-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 20px;
  box-sizing: border-box;
}

.showcase-products-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 40px auto;
}

.showcase-section-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #2d6a4f;
  border: 1px solid #2d6a4f;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 15px;
}

.showcase-products-header h2 {
  font-size: 2.2rem;
  color: #1b4332;
  margin: 0 0 12px 0;
  font-weight: 700;
}

.showcase-products-header p {
  color: #64748b;
  font-size: 1rem;
  line-height: 1.5;
  margin: 0;
}

/* ---- Home/test.latte (scratch/test content, not linked from any route) ---- */
.profipools-container {
    max-width: 700px;
    max-height: 530px;
    margin-left: auto;
    margin-right: auto;
    background-color: #e6e6e6;
}

.profipools-grid-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    gap: 1rem;
}

.profipools-grid-item {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    text-align: center;
}

.profipools-title {
    font-size: 3rem;
    text-align: center;
}

.profipools-container-bottom-text {
    text-align: center;
}

.profipools-grid-img {
    width: 80px;
    height: 80px;
    margin: auto;
}

.profipools-colored {
    color: #025692;
}

.profipools-vertical-line {
    width: 1px;
    background-color: black;
    align-self: stretch;
}

.profipools-textBlock {
    display: inline-grid;
}

.profipools-icon-check {
    color: #025692;
    font-size: 3rem;
}

.profipools-grid-item p,
.profipools-grid-item h3 {
    margin: 0;
}

/* Replace former style="font-size:20px"/"font-size:18px" inline styles */
.profipools-text-20 { font-size: 20px; }
.profipools-text-18 { font-size: 18px; }

/* ---- Verified orphaned/dead CSS (no matching live markup anywhere) ---- */
/* ContactPage/default.latte: these selectors had no matching HTML in that
   file even before this refactor (confirmed by grep) — looks like a
   contact form that was designed but never wired up. */
.contact-content{
    max-width:1100px;
    margin:50px auto;
    display:grid;
    grid-template-columns:2fr 1fr;
    gap:28px;
    padding:0 20px;
}

.contact-form-card,
.contact-info-card{
    background:#f2eee2;
    border-radius:18px;
    padding:34px;
    box-shadow:0 8px 24px rgba(0,0,0,.05);
}

.contact-form-card h2,
.contact-info-card h2{
    margin-bottom:12px;
}

.contact-form-card p{
    color:#64748b;
    margin-bottom:28px;
}

.contact-form-card .form-row{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:18px;
}

.contact-form-card .form-group{
    margin-bottom:18px;
}

.contact-form-card .form-group label{
    display:block;
    margin-bottom:8px;
    font-weight:600;
}

.contact-form-card .form-group input,
.contact-form-card .form-group textarea{
    width:100%;
    padding:14px;
    border:1px solid #d1d5db;
    border-radius:10px;
    font-size:15px;
    transition:.2s;
}

.contact-form-card .form-group input:focus,
.contact-form-card .form-group textarea:focus{
    outline:none;
    border-color:#8b263e;
    box-shadow:0 0 0 3px rgba(139,38,62,.12);
}

.contact-form-card .btn-primary{
    background:#8b263e;
    color:white;
    border:none;
    padding:14px 26px;
    border-radius:10px;
    cursor:pointer;
    font-size:16px;
    font-weight:600;
}

.contact-form-card .btn-primary:hover{
    background:#742035;
}

.contact-info-card ul{
    list-style:none;
    padding:0;
    margin:22px 0;
}

.contact-info-card li{
    padding:12px 0;
    border-bottom:1px solid #f1f5f9;
}

.contact-info-card li::before{
    content:"✓";
    color:#8b263e;
    font-weight:bold;
    margin-right:10px;
}

.note{
    background:#fff7ed;
    border-left:4px solid #8b263e;
    padding:16px;
    border-radius:8px;
    color:#7c2d12;
    font-size:14px;
}

@media(max-width:900px){
    .contact-content{
        grid-template-columns:1fr;
    }
    .contact-form-card .form-row{
        grid-template-columns:1fr;
    }
}

/* CreateUser modal */
/* NOTE: CreateUserComponent/createUser.latte is not instantiated by any
   presenter (CreateUserFactory has no createComponent... caller anywhere
   in app/) — this block through the end of the "User Page CSS" section
   below styles dead/unreachable markup. Left in place undisturbed rather
   than guessed-deleted; flagged here and in .claude/architecture.md. */
.createUserModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    z-index: 1000;
    box-sizing: border-box;
    font-family: "Inter", Arial, sans-serif;
}

.createUserModal .form-card {
    position: relative;
    width: 100%;
    max-width: 500px;
    background: #f2eee2;
    border-radius: 20px;
    padding: 36px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .2);
}

.createUserModal .form-card h2 {
    margin: 0;
    font-size: 30px;
    color: #1e293b;
}

.createUserModal .subtitle {
    margin: 8px 0 28px;
    color: #64748b;
    font-size: 15px;
}

.createUserModal .form-group {
    margin-bottom: 20px;
}

.createUserModal .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #334155;
}

.createUserModal .form-input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    font-size: 15px;
    transition: .2s;
    background: #fff;
    box-sizing: border-box;
}

.createUserModal .form-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, .15);
}

.createUserModal .textarea {
    min-height: 120px;
    resize: vertical;
}

.createUserModal .form-actions {
    margin-top: 28px;
}

.createUserModal .btn-primary {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease;
}

.createUserModal .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(79, 70, 229, .35);
}

.createUserModal .btn-primary:active {
    transform: translateY(0);
}

.createUserModal .error {
    color: #dc2626;
    font-size: 14px;
    margin-top: 6px;
}

.createUserModal .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    color: #64748b;
    text-decoration: none;
    border-radius: 50%;
    transition: background-color .15s ease, color .15s ease;
}

.createUserModal .close-btn:hover {
    color: #0f172a;
}

/* User Page CSS */

.userPage {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px;
    font-family: Inter, system-ui, sans-serif;
    color: #18181b;
}

.userPage__header {
    margin-bottom: 28px;
}

.userPage__title {
    margin: 0;
    font-size: 32px;
    letter-spacing: -0.8px;
}

.userPage__subtitle {
    margin: 6px 0 0;
    color: #71717a;
}

/* Actions Grid Block */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

/* Action Card Block */
.action-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    border: 1px solid #e4e4e7;
    border-radius: 14px;
    background: #f2eee2;
    color: #18181b;
    text-decoration: none;
    transition: .2s;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, .07);
}

.action-card--primary {
    background: #18181b;
    color: white;
    border-color: #18181b;
}

.action-card__icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #e4dfca;
    color: #18181b;
    font-size: 22px;
}

.action-card--primary .action-card__icon {
    background: #3f3f46;
    color: white;
}

.action-card__content {
    display: flex;
    flex-direction: column;
}

.action-card__title {
    display: block;
}

.action-card__description {
    display: block;
    margin-top: 4px;
    color: #a1a1aa;
}

/* Table Card Block */
.table-card {
    overflow: hidden;
    border: 1px solid #e4e4e7;
    border-radius: 16px;
    background: #f2eee2;
}

.table-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px;
    border-bottom: 1px solid #e4e4e7;
}

.table-card__title {
    margin: 0 0 4px;
    font-size: 18px;
}

.table-card__subtitle {
    color: #71717a;
    font-size: 13px;
}

.table-card__search {
    width: 240px;
    padding: 10px 13px;
    border: 1px solid #d4d4d8;
    border-radius: 9px;
    outline: none;
    font-size: 14px;
}

.table-card__search:focus {
    border-color: #71717a;
}

.table-card__wrapper {
    overflow-x: auto;
}

/* Data Table Block */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table__th {
    padding: 13px 24px;
    background: #ebe6d6;
    color: #71717a;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    text-transform: uppercase;
}

.data-table__td {
    padding: 16px 24px;
    border-top: 1px solid #f4f4f5;
    font-size: 14px;
}

.data-table__row:hover .data-table__td {
    background: #ebe6d6;
}

.data-table__td--actions {
    text-align: right;
}

.data-table__comment {
    max-width: 350px;
    color: #71717a;
}

.data-table__empty {
    padding: 60px 20px;
    text-align: center;
}

.data-table__empty-title,
.data-table__empty-text {
    display: block;
}

.data-table__empty-text {
    margin-top: 5px;
    color: #71717a;
}

/* User Profile Component */
.user-profile {
    display: flex;
    align-items: center;
    gap: 11px;
}

.user-profile__avatar {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e4dfca;
    font-size: 13px;
    font-weight: 600;
}

/* Row Actions Component */
.row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
}

.row-actions__link {
    color: #52525b;
    text-decoration: none;
    font-size: 13px;
}

.row-actions__link:hover {
    text-decoration: underline;
}

.row-actions__link--danger {
    color: #dc2626;
}

/* Badge Block */
.badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 6px;
    background: #e4dfca;
    font-size: 12px;
}

/* Responsive Styles */
@media (max-width: 800px) {
    .actions-grid {
        grid-template-columns: 1fr;
    }

    .table-card__header {
        align-items: flex-start;
        gap: 15px;
        flex-direction: column;
    }

    .table-card__search {
        width: 100%;
    }
}
/* Payment fee row of the summary (Cart/payment.latte), hidden while the fee is 0 */
.summary-row[hidden] {
    display: none;
}

/* "K částce bude přidána cena za produkt dohodou" under a total with a product without a price */
.checkout-by-agreement {
    color: #8b263e;
    font-size: 0.85rem;
    font-weight: 600;
}

p.checkout-by-agreement {
    margin: 4px 0 0;
    text-align: right;
}

.checkout-totals-bar__total {
    flex-wrap: wrap;
}

.checkout-totals-bar__total .checkout-by-agreement {
    flex-basis: 100%;
    text-align: right;
}

/* ---- Idle lizard (@layout.latte, initIdleLizard() in script.js) ---- */
.idle-lizard {
    position: fixed;
    right: 16px;
    bottom: 0;
    z-index: 1300;
    width: 260px;
    max-width: 50vw;
    height: auto;
    pointer-events: none;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.idle-lizard:not([src]) {
    display: none;
}

.idle-lizard--visible {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    .idle-lizard {
        transition: none;
        transform: none;
    }
}

/* ---- Markdown texts of the administrator (MarkdownRenderer) ---- */
/* "-# text" = small text, smaller than the hero paragraph */
p.md-small {
  font-size: 0.85rem;
  line-height: 1.5;
  opacity: 0.85;
}

/* Hero / banner text is Markdown now, the spacing moved from the single <p> to the wrapper */
.hero-content__text {
  margin-bottom: 30px;
}

.hero-content .hero-content__text p {
  margin: 0 0 0.6em;
}

.banner-hero__text p {
  margin: 0 0 0.6em;
}

.hero-content__text > :last-child,
.banner-hero__text > :last-child {
  margin-bottom: 0;
}

.hero-content .hero-content__text p.md-small,
.banner-hero__content .banner-hero__text p.md-small {
  font-size: 0.85rem;
}

/* ---- Feedback button and modal (feedback.latte, initFeedback()) ---- */
.feedback-button {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 950;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #1f4d43;
    color: #fff;
    font-size: 1.5rem;
    box-shadow: 0 6px 18px rgba(15, 40, 35, 0.3);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.feedback-button:hover {
    background: #2a6355;
    transform: translateY(-2px);
}

.feedback-button:focus-visible {
    outline: 3px solid #9cc7b5;
    outline-offset: 3px;
}

.feedback-modal {
    padding: 16px;
    background: rgba(10, 30, 26, 0.6);
}

.feedback-modal [hidden] {
    display: none !important;
}

.feedback-modal__content {
    width: 480px;
    max-height: calc(100vh - 32px);
    max-width: 100%;
    box-sizing: border-box;
    overflow-y: auto;
    padding: 28px;
    border-radius: 24px;
    background: #f6f7ef;
    color: #1d3b3a;
}

.feedback-modal__close {
    position: absolute;
    top: 22px;
    right: 22px;
    padding: 4px;
    border: 0;
    background: none;
    color: #1d3b3a;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.feedback-modal__head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.feedback-modal__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: #dfece6;
    color: #2f6b55;
    font-size: 1.4rem;
}

.feedback-modal__eyebrow {
    color: #3f7a5f;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.feedback-modal__title {
    margin: 0 0 10px;
    color: #1d3b3a;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.feedback-modal__text {
    margin: 0 0 24px;
    color: #5b6b68;
    font-size: 1rem;
}

.feedback-option {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    width: 100%;
    margin-bottom: 14px;
    padding: 22px;
    border: 1px solid #dfe3da;
    border-radius: 18px;
    background: #fff;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.feedback-option:last-child {
    margin-bottom: 0;
}

.feedback-option:hover,
.feedback-option:focus-visible {
    border-color: #9cc7b5;
    box-shadow: 0 4px 14px rgba(29, 59, 58, 0.08);
    outline: none;
}

.feedback-option__icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    font-size: 1.3rem;
}

.feedback-option__icon--bug {
    background: #fbe3d9;
    color: #b4532a;
}

.feedback-option__icon--idea {
    background: #fdf0c8;
    color: #b07d10;
}

.feedback-option__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.feedback-option__title {
    color: #1d3b3a;
    font-size: 1.1rem;
    font-weight: 700;
}

.feedback-option__desc {
    color: #5b6b68;
    font-size: 0.95rem;
    line-height: 1.45;
}

.feedback-modal__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 12px;
    padding: 0;
    border: 0;
    background: none;
    color: #3f7a5f;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.feedback-modal__back:hover {
    text-decoration: underline;
}

/* honeypot, off screen instead of display:none (some bots skip hidden fields) */
.feedback-modal__trap {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.feedback-modal__account {
    margin: 0 0 16px;
    color: #5b6b68;
    font-size: 0.95rem;
    overflow-wrap: anywhere;
}

.feedback-modal__account .bi {
    margin-right: 4px;
    color: #3f7a5f;
}

.feedback-modal__field {
    position: relative;
    margin-bottom: 16px;
}

.feedback-modal__field label {
    display: block;
    margin-bottom: 6px;
    color: #1d3b3a;
    font-size: 0.9rem;
    font-weight: 600;
}

.feedback-modal__field input,
.feedback-modal__field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid #dfe3da;
    border-radius: 12px;
    background: #fff;
    color: #1d3b3a;
    font: inherit;
    font-size: 1rem;
}

.feedback-modal__field textarea {
    min-height: 140px;
    resize: vertical;
}

.feedback-modal__field input:focus,
.feedback-modal__field textarea:focus {
    border-color: #3f7a5f;
    outline: 2px solid #dfece6;
}

.feedback-modal__field input[aria-invalid="true"],
.feedback-modal__field textarea[aria-invalid="true"] {
    border-color: #d92d20;
    outline-color: #fdecec;
}

.feedback-modal__field-error {
    margin: 6px 0 0;
    color: #b42318;
    font-size: 0.85rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.feedback-modal__field-error::before {
    content: "\F33A";
    margin-right: 5px;
    font-family: "bootstrap-icons";
    vertical-align: -1px;
}

/* Error on the left, counter on the right under the textarea */
.feedback-modal__field-foot {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.feedback-modal__field-foot .feedback-modal__field-error {
    flex: 1 1 auto;
    min-width: 0;
}

.feedback-modal__counter {
    display: block;
    flex: 0 0 auto;
    margin-top: 4px;
    margin-left: auto;
    color: #8a9794;
    font-size: 0.8rem;
    text-align: right;
}

.feedback-modal__error {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #fdecec;
    color: #b42318;
    font-size: 0.9rem;
}

.feedback-modal__submit {
    width: 100%;
    padding: 13px 20px;
    border: 0;
    border-radius: 12px;
    background: #1f4d43;
    color: #fff;
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
}

.feedback-modal__submit:hover {
    background: #2a6355;
}

.feedback-modal__submit:disabled {
    opacity: 0.6;
    cursor: progress;
}

.feedback-modal__note {
    margin: 12px 0 0;
    color: #8a9794;
    font-size: 0.8rem;
    line-height: 1.45;
}

.feedback-modal__done {
    text-align: center;
}

.feedback-modal__done-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: #dfece6;
    color: #2f6b55;
    font-size: 2rem;
}

@media (max-width: 480px) {
    .feedback-button {
        right: 14px;
        bottom: 14px;
        width: 46px;
        height: 46px;
    }

    .feedback-modal__content {
        padding: 22px 18px;
        border-radius: 20px;
    }

    .feedback-modal__title {
        font-size: 1.45rem;
    }

    .feedback-option {
        gap: 14px;
        padding: 16px;
    }

    .feedback-modal__field-foot {
        flex-direction: column-reverse;
        gap: 0;
    }

    .feedback-modal__field-foot .feedback-modal__field-error {
        width: 100%;
    }
}
