/* jamon — вітрина jamon.com.ua: впізнаваний вигляд старого сайту (коричнева смуга, біла шапка зі знаком-окороком,
   ілюстрації категорій, картки з мітками-стрічками й зеленою «Купити», темний підвал), зібраний наново.
   Палітра — з лого й теми «brown» старого сайту: коричневий — каркас, оранжево-червоний окорок — бренд і ціна,
   оливково-зелений — дія. Кольори фіксовані (!important перебиває палітру CRM, яка приходить inline на <html>).
   Шрифти лежать поруч (themes/jamon/fonts): Roboto — текст (як на старому сайті), Rubik — знак і заголовки. */

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('jamon/fonts/roboto-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('jamon/fonts/roboto-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('jamon/fonts/rubik-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('jamon/fonts/rubik-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --store-bg-page: #ffffff !important;
  --store-surface: #ffffff !important;
  --store-header-bg: #ffffff !important;
  --store-text: #2b2220 !important;
  --store-text-muted: #6e625d !important;
  --store-border: #e6dfdb !important;
  --store-nav-hover: #f4efec !important;
  --store-accent: #3d7a2e !important;
  --store-accent-contrast: #ffffff !important;
  --store-accent-soft: #eef5ea !important;
  --store-accent-ring: rgba(61, 122, 46, 0.35) !important;
  --store-font-sans: 'Roboto', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --store-radius-sm: 3px;
  --store-radius: 4px;
  --store-radius-lg: 6px;
  --store-radius-xl: 8px;
  --store-shadow-card: 0 1px 2px rgba(60, 35, 25, 0.06);
  --store-shadow-pop: 0 18px 40px -14px rgba(60, 35, 25, 0.35);
  --jm-brown: #5d4037;
  --jm-brown-2: #795548;
  --jm-cream: #f6f1ee;
  --jm-ham: #e2572b;
  --jm-ham-deep: #b8401a;
  --jm-sale: #c62828;
  --jm-green: #3d7a2e;
  --jm-green-deep: #2f6223;
  --jm-night: #2d2523;
  --jm-display: 'Rubik', 'Roboto', ui-sans-serif, system-ui, sans-serif;
  --jm-ease: cubic-bezier(0.22, 1, 0.36, 1);
  accent-color: var(--jm-green);
  caret-color: var(--jm-ham);
}

body {
  font-family: var(--store-font-sans);
}
::selection {
  background: #f8d3c3;
  color: var(--jm-night);
}
:focus-visible {
  outline: 2px solid var(--jm-ham);
  outline-offset: 2px;
}
p,
li {
  text-wrap: pretty;
}
body > .min-h-screen {
  background-image: none !important;
}
/* Телефон: темний підвал теми замість спільного світлого футера платформи. */
footer[class~='lg:hidden'] {
  display: none;
}
.store-btn {
  font-weight: 700;
}
/* Знижка — червона скрізь (картки, «Рекомендуємо», сторінка товару). */
.catalog-badge.text-brand {
  color: var(--jm-sale) !important;
}
/* Умови магазину (спільний partial): намальований шеврон замість гліфа «▾». */
details.store-collapse > summary > span[aria-hidden='true']:last-child {
  width: 0.55rem;
  height: 0.55rem;
  margin-top: 0.3rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  font-size: 0;
  transform: rotate(45deg);
}
details.store-collapse[open] > summary > span[aria-hidden='true']:last-child {
  margin-top: 0.55rem;
  transform: rotate(-135deg);
}

/* ---------- Знак ---------- */
.jm-logo {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 8px;
  color: var(--jm-ham);
}
.jm-logo-mark {
  width: 54px;
  height: 54px;
}
.jm-logo-text {
  display: grid;
  line-height: 1.02;
}
.jm-logo-text b {
  max-width: 10.5em;
  font-family: var(--jm-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.jm-logo-text small {
  margin-top: 3px;
  color: var(--jm-brown);
  font-family: var(--jm-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.jm-logo--ftr .jm-logo-text small {
  color: #cdbfb9;
}

/* ---------- Шапка ---------- */
.jm-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #fff;
  box-shadow: 0 1px 0 var(--store-border), 0 6px 16px -14px rgba(60, 35, 25, 0.4);
}
.jm-strip {
  background: var(--jm-brown);
  color: #f3e9e4;
  font-size: 13px;
}
.jm-strip-in {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 32px;
}
.jm-strip-in > a:first-child {
  color: #fff;
  font-weight: 700;
}
.jm-strip-links {
  display: flex;
  gap: 18px;
  margin-left: auto;
  font-size: 12.5px;
}
.jm-strip a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.jm-bar {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.4vw, 36px);
  min-height: 82px;
}
.jm-search {
  position: relative;
  flex: 1;
  max-width: 640px;
  margin: 0 auto;
}
.jm-search input {
  width: 100%;
  height: 44px;
  padding: 0 52px 0 16px;
  border: 1.5px solid #d8ccc6;
  border-radius: var(--store-radius);
  background: #fff;
  color: var(--store-text);
  font-size: 15px;
  transition: border-color 0.2s;
}
.jm-search input::placeholder {
  color: #85776f;
}
.jm-search input:focus {
  border-color: var(--jm-brown-2);
  outline: none;
}
.jm-search button {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  width: 44px;
  height: 36px;
  place-items: center;
  border-radius: var(--store-radius-sm);
  background: var(--jm-brown-2);
  color: #fff;
  transition: background 0.2s;
}
.jm-search button:hover {
  background: var(--jm-brown);
}
.jm-search button svg {
  width: 18px;
  height: 18px;
}
.jm-icons {
  display: flex;
  align-items: center;
  gap: 4px;
}
.jm-ibtn {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: var(--jm-brown);
  transition: background 0.2s;
}
.jm-ibtn:hover {
  background: var(--jm-cream);
}
.jm-ibtn svg {
  width: 22px;
  height: 22px;
}
/* Підписи кнопок платформи («Меню», «Огляди») — лише для читачів екрана: у шапці тільки іконки. */
.jm-ibtn > span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.jm-cart {
  align-items: center;
  gap: 8px;
  height: 42px;
  margin-left: 6px;
  padding: 0 16px 0 12px;
  border: 1.5px solid var(--jm-brown-2);
  border-radius: var(--store-radius);
  color: var(--jm-brown);
  font-weight: 700;
  transition: background 0.2s, color 0.2s;
}
.jm-cart:hover {
  background: var(--jm-brown-2);
  color: #fff;
}
.jm-cart svg {
  width: 20px;
  height: 20px;
}
.jm-nav {
  border-top: 1px solid var(--store-border);
  background: #fff;
}
/* Усі кореневі категорії в один ряд: рівні клітинки, мініатюра-ілюстрація зліва, назва до двох рядків. */
.jm-nav-in {
  display: flex;
}
.jm-nav-item {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
}
.jm-nav-item > a {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  padding: 8px 10px 7px;
  border-bottom: 2px solid transparent;
  color: #4a3d38;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  text-wrap: balance;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.jm-nav-item > a span {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.jm-nav-item + .jm-nav-item > a {
  box-shadow: inset 1px 0 0 var(--store-border);
}
.jm-nav-item > a:hover,
.jm-nav-item > a[aria-current='page'] {
  border-color: var(--jm-ham);
  background: var(--jm-cream);
  color: var(--jm-ham-deep);
}
.jm-drop {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50;
  min-width: 240px;
  padding: 8px 0;
  border: 1px solid var(--store-border);
  border-radius: 0 0 var(--store-radius) var(--store-radius);
  background: #fff;
  box-shadow: var(--store-shadow-pop);
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity 0.18s var(--jm-ease), transform 0.18s var(--jm-ease), visibility 0.18s;
}
.jm-nav-item:hover > .jm-drop,
.jm-nav-item:focus-within > .jm-drop {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.jm-drop a {
  display: block;
  padding: 8px 18px;
  font-size: 14px;
}
.jm-drop a:hover {
  background: var(--jm-cream);
  color: var(--jm-ham-deep);
}

/* ---------- Головна ---------- */
.jm-banners {
  border-radius: var(--store-radius-lg);
}
.jm-hero {
  display: grid;
  justify-items: start;
  gap: 14px;
  padding: clamp(28px, 6vw, 72px) clamp(20px, 5vw, 64px);
  border-radius: var(--store-radius-lg);
  background: var(--jm-brown);
  color: #f6ece7;
}
.jm-hero h1 {
  color: #fff;
  font-family: var(--jm-display);
  font-size: clamp(30px, 5vw, 56px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.jm-hero p {
  max-width: 52ch;
  font-size: 17px;
}
.jm-btn {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  padding: 0 24px;
  border-radius: var(--store-radius);
  background: var(--jm-green);
  color: #fff;
  font-weight: 700;
  transition: background 0.2s, transform 0.15s;
}
.jm-btn:hover {
  background: var(--jm-green-deep);
}
.jm-btn:active {
  transform: scale(0.98);
}
.jm-h2 {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--store-border);
  color: var(--jm-brown);
  font-family: var(--jm-display);
  font-size: clamp(21px, 2.2vw, 26px);
  font-weight: 700;
  text-wrap: balance;
}
.jm-h2-link {
  margin-left: auto;
  color: var(--jm-ham-deep);
  font-family: var(--store-font-sans);
  font-size: 14px;
  font-weight: 500;
}
.jm-h2-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.jm-cats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.jm-cat {
  display: flex;
  height: 100%;
  flex-direction: column;
  border-radius: var(--store-radius-lg);
  background: var(--jm-cream);
  transition: background 0.25s, box-shadow 0.25s;
}
.jm-cat:hover {
  background: #f1e7e2;
  box-shadow: 0 10px 24px -18px rgba(60, 35, 25, 0.6);
}
.jm-cat-pic {
  display: grid;
  aspect-ratio: 4 / 3;
  place-items: center;
  padding: 12px 14% 0;
}
.jm-cat-pic img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform 0.5s var(--jm-ease);
}
.jm-cat:hover .jm-cat-pic img {
  transform: scale(1.06) rotate(-2deg);
}
.jm-cat-pic b {
  color: var(--jm-ham);
  font-family: var(--jm-display);
  font-size: 48px;
}
.jm-cat-name {
  padding: 8px 16px 18px;
  color: var(--store-text);
  font-family: var(--jm-display);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  text-wrap: balance;
}
.jm-logos {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.jm-logos a {
  display: grid;
  height: 84px;
  place-items: center;
  padding: 10px;
  border: 1px solid var(--store-border);
  border-radius: var(--store-radius);
  color: var(--jm-brown);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  transition: border-color 0.2s;
}
.jm-logos a:hover {
  border-color: var(--jm-brown-2);
}
.jm-logos img {
  max-width: 100%;
  max-height: 60px;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.jm-terms {
  padding: clamp(20px, 3vw, 32px);
  border-radius: var(--store-radius-lg);
  background: var(--jm-cream);
}

/* ---------- Картка ---------- */
.jm-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.jm-card {
  position: relative;
  display: flex;
  height: 100%;
  min-width: 0;
  flex-direction: column;
  border: 1px solid var(--store-border);
  border-radius: var(--store-radius-lg);
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.25s;
}
.jm-card:hover {
  border-color: #d6c8c1;
  box-shadow: 0 12px 26px -20px rgba(60, 35, 25, 0.55);
}
.jm-card-img {
  position: relative;
  display: block;
  aspect-ratio: 1;
  padding: 14px;
}
.jm-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.45s var(--jm-ease);
}
.jm-card:hover .jm-card-img img {
  transform: scale(1.04);
}
.jm-tags {
  position: absolute;
  top: 10px;
  left: -5px;
  z-index: 1;
  display: grid;
  gap: 4px;
  justify-items: start;
}
/* Стрічка з загином зліва — як мітки старого jamon.com.ua. */
.jm-tag {
  position: relative;
  padding: 3px 9px 3px 10px;
  border-radius: 0 3px 3px 0;
  background: var(--jm-brown-2);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.jm-tag::after {
  position: absolute;
  top: 100%;
  left: 0;
  border-top: 4px solid #3e2a24;
  border-left: 5px solid transparent;
  content: '';
}
.jm-tag--sale {
  background: var(--jm-sale);
}
.jm-tag--sale::after {
  border-top-color: #7f1717;
}
.jm-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  padding: 2px 14px 14px;
}
.jm-name {
  display: -webkit-box;
  min-height: 2.8em;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.jm-card a:hover .jm-name {
  color: var(--jm-ham-deep);
}
.jm-buy {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
}
.jm-prices {
  display: grid;
  font-variant-numeric: tabular-nums;
}
.jm-now {
  color: var(--jm-ham-deep);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}
.jm-now small {
  margin-left: 3px;
  font-size: 13px;
  font-weight: 500;
}
.jm-prices--sale .jm-now {
  color: var(--jm-sale);
}
.jm-was {
  color: var(--store-text-muted);
  font-size: 13px;
  white-space: nowrap;
}
.jm-pct {
  margin-left: 6px;
  padding: 0 4px;
  border-radius: 2px;
  background: var(--jm-sale);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.jm-add {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--store-radius);
  background: var(--jm-green);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.2s, transform 0.15s;
}
.jm-add svg {
  width: 17px;
  height: 17px;
}
.jm-add:hover {
  background: var(--jm-green-deep);
}
.jm-add:active {
  transform: scale(0.97);
}
.jm-add:disabled {
  background: #ece6e3;
  color: #7a6e69;
  cursor: not-allowed;
}

/* ---------- Підвал ---------- */
.jm-ftr {
  margin-top: auto;
  padding: 48px 0 26px;
  background: var(--jm-night);
  color: #d9cdc8;
  font-size: 14px;
}
.jm-ftr-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 40px;
}
.jm-ftr h2 {
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid #4a3e3a;
  color: #fff;
  font-family: var(--jm-display);
  font-size: 17px;
  font-weight: 600;
}
.jm-ftr ul {
  display: grid;
  gap: 8px;
}
.jm-ftr a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.jm-ftr .jm-logo:hover {
  text-decoration: none;
}
.jm-ftr-phone {
  display: block;
  margin-bottom: 4px;
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
}
.jm-ftr-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 16px;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid #443936;
  color: #a99a94;
  font-size: 13px;
}

/* ---------- Адаптив ---------- */
@media (max-width: 1240px) {
  .jm-nav-item > a {
    padding-inline: 6px;
    font-size: 12.5px;
  }
}
@media (max-width: 1023px) {
  .jm-bar {
    flex-wrap: wrap;
    min-height: 0;
    gap: 6px 10px;
    padding-top: 8px;
    padding-bottom: 10px;
  }
  .jm-logo-mark {
    width: 42px;
    height: 42px;
  }
  .jm-logo-text b {
    font-size: 14px;
  }
  .jm-logo-text small {
    font-size: 12px;
  }
  .jm-icons {
    margin-left: auto;
  }
  .jm-search {
    order: 5;
    flex-basis: 100%;
    max-width: none;
  }
  .jm-nav {
    overflow-x: auto;
    scrollbar-width: none;
  }
  .jm-nav::-webkit-scrollbar {
    display: none;
  }
  .jm-nav-in {
    width: max-content;
  }
  .jm-nav-item {
    flex: none;
    width: 156px;
  }
  .jm-nav-item > a {
    font-size: 13px;
  }
  .jm-drop {
    display: none;
  }
  .jm-cats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .jm-cat-name {
    padding: 6px 10px 14px;
    font-size: 14px;
  }
  .jm-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .jm-card-img {
    padding: 8px;
  }
  .jm-card-body {
    padding: 2px 10px 12px;
  }
  .jm-buy {
    flex-direction: column;
    align-items: stretch;
  }
  .jm-add {
    justify-content: center;
  }
  .jm-now {
    font-size: 18px;
  }
  .jm-logos {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .jm-ftr-grid {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
  .jm-ftr-grid > :first-child {
    grid-column: 1 / -1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .jm-drop,
  .jm-card-img img,
  .jm-cat-pic img {
    transition: none;
  }
}
