/* Base */
body{font-family:system-ui,Arial,sans-serif;color:#111;background:#fff;margin:0}
a{text-decoration:none;color:inherit}
.container{max-width:1100px;margin:0 auto;padding:0 16px}

/* Header with brand above nav */
.header{position:sticky;top:0;z-index:30}
.brandbar{background:#fff}
.brand{display:flex;justify-content:center;align-items:center;padding:14px 0}
.brand-logo{height:40px}
.navbar{background:#ffffffcc;backdrop-filter:blur(6px);border-top:1px solid #e5e7eb;border-bottom:1px solid #e5e7eb}
.nav-inner{display:flex;gap:16px;align-items:center;justify-content:space-between;padding:10px 0}
.nav a{margin:0 10px;font-size:14px}
.btn{display:inline-flex;align-items:center;justify-content:center;padding:10px 14px;border-radius:14px;border:1px solid #e5e7eb;box-shadow:0 1px 2px rgba(0,0,0,.05);cursor:pointer}

/* Hero banner */
.hero{position:relative;min-height:340px;border-radius:16px;overflow:hidden;border:1px solid #e5e7eb;margin:18px 0;background-size:cover;background-position:center}
.hero::after{content:'';position:absolute;inset:0;background:linear-gradient(180deg, rgba(0,0,0,0.35), rgba(0,0,0,0.55));}
.hero-content{position:relative;color:#fff;padding:46px}
.hero h1{font-size:42px;line-height:1.15;margin:0 0 10px;color:#fff}
.hero p{font-size:18px;opacity:.95;max-width:720px;margin:0}

/* Cards & grid */
.grid{display:grid;gap:18px}
.grid-3{grid-template-columns:repeat(auto-fill,minmax(260px,1fr))}
.card{border:1px solid #e5e7eb;border-radius:16px;box-shadow:0 1px 2px rgba(0,0,0,.05);padding:14px;background:#fff}
.badge{padding:4px 8px;border-radius:999px;border:1px solid #e5e7eb;font-size:12px;color:#6b7280}
.input{width:100%;border:1px solid #d1d5db;padding:10px 12px;border-radius:12px}
.label{font-size:12px;color:#6b7280;margin-bottom:6px}
.footer{margin-top:60px;border-top:1px solid #e5e7eb;padding:24px 0;font-size:14px;color:#6b7280}
.price{font-weight:600}
h1{font-size:28px;margin:0 0 12px}
h2{font-size:22px;margin:20px 0 8px}
.text-muted{color:#6b7280}
.table{width:100%;border-collapse:collapse}
.table th,.table td{border-bottom:1px solid #e5e7eb;padding:10px;text-align:left}
img{max-width:100%;height:auto;border-radius:12px;border:1px solid #e5e7eb}
.thumb{height:80px;border-radius:10px;border:1px solid #e5e7eb}

/* Mobile */
@media (max-width:720px){
  .nav{display:flex;flex-wrap:wrap;gap:10px}
  .hero{min-height:260px}
  .hero h1{font-size:30px}
  .hero-content{padding:26px}
}

/* Шапка */
.header{position:sticky; top:0; z-index:30; background:#fff;}
.brandbar{background:#fff; border-bottom:1px solid #e5e7eb;}
.brand{display:flex; justify-content:center; align-items:center; padding:18px 0 12px;}
.brand-logo{height:104px; display:block;}

/* Навбар под логотипом */
.navbar{background:#fff;}
/* Сетка: [лево-пусто] [центр — меню] [право — корзина] */
.nav-inner{
  display:grid;
  grid-template-columns: 1fr auto 1fr;
  align-items:center;
  padding:10px 0;
}

/* Меню по центру */
.nav{
  grid-column: 2;
  display:flex; justify-content:center; align-items:center;
  gap: 42px;                 /* расстояние между пунктами */
  text-transform:uppercase; font-weight:700; letter-spacing:.02em;
}
.nav a{padding:12px 0; color:#111; opacity:.9;}
.nav a:hover{opacity:1;}

/* Кнопка корзины — справа, больше не absolute */
.cart-btn{
  grid-column: 3;
  justify-self: end;
  position: static !important;
  transform: none !important;
}

/* Мобилка */
@media (max-width: 720px){
  .brand-logo{height:48px;}
  .nav{gap:14px; flex-wrap:wrap;}
  .cart-btn{grid-column: 3; justify-self:end;}
}


/* Логотип без рамки/скруглений */
.brand-logo{
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}


/* Широкий контейнер навбара (только для меню) */
.nav-inner{
  max-width: 1360px;          /* можно 1400–1440, если нужно ещё шире */
  margin: 0 auto;
  padding: 10px 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* [пусто] [меню по центру] [корзина справа] */
  align-items: center;
}

/* Меню — чуть плотнее, без переносов внутри пункта */
.nav{
  grid-column: 2;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;                  /* уменьшил интервал, было 42px */
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: .01em;      /* было .02em */
}
.nav a{
  padding: 12px 0;
  color: #111;
  white-space: nowrap;        /* НЕ переносить "Публічна оферта" на 2 строки */
}

/* Кнопка корзины — справа, фиксированно */
.cart-btn{
  grid-column: 3;
  justify-self: end;
  position: static !important;
  transform: none !important;
}

/* Брейкпоинт — на уже узких экранах можно переносить меню */
@media (max-width: 900px){
  .nav-inner{ grid-template-columns: 1fr auto; }
  .nav{ grid-column: 1 / -1; flex-wrap: wrap; gap: 16px; }
  .cart-btn{ grid-column: 2; justify-self: end; }
}


/* Плавающая кнопка корзины */
.cart-fab{
  position: fixed;
  right: 20px;           /* подвиньте как нравится */
  top: 140px;            /* можно bottom: 20px для мобилки */
  width: 64px; height: 64px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 6px 18px rgba(0,0,0,.15);
  display: inline-flex; align-items: center; justify-content: center;
  z-index: 60;
  transition: transform .18s ease, box-shadow .18s ease;
}
.cart-fab:hover{ transform: scale(1.08); box-shadow: 0 10px 28px rgba(0,0,0,.2); }

.cart-icon svg{ opacity: .85; }

.cart-badge{
  position: absolute;
  right: -2px; bottom: -2px;
  background: #ef4444; color: #fff;
  font-weight: 700; font-size: 12px; line-height: 1;
  padding: 6px 7px; min-width: 22px; text-align: center;
  border-radius: 999px; border: 2px solid #fff;
}

/* Тултип с суммой */
.cart-tooltip{
  position: absolute;
  right: 80px;           /* расстояние до кнопки */
  background: #222; color: #fff;
  border-radius: 6px; padding: 8px 10px;
  font-weight: 700; font-size: 14px; white-space: nowrap;
  opacity: 0; transform: translateX(6px);
  transition: all .18s ease; pointer-events: none;
  box-shadow: 0 6px 18px rgba(0,0,0,.22);
}
.cart-tooltip::after{
  content: ""; position: absolute; right: -6px; top: 50%;
  transform: translateY(-50%);
  border-width: 6px; border-style: solid;
  border-color: transparent transparent transparent #222;
}
.cart-fab:hover .cart-tooltip,
.cart-fab.fab-show .cart-tooltip{  /* для мобилки по тапу */
  opacity: 1; transform: translateX(0);
}

/* На десктопе можно скрыть кнопку в навбаре, оставить только плавающую */
@media (min-width: 901px){
  .cart-btn{ display: none; }
}

/* Мобильная адаптация */
@media (max-width: 820px){
  .cart-fab{ right: 14px; top: auto; bottom: 18px; width: 60px; height: 60px; }
  .cart-tooltip{ right: 72px; }
}


/* Каталог: сделаем сетку плотнее и карточки меньше */
.grid.grid-3{
  /* было minmax(260px, 1fr) */
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* На широких экранах — ровно 4 колонки; на средних — 3 */
@media (min-width: 1200px){
  .grid.grid-3{ grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) and (max-width: 1199px){
  .grid.grid-3{ grid-template-columns: repeat(3, 1fr); }
}

/* (необязательно) ограничить высоту обложки, если хотите ещё компактнее */
/* .grid.grid-3 .card > a > img{ height: 280px; width: 100%; object-fit: cover; } */


/* Каталог: центруємо контент карток */
.grid.grid-3 .card{
  text-align: center;
}
.grid.grid-3 .card img{
  display:block; margin:0 auto;
}

/* Назва книги великими літерами */
.grid.grid-3 .card > a + .text-muted + div{
  /* це якраз блок із назвою */
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .02em;
}

/* Ціна — інший колір (змінити під ваш бренд) */
.grid.grid-3 .card .price{
  color: #2563eb;          /* хочете інший — підставте свій HEX */
  font-weight: 800;
  margin-top: 4px;
}

/* Кнопку «Детальніше» теж по центру */
.grid.grid-3 .card .btn{
  margin: 10px auto 0;
}


/* Дві кнопки в картці: по центру, поруч */
.card-actions{
  display:flex;
  gap:10px;
  justify-content:center;
  align-items:center;
  margin-top:12px;
}
.inline-form{ display:inline; }

/* Варіації кнопок */
.btn-primary{
  background:#2563eb;
  color:#fff;
  border-color:#2563eb;
  font-weight:700;
}
.btn-primary:hover{ filter:brightness(.95); }

.btn-ghost{
  background:#fff;
  border-color:#e5e7eb;
}

/* Щоб на вузьких екранах кнопки не ламались */
@media (max-width: 480px){
  .card-actions{ flex-direction:column; }
  .card-actions .btn{ width:100%; }
}


/* Выравнивание и оформление карточек */
.grid.grid-3 .card{ text-align:center; }
.grid.grid-3 .card img{ display:block; margin:0 auto; }
.grid.grid-3 .card .book-title{
  font-weight:800; text-transform:uppercase; letter-spacing:.02em; margin-top:2px;
}
.grid.grid-3 .card .price{ color:#2563eb; font-weight:800; margin-top:4px; }

/* Две кнопки в одной строке */
.card-actions{ display:flex; gap:10px; justify-content:center; align-items:center; margin-top:12px; }
.inline-form{ display:inline; }
.btn-primary{ background:#2563eb; color:#fff; border-color:#2563eb; font-weight:700; }
.btn-primary:hover{ filter:brightness(.95); }
.btn-ghost{ background:#fff; border-color:#e5e7eb; }


/* === ЕДИНООБРАЗНЫЕ КАРТОЧКИ В КАТАЛОГЕ === */
.grid.grid-3 .card{
  /* делаем карточку флекс-колонкой и пинним кнопки вниз */
  display: flex;
  flex-direction: column;
  text-align: center;
  min-height: 280px;          /* общая высота карточки, подгоните при желании */
}

/* Зона обложки фиксированной высоты, картинка вписывается */
.grid.grid-3 .card > a:first-child{
  height: 240px;              /* высота зоны обложки на десктопе */
  display: flex; align-items: center; justify-content: center;
}
.grid.grid-3 .card > a:first-child img{
  height: 100%; width: auto; max-width: 100%;
  object-fit: contain;        /* не режем изображение */
  margin: 0 auto;
}

/* Автор / Название / Цена — стабильные блоки одинаковой высоты */
.grid.grid-3 .card .book-author{ min-height: 12px; margin-top: 4px; }
.grid.grid-3 .card .book-title{
  min-height: 48px;           /* чтобы 1–2 строки не «гуляли» */
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; text-transform: uppercase; letter-spacing: .02em;
  margin-top: 1px;
}
.grid.grid-3 .card .price{
  color: #e85d3d;             /* акцентный цвет цены (поменяйте под бренд) */
  font-weight: 800; margin-top: 4px;
}

/* Кнопки всегда у нижней кромки карточки */
.grid.grid-3 .card .card-actions{
  margin-top: auto;           /* магия: прижимает блок вниз */
  padding-top: 10px;
  display: flex; gap: 10px; justify-content: center; align-items: center;
}
.inline-form{ display: inline; }
.btn-primary{ background:#2563eb; color:#fff; border-color:#2563eb; font-weight:700; }
.btn-primary:hover{ filter: brightness(.95); }
.btn-ghost{ background:#fff; border-color:#e5e7eb; }

/* Сетка: 4 колонки на широких, 3 — на средних (как обсуждали) */
@media (min-width: 1200px){ .grid.grid-3{ grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) and (max-width: 1199px){ .grid.grid-3{ grid-template-columns: repeat(3, 1fr); } }

/* Чуть ниже высоты обложки на узких экранах */
@media (max-width: 900px){
  .grid.grid-3 .card{ min-height: 460px; }
  .grid.grid-3 .card > a:first-child{ height: 240px; }
}
@media (max-width: 600px){
  .grid.grid-3 .card{ min-height: 420px; }
  .grid.grid-3 .card > a:first-child{ height: 210px; }
  .grid.grid-3 .card .card-actions{ flex-direction: column; }
}

/* --- если классы не добавляли, fallback для названия: --- */
.grid.grid-3 .card > a + .text-muted + div{
  font-weight: 600; text-transform: uppercase; letter-spacing: .02em;
  min-height: 48px; display: flex; align-items: center; justify-content: center;
}


/* Компактная карточка */
.grid.grid-3 .card{ min-height: 300px; }            /* вы уже поставили */

/* Сделаем зону обложки ниже, чтобы осталось место под текст и кнопки */
.grid.grid-3 .card > a:first-child{ height: 200px; } /* было 280px */

/* Чуть плотнее текст */
.grid.grid-3 .card .book-title{
  min-height: 32px;        /* было 48px */
  margin-top: 2px;
  line-height: 1.15;
}
.grid.grid-3 .card .price{ margin-top: 2px; }

/* Кнопки ближе к тексту, но по-прежнему у низа */
.grid.grid-3 .card .card-actions{
  margin-top: auto;
  padding-top: 6px;
  gap: 8px;
}
.card-actions .btn{ padding: 8px 14px; }  /* компактнее сами кнопки */


/* Каталог — автор и назва */
.grid.grid-3 .card .book-author{
  font-size: 12px;   /* ← размер автора */
}
.grid.grid-3 .card .book-title{
  font-size: 14px;   /* ← размер названия */
  /* при желании: */
  /* font-weight: 800; text-transform: uppercase; letter-spacing: .02em; */
}


/* Кнопки-«таблетки» одинакового размера с иконками */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease, color .12s ease, border-color .12s ease;
  white-space: nowrap;
}
.btn:hover{ transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0,0,0,.08); }

/* одинаковая высота/ширина */
.btn-lg{ height: 40px; padding: 0 16px; }
.btn-pill{ border-radius: 999px; }
.btn-equal{ min-width: 128px; }      /* при желании 136/140px */

/* Иконка внутри */
.btn .btn-ic{ flex: 0 0 auto; }

/* Варианты */
.btn-ghost{
  background: #fff;
  color: #111;
  border-color: #e5e7eb;
}
.btn-ghost:hover{ background: #f8f9fb; }

.btn-primary{
  background: #2563eb;         /* бренд-синий — поменяйте при желании */
  border-color: #2563eb;
  color: #fff;
}
.btn-primary:hover{ filter: brightness(.95); }

/* На очень узких экранах — в столбик и на всю ширину */
@media (max-width: 480px){
  .card-actions{ flex-direction: column; }
  .btn-equal{ width: 100%; min-width: 0; }
}

/* Одинаковые кнопки "Опис" и "Купити" в карточке */
.card-actions a.btn,
.card-actions button.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  line-height: 1 !important;
  box-sizing: border-box;
  border-radius: 999px;
  padding: 0 16px !important;     /* убираем вертикальные паддинги */
  height: 40px !important;        /* фикс. высота */
}

/* одинаковая ширина */
.card-actions .btn-equal{
  width: 132px !important;        /* можно 128–140 по вкусу */
}

/* иконки внутри */
.card-actions .btn .btn-ic{
  width: 18px; height: 18px; flex: 0 0 auto;
}

/* варианты оформления (на всякий случай перекроем) */
.card-actions .btn-ghost{
  background:#fff; color:#111; border:1px solid #e5e7eb;
}
.card-actions .btn-primary{
  background:#2563eb; color:#fff; border:1px solid #2563eb;
}


/* На десктопе делаем высокий блок */
.footer-hero .inner{
  min-height: 360px;                       /* подберите 320–480px */
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 0 16px;
}


/* Логотип в футере: крупнее и БЕЗ рамки */
.footer-hero .footer-logo{
  height: 140px;              /* ↑ сделайте 120–140px, если нужно ещё больше */
  width: auto;
  display: block;
  margin: 12px auto 8px;
  border: none !important;    /* убираем ваш общий border img */
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  outline: none !important;
  filter: brightness(0) invert(1); /* чтобы SVG стал белым на бежевом фоне */
}

/* Адаптив: поменьше на узких экранах */
@media (max-width: 900px){ .footer-hero .footer-logo{ height: 88px; } }
@media (max-width: 520px){ .footer-hero .footer-logo{ height: 72px; } }

/* На всякий случай снимаем рамку со всех картинок внутри бежевого блока */
.footer-hero img{ border: none !important; border-radius: 0 !important; box-shadow: none !important; }


.logos-row{
  display:flex; gap:48px;
  justify-content:center; align-items:center; flex-wrap:wrap;
}
.logos-row img{ height:28px; opacity:.9; filter:grayscale(100%); }
.logos-row img[alt*="Mastercard"]{ opacity:.6; }  /* светлее, как на образце */
.logos-row img[alt*="Google"]{ opacity:.75; }
.logos-row img:hover{ opacity:1; filter:none; }
@media (max-width:600px){ .logos-row{ gap:24px; } .logos-row img{ height:22px; } }


/* ==== Бейдж "NEW / ХІТ / -10%" на карточке ==== */
.grid.grid-3 .card{ position:relative; }

.product-badge{
  position:absolute;
  top:-10px;                /* над карточкой */
  right:-10px;
  background:var(--badge-bg, #ef4444); /* цвет по умолчанию — красный */
  color:#fff;
  font-weight:800;
  font-size:12px;
  padding:10px 12px;
  line-height:1;
  border-radius:999px;
  border:2px solid #fff;    /* тонкое белое кольцо вокруг */
  box-shadow:0 8px 20px rgba(0,0,0,.18);
  letter-spacing:.02em;
  text-transform:uppercase;
  pointer-events:none;
}
@media (max-width:600px){
  .product-badge{ font-size:11px; padding:8px 10px; top:-8px; right:-8px; }
}

.grid.grid-3 .card > a.cover{
  height: 200px;                     /* твоя высота зоны обложки */
  display:flex; align-items:center; justify-content:center;
}
.grid.grid-3 .card > a.cover img{
  height:100%; width:auto; max-width:100%; object-fit:contain; margin:0 auto;
}
.product-badge{ z-index:2; }         /* бейдж поверх обложки */


/* ===== Hero ===== */
.hero{
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  min-height: 260px;               /* подгони при желании */
}

/* Фон-картинка */
.hero .hero-bg{
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

/* Затемнение поверх фона, но ПОД контентом */
.hero::after{
  content:"";
  position: absolute; inset:0;
  background: linear-gradient(0deg, rgba(0,0,0,.55), rgba(0,0,0,.35));
  z-index: 0;                      /* ниже контента */
  pointer-events: none;            /* не перехватывает клики */
}

/* Контент поверх */
.hero-inner{
  position: relative; z-index: 1;
  padding: 28px 24px 32px;
  max-width: 820px;                /* чтобы строки не тянулись на всю ширину */
  color: #fff;
}

/* Заголовок/текст — без обрезаний */
.hero h1{
  margin: 0 0 10px;
  font-size: 36px;                 /* подгони */
  line-height: 1.15;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}
.hero-sub{
  margin: 0;
  opacity: .9;
}

/* Кнопки */
.hero-cta{ display:flex; gap:12px; margin-top:16px; }
.btn{ display:inline-flex; align-items:center; justify-content:center;
      border:1px solid #e5e7eb; border-radius:12px; font-weight:700;
      padding:10px 16px; cursor:pointer; text-decoration:none; }
.btn-lg{ height:42px; padding:0 18px; }

.btn-ghost{ background:#fff; color:#111; border-color:#fff;
            box-shadow:0 6px 18px rgba(0,0,0,.18); }
.btn-primary{ background:#2563eb; border-color:#2563eb; color:#fff; }
.btn:hover{ transform: translateY(-1px); transition: transform .12s ease; }

/* Адаптив */
@media (max-width: 720px){
  .hero h1{ font-size: 28px; }
  .hero-inner{ padding: 22px 18px 24px; }
}

.footer-socials{ display:flex; gap:16px; justify-content:center; margin-top:14px; }
.footer-socials .soc{
  display:inline-flex; align-items:center; justify-content:center;
  width:34px; height:34px; border-radius:999px;
  background:#ffffff26; border:1px solid #ffffff44;
  transition:transform .12s ease, background-color .12s ease, border-color .12s ease;
  color:#fff;
}
.footer-socials .soc:hover{ transform:translateY(-1px); background:#ffffff33; border-color:#ffffff66; }
.footer-socials .soc svg{ width:18px; height:18px; }


/* ==== Admin dashboard ==== */
.admin{ max-width: 1100px; margin: 24px auto; padding: 0 16px; }
.admin-header{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
.admin-title{ margin:0; font-size:28px; font-weight:800; letter-spacing:.2px; }
.admin-quick{ display:flex; gap:10px; flex-wrap:wrap; }

.admin-grid{ display:grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap:16px; }
.admin-card{
  background:#fff; border:1px solid #e5e7eb; border-radius:16px; padding:18px;
  box-shadow: 0 2px 10px rgba(0,0,0,.04); display:flex; flex-direction:column; gap:8px;
}
.admin-card h3{ margin:6px 0 4px; font-size:18px; }
.admin-card p{ margin:0; color:#6b7280; font-size:14px; }
.admin-card .card-actions{ margin-top:auto; display:flex; gap:10px; }

.icon-circle{
  width:44px; height:44px; border-radius:999px; background:#f3f4f6;
  border:1px solid #e5e7eb; display:flex; align-items:center; justify-content:center; color:#111;
}
.icon-circle svg{ width:22px; height:22px; opacity:.85; }

.btn{ display:inline-flex; align-items:center; justify-content:center; border:1px solid #e5e7eb;
      border-radius:12px; padding:10px 14px; font-weight:700; text-decoration:none; cursor:pointer; }
.btn-primary{ background:#2563eb; border-color:#2563eb; color:#fff; }
.btn:hover{ transform: translateY(-1px); transition: transform .12s ease; }


/* === Sale price on cards === */
.price-wrap{ display:flex; gap:8px; align-items:baseline; justify-content:center; margin-top:4px; }
.price-old{ color:#9ca3af; text-decoration:line-through; font-size:14px; }
.price-new{ color:#ef4444; font-weight:800; }


/* Цена на странице товара */
.product-price{
  display:flex;                 /* гарантируем флекс */
  gap:8px;
  align-items:baseline;
  width:100%;                   /* растянуть по строке */
  justify-content:flex-start;   /* выравнивание как у заголовка (влево) */
  margin:6px 0 10px;
}

/* если хочешь по центру – замени на: */
/* .product-price{ justify-content:center; } */

.product-price .price-old{ font-size:16px; color:#9ca3af; text-decoration:line-through; }
.product-price .price-new{ font-size:22px; color:#ef4444; font-weight:800; }


/* ==== Product status pill ==== */
.status-row{ display:flex; justify-content:center; margin-top:4px; }
.status-pill{
  display:inline-flex; align-items:center;
  padding:4px 8px; border-radius:999px;
  font-size:12px; font-weight:700; line-height:1;
  border:1px solid transparent;
}
.status-in_stock  { background:#e8f5e9; border-color:#bbf7d0; color:#166534; } /* зелений */
.status-preorder  { background:#fff7ed; border-color:#fed7aa; color:#9a3412; } /* помаранчевий */
.status-coming_soon{ background:#eff6ff; border-color:#bfdbfe; color:#1e3a8a; } /* синій */


/* ===== Privacy page (scoped) ===== */
.privacy-page .container{max-width:1100px;margin:0 auto;padding:10 16px;}
.privacy-hero{
  background: radial-gradient(120% 120% at 10% -10%, # 0%, #9e8465 25%, # 60%);
  color:#000000;
  padding:40px 0 52px;
  position:relative;
  overflow:hidden;
}
.privacy-hero:after{ /* легкая вуаль */
  content:""; position:absolute; inset:0; backdrop-filter: blur(2px) saturate(110%); opacity:.15;
}
.privacy-hero h1{margin:0 0 8px; font-size:32px; letter-spacing:.2px;}
.privacy-hero .lead{margin:0; opacity:.9}

.privacy-grid{display:grid; grid-template-columns: 260px 1fr; gap:24px; padding:28px 0 56px;}
@media (max-width: 900px){
  .privacy-grid{grid-template-columns: 1fr;}
  .privacy-toc{position:relative; top:auto;}
}

.privacy-toc{position:sticky; top:12px; align-self:start;}
.privacy-toc nav{background:#fff; border:1px solid #eee; border-radius:14px; padding:14px; box-shadow:0 4px 20px rgba(0,0,0,.04);}
.privacy-toc .toc-title{font-weight:800; font-size:13px; letter-spacing:.04em; text-transform:uppercase; color:#6b7280; margin-bottom:8px;}
.privacy-toc a{display:block; padding:8px 10px; border-radius:10px; color:#111; text-decoration:none; font-weight:600;}
.privacy-toc a:hover{background:#f3f4f6;}
.privacy-note{margin-top:10px; font-size:12px; color:#6b7280;}

.privacy-content{display:grid; gap:16px;}
.privacy-card{
  background:#fff; border:1px solid #eee; border-radius:16px; padding:18px 18px 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,.03);
}
.privacy-card h2{margin:0; font-size:20px;}
.pc-head{display:flex; align-items:center; gap:10px; margin-bottom:10px;}
.pc-ico{display:inline-grid; place-items:center; width:36px; height:36px; border-radius:999px; background:#f3f4f6;}
.pc-list{margin:8px 0 0 18px;}
.privacy-card .link{color:#2563eb; font-weight:700; text-decoration:none;}
.privacy-card .link:hover{text-decoration:underline;}


/* якорный сдвиг, чтобы шапка не перекрывала заголовок */
:root { --header-offset: 200px; }            /* при необходимости подстрой: 80–120px */

.privacy-page .privacy-card[id]{
  scroll-margin-top: var(--header-offset);  /* современный способ */
}

/* Небольшой фолбэк для старых браузеров */
.privacy-page .privacy-card[id]::before{
  content:"";
  display:block;
  height: var(--header-offset);
  margin-top: calc(-1 * var(--header-offset));
  visibility:hidden;
}

/* закругляем "шапку" страницы Політики */
.privacy-hero{
  border-radius: 18px;       /* закругление всех углов */
  overflow: hidden;          /* чтобы градиент и ::after не вылазили за радиус */
  box-shadow: 0 12px 30px rgba(0,0,0,.06); /* мягкая тень, по желанию */
  margin: 16px 0 0;          /* чуть отступ сверху, если нужно */
}

/* если нужно скруглить только верхние углы, а низ оставить прямым: */
/*
.privacy-hero{
  border-radius: 18px 18px 0 0;
  overflow: hidden;
}
*/

.fab-search{
  position: fixed;
  z-index: 950;
  width: 46px; height: 46px;
  right: 22px;      /* правый край совпадает с корзиной */
  bottom: auto;     /* будем задавать top скриптом */
}


.catalog-toolbar{
  display:flex;
  justify-content:flex-end;       /* прижимаем в правый верх */
  align-items:center;
  margin: -6px 0 10px 0;          /* подстрой: немного вверх и вниз */
}

.catalog-sort-form{
  display:flex;
  gap:10px;
  align-items:center;
}

@media (max-width: 900px){
  .catalog-toolbar{ justify-content:flex-start; }
  .catalog-sort-form .input{ min-width:220px; }
}


/* Disabled / grey button for out-of-stock */
.btn.disabled,
.btn[disabled]{
  background:#e5e7eb !important;
  border-color:#e5e7eb !important;
  color:#9ca3af !important;
  cursor:not-allowed;
  pointer-events:none;   /* щоб не клікатись */
}

/* Сіра неактивна кнопка в стилі «Купити» */
.btn-muted,
.btn-muted[disabled],
.btn.btn-pill.btn-lg.btn-equal.disabled {
  background: #f3f4f6;          /* світло-сірий фон */
  border-color: #e5e7eb;        /* світло-сіра рамка */
  color: #9ca3af;               /* сірий текст/іконка */
  cursor: not-allowed;
  pointer-events: none;         /* відключає кліки */
  box-shadow: none;             /* без тіней/ефектів */
  transform: none !important;   /* без натискання */
}

/* дрібні допи для іконки та відступів (як у синьої кнопки) */
.btn-equal{ display:inline-flex; align-items:center; gap:10px; }
.btn-ic{ display:inline-block; }
.btn-muted .btn-ic{ opacity:.7; } /* іконка трохи блідніша */

.btn.danger, .btn.btn-outline.danger{
  border-color:#ef4444;
  color:#ef4444;
}
.btn.danger:hover, .btn.btn-outline.danger:hover{
  background:#ef4444; color:#fff;
}

/* mini modal */
.modal-backdrop{
  position:fixed; inset:0; background:rgba(15,23,42,.45);
  display:none; align-items:center; justify-content:center; z-index:9999;
}
.modal{
  background:#fff; border-radius:14px; padding:18px; width:min(480px, 92vw);
  box-shadow:0 20px 60px rgba(0,0,0,.35);
  border:1px solid #e5e7eb;
}
.modal h3{ margin:0 0 8px; font-size:18px; }
.modal p{ margin:6px 0 14px; color:#64748b; }
.modal .actions{ display:flex; gap:10px; justify-content:flex-end; flex-wrap:wrap; }
.btn.ghost{ background:#fff; border-color:#e5e7eb; color:#334155; }
.btn.danger{ border-color:#ef4444; color:#ef4444; }
.btn.danger:hover{ background:#ef4444; color:#fff; }



/*
МОБИЛЬНАЯ ВЕРСИЯ
*/

/* ====== Только мобильные и планшеты — десктоп не затрагиваем ====== */

/* <= 1024px (небольшие экраны/ноуты): чуть компактнее сетка и герой */
@media (max-width: 1024px){
  /* Каталог: 3 колонки вместо 4 */
  .products-grid, .catalog-grid, .catalog-list{
    display:grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 18px;
  }

  /* Герой-блок: в одну колонку */
  .hero{ display:grid; grid-template-columns: 1fr; gap:14px; align-items:center; }
  .hero .headline{ font-size:clamp(22px, 3.5vw, 32px); line-height:1.15; margin:0 0 8px; }
  .hero .cta-row{ display:flex; flex-wrap:wrap; gap:10px; }
}

/* <= 768px (планшет): 2 колонки каталога, меню плотнее */
@media (max-width: 768px){
  /* Каталог: 2 колонки */
  .products-grid, .catalog-grid, .catalog-list{
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 14px;
  }

  /* Шапка/навигация — компактнее и переносится в 2 строки при необходимости */
  .header, .topbar, .nav-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap; }
  .site-nav, .nav{ display:flex; flex-wrap:wrap; gap:10px 12px; }
  .site-nav a, .nav a{ white-space:nowrap; }

  /* Кнопки/поля: чуть больше кликабельность */
  .btn{ padding:10px 14px; }
  .input, .select{ padding:10px 12px; }
}

/* <= 480px (телефон): 1 колонка каталога, блоки на всю ширину */
@media (max-width: 480px){
  /* Каталог: 1 колонка */
  .products-grid, .catalog-grid, .catalog-list{
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* Карточка: кнопки внизу и по центру */
  .product-card, .catalog-item, .card.product{ display:flex; flex-direction:column; }
  .product-card .btn-row, .catalog-item .btn-row, .card.product .btn-row{
    margin-top:auto; display:flex; gap:10px; justify-content:center; flex-wrap:wrap;
  }
  .product-card .title, .catalog-item .title, .card.product .title{ text-align:center; }
  .product-card .author, .catalog-item .author, .card.product .author{ text-align:center; }

  /* Контейнеры: небольшие поля */
  .container{ padding-left:12px; padding-right:12px; }

  /* Таблицы (админка): горизонтальный скролл */
  .table-wrap{ width:100%; overflow-x:auto; }
  .table-wrap table{ min-width:720px; }
}


/* === Исправляем положение плавающей кнопки поиска === */
/* Жёстко переопределяем старые стили (если были bottom/relative и т.п.) */
.fab-search{
  position: fixed !important;      /* отрываем от родителя, чтобы overflow не резал */
  right: 16px !important;          /* у правого края */
  top: 86px !important;            /* чуть ниже корзины; при необходимости подстрой */
  bottom: auto !important;
  z-index: 2147483646;             /* поверх всего */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  border-radius: 9999px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(0,0,0,.15);
}

/* iPhone с “чёлкой”: учитываем безопасную зону */
@supports (top: env(safe-area-inset-top)) {
  .fab-search{ top: calc(env(safe-area-inset-top) + 72px) !important; }
}

/* На совсем узких экранах можно чуть ближе к верху/краю */
@media (max-width: 768px){
  .fab-search{
    right: 14px !important;
    top: 78px !important;          /* подстрой, если иконка корзины выше/ниже */
  }
}

/* Если шапка где-то содержит overflow:hidden — выключаем, чтобы кнопка не обрезалась */
.header, .topbar{ overflow: visible !important; }


/* ===== Фиксим постер «Про нас» на мобильных (только мобилки) ===== */
@media (max-width: 768px){

  /* 0) Безопасные отступы + запрет горизонт. прокрутки */
  html, body { overflow-x: hidden !important; }
  .container, .page-content, main, .section{
    padding-left: max(16px, env(safe-area-inset-left)) !important;
    padding-right: max(16px, env(safe-area-inset-right)) !important;
  }

  /* 1) Любая обёртка постера — не должна резать содержимое */
  .hero, .about, .about-wrap, .about-grid, .poster-wrap, .hero-poster-wrap{
    overflow: visible !important;
  }

  /* 2) Если постер — ЭЛЕМЕНТ С ФОНОМ (как на скрине) */
  /* Подхватим самые типичные классы; лишние строки можно удалить */
  .about-poster,
  .poster,
  .hero .poster,
  .about .poster,
  [class*="poster"] {
    /* вместо cover ставим contain — ничего не обрезаем */
    background-size: contain !important;
    background-position: center top !important;
    background-repeat: no-repeat !important;

    /* убираем фиксированные высоты, задаём мягкие размеры */
    height: auto !important;
    min-height: 220px !important;         /* можно 200–260 */
    aspect-ratio: 16 / 9 !important;       /* даёт стабильное соотношение, без обрезаний */
    border-radius: 14px !important;
  }

  /* 3) Если где-то используется <img> внутри постера — тоже не режем */
  .about img,
  .poster img,
  .about-poster img,
  [class*="poster"] img{
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    object-position: center top !important;
    display: block !important;
    border-radius: 14px !important;
  }

  /* 4) Сетки блока «Про нас» — в одну колонку на телефоне */
  .about-grid, .about-wrap, .hero{
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    align-items: start !important;
  }

  /* 5) Текст чуть мягче по размерам, чтобы влезал без переносов за край */
  h1, .about-title, .hero .headline{
    font-size: clamp(22px, 5.5vw, 28px) !important;
    line-height: 1.15 !important;
    margin: 0 0 8px !important;
    word-break: break-word;
  }
  .about-text p, .section p{ line-height: 1.55 !important; }
}

/* супер-узкие экраны */
@media (max-width: 480px){
  .container, .page-content, main, .section{
    padding-left: max(14px, env(safe-area-inset-left)) !important;
    padding-right: max(14px, env(safe-area-inset-right)) !important;
  }
}

/* ========= ПРО НАС: фикс переполнения на мобильных ========= */
@media (max-width: 768px){

  /* 1) Глобально запретим горизонтальный скролл на странице */
  html, body { overflow-x: hidden; }

  /* 2) Карточка не должна «резать» контент */
  .about .about-card{
    overflow: visible !important;         /* если было hidden — отключаем */
    border-radius: 18px;                  /* можно оставить как есть */
    padding: 16px;                        /* безопасные отступы внутри */
  }

  /* 3) Вся сетка и контент — строго в ширину экрана */
  .about .about-grid{
    width: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
  .about .about-content{
    width: 100% !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }

  /* 4) Текст не должен вылазить за правый край */
  .about .about-content,
  .about .about-list,
  .about .about-list li{
    max-width: 100% !important;
    overflow-wrap: anywhere;   /* переносим длинные слова */
    word-break: break-word;
  }

  /* 5) Кнопки: перенос, чтобы они не растягивали карточку */
  .about .about-ctas{
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }
  .about .about-ctas .btn{
    flex: 1 1 auto;
    min-width: 48%;         /* две кнопки в ряд; можно 100% если хочешь столбиком */
    max-width: 100%;
  }

  /* 6) Если где-то в теме стоит общий overflow:hidden — подстрахуемся */
  .about * { box-sizing: border-box; }
}


/* ==================== ABOUT: мобильная доводка ==================== */
@media (max-width: 768px){

  /* Карточка и сетка */
  .about .about-card{
    padding: 14px 14px 16px;
    border-radius: 18px;
    overflow: visible;
  }
  .about .about-grid{
    width: 100%;
    margin: 0;
    gap: 12px;
  }
  .about .about-content{
    width: 100%;
    padding: 0;
    box-sizing: border-box;
  }

  /* Заголовок и тексты — немного компактнее */
  .about h2{
    font-size: 32px;          /* было слишком крупно, ломало строки */
    line-height: 1.12;
    margin: 4px 0 10px;
  }
  .about .lead{
    font-size: 16.5px;
    line-height: 1.55;
    margin: 0 0 10px;
  }
  .about p{
    font-size: 16px;
    line-height: 1.55;
    margin: 0 0 10px;
  }

  /* Список — плотнее и без переполнений */
  .about .about-list{
    margin: 8px 0 14px;
    gap: 8px;
  }
  .about .about-list li{
    font-size: 16px;
    line-height: 1.5;
    overflow-wrap: anywhere;  /* переносим длинные слова */
    word-break: break-word;
  }

  /* Изображение: ставим вверху, обрезаем под ratio, без “вываливания” */
  .about .about-visual{
    order: -1;                /* картинка над текстом на мобилке */
    margin: -12px -12px 10px; /* растягиваем до краёв карточки */
  }
  .about .about-poster{
    border-radius: 16px;
    overflow: hidden;
  }
  .about .about-poster img{
    display: block;
    width: 100%;
    height: 180px;            /* комфортная высота на мобилке */
    object-fit: cover;        /* аккуратная обрезка без искажений */
  }

  /* Кнопки: столбиком и на всю ширину */
  .about .about-ctas{
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .about .about-ctas .btn{
    width: 100%;
  }

  /* Подстраховка от горизонтального скролла */
  html, body{ overflow-x: hidden; }
  .about *{ box-sizing: border-box; max-width: 100%; }
}

/* --- ABOUT: никаких горизонтальных скроллов и переполнений --- */
@media (max-width: 768px){

  /* Страховка на уровне страницы */
  html, body { overflow-x: hidden; }

  /* Контейнер и карточка явно не шире вьюпорта */
  .about,
  .about .about-card,
  .about .about-grid,
  .about .about-content {
    max-width: 100%;
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  /* Сетка «Про нас» на мобилке в одну колонку,
     чтобы картинка/текст точно не толкали друг друга */
  .about .about-grid{
    display: block;          /* вместо двух колонок */
  }

  /* Любые тексты внутри — обязательно переносим */
  .about h2,
  .about p,
  .about .lead,
  .about .about-list,
  .about .about-list li {
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: anywhere;
    hyphens: auto;
    min-width: 0;            /* КРИТИЧНО для flex/grid-детей */
  }

  /* Список: чёткий флекс с «сжимаемым» текстом */
  .about .about-list {
    margin-right: 0;
    padding-right: 0;
  }
  .about .about-list li{
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;            /* не даём элементу раздвинуть контейнер */
  }
  .about .about-list li svg{
    flex: 0 0 22px;          /* иконка фиксированной ширины */
    width: 22px;
    height: 22px;
    margin-top: 3px;
  }
  /* сам текст пункта (всё, что не svg) пусть сжимается */
  .about .about-list li > :not(svg){
    min-width: 0;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  /* Кнопки под текстом — без nowrap, во всю ширину */
  .about .about-ctas{
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 16px;
  }
  .about .about-ctas .btn{
    width: 100%;
    white-space: normal;     /* разрешаем перенос внутри кнопок */
    box-sizing: border-box;
  }

  /* Картинка в правой колонке — не шире контейнера */
  .about .about-visual,
  .about .about-visual img{
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
    overflow: hidden;
  }
}

/* ====== Responsive admin products ====== */

.table-responsive{
  width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}

/* чуть скруглим «дорожку» скролла для глаз */
.table-responsive > .table{
  min-width: 720px;               /* базовая ширина таблицы, чтобы не ломалась верстка */
  background: #fff;
}

/* Мобильная адаптация */
@media (max-width: 640px){

  /* контейнер поменьше */
  .container{ padding:16px 0; }

  /* тулбар: в столбик и на всю ширину */
  .admin-toolbar{
    flex-direction: column;
    align-items: stretch;
    gap:8px;
  }
  .admin-toolbar .input{ max-width:none; width:100%; }
  .admin-toolbar .select{ width:100%; }

  /* скролл-обёртка даёт боковой скролл, а таблицу
     не пытаемся «схлопнуть» — пусть листается по X */
  .table-responsive{
    margin: 0 -12px;              /* зрительно во всю ширину экрана */
    padding: 0 12px;
  }

  /* компактнее ячейки */
  .table th, .table td{
    padding: 10px 8px;
  }

  /* уменьшить превью */
  .thumb{ height:42px; }

  /* компактные кнопки действий */
  .table td .btn{
    padding: 8px 10px;
    font-size: 13px;
    border-radius: 10px;
  }

  /* если кнопок 2 — сделаем небольшой зазор */
  .table td .btn + .btn{ margin-left:6px; }
}
