.shk47-shop { max-width: 1100px; margin: 0 auto; padding: 18px 14px; }
.shk47-h { font-size: 26px; margin: 0 0 14px; }
.shk47-h3 { font-size: 18px; margin: 0 0 12px; }

.shk47-input { padding: 10px 12px; border: 1px solid #ddd; border-radius: 10px; background: #fff; }
.shk47-btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; padding: 10px 14px; border-radius: 12px; border: 1px solid #111; background: #111; color:#fff; cursor:pointer; text-decoration:none; }
.shk47-btn--ghost { background: transparent; color:#111; }
.shk47-btn--small { padding: 8px 10px; border-radius: 10px; }
.shk47-btn:disabled{ opacity:.6; cursor:not-allowed; }

.shk47-empty { padding: 16px; border: 1px dashed #ccc; border-radius: 14px; }

.shk47-filters-mobilebar{ display:none; margin-bottom:12px; }
.shk47-filters-backdrop{ position:fixed; inset:0; background:rgba(15,23,42,.4); z-index:9997; }
.shk47-filters__head{ display:none; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px; }
.shk47-filters__row { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-bottom: 14px; }
.shk47-grid { display:grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 980px){ .shk47-grid{ grid-template-columns: repeat(2,1fr); } }
@media (max-width: 520px){ .shk47-grid{ grid-template-columns: 1fr; } }

.shk47-card { border: 1px solid #eee; border-radius: 16px; overflow:hidden; background:#fff; }
.shk47-card__media { position:relative; display:block; aspect-ratio: 4/5; background:#f6f6f6; }
.shk47-card__img { width:100%; height:100%; object-fit:cover; display:block; }
.shk47-cond{ position:absolute; left:10px; top:10px; z-index:2; padding:6px 9px; border-radius:999px; font-size:11px; line-height:1; font-weight:700; background:rgba(17,17,17,.78); color:#fff; backdrop-filter: blur(6px); }
.shk47-cond--new{ background:rgba(0,120,80,.88); }
.shk47-cond--excellent{ background:rgba(59,130,246,.88); }
.shk47-cond--used{ background:rgba(245,158,11,.92); color:#111; }
.shk47-cond--nuance{ background:rgba(176,0,32,.88); }
.shk47-card__dots { position:absolute; left:10px; right:10px; bottom:10px; display:flex; gap:6px; justify-content:center; }
.shk47-dot { width:6px; height:6px; border-radius:999px; background: rgba(255,255,255,.55); border:1px solid rgba(0,0,0,.12); }
.shk47-dot.is-active { background: rgba(255,255,255,.95); }

.shk47-card__body { padding: 12px; display:flex; flex-direction:column; gap:10px; }
.shk47-card__title { font-weight:700; color:#111; text-decoration:none; }
.shk47-card__meta { display:flex; align-items:center; justify-content:space-between; gap:10px; font-size:13px; line-height:1.35; }
.shk47-price { font-weight:700; font-size: 15px; }
.shk47-stock { font-size:12.5px; color:#444; }
.shk47-stock--out { color:#b00020; }
.shk47-card__actions { display:flex; gap:10px; flex-wrap:wrap; }
.shk47-btn{ transition: transform .15s ease, box-shadow .15s ease; }
.shk47-btn:hover{ transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.08); }

.shk47-cart { display:flex; flex-direction:column; gap:10px; }
.shk47-cart__row { display:grid; grid-template-columns: 80px 1fr 180px 120px 34px; gap:12px; align-items:center; border:1px solid #eee; border-radius: 14px; padding: 10px; }
@media (max-width: 760px){ .shk47-cart__row{ grid-template-columns: 70px 1fr; grid-auto-rows:auto; } .shk47-cart__qty, .shk47-cart__sum, .shk47-cart__rm{ justify-self:start; } }
.shk47-cart__img img { width:80px; height:80px; border-radius:12px; object-fit:cover; display:block; }
.shk47-cart__title { font-weight:700; color:#111; text-decoration:none; }
.shk47-cart__price { font-size:13px; color:#555; margin-top:4px; }

.shk47-cart__qty { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.shk47-qtybtn { width:32px; height:32px; border-radius:10px; border:1px solid #ddd; background:#fff; cursor:pointer; }
.shk47-qty { width:64px; }
.shk47-cart__stock { font-size:12px; color:#666; width:100%; }
.shk47-cart__sum { font-weight:700; }
.shk47-cart__rm { width:34px; height:34px; border-radius:10px; border:1px solid #eee; background:#fff; cursor:pointer; }

.shk47-cart__footer { margin-top: 14px; display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
.shk47-box { border:1px solid #eee; border-radius: 16px; padding: 14px; background:#fff; }
.shk47-stepbox{ transition: opacity .18s ease, transform .18s ease; }
.shk47-stepbox.is-collapsed{ opacity:.56; }
.shk47-stepbox__actions{ margin-top:12px; display:flex; justify-content:flex-end; }
.shk47-form { display:grid; gap:10px; }
.shk47-note { margin-top:10px; font-size:13px; color:#666; }

.shk47-checkout { display:grid; grid-template-columns: 1.2fr .8fr; gap:14px; }
@media (max-width: 980px){ .shk47-checkout{ grid-template-columns: 1fr; } }
.shk47-orderlist { display:grid; gap:10px; }
.shk47-orderlist__row { display:flex; justify-content:space-between; gap:10px; }
.shk47-orderlist__total { margin-top: 10px; display:flex; justify-content:space-between; }

#shk47-checkout-msg{ margin-top:10px; font-size:13px; }
#shk47-checkout-msg.is-error{ color:#b00020; }
#shk47-yookassa{ margin-top:12px; }

.shk47-tabs{ display:flex; gap:10px; flex-wrap:wrap; margin: 10px 0 14px; }
.shk47-tab{ padding:8px 10px; border-radius: 12px; border:1px solid #ddd; text-decoration:none; color:#111; background:#fff; }
.shk47-tab.is-active{ border-color:#111; }

.shk47-kpis{ display:grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
@media (max-width: 980px){ .shk47-kpis{ grid-template-columns: repeat(2,1fr);} }
@media (max-width: 520px){ .shk47-kpis{ grid-template-columns: 1fr;} }
.shk47-kpi{ border:1px solid #eee; border-radius:16px; padding:12px; background:#fff; }
.shk47-kpi__v{ font-size:18px; font-weight:700; margin-top:6px; }

.shk47-table{ width:100%; border-collapse: collapse; }
.shk47-table th,.shk47-table td{ padding:10px 8px; border-bottom:1px solid #eee; text-align:left; font-size:14px; }

/* -------------------- Shop topbar + toast -------------------- */
.shk47-topbar{
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 99999;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.shk47-topbar__btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border-radius:999px;
  text-decoration:none;
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  color: inherit;
}

.shk47-toast{
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 99999;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.shk47-toast.is-on{ opacity: 1; }
/* =========================================================
   MOBILE: корзина/ЛК — снизу, компактно, не перекрывает контент
   + Telegram/Avito (тема) поднимаем выше корзины
   ========================================================= */
@media (max-width: 760px){
  .shk47-filters-mobilebar{ display:flex; }
  .shk47-filters{
    position: fixed;
    left: 12px;
    right: 12px;
    top: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    overflow:auto;
    z-index: 9998;
    padding:12px;
    border:1px solid #e9e9e9;
    border-radius:16px;
    background:#fff;
    box-shadow: 0 20px 60px rgba(0,0,0,.22);
    transform: translateY(8px);
    opacity:0;
    pointer-events:none;
    transition: opacity .18s ease, transform .18s ease;
  }
  .shk47-filters.is-open{ opacity:1; transform:translateY(0); pointer-events:auto; }
  .shk47-filters__head{ display:flex; position:sticky; top:0; background:#fff; padding-bottom:8px; z-index:1; }
  .shk47-filters__row { display:grid; grid-template-columns: 1fr; }
  #shk47-filters-submit{ width:100%; }


  /* --- Нижняя панель корзины/ЛК --- */
  .shk47-topbar{
    position: fixed !important;
    top: auto !important;
    left: 12px !important;
    right: 12px !important;
    bottom: calc(12px + env(safe-area-inset-bottom)) !important;

    z-index: 99999 !important;

    display: flex !important;
    align-items: stretch !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
  }

  /* Кнопки панели */
  .shk47-topbar__btn{
    min-width: 0 !important;              /* важно: чтобы текст не раздувал панель */
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 12px 10px !important;
    border-radius: 14px !important;

    font-size: 13px !important;
    line-height: 1.15 !important;

    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Первая кнопка (Корзина) пусть занимает всё свободное место */
  .shk47-topbar__btn:first-child{
    flex: 1 1 auto !important;
    justify-content: center !important;
  }

  /* Остальные (ЛК/Войти/Выйти) — компактные */
  .shk47-topbar__btn:not(:first-child){
    flex: 0 0 auto !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  /* --- Telegram/Avito снизу (элемент темы .float) поднимаем выше корзины --- */
  .float{
    bottom: calc(12px + env(safe-area-inset-bottom) + 66px) !important;
    left: 12px !important;
    right: 12px !important;
    z-index: 99998 !important; /* чуть ниже, чем корзина */
  }

  /* --- Чтобы контент не прятался под ДВУМЯ панелями снизу --- */
  body:not(.wp-admin){
    padding-bottom: calc(160px + env(safe-area-inset-bottom)) !important;
  }

  /* Тост (уведомление плагина) поднимаем выше обеих панелей */
  .shk47-toast{
    bottom: calc(160px + env(safe-area-inset-bottom)) !important;
  }
}
/* =========================
   AUTH (login/register)
   ========================= */
.shk47-auth{
  display:flex;
  justify-content:center;
  padding: 10px 0 18px;
}
.shk47-auth__card{
  width: 100%;
  max-width: 520px;
}

.shk47-switch{
  margin: 14px 0;
  display:grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid #e8e8e8;
  border-radius: 14px;
  overflow:hidden;
  background:#fafafa;
}
.shk47-switch__btn{
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 10px 12px;
  text-decoration:none;
  color:#111;
  font-weight:600;
  border-right: 1px solid #e8e8e8;
}
.shk47-switch__btn:last-child{ border-right:none; }
.shk47-switch__btn.is-active{
  background:#111;
  color:#fff;
}

.shk47-auth__pane{ display:none; }
.shk47-auth__pane.is-active{ display:block; }

.shk47-auth__links{
  display:flex;
  justify-content:flex-start;
  margin-top: 6px;
}
.shk47-link{
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 13px;
}

.shk47-pass{
  position: relative;
  display:flex;
  align-items:center;
}
.shk47-pass .shk47-input{
  width:100%;
  padding-right: 44px;
}
.shk47-pass__toggle{
  position:absolute;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #e6e6e6;
  background:#fff;
  cursor:pointer;
}

.shk47-auth__msg{
  margin-top: 10px;
  font-size: 13px;
  color: #b00020;
  display:none;
}
.shk47-auth__msg.is-on{ display:block; }

@media (max-width: 520px){
  .shk47-auth__card{ max-width: 100%; }
  .shk47-switch__btn{ padding: 12px 10px; }
}
/* ==== Mobile: tables should not overflow the screen ==== */
.shk47-tableWrap{
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}

.shk47-table{
  min-width: 640px; /* чтобы колонки не слипались */
}

.shk47-table th,
.shk47-table td{
  white-space: nowrap;
}
.shk47-table td:last-child{ white-space: normal; }

/* На телефоне можно сделать "Подробнее" чуть компактнее */
@media (max-width: 640px){
  .shk47-table a{
    font-size: 14px;
  }
}
/* ===== Каталог: "Показано X–Y из Z" ===== */
.shk47-results{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin:10px 0 14px;
  color: rgba(17,17,17,.75);
  font-size:14px;
}

/* ===== Пагинация ===== */
.shk47-pagination { margin-top: 18px; }
.shk47-pagination .page-numbers{
  list-style:none;
  display:flex;
  gap:8px;
  justify-content:center;
  flex-wrap:wrap;
  padding:0;
  margin:0;
}
.shk47-pagination .page-numbers a,
.shk47-pagination .page-numbers span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:36px;
  height:36px;
  padding:0 10px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.14);
  background:#fff;
  color:#111;
  text-decoration:none;
}
.shk47-pagination .page-numbers span.current{
  background:#111;
  color:#fff;
  border-color:#111;
}
.shk47-pagination .page-numbers span.dots{
  border-color:transparent;
  background:transparent;
  min-width:auto;
  padding:0 6px;
}
/* =========================================================
   MOBILE FIX: фильтры / "Показано" / пагинация / кнопки
   ========================================================= */

@media (max-width: 760px){

  /* 1) ФИЛЬТРЫ: чтобы ничего не сжималось и не уезжало */
  .shk47-filters__row{
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    align-items: stretch !important;
  }

  .shk47-filters__row .shk47-input{
    width: 100% !important;
  }

  /* Кнопки "Показать" и "Сброс" — в 2 колонки, чтобы было аккуратно */
  .shk47-filters__row .shk47-btn,
  .shk47-filters__row a.shk47-btn{
    width: 100% !important;
  }

  /* Если хотите строго: кнопки в 2 колонки — включите этот блок
     (работает, если у вас именно 2 последние кнопки) */
  .shk47-filters__row .shk47-btn[type="submit"],
  .shk47-filters__row a.shk47-btn--ghost{
    display: inline-flex !important;
  }

  /* 2) "ПОКАЗАНО X–Y ИЗ Z": на мобилке в столбик */
  .shk47-results{
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 6px !important;
    font-size: 13px !important;
  }

  /* 3) КАРТОЧКА: кнопки сделать ровными и удобными для пальца */
  .shk47-card__actions{
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .shk47-card__actions .shk47-btn{
    width: 100% !important;
    justify-content: center !important;
  }

  /* 4) ПАГИНАЦИЯ: чтобы тема не ломала список и чтобы кнопки были компактнее */
  .shk47-pagination{
    margin-top: 14px !important;
  }

  .shk47-pagination ul.page-numbers{
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }
  .shk47-pagination ul.page-numbers li{
    margin: 0 !important;
    padding: 0 !important;
  }

  .shk47-pagination .page-numbers a,
  .shk47-pagination .page-numbers span{
    min-width: 32px !important;
    height: 32px !important;
    padding: 0 8px !important;
    border-radius: 12px !important;
    font-size: 13px !important;
    line-height: 32px !important;
  }

  /* 5) Чтобы нижняя фикс-панель (корзина/кнопки) не перекрывала пагинацию */
  .shk47-shop{
    padding-bottom: calc(110px + env(safe-area-inset-bottom)) !important;
  }
}
.shk47-specs{
  max-width: 1100px;
  margin: 14px auto;
  padding: 14px;
  border: 1px solid #eee;
  border-radius: 16px;
  background: #fff;
}
.shk47-specs__grid{
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 8px 14px;
}
.shk47-specs__k{ color:#666; font-size: 13px; }
.shk47-specs__v{ color:#111; font-size: 14px; }
@media (max-width: 520px){
  .shk47-specs__grid{ grid-template-columns: 1fr; }
}
.shk47-dot.is-active{
  background: rgba(255,255,255,.95);
  border-color: rgba(0,0,0,.25);
}

/* Quick view modal */
.shk47-qv{ position:fixed; inset:0; z-index:100000; display:flex; align-items:flex-start; justify-content:center; padding: min(6vh, 36px) 12px; overflow:auto; }
.shk47-qv[hidden]{ display:none !important; }
.shk47-qv__backdrop{ position:fixed; inset:0; background:rgba(15,23,42,.45); }
.shk47-qv__panel{ position:relative; z-index:1; width:min(920px, 100%); margin:0; background:#fff; border-radius:18px; padding:18px; box-shadow:0 24px 70px rgba(0,0,0,.25); max-height:88vh; overflow:auto; }
.shk47-qv__close{ position:absolute; top:8px; right:8px; width:34px; height:34px; border-radius:999px; border:1px solid #ddd; background:#fff; cursor:pointer; }
.shk47-qv__grid{ display:grid; grid-template-columns: 1fr 1fr; gap:14px; }
.shk47-qv__media{ background:#f6f6f6; border-radius:14px; overflow:hidden; aspect-ratio:1/1; }
.shk47-qv__media img{ width:100%; height:100%; object-fit:cover; display:block; }
.shk47-qv__meta{ display:flex; justify-content:space-between; align-items:center; gap:10px; }
.shk47-qv__actions{ margin-top:12px; display:flex; flex-wrap:wrap; gap:10px; }
.shk47-qv__cond{ display:inline-flex; align-items:center; padding:6px 9px; border-radius:999px; font-size:11px; font-weight:700; margin-bottom:8px; background:#111; color:#fff; }
.shk47-qv__cond.shk47-cond--new{ background:rgba(0,120,80,.9); }
.shk47-qv__cond.shk47-cond--excellent{ background:rgba(59,130,246,.9); }
.shk47-qv__cond.shk47-cond--used{ background:rgba(245,158,11,.95); color:#111; }
.shk47-qv__cond.shk47-cond--nuance{ background:rgba(176,0,32,.9); }
@media (max-width: 760px){
  .shk47-qv{ padding:8px; }
  .shk47-qv__panel{ margin:0; border-radius:14px; padding:12px; }
  .shk47-qv__grid{ grid-template-columns:1fr; }
}


.shk47-btn:focus-visible,
.shk47-input:focus-visible,
.shk47-card__title:focus-visible{
  outline: 2px solid rgba(59,130,246,.65);
  outline-offset: 2px;
}


/* Account: statuses and order actions */
.shk47-status{
  display:inline-flex;
  align-items:center;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background:#f6f6f6;
  font-size:12px;
  font-weight:700;
  line-height:1.2;
}
.shk47-status.is-new,.shk47-status.is-wait{ background: rgba(245,158,11,.16); border-color: rgba(245,158,11,.35); color:#7a4b00; }
.shk47-status.is-paid,.shk47-status.is-done{ background: rgba(0,120,80,.12); border-color: rgba(0,120,80,.3); color:#0b5a3f; }
.shk47-status.is-work{ background: rgba(59,130,246,.12); border-color: rgba(59,130,246,.3); color:#1d4f9c; }
.shk47-status.is-cancel{ background: rgba(176,0,32,.1); border-color: rgba(176,0,32,.28); color:#8f1028; }

.shk47-order-actions{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}
.shk47-order-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  padding: 4px 9px;
  border-radius:10px;
  border:1px solid #ddd;
  text-decoration:none;
  color:#111;
  background:#fff;
  font-size:12px;
  white-space:nowrap;
}
.shk47-order-link.is-accent{ border-color:#111; background:#111; color:#fff; }

@media (max-width: 640px){
  .shk47-order-actions{ min-width: 220px; }
}


/* Public account: profile + mobile orders cards */
.shk47-profile-form{ max-width: 560px; }
.shk47-profile-form .shk47-input[disabled]{ opacity:.78; background:#f7f7f7; }

.shk47-orders-mobile{ display:none; }
.shk47-order-card{
  border:1px solid #eee;
  border-radius:14px;
  background:#fff;
  padding:10px;
}
.shk47-order-card + .shk47-order-card{ margin-top:10px; }
.shk47-order-card__head{ display:flex; justify-content:space-between; align-items:center; gap:8px; }
.shk47-order-card__meta{ margin-top:6px; font-size:13px; color:#555; }

@media (max-width: 640px){
  .shk47-tableWrap{ display:none; }
  .shk47-orders-mobile{ display:block; margin-top:10px; }
  .shk47-order-card .shk47-order-actions{ margin-top:8px; }
}
