/* Shop: cart + personal */
.sb-shop { padding: 28px 0 80px; min-height: 55vh; background: #fff; }
.sb-shop__wrap { width: min(1100px, calc(100% - 40px)); margin: 0 auto; }
.sb-shop__title { margin: 0 0 8px; font-size: 32px; font-weight: 700; }
.sb-shop__lead { margin: 0 0 28px; color: rgba(8,9,9,.5); font-size: 14px; }

.sb-shop-toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(12px);
  z-index: 12000; background: #1a1b1c; color: #fff; padding: 12px 18px; border-radius: 4px;
  font-size: 13px; font-weight: 600; opacity: 0; transition: .25s; pointer-events: none;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.sb-shop-toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

.sb-cart-empty { padding: 48px 0; text-align: center; color: rgba(8,9,9,.55); }
.sb-cart-empty a { color: var(--sb-wine2, #9d1830); }

.sb-cart-line {
  display: grid;
  grid-template-columns: 88px minmax(0,1fr) 140px 120px 40px;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid rgba(8,9,9,.08);
}
.sb-cart-line img {
  width: 88px; height: 88px; object-fit: contain; background: #f6f6f6; display: block;
}
.sb-cart-line__name { font-weight: 700; font-size: 14px; color: #222; text-decoration: none; }
.sb-cart-line__name:hover { color: var(--sb-wine2, #9d1830); }
.sb-cart-line__art { font-size: 12px; color: rgba(8,9,9,.45); margin-top: 4px; }
.sb-cart-line__price { font-weight: 700; font-size: 15px; }
.sb-cart-qty { display: inline-flex; align-items: center; border: 1px solid rgba(8,9,9,.15); border-radius: 3px; }
.sb-cart-qty button {
  width: 34px; height: 34px; border: 0; background: #f5f5f5; cursor: pointer; font-size: 16px;
}
.sb-cart-qty input {
  width: 44px; height: 34px; border: 0; border-left: 1px solid rgba(8,9,9,.12);
  border-right: 1px solid rgba(8,9,9,.12); text-align: center; font-weight: 600;
}
.sb-cart-line__sum { font-weight: 700; font-size: 16px; text-align: right; }
.sb-cart-line__rm {
  border: 0; background: transparent; color: rgba(8,9,9,.4); cursor: pointer; font-size: 22px; line-height: 1;
}
.sb-cart-line__rm:hover { color: var(--sb-wine2, #9d1830); }

.sb-cart-foot {
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-end;
  margin-top: 28px; padding-top: 20px;
}
.sb-cart-total { font-size: 28px; font-weight: 700; }
.sb-cart-total span { color: rgba(8,9,9,.45); font-size: 14px; font-weight: 600; display: block; margin-bottom: 4px; }
.sb-cart-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.sb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border: 0; border-radius: 3px; cursor: pointer;
  font-size: 13px; font-weight: 700; text-decoration: none; color: #fff;
  background: #8b1a2b;
}
.sb-btn:hover { filter: brightness(1.06); color: #fff; }
.sb-btn--ghost {
  background: #fff; color: #222; border: 1px solid rgba(8,9,9,.15);
}
.sb-btn--ghost:hover { border-color: var(--sb-wine2, #9d1830); color: var(--sb-wine2, #9d1830); }
.sb-btn--wa { background: #25d366; }

.sb-crumbs {
  margin: 0 0 14px; font-size: 13px; color: rgba(8,9,9,.45);
}
.sb-crumbs a { color: rgba(8,9,9,.55); text-decoration: none; }
.sb-crumbs a:hover { color: var(--sb-wine2, #9d1830); }

.sb-lk {
  display: grid; grid-template-columns: 240px minmax(0,1fr); gap: 32px; align-items: start;
}
.sb-lk__nav {
  border: 1px solid rgba(8,9,9,.1); border-radius: 4px; padding: 12px 0; background: #fff;
}
.sb-lk__nav a {
  display: block; padding: 11px 18px; color: #333; text-decoration: none; font-size: 14px; font-weight: 600;
}
.sb-lk__nav a:hover, .sb-lk__nav a.is-active { color: var(--sb-wine2, #9d1830); background: rgba(157,24,48,.05); }
.sb-lk__nav a.sb-lk__exit {
  margin-top: 6px; border-top: 1px solid rgba(8,9,9,.08); color: rgba(8,9,9,.55); font-weight: 600;
}
.sb-lk__nav a.sb-lk__exit:hover { color: var(--sb-wine2, #9d1830); }
.sb-lk__panel { min-width: 0; }

.sb-lk-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.sb-lk-tile {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px 16px;
  border: 1px solid rgba(8,9,9,.1);
  border-radius: 4px;
  text-decoration: none;
  color: inherit;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.sb-lk-tile:hover {
  border-color: rgba(157,24,48,.35);
  box-shadow: 0 8px 22px rgba(120,19,38,.08);
}
.sb-lk-tile__icon {
  flex: 0 0 42px; width: 42px; height: 42px; max-width: 42px; max-height: 42px;
  display: grid; place-items: center;
  border-radius: 4px;
  background: rgba(157,24,48,.08);
  color: #781326;
  overflow: hidden;
  box-sizing: border-box;
}
.sb-lk-tile__icon svg {
  width: 22px !important;
  height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
  display: block;
  flex: none;
}
.sb-lk-tile__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sb-lk-tile__body strong { font-size: 15px; font-weight: 700; color: #1a1a1a; }
.sb-lk-tile__body span { font-size: 13px; line-height: 1.4; color: rgba(8,9,9,.55); }

.sb-r360-gate__links .sb-btn { height: 42px; padding: 0 16px; font-size: 13px; }

.sb-auth {
  max-width: 420px; margin: 0 auto; border: 1px solid rgba(8,9,9,.1); padding: 28px 24px; border-radius: 4px;
}
.sb-auth h1 { margin: 0 0 8px; font-size: 26px; }
.sb-auth__lead { margin: 0 0 22px; color: rgba(8,9,9,.5); font-size: 13px; line-height: 1.45; }
.sb-auth label { display: block; font-size: 12px; font-weight: 600; margin: 0 0 6px; color: rgba(8,9,9,.65); }
.sb-auth input[type=text],
.sb-auth input[type=email],
.sb-auth input[type=tel],
.sb-auth input[type=password] {
  width: 100%; height: 44px; box-sizing: border-box; margin-bottom: 14px;
  border: 1px solid rgba(8,9,9,.15); border-radius: 3px; padding: 0 12px; font-size: 14px;
}
.sb-auth__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; font-size: 13px; }
.sb-auth__err { color: #b00020; font-size: 13px; margin: 0 0 12px; min-height: 1.2em; }
.sb-auth__switch { margin-top: 18px; font-size: 13px; color: rgba(8,9,9,.55); }
.sb-auth__switch a { color: var(--sb-wine2, #9d1830); }

.sb-order {
  border: 1px solid rgba(8,9,9,.1); border-radius: 4px; padding: 16px 18px; margin-bottom: 12px;
}
.sb-order__top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.sb-order__id { font-weight: 700; }
.sb-order__meta { font-size: 12px; color: rgba(8,9,9,.45); }
.sb-order__items { font-size: 13px; color: rgba(8,9,9,.7); line-height: 1.45; }
.sb-order__sum { margin-top: 8px; font-weight: 700; }

.sb-fav-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px;
}

@media (max-width: 900px) {
  .sb-cart-line { grid-template-columns: 64px minmax(0,1fr); grid-template-areas: "img name" "img qty" "sum sum" "rm rm"; }
  .sb-cart-line img { grid-area: img; width: 64px; height: 64px; }
  .sb-cart-line__info { grid-area: name; }
  .sb-cart-qty { grid-area: qty; }
  .sb-cart-line__price { display: none; }
  .sb-cart-line__sum { grid-area: sum; text-align: left; }
  .sb-cart-line__rm { grid-area: rm; justify-self: start; }
  .sb-lk { grid-template-columns: 1fr; }
  .sb-fav-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .sb-lk-tiles { grid-template-columns: 1fr; }
}

@media (min-width: 901px) and (max-width: 1100px) {
  .sb-lk-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
