/* =========================
   COSMOD Side Cart — FULL CSS
   ========================= */

:root{
  --sc-bg: #ffffff;
  --sc-text: #111;
  --sc-muted: #666;
  --sc-border: #eeeeee;
  --sc-shadow: 0 22px 50px rgba(0,0,0,.14);
  --sc-overlay: rgba(0,0,0,.5);
  --sc-primary: #000;        /* чёрные кнопки */
  --sc-primary-contrast: #fff;
}

/* Иконка-тогглер (если используете шорткод [cos_sidecart_toggle]) */
.cos-sc-toggle{
  position: relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:36px;height:36px;
  border-radius:50%;
  background:#fff;
  color:var(--sc-text);
  text-decoration:none;
  box-shadow:0 2px 10px rgba(0,0,0,.12);
}
.cos-sc-count-badge{
  position:absolute; right:-6px; top:-6px;
  min-width:18px; height:18px; padding:0 5px;
  border-radius:999px;
  background:#000; color:#fff;
  font-size:12px; line-height:18px; text-align:center;
}

/* Оверлей и дровер */
.cos-sc-overlay{
  position:fixed; inset:0;
  background:var(--sc-overlay);
  z-index:9998;
}
.cos-sc-drawer{
  position:fixed; right:0; top:0; bottom:0;
  width:360px; max-width:92vw;
  background:var(--sc-bg);
  z-index:9999;
  display:flex; flex-direction:column;
  box-shadow:-12px 0 34px rgba(0,0,0,.15);
  transform:translateX(100%);
  transition:transform .25s ease;
}
.cos-sc-drawer.is-open{ transform:translateX(0); }

/* Шапка */
.cos-sc-header{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 16px; border-bottom:1px solid var(--sc-border);
}
.cos-sc-title-wrap{ display:flex; gap:10px; align-items:center; font-weight:700; font-size:16px; color:var(--sc-text); }
.cos-sc-close{
  border:0; background:transparent; font-size:24px; line-height:1; cursor:pointer;
}

/* Тело */
.cos-sc-body{ padding:10px 10px 0; overflow:auto; flex:1; }
.cos-sc-items{ display:block; }

/* Пустая корзина */
.cos-sc-empty{
  padding:30px 14px; text-align:center; color:var(--sc-muted);
}

/* Линия товара */
.cos-sc-line{
  display:flex; gap:12px; align-items:center;
  padding:10px; border:1px solid var(--sc-border);
  border-radius:10px; margin-bottom:10px; background:#fff;
}
.cos-sc-thumb img{
  width:60px; height:60px; object-fit:cover; border-radius:8px; display:block;
}
.cos-sc-info{ flex:1; min-width:0; }
.cos-sc-name{
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  font-weight:700; color:var(--sc-text); text-decoration:none;
}
.cos-sc-meta{ display:flex; justify-content:space-between; align-items:center; margin-top:6px; }
.cos-sc-price{ font-weight:700; color:var(--sc-text); }

/* Количество */
.cos-sc-qty{
  display:inline-flex; align-items:center;
  border:1px solid #ddd; border-radius:8px; overflow:hidden;
}
.cos-sc-qty input{
  width:48px; height:32px; text-align:center; border:0; outline:none; background:#fff; color:var(--sc-text);
}
.cos-sc-minus, .cos-sc-plus{
  width:32px; height:32px; border:0; background:#f6f6f6; cursor:pointer;
}

/* Кнопка удаления (ваш вариант) */
.cos-sc-remove {
    border: 0;
    background: #ffffff;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
}
/* Иконка корзины можно оставить emoji или заменить на svg через background-image */

/* Итоги */
.cos-sc-totals{ padding:10px; border-top:1px solid var(--sc-border); margin-top:10px; }
.cos-sc-total-row{ display:flex; justify-content:space-between; font-size:14px; color:#333; }

/* Футер и кнопки */
.cos-sc-footer{ padding:10px; border-top:1px solid var(--sc-border); }
.cos-sc-actions{ display:flex; flex-direction:column; gap:10px; }

.cos-sc-btn{
  display:block; text-align:center; padding:12px 14px;
  border-radius:6px; text-decoration:none; font-weight:700;
}
.cos-sc-btn--primary{
  background:var(--sc-primary); color:var(--sc-primary-contrast);
}
.cos-sc-btn--primary:hover{ filter:brightness(1.1); }
.cos-sc-btn--primary-outline{
  background:#fff; color:var(--sc-text); border:2px solid var(--sc-text);
}

/* Фокус/доступность */
.cos-sc-btn:focus,
.cos-sc-close:focus,
.cos-sc-minus:focus,
.cos-sc-plus:focus,
.cos-sc-remove:focus{
  outline:2px solid rgba(0,0,0,.35);
  outline-offset:2px;
}

/* Мобильная подгонка */
@media (max-width:420px){
  .cos-sc-drawer{ width:92vw; }
  .cos-sc-thumb img{ width:56px; height:56px; }
  .cos-sc-name{ font-size:14px; }
}

/* Дополнительно: слегка скрываем полосы прокрутки в WebKit */
.cos-sc-body::-webkit-scrollbar{ width:10px; }
.cos-sc-body::-webkit-scrollbar-thumb{ background:#e7e7e7; border-radius:6px; }
