/* ——— Layout ——— */
.container { max-width: 1160px; margin: 0 auto; }
.account-wrapper{
  max-width:1160px; margin:40px auto; padding:0 20px;
  display:flex; gap:40px;
}
.account-sidebar{ width:247px; background:#fff; border:1px solid #eee; border-radius:10px; display:flex; flex-direction:column; padding:8px 0; }
.account-link{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 16px 12px 20px; font-size:18px; color:#303030; text-decoration:none; position:relative; transition:background .15s,color .15s; border-radius:8px; margin:4px 8px; }
.account-link:hover{ background:#f6f6f6; }
.account-link:focus-visible{ background:#f0f0f0; outline:2px solid rgba(194,24,31,.25); outline-offset:2px; }
.account-link.active{ color:#C2181F; background:#fff; }
.account-link.active::before{ content:""; position:absolute; left:0; top:6px; bottom:6px; width:4px; border-radius:4px; background:#C2181F; }
.counter-chip{ display:inline-flex; min-width:22px; height:22px; padding:0 6px; align-items:center; justify-content:center; border-radius:999px; font-size:12px; background:#eee; color:#303030; }
.account-link.logout{ color:#7a1216; }
.account-link.logout:hover{ background:#fff5f5; }

.account-content{
  flex:1; min-width:0;
  background:#fff; border:1px solid #eee; border-radius:10px; padding:32px;
}
.account-title{ font-size:24px; font-weight:400; margin:0 0 16px; }

/* ——— Messages ——— */
.account-messages{ list-style:none; margin:0 0 12px; padding:0; display:flex; flex-direction:column; gap:8px; }
.msg{ padding:10px 12px; border-radius:8px; border:1px solid #e6e6e6; background:#fafafa; font-size:14px; }
.msg-success{ border-color:#c6e7c6; background:#f3fbf3; }
.msg-error,.msg-danger{ border-color:#f5c2c7; background:#fff5f5; }
.msg-warning{ border-color:#ffe7b3; background:#fff9e9; }
.msg-info{ border-color:#d7e3ff; background:#f5f8ff; }

/* ——— Forms ——— */
.account-form{ display:grid; gap:16px 24px; align-items:start; }
.account-form label{ font-size:14px; color:#000; }
.account-form input,.account-form select,.account-form textarea{
  width:100%; padding:10px 12px; font-size:14px; line-height:1.4;
  border:1px solid #ccc; border-radius:8px; background:#f9f9f9;
  transition:border-color .15s, box-shadow .15s, background .15s;
}
.account-form input:focus,.account-form select:focus,.account-form textarea:focus{
  border-color:#C2181F; box-shadow:0 0 0 3px rgba(194,24,31,.12); background:#fff;
}

/* ——— Buttons ——— */
.btn{ display:inline-flex; align-items:center; justify-content:center; padding:10px 14px; border-radius:10px; font-size:14px; border:1px solid transparent; cursor:pointer; text-decoration:none; transition:background .15s,border-color .15s,color .15s,transform .05s; }
.btn:active{ transform:translateY(1px); }
.btn:disabled,.btn[aria-disabled="true"]{ opacity:.6; cursor:not-allowed; }
.btn-primary{ background:#C2181F; color:#fff; }
.btn-primary:hover{ background:#a7151b; }
.btn-light{ background:#f0f3f7; color:#1f2937; border:1px solid #e1e5ea; }
.btn-light:hover{ background:#e7ebf1; }
.btn-ghost{ background:transparent; color:#303030; border:1px solid #e6e6e6; }
.btn-ghost:hover{ background:#f8f8f8; }

/* ——— Favorites (кратко) ——— */
.goods-grid{ display:grid; gap:20px; grid-template-columns:repeat(4,1fr); }
@media (max-width:1199px){ .goods-grid{ grid-template-columns:repeat(3,1fr);} }
@media (max-width: 899px){ .goods-grid{ grid-template-columns:repeat(2,1fr);} }
@media (max-width: 599px){ .goods-grid{ grid-template-columns:1fr;} }
.good-card{ border:1px solid #eee; border-radius:12px; background:#fff; padding:14px; display:flex; flex-direction:column; transition:box-shadow .15s,border-color .15s; }
.good-card:hover{ border-color:#ddd; box-shadow:0 4px 14px rgba(0,0,0,.05); }
.good-img{ display:block; border-radius:10px; overflow:hidden; background:#fafafa; position:relative; width:100%; height:0; padding-bottom:100%; }
.good-img img{ position:absolute; inset:0; width:100%; height:100%; object-fit:contain; background:#fff; }
.good-title{ margin-top:10px; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; line-height:1.3; min-height:2.6em; color:#1f2937; text-decoration:none; font-size:15px; }
.good-title:hover{ text-decoration:underline; }
.good-article{ color:#6b7280; font-size:13px; margin-top:2px; min-height:1.3em; }
.good-price{ display:flex; align-items:baseline; gap:8px; margin-top:6px; margin-bottom: 4px;}
.good-price .cur{ font-weight:500; font-size:16px; color:#111827; }
.good-price .old{ font-size:14px; color:#9ca3af; text-decoration:line-through; }
.good-benefit{ display:inline-flex; align-items:center; justify-content:center; padding:3px 8px; border-radius:999px; font-size:12px; line-height:1; background:#f0fff4; border:1px solid #a7f3d0; color:#065f46; width:fit-content; margin-top:8px; }
.good-actions{ margin-top:auto; display:flex; flex-direction:column; gap:8px; }
.good-actions .inline{ display:block; width:100%; }
.good-actions .inline .btn{ width:100%; justify-content:center; }

.empty{ border:1px dashed #e5e7eb; border-radius:12px; padding:40px 20px; background:#fbfbfc; text-align:center; grid-column:1/-1; color:#6b7280; }

/* ——— Header line ——— */
.account-header{
  display:flex; align-items:center; gap:12px;
  padding-bottom:12px; margin-bottom:16px; border-bottom:1px solid #eee;
}
.account-header h1{ font-size:24px; font-weight:400; margin:0; }

/* ===== CART (вертикальные карточки + сужение ленты) ===== */

/* Лента корзины — делаем уже и центрируем */
.cart-main{ display:grid; grid-template-columns: 1fr 320px; gap:24px; }
@media (max-width:991px){ .cart-main{ grid-template-columns:1fr; } }

.cart-items{
  display:flex; flex-direction:column; gap:12px;
  max-width: 720px;   /* ← сужаем горизонтально */
  width: 100%;
}

/* Каждая карточка — вертикальная */
.cart-item{
  display:grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "img"
    "info"
    "actions";
  gap:12px;
  padding:14px; border:1px solid #eee; border-radius:12px; background:#fff;
  transition:border-color .15s, box-shadow .15s;
}
.cart-item:hover{ border-color:#ddd; box-shadow:0 4px 14px rgba(0,0,0,.05); }

/* Блоки по зонам */
.cart-item-img{ grid-area: img; display:block; width:140px; aspect-ratio:1/1; border-radius:10px; overflow:hidden; background:#fafafa; margin: 4px auto; }
.cart-item-img img{ width:100%; height:100%; object-fit:contain; background:#fff; }

.cart-item-info{ grid-area: info; display:flex; flex-direction:column; gap:6px; min-width:0; }
.cart-item-title{ font-size:16px; line-height:1.3; color:#1f2937; text-decoration:none; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; text-align:center; }
.cart-item-title:hover{ text-decoration:underline; }
.cart-item-sku{ color:#6b7280; font-size:13px; text-align:center; }

/* Цена/экономия — по центру */
.price-box{ display:flex; flex-direction:column; gap:6px; margin-top:2px; align-items:center; }
.price-row{ display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; justify-content:center; }
.price-current{ font-size:18px; font-weight:600; color:#111; }
.price-old{ font-size:14px; color:#9ca3af; text-decoration:line-through; }
.benefit-pill{ display:inline-flex; align-items:center; gap:6px; width:fit-content; padding:5px 10px; border-radius:999px; background:#f0fff4; border:1px solid #a7f3d0; color:#065f46; font-size:12px; line-height:1; }

/* Правая колонка (раньше) теперь низ карточки */
.cart-item-actions{
  grid-area: actions;
  display:flex; flex-direction:column; gap:10px; align-items:stretch;
}

/* Количество — по центру */
.quantity-control{ align-self:center; display:inline-flex; align-items:center; gap:8px; border:1px solid #e6e6e6; border-radius:10px; padding:6px; width:fit-content; background:#f9fafb; }
.qty-btn{ width:32px; height:32px; border:1px solid #e6e6e6; border-radius:8px; background:#fff; cursor:pointer; font-size:18px; line-height:1; }
.qty-btn:hover{ background:#f3f4f6; }
.qty-count{ width:64px; height:32px; text-align:center; border:1px solid #e6e6e6; border-radius:8px; background:#fff; }

/* Итоги позиции — растянуть на всю ширину */
.cart-item-price{ background:#fafafa; border:1px dashed #e6e6e6; border-radius:10px; padding:10px 12px; font-size:14px; }
.cart-item-price .item-unit-price{ color:#6b7280; margin-bottom:4px; text-align:center; }
.cart-item-price .item-line-total{ text-align:center; }
.cart-item-price .item-line-total b{ font-weight:500; }

/* Кнопки — на всю ширину */
.cart-item-buttons{ display:flex; flex-direction:column; gap:8px; margin-top:4px; }
.cart-item-buttons .btn{ width:100%; justify-content:center; }
.cart-item-buttons .inline{ display:block; width:100%; }

/* Боковая панель итогов */
.cart-summary-wrapper{ position:relative; }
.cart-summary{ position:sticky; top:16px; border:1px solid #eee; border-radius:12px; background:#fff; padding:16px; display:flex; flex-direction:column; gap:12px; }
.summary-row,.summary-total{ display:flex; align-items:center; justify-content:space-between; }
.summary-total{ font-size:18px; font-weight:600; margin-top:6px; }
.cart-summary .btn{ width:100%; justify-content:center; }

/* пустая корзина */
.cart-items .empty{ border:1px dashed #e5e7eb; border-radius:12px; padding:28px; background:#fbfbfc; text-align:center; color:#6b7280; }

/* ——— Responsive контейнеры ——— */
@media (max-width:1023px){
  .container{ max-width:96%; }
  .account-sidebar{ width:215px; }
  .account-link{ font-size:16px; }
  .account-content{ border:1px solid #eee; border-radius:10px; padding:24px; max-width:465px; }
}
@media (max-width:767px){
  .account-sidebar{ display:none !important; }
  .account-wrapper{ justify-content:center; }
  .account-title{ font-size:20px; }
}

/* ======================
   Orders (Мои заказы)
   ====================== */
.orders-list{ display:grid; grid-template-columns:1fr; gap:16px; }
.order-link{ display:block; color:inherit; }
.order-card{ position:relative; display:grid; grid-template-columns:1fr auto; grid-template-areas:"head chevron" "meta chevron" "sum chevron"; gap:8px 16px; padding:16px 20px; border:1px solid #eee; border-radius:10px; background:#fff; transition:border-color .2s, box-shadow .2s, transform .06s; }
.order-card:hover{ border-color:#e6c7ca; box-shadow:0 6px 18px rgba(0,0,0,.06); }
.order-card:active{ transform:translateY(1px); }
.order-card__head{ grid-area:head; display:flex; align-items:center; justify-content:space-between; gap:12px; }
.order-card__meta{ grid-area:meta; display:flex; flex-wrap:wrap; gap:10px; align-items:center; color:#777; font-size:14px; }
.order-card__sum{ grid-area:sum; margin-top:4px; display:grid; gap:6px; align-content:start; }
.order-card__chevron{ grid-area:chevron; align-self:center; width:24px; height:24px; opacity:.5; transition:opacity .2s, transform .2s; }
.order-card:hover .order-card__chevron{ opacity:.85; transform:translateX(2px); }
.order-no{ font-size:18px; font-weight:500; letter-spacing:.2px; }
.order-no .hash{ color:#8A8A8A; margin-right:4px; font-weight:400; }
.badge{ --badge-bg:#f1f1f1; --badge-fg:#303030; display:inline-flex; align-items:center; gap:6px; padding:6px 10px; font-size:13px; line-height:1; border-radius:999px; background:var(--badge-bg); color:var(--badge-fg); white-space:nowrap; }
.badge::before{ content:""; width:8px; height:8px; border-radius:999px; background:var(--badge-fg); opacity:.9; }
.badge[data-status="new"]{ --badge-bg:#FFF1F0; --badge-fg:#C2181F; }
.badge[data-status="pending"]{ --badge-bg:#FFF7E6; --badge-fg:#C47A1C; }
.badge[data-status="paid"]{ --badge-bg:#E6FFFB; --badge-fg:#0C8576; }
.badge[data-status="processing"]{ --badge-bg:#F0F5FF; --badge-fg:#3C63D6; }
.badge[data-status="shipped"]{ --badge-bg:#F5F0FF; --badge-fg:#6A47C1; }
.badge[data-status="done"]{ --badge-bg:#EDFBEA; --badge-fg:#3A7A63; }
.badge[data-status="canceled"]{ --badge-bg:#FFF0F0; --badge-fg:#B00020; }
.badge[data-status="unknown"]{ --badge-bg:#F2F2F2; --badge-fg:#777; }
.order-card__sum .row{ display:flex; align-items:baseline; justify-content:space-between; gap:16px; font-size:15px; }
.order-card__sum .label{ color:#666; }
.order-card__sum .val{ font-weight:500; color:#000; }
.order-card__sum .val.minus{ color:#B00020; }
.order-card__sum .val.free{ color:#3A7A63; }
.order-card__sum .total .label{ font-weight:500; color:#303030; }
.order-card__sum .total .val{ font-size:18px; }
.empty--orders{ display:grid; place-items:center; padding:32px; border:1px dashed #ddd; border-radius:12px; background:#fff; }
.empty--orders .empty-in{ text-align:center; }
.empty--orders .empty-title{ font-size:18px; margin-bottom:6px; }
.empty--orders .empty-text{ font-size:14px; color:#666; margin-bottom:12px; }
.empty--orders .empty-btn{ display:inline-block; }
.pagination{ display:flex; justify-content:center; align-items:center; margin-top:20px; gap:10px; }
.pagination a,.pagination span{ min-width:36px; height:36px; padding:0 12px; display:inline-flex; align-items:center; justify-content:center; border:1px solid #eee; border-radius:999px; font-weight:500; color:#303030; background:#fff; }
.pagination a:hover{ border-color:#e6c7ca; color:#C2181F; }
.pagination-current{ padding:0 12px; }
@media (max-width:1023px){ .orders-list{ gap:12px; } .order-card{ padding:14px 16px; } .order-card__sum .total .val{ font-size:17px; } }
@media (max-width:640px){
  .order-card{ grid-template-columns:1fr auto; grid-template-areas:"head chevron" "sum chevron" "meta meta"; gap:10px 12px; }
  .order-card__meta{ font-size:13px; }
  .order-no{ font-size:16px; }
  .order-card__sum .row{ font-size:14px; }
  .order-card__sum .total .val{ font-size:16px; }
}

/* ——— Order detail ——— */
.order-header{ margin-bottom:14px; }
.order-title{ font-size:28px; font-weight:500; margin-bottom:8px; }
.order-meta{ display:flex; flex-wrap:wrap; gap:10px 16px; align-items:center; color:#777; font-size:14px; }
.order-meta .muted{ color:#777; }
.badge[data-status="DRAFT"]{ --badge-bg:#F2F2F2; --badge-fg:#777; }
.badge[data-status="PLACED"]{ --badge-bg:#FFF7E6; --badge-fg:#C47A1C; }
.badge[data-status="PAID"]{ --badge-bg:#E6FFFB; --badge-fg:#0C8576; }
.badge[data-status="SHIPPED"]{ --badge-bg:#F0F5FF; --badge-fg:#3C63D6; }
.badge[data-status="DELIVERED"]{ --badge-bg:#EDFBEA; --badge-fg:#3A7A63; }
.badge[data-status="CANCELED"]{ --badge-bg:#FFF0F0; --badge-fg:#B00020; }

.order-info-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin:8px 0 18px; }
.info-card{ border:1px solid #eee; border-radius:10px; background:#fff; padding:14px 16px; }
.info-card__title{ font-weight:500; margin-bottom:8px; }
.info-card__rows .row{ display:flex; justify-content:space-between; align-items:baseline; gap:12px; font-size:14px; padding:6px 0; border-bottom:1px dashed #f0f0f0; }
.info-card__rows .row:last-child{ border-bottom:0; }
.info-card__rows .row span{ color:#666; }
.info-card__rows .row b{ font-weight:500; color:#000; }

.order-section{ margin-top:8px; }
.order-section__title{ font-size:20px; font-weight:500; margin:10px 0 12px; }
.order-lines{ display:grid; gap:10px; }
.order-line{ display:grid; grid-template-columns:64px 1fr auto auto; align-items:center; gap:14px; padding:12px 14px; border:1px solid #eee; border-radius:10px; background:#fff; }
.line-thumb img{ width:64px; height:64px; object-fit:contain; }
.line-main{ min-width:0; }
.line-title{ display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; font-size:16px; line-height:1.35; }
.line-sub{ margin-top:4px; font-size:14px; color:#666; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.line-sub .dot{ color:#C4C4C4; }
.line-price,.line-total{ text-align:right; min-width:120px; }
.line-price .old{ display:block; font-size:13px; color:#8A8A8A; margin-bottom:2px; }
.line-price .new{ font-weight:500; font-size:15px; color:#000; }
.line-total .sum{ font-weight:600; font-size:16px; color:#000; }

.order-summary{ margin-top:16px; border:1px solid #eee; border-radius:10px; background:#fff; padding:16px; }
.order-summary .total-row{ display:flex; align-items:baseline; justify-content:space-between; gap:16px; padding:8px 0; font-size:15px; border-bottom:1px dashed #f0f0f0; }
.order-summary .total-row:last-child{ border-bottom:0; }
.order-summary .total-row .minus{ color:#B00020; }
.order-summary .total-row .free{ color:#3A7A63; }
.order-summary .total-grand{ padding-top:12px; font-size:16px; font-weight:600; }
@media (max-width:1023px){ .order-info-grid{ grid-template-columns:1fr 1fr; } .order-line{ grid-template-columns:56px 1fr auto; } .line-total{ display:none; } .order-title{ font-size:24px; } }
@media (max-width:640px){ .order-info-grid{ grid-template-columns:1fr; } .order-line{ grid-template-columns:56px 1fr; grid-template-rows:auto auto; align-items:start; } .line-price{ justify-self:end; } .line-total{ display:none; } .order-title{ font-size:20px; } }

/* аккуратные цифры */
.price-current,.price-old,.item-unit-price b,.item-line-total b,
.line-price .new,.line-price .old,.line-total .sum,
.order-summary .total-row b,.order-summary .total-grand b,
.summary-total,.js-summary-total,.money{
  font-variant-numeric: tabular-nums; letter-spacing:.2px;
}

/* ======================
   Checkout (оформление)
   ====================== */
.checkout-grid{ display:grid; grid-template-columns: 1fr 320px; gap:24px; }
@media (max-width:991px){ .checkout-grid{ grid-template-columns:1fr; } }
.checkout-main{ display:flex; flex-direction:column; gap:16px; }
.checkout-title{ font-size:18px; font-weight:500; margin:2px 0; }
.cart-list{ display:flex; flex-direction:column; gap:12px; }
.checkout-grid .cart-item{ grid-template-columns:1fr; grid-template-areas:"img" "info" "actions"; }
.checkout-grid .cart-item-price{ align-self:center; justify-self:stretch; }
.checkout-form{ margin-top:4px; }
.form-grid{ display:grid; grid-template-columns:1fr 1fr; gap:14px 16px; margin-top:8px; }
.form-grid .form-row{ display:flex; flex-direction:column; gap:6px; }
.form-grid .form-row label{ font-size:14px; color:#000; }
.form-grid .form-row input,.form-grid .form-row select{
  width:100%; padding:10px 12px; font-size:14px; line-height:1.4;
  border:1px solid #ccc; border-radius:8px; background:#f9f9f9;
  transition:border-color .15s, box-shadow .15s, background .15s;
}
.form-row--wide{ grid-column:1/-1; }
.input-amount{ display:flex; align-items:center; gap:8px; }
.input-amount .currency{ color:#6b7280; }
@media (max-width:640px){ .form-grid{ grid-template-columns:1fr; } }
.form-actions{ margin-top:12px; display:flex; gap:10px; justify-content:flex-end; flex-wrap:wrap; }
.checkout-summary .summary-card{ position:sticky; top:16px; border:1px solid #eee; border-radius:12px; background:#fff; padding:16px; display:flex; flex-direction:column; gap:12px; }
.checkout-summary .summary-row{ display:flex; align-items:baseline; justify-content:space-between; gap:16px; }
.checkout-summary .summary-row.total b{ font-size:18px; }
.checkout-summary .btn{ width:100%; justify-content:center; }
.currency.dim{ color:#9ca3af; }

/* ——— Fix: размеры и стили SVG в списке заказов ——— */
.order-card__meta .icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: inline-block;
  vertical-align: -2px;
  margin-right: 4px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
}

.order-card__chevron svg {
  width: 20px;
  height: 20px;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* если где-то в badge окажется svg — тоже фиксируем */
.badge svg {
  width: 14px;
  height: 14px;
  display: inline-block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
}

/* на всякий случай: не даём svg «расползаться» внутри карточки заказа */
.order-card svg {
  max-width: 100%;
  max-height: 100%;
}

/* ======================
   Purchased (Купленные)
   ====================== */

.purchased-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.purchased-item {
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fff;
  padding: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.purchased-item:hover {
  border-color: #ddd;
  box-shadow: 0 4px 14px rgba(0,0,0,.05);
}

.pi-row {
  display: grid;
  grid-template-columns: 88px 1fr 200px;
  gap: 14px;
  align-items: center;
}
@media (max-width: 899px) {
  .pi-row {
    grid-template-columns: 72px 1fr;
    grid-template-areas:
      "thumb main"
      "side  side";
    align-items: start;
  }
}

.pi-col.pi-thumb { grid-area: thumb; }
.pi-col.pi-main  { grid-area: main;  }
.pi-col.pi-side  { grid-area: auto;  }
@media (max-width: 899px) {
  .pi-col.pi-side { grid-area: side; }
}

.thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 10px;
  overflow: hidden;
  background: #fafafa;
}
.thumb img {
  width: 100%; height: 100%; object-fit: contain; background: #fff;
}

.pi-topline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  color: #6b7280;
  font-size: 14px;
  margin-bottom: 6px;
}
.pi-topline .dot { color: #C4C4C4; }

.title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #1f2937;
  line-height: 1.35;
  font-size: 16px;
  text-decoration: none;
}
.title:hover { text-decoration: underline; }

.actions {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.actions .to-card { min-width: 200px; }
.actions .link {
  color: #303030;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 14px;
}
.actions .link:hover { color: #C2181F; }

.pi-side {
  justify-self: end;
}
@media (max-width: 899px) {
  .pi-side { justify-self: start; }
}

.my-rating {
  display: grid;
  gap: 6px;
  align-content: start;
}
.my-rating .muted {
  color: #6b7280;
  font-size: 13px;
}
.stars {
  display: inline-flex;
  gap: 2px;
  vertical-align: middle;
}
.star {
  width: 18px; height: 18px;
  color: #C4C4C4;
}
.star.active {
  color: #F59E0B; /* янтарный для активных */
  fill: currentColor;
}

/* Empty state под купленные */
.empty--purchased {
  display: grid;
  place-items: center;
  padding: 28px;
  border: 1px dashed #e5e7eb;
  border-radius: 12px;
  background: #fbfbfc;
  color: #6b7280;
}
.empty--purchased .empty-in { text-align: center; }
.empty--purchased .empty-title { font-size: 18px; margin-bottom: 6px; color: #111827; }
.empty--purchased .empty-text  { margin-bottom: 14px; }
.empty--purchased .empty-btn   { display: inline-flex; }

/* Пагинация — иконки */
.pagination .icon {
  width: 18px; height: 18px;
}


/* ==== Purchased: вертикальная карточка ==== */
.purchased-list .pi-row {
  grid-template-columns: 1fr;
  grid-template-areas:
    "thumb"
    "main"
    "side";
  align-items: start;
}

.purchased-list .pi-col.pi-thumb { grid-area: thumb; }
.purchased-list .pi-col.pi-main  { grid-area: main;  }
.purchased-list .pi-col.pi-side  { grid-area: side;  }

/* Превью по центру и компактнее */
.purchased-list .thumb {
  width: 140px;
  margin: 4px auto 8px;
  aspect-ratio: 1 / 1;
}

/* Текст по центру, чтобы визуально было ровно */
.purchased-list .pi-topline { justify-content: center; }
.purchased-list .title { text-align: center; }

/* Кнопки и ссылки — в колонку и на всю ширину */
.purchased-list .actions {
  justify-content: center;
  flex-direction: column;
  align-items: stretch;
}
.purchased-list .actions .to-card { min-width: 0; width: 100%; }

/* Правая колонка (оценка) — тоже по центру */
.purchased-list .pi-side { justify-self: center; }
.purchased-list .my-rating { text-align: center; }
.purchased-list .stars { justify-content: center; }


/* ======================
   Review (страница отзыва)
   ====================== */

/* Бриф товара */
.product-brief{
  display:flex; align-items:center; gap:14px;
  padding:12px; border:1px solid #eee; border-radius:10px; background:#fff;
  margin-bottom:16px;
}
.brief-thumb{
  display:block; width:72px; aspect-ratio:1/1; border-radius:10px; overflow:hidden; background:#fafafa;
  flex:0 0 72px;
}
.brief-thumb img{ width:100%; height:100%; object-fit:contain; background:#fff; }
.brief-title{
  color:#1f2937; line-height:1.35; font-size:16px; text-decoration:none; display:-webkit-box;
  -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.brief-title:hover{ text-decoration:underline; }

/* Форма отзыва — используем общие поля, чуть расширим */
.review-form{ display:grid; gap:14px 16px; }
.review-form .form-row{ display:flex; flex-direction:column; gap:6px; }
.review-form .form-row--wide{ grid-column:1/-1; }

/* Ошибки полей */
.field-errors{
  margin:4px 0 0; padding-left:18px; color:#B00020; font-size:13px;
}
.form-errors{ margin:0 0 8px; padding-left:18px; }

/* Рейтинг (звёзды) */
.rating-control{ display:flex; align-items:center; gap:12px; }
.rating-stars{ display:inline-flex; gap:6px; }
.rating-stars .star{
  font-size:22px; line-height:1; cursor:pointer; color:#C4C4C4; background:transparent; border:0;
  padding:2px 4px; border-radius:8px; transition:transform .05s, background .15s, color .15s;
}
.rating-stars .star:hover{ background:#f6f6f6; transform:translateY(1px); }
.rating-stars .star.active{ color:#F59E0B; }

/* Адаптив для брифа */
@media (max-width:640px){
  .product-brief{ gap:10px; padding:10px; }
  .brief-thumb{ width:64px; flex-basis:64px; }
  .brief-title{ font-size:15px; }
}


/* ======================
   Reviews (Мои отзывы)
   ====================== */

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

.review-card {
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fff;
  padding: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.review-card:hover {
  border-color: #ddd;
  box-shadow: 0 4px 14px rgba(0,0,0,.05);
}

/* шапка карточки: картинка + инфо */
.review-card .card-head {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 14px;
  align-items: center;
}
.review-card .thumb {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  overflow: hidden;
  background: #fafafa;
  border: 1px solid #f0f0f0;
  display: block;
}
.review-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
@media (max-width:480px){
  .review-card .card-head{ grid-template-columns:56px 1fr; }
  .review-card .thumb{ width:56px; height:56px; }
}

.review-card .card-title {
  color: #1f2937;
  font-size: 16px;
  line-height: 1.35;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.review-card .card-title:hover { text-decoration: underline; }

.review-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 14px;
  color: #6b7280;
  margin-top: 4px;
}
.review-meta .sep { color: #c4c4c4; }
.stars { display: inline-flex; gap: 2px; }
.star {
  color: #c4c4c4;
  font-size: 16px;
  line-height: 1;
}
.star.active { color: #f59e0b; }

/* тело отзыва */
.review-title {
  font-weight: 500;
  font-size: 15px;
  margin-top: 8px;
}
.review-text {
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.45;
}
.review-card .row {
  margin-top: 4px;
  font-size: 15px;
}
.review-card .row b {
  color: #000;
  font-weight: 500;
}

/* ответ продавца */
.seller-reply {
  margin-top: 10px;
  border-top: 1px dashed #f0f0f0;
  padding-top: 10px;
  font-size: 15px;
}
.seller-reply__head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  font-weight: 500;
  margin-bottom: 4px;
}
.seller-reply__head .muted { color: #6b7280; }
.seller-reply__text { color: #111; line-height: 1.45; }

/* кнопка "Дополнить отзыв" */
.review-card .actions {
  margin-top: 10px;
}
.review-card .btn {
  width: fit-content;
  padding: 8px 14px;
  font-size: 14px;
}

/* —— checkout notices & utils —— */
.form-note{
  padding: 10px 12px;
  border: 1px dashed #e6e6e6;
  border-radius: 10px;
  background: #fafafa;
  font-size: 14px;
  line-height: 1.45;
  color: #1f2937;
}
.form-note .muted{ color:#6b7280; }

.is-hidden{ display:none !important; }

/* summary: строка для доставки Алматы */
.summary-row .free  { color:#3A7A63; }
.summary-row .minus { color:#B00020; }

/* util */
.is-hidden{ display:none !important; }

/* ——— Уточнение ширины блока доставки в заказе ——— */
.info-card--delivery {
  min-width: 330px;
  flex: 1 1 60%;
}
.info-card--delivery .row b {
  word-break: break-word;
  white-space: normal;
}

/* ===== CART (вертикальные карточки, «приятнее» визуал) ===== */

/* Лента — чуть уже, чтобы карточки смотрелись плотнее */
.cart-main{ display:grid; grid-template-columns: 1fr 320px; gap:24px; }
@media (max-width:991px){ .cart-main{ grid-template-columns:1fr; } }

.cart-items{
  display:flex; flex-direction:column; gap:14px;
  max-width: 680px;  /* было 720 — смотрится аккуратнее */
  width: 100%;
  margin-inline: auto;
}

/* Карточка: мягкая тень, приятный фон, «карточный» вид */
.cart-item{
  display:grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "img"
    "info"
    "actions";
  gap:12px;
  padding:16px;
  border:1px solid #eaeaea;
  border-radius:14px;
  background:
    radial-gradient(120% 60% at 50% -20%, #fafafa, #fff 60%);
  box-shadow: 0 1px 0 rgba(16,24,40,.02);
  transition: border-color .2s ease, box-shadow .2s ease, transform .06s ease;
}
.cart-item:hover{
  border-color:#e3d4d6; /* лёгкий фирменный оттенок */
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
}
.cart-item:active{ transform: translateY(1px); }

/* Изображение — чуть крупнее и «в рамке» */
.cart-item-img{
  grid-area: img;
  display:block;
  width: 148px;           /* было 140 */
  aspect-ratio:1/1;
  border-radius:12px;
  overflow:hidden;
  background:#fafafa;
  margin: 2px auto 6px;
  box-shadow: inset 0 0 0 1px #f2f2f2;
}
.cart-item-img img{ width:100%; height:100%; object-fit:contain; background:#fff; }

/* Информация: центрируем, делаем чип артикула */
.cart-item-info{
  grid-area: info;
  display:flex; flex-direction:column; gap:8px; min-width:0;
  align-items:center; text-align:center;
}
.cart-item-title{
  font-size:16px; line-height:1.35; color:#111827; text-decoration:none;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  font-weight:500;
}
.cart-item-title:hover{ text-decoration:underline; }
.cart-item-sku{
  font-size:12px; color:#475569;
  display:inline-flex; align-items:center; gap:6px;
  background:#f7f7f9; border:1px solid #eee; border-radius:999px;
  padding:4px 8px; line-height:1; user-select:none;
}

/* Цена — компактный «бокс» с лёгкой рамкой */
.price-box{
  display:flex; flex-direction:column; gap:6px; margin-top:4px; align-items:center;
  background:#fcfcfd; border:1px solid #f0f0f2; border-radius:10px; padding:8px 10px;
}
.price-row{ display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; justify-content:center; }
.price-current{ font-size:18px; font-weight:650; color:#111; }
.price-old{ font-size:14px; color:#9ca3af; text-decoration:line-through; }
.benefit-pill{
  display:inline-flex; align-items:center; gap:6px; width:fit-content;
  padding:5px 10px; border-radius:999px; background:#f0fff4; border:1px solid #a7f3d0; color:#065f46;
  font-size:12px; line-height:1;
}

/* Зона действий — отделяем пунктиром, чтобы визуально блоки читались */
.cart-item-actions{
  grid-area: actions;
  display:flex; flex-direction:column; gap:10px; align-items:stretch;
  border-top:1px dashed #eee; padding-top:10px;
}

/* Количество: мягкие кнопки, ховер, фокус */
.quantity-control{
  align-self:center; display:inline-flex; align-items:center; gap:8px;
  border:1px solid #e6e6e6; border-radius:12px; padding:6px;
  width:fit-content; background:#f9fafb;
  box-shadow: 0 0 0 0 rgba(194,24,31,0);
  transition: box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
.quantity-control:focus-within{
  border-color:#C2181F22;
  box-shadow: 0 0 0 4px rgba(194,24,31,.06);
  background:#fff;
}
.qty-btn{
  width:34px; height:34px; border:1px solid #e6e6e6; border-radius:10px;
  background:#fff; cursor:pointer; font-size:18px; line-height:1;
  transition: background .15s ease, border-color .15s ease, transform .05s ease;
}
.qty-btn:hover{ background:#f3f4f6; }
.qty-btn:active{ transform: translateY(1px); }
.qty-count{
  width:68px; height:34px; text-align:center;
  border:1px solid #e6e6e6; border-radius:10px; background:#fff;
  font-weight:500;
}

/* Итоги по позиции — аккуратная карточка */
.cart-item-price{
  background:#fbfbfd; border:1px solid #eef0f2; border-radius:12px;
  padding:10px 12px; font-size:14px;
}
.cart-item-price .item-unit-price{ color:#6b7280; margin-bottom:4px; text-align:center; }
.cart-item-price .item-line-total{ text-align:center; }
.cart-item-price .item-line-total b{ font-weight:600; }

/* Кнопки — на всю ширину; небольшие отступы между ними */
.cart-item-buttons{ display:flex; flex-direction:column; gap:8px; margin-top:4px; }
.cart-item-buttons .btn{ width:100%; justify-content:center; }

/* ПРАВАЯ колонка (итоги) — без изменений логики */
.cart-summary-wrapper{ position:relative; }
.cart-summary{
  position:sticky; top:16px;
  border:1px solid #eee; border-radius:12px; background:#fff;
  padding:16px; display:flex; flex-direction:column; gap:12px;
  box-shadow: 0 1px 0 rgba(16,24,40,.02);
}
.summary-row,.summary-total{ display:flex; align-items:center; justify-content:space-between; }
.summary-total{ font-size:18px; font-weight:600; margin-top:6px; }
.cart-summary .btn{ width:100%; justify-content:center; }

/* пустая корзина */
.cart-items .empty{
  border:1px dashed #e5e7eb; border-radius:12px; padding:28px;
  background:#fbfbfc; text-align:center; color:#6b7280;
}

/* Мелкие адаптивные правки (ничего не ломаем) */
@media (max-width:640px){
  .cart-item-img{ width:136px; }
  .quantity-control{ gap:6px; }
  .qty-btn{ width:32px; height:32px; }
  .qty-count{ width:64px; height:32px; }
}

/* ——— Избранное (заголовок) ——— */
.favorites-header {
  display: flex !important;;
  align-items: center !important;;
  justify-content: space-between !important;;
  gap: 12px !important;
  padding-top: 12px;
  padding-bottom: 12px !important;;
  margin-bottom: 16px !important;;
  border-bottom: 1px solid #eee;
}

.favorites-header h1 {
  margin: 0;
  font-size: 24px !important;
  font-weight: 400;
}

.fav-clear-form {
  margin-left: auto;
}


/* ——— Цена в избранном / карточках каталога ——— */
.good-price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-top: 8px;
}

.good-price .cur {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}

.good-price .old {
  font-size: 14px;
  color: #9ca3af;
  text-decoration: line-through;
}

.good-price .benefit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f0fff4;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-size: 12px;
  line-height: 1;
}

