/* Оверрайды поверх темы Journal 3.
   Секции товаров отрисованы сеткой (без JS-слайдера Swiper), визуально как оригинал. */

.lim-section {
  max-width: 1280px;
  margin: 0 auto 40px;
  padding: 0 15px;
}
.lim-section .module-title {
  margin: 20px 0;
  font-size: 24px;
}
.lim-section .swiper,
.lim-section .swiper-container {
  width: 100%;
  overflow: visible;
}

/* Сетка карточек вместо флекс-слайдера */
.lim-grid.swiper-wrapper {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  transform: none !important;
}
.lim-grid .swiper-slide {
  width: auto !important;
  margin: 0 !important;
  flex-shrink: 1 !important;
}

@media (max-width: 1024px) {
  .lim-grid.swiper-wrapper { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .lim-grid.swiper-wrapper { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 470px) {
  .lim-grid.swiper-wrapper { grid-template-columns: 1fr; }
}

/* Защита от горизонтального оверфлоу страницы */
html, body { max-width: 100%; overflow-x: hidden; }

/* ===== Страницы на общем каркасе (корзина, каталог, checkout, избранное) ===== */
.lim-page { max-width: 1280px; margin: 0 auto; padding: 24px 15px 48px; }
.lim-page .page-title { margin: 8px 0 20px; font-size: 26px; }
.lim-muted { color: #888; font-size: 14px; }
.lim-empty { text-align: center; padding: 64px 15px; }
.lim-empty p { color: #666; margin: 8px 0; }

.lim-btn {
  display: inline-block; background: var(--brand, #e8491d); color: #fff;
  padding: 12px 24px; border-radius: 6px; font-weight: 600; text-decoration: none;
  border: none; cursor: pointer; margin-top: 16px;
}
.lim-btn:hover { background: #c53a13; color: #fff; }
.lim-btn-block { display: block; width: 100%; text-align: center; }

.lim-cart { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
@media (max-width: 860px) { .lim-cart { grid-template-columns: 1fr; } }

.lim-cart-row { display: flex; gap: 16px; border: 1px solid #e5e5e5; border-radius: 8px; padding: 12px; margin-bottom: 12px; background: #fff; }
.lim-cart-thumb img { object-fit: contain; border-radius: 4px; }
.lim-cart-main { flex: 1; display: flex; flex-direction: column; }
.lim-cart-name { font-weight: 600; color: #1a1a1a; text-decoration: none; }
.lim-cart-name:hover { color: var(--brand, #e8491d); }
.lim-cart-opts { font-size: 13px; color: #888; margin-top: 4px; }
.lim-cart-controls { margin-top: auto; display: flex; align-items: center; gap: 16px; padding-top: 10px; }
.lim-qty { display: inline-flex; align-items: center; border: 1px solid #e5e5e5; border-radius: 6px; }
.lim-qty button { padding: 6px 12px; font-size: 16px; background: none; border: none; cursor: pointer; }
.lim-qty span { min-width: 36px; text-align: center; }
.lim-cart-total { font-weight: 700; margin-left: auto; }
.lim-remove { background: none; border: none; color: #aaa; cursor: pointer; font-size: 16px; }
.lim-remove:hover { color: var(--brand, #e8491d); }

.lim-cart-summary { border: 1px solid #e5e5e5; border-radius: 8px; padding: 20px; background: #fff; }
.lim-cart-summary .title { font-size: 18px; margin-bottom: 14px; }
.lim-sum-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; color: #555; }
.lim-sum-total { border-top: 1px solid #e5e5e5; margin-top: 6px; padding-top: 12px; font-size: 18px; font-weight: 700; color: #1a1a1a; }
.lim-order-list { list-style: none; padding: 0; margin: 0 0 12px; }
.lim-order-list li { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 4px 0; color: #555; }

.lim-checkout-form { display: flex; flex-direction: column; gap: 16px; }
.lim-box { border: 1px solid #e5e5e5; border-radius: 8px; padding: 20px; background: #fff; }
.lim-box .title { font-size: 17px; margin-bottom: 14px; }
.lim-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .lim-grid2 { grid-template-columns: 1fr; } }
.lim-page input, .lim-page textarea {
  border: 1px solid #e5e5e5; border-radius: 6px; padding: 10px 12px; font-size: 14px; width: 100%; font-family: inherit;
}
.lim-page input:focus, .lim-page textarea:focus { outline: none; border-color: var(--brand, #e8491d); }
.lim-radio { display: flex; align-items: center; gap: 10px; border: 1px solid #e5e5e5; border-radius: 6px; padding: 10px 12px; margin-bottom: 8px; font-size: 14px; cursor: pointer; }
.lim-radio b { margin-left: auto; }

.lim-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.lim-sort { border: 1px solid #e5e5e5; border-radius: 6px; padding: 8px 12px; font-size: 14px; background: #fff; }
.lim-searchbox { display: flex; gap: 8px; margin-top: 8px; max-width: 520px; }
.lim-searchbox input { flex: 1; border: 1px solid #e5e5e5; border-radius: 6px; padding: 10px 14px; font-size: 14px; }
.lim-searchbox input:focus { outline: none; border-color: var(--brand, #e8491d); }

.lim-tabs { display: flex; border: 1px solid #e5e5e5; border-radius: 6px; overflow: hidden; margin-bottom: 16px; }
.lim-tabs button { flex: 1; padding: 12px; font-size: 14px; font-weight: 600; background: #fff; border: none; cursor: pointer; }
.lim-tabs button.active { background: var(--brand, #e8491d); color: #fff; }
