/* Картка страви, кількість (з прототипу), токени для компонентів ShopCore, шторка кошика, плаваюча панель. */
.us-prod {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--us-paper);
  border-radius: 22px;
  padding: 10px;
  box-shadow:
    0 1px 0 var(--us-line),
    0 14px 30px -26px rgba(30, 26, 24, 0.5);
  transition:
    transform 0.25s,
    box-shadow 0.25s;
}
.us-prod::after {
  content: '';
  position: absolute;
  inset: 5px;
  border: 1.5px dashed rgba(200, 32, 26, 0);
  border-radius: 18px;
  pointer-events: none;
  transition: border-color 0.25s;
}
.us-prod:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 46px -28px rgba(30, 26, 24, 0.55);
}
.us-prod:hover::after {
  border-color: rgba(200, 32, 26, 0.35);
}
.us-prod[hidden] {
  display: none;
}
.us-prod__img {
  position: relative;
  display: block;
  aspect-ratio: 1/1;
  max-width: 100%;
  overflow: hidden;
  border-radius: 16px;
  background: var(--us-linen);
}
.us-prod__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.us-prod:hover .us-prod__img img {
  transform: scale(1.06);
}
.us-prod__img--ph {
  display: grid;
  place-items: center;
  background: var(--us-linen) url(../img/linen.jpg) repeat;
  background-size: 300px;
}
.us-prod__info {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  padding: 18px;
  color: var(--us-paper);
  background: linear-gradient(180deg, rgba(30, 26, 24, 0.15) 0%, rgba(30, 26, 24, 0.88) 55%);
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.25s,
    transform 0.25s;
}
.us-prod__img:hover .us-prod__info,
.us-prod__img:focus-visible .us-prod__info {
  opacity: 1;
  transform: none;
}
.us-prod__info b {
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.8;
}
.us-prod__sk {
  font-size: 13.5px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.us-prod__kb {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}
.us-prod__kb span {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.16);
  font-variant-numeric: tabular-nums;
}
.us-prod__kb span:first-child {
  background: var(--us-red);
}
.us-prod__info small {
  font-size: 11px;
  opacity: 0.65;
}
.us-prod__body {
  display: flex;
  flex-direction: column;
  padding: 14px 8px 6px;
  flex: 1;
}
.us-prod__cat {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--us-red);
  margin-bottom: 6px;
}
.us-prod__name {
  font-size: 17.5px;
  font-weight: 600;
  line-height: 1.25;
  margin: 0 0 8px;
  text-wrap: balance;
}
.us-prod__name a:hover {
  color: var(--us-red);
}
.us-prod__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--us-muted);
  font-variant-numeric: tabular-nums;
}
.us-prod__w {
  font-weight: 700;
  color: var(--us-ink);
  background: var(--us-linen);
  padding: 3px 9px;
  border-radius: 999px;
}
.us-prod__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
}
.us-prod__price {
  font-family: var(--us-body);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  font-size: 30px;
  line-height: 1;
  white-space: nowrap;
}
.us-prod__price small {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  margin-left: 5px;
  color: var(--us-muted);
}
.us-qty {
  display: flex;
  align-items: center;
  height: 42px;
  border: 1.5px solid var(--us-line);
  border-radius: 999px;
  background: #fff;
  flex: none;
}
.us-qty__b {
  width: 36px;
  height: 100%;
  font-size: 20px;
  font-weight: 500;
  color: var(--us-red);
  border-radius: 999px;
}
.us-qty__b:hover {
  background: rgba(200, 32, 26, 0.07);
}
.us-qty__v {
  width: 26px;
  height: 100%;
  border: 0;
  background: none;
  text-align: center;
  font: 700 16px var(--us-body);
  color: var(--us-ink);
  padding: 0;
}
.us-prod__add {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  margin-top: 12px;
  border-radius: 14px;
  background: var(--us-red);
  color: var(--us-paper);
  font-weight: 600;
  font-size: 16px;
  position: relative;
  overflow: hidden;
  transition: background 0.2s;
}
.us-prod__add::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1.5px dashed rgba(255, 252, 247, 0.45);
  border-radius: 10px;
  pointer-events: none;
}
.us-prod__add:hover {
  background: var(--us-red-deep);
}
.us-prod__add svg {
  width: 21px;
  height: 21px;
  flex: none;
}
.us-prod__add.is-done {
  background: #2f8f4e;
}
@media (max-width: 760px) {
  .us-prod__cat {
    display: none;
  }
  .us-prod {
    padding: 6px;
    border-radius: 16px;
  }
  .us-prod__img {
    border-radius: 12px;
  }
  .us-prod__info {
    display: none;
  }
  .us-prod__body {
    padding: 10px 4px 2px;
  }
  .us-prod__name {
    font-size: 15px;
  }
  .us-prod__meta span:last-child {
    display: none;
  }
  .us-prod__foot {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding-top: 10px;
  }
  .us-prod__price {
    font-size: 24px;
  }
  .us-qty {
    justify-content: space-between;
  }
  .us-qty__b {
    width: 44px;
  }
  .us-prod__add {
    height: 44px;
    margin-top: 8px;
    font-size: 15px;
  }
}

.us-prod__ph {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--us-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.us-prod__ph::before {
  content: '';
  width: 34px;
  height: 34px;
  background: url(../img/rhomb.svg) center/contain no-repeat;
  opacity: 0.8;
}
.us-prod__img--ph {
  display: grid;
  place-items: center;
}
.us-prod__add.is-added {
  background: #2f8f4e;
}
.us-prod__add {
  text-decoration: none;
  border: 0;
  cursor: pointer;
  font-family: var(--us-body);
}
.us-qty__v {
  -moz-appearance: textfield;
}

/* ===== Токени ShopCore під бренд (перекривають нейтральні змінні батьківської теми) ===== */
:root {
  --ink: #1e1a18;
  --muted: #6b5f57;
  --line: #e6dacb;
  --bg: #f6f0e6;
  --surface: #f6f0e6;
  --surface-2: #fffcf7;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
}
.btn-brand,
.btn.btn-brand {
  font-weight: 600;
}

/* ===== Шторка кошика: вигляд «У сестер» ===== */
.cart-drawer {
  background: var(--us-linen) url(../img/linen.jpg) repeat;
  background-size: 420px;
}
.cart-drawer::before {
  content: '';
  display: block;
  height: 34px;
  flex: none;
  background: url(../img/band-pic.webp) repeat-x left center/auto 100%;
}
.cart-drawer .drawer-head h3 {
  font-family: var(--us-display);
  font-weight: 900;
  color: var(--us-red);
  font-size: 26px;
}
.cart-drawer .d-count {
  font-family: var(--us-body);
  color: var(--us-muted);
}
.cart-drawer .free-ship {
  padding: 12px 14px;
  border: 1.5px dashed rgba(200, 32, 26, 0.35);
  border-radius: 14px;
  background: var(--us-paper);
  color: var(--us-ink);
  margin-bottom: 12px;
}
.cart-drawer .free-ship .bar {
  background: var(--us-line);
}
.cart-drawer .free-ship .bar i {
  background: var(--us-red);
}
.cart-drawer .free-ship .free-done {
  color: var(--us-ok);
}
.cart-drawer .d-item {
  background: var(--us-paper);
  border: 1px solid var(--us-line);
  border-radius: 14px;
  padding: 10px;
  margin-bottom: 10px;
}
.cart-drawer .d-right b {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.cart-drawer .total {
  font-weight: 800;
  font-size: 20px;
}
.cart-drawer .qty button {
  color: var(--us-red);
}
.cart-drawer .d-undo {
  background: var(--us-paper);
  border: 1px dashed var(--us-line);
}
.cart-drawer .d-up-add {
  background: var(--us-red);
}
.cart-drawer .d-up h4 {
  font-family: var(--us-display);
  color: var(--us-red);
  font-size: 18px;
}
.cart-drawer .d-quick-ask b {
  color: var(--us-red);
  text-decoration: underline;
}

/* Плаваюча панель кошика (телефон) */
.sc-cartbar {
  background: #1e1a18;
  border-radius: 18px;
}
.sc-cartbar-go {
  background: var(--us-red);
  border-radius: 12px;
}
.sc-cartbar-txt b {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: 17px;
}
.sc-cartbar-txt small {
  color: #cfc4b8;
}

/* Контраст (WCAG AA) */
.us-ctab[aria-selected='true'] span {
  background: rgba(0, 0, 0, 0.22);
  color: #fff;
}
.us-cta .us-cform__f span {
  color: #fff;
}
.us-cform__f input::placeholder {
  color: rgba(255, 255, 255, 0.85);
}
.us-prod__cat {
  color: #a3150f;
}

/* Заглушка фото в допродажі (страви без фото) */
.cart-drawer .d-up-item .d-ph {
  width: 48px;
  height: 48px;
  background: var(--us-linen);
  color: var(--us-red);
}
.cart-drawer .d-up-item .d-ph .icon {
  width: 24px;
  height: 24px;
}

/* Шторка кошика: компактніший низ, щоб на невисоких екранах лишалось місце для списку */
.cart-drawer .drawer-foot {
  gap: 8px;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px));
}
.cart-drawer .drawer-foot .btn {
  min-height: 46px;
}

/* Невисокі екрани: прибираємо другорядну кнопку, щоб список і «Оформити» не тіснились */
@media (max-height: 720px) {
  .cart-drawer .drawer-foot .btn-ghost {
    display: none;
  }
}

/* Плаваюча панель кошика не показується під відкритою мобільною панеллю меню */
html:has(.us-drawer.is-open) .sc-cartbar {
  display: none;
}

/* Телефон: відступ під нижню панель не потрібен (нижньої панелі навігації в цій темі немає) */
@media (max-width: 760px) {
  body.sc-has-bottom-bar {
    padding-bottom: 0;
  }
}
