/*
 * Base styles for the plasma cutter catalogue.
 * Designed to be lightweight, responsive and easily extendable.
 */
html, body {
  margin: 0;
  padding: 0;
  font-family: 'Arial', sans-serif;
  color: #333;
  background-color: #f9fafb;
}

header {
  background: #0a2d4a;
  color: #fff;
  padding: 20px;
}
header h1 {
  margin: 0;
  font-size: 24px;
}

nav.breadcrumbs {
  background: #e9eef3;
  padding: 10px 20px;
  font-size: 14px;
}
nav.breadcrumbs a {
  color: #1a73e8;
  text-decoration: none;
  margin-right: 8px;
}
nav.breadcrumbs span {
  color: #555;
}

/* Legacy layout container (avoid overriding Bootstrap .container) */
.legacy-container {
  display: flex;
  flex-direction: row;
  padding: 20px;
}

/* Sidebar filter */
/* Sidebar filter */
.sidebar {
  width: 280px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin-right: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.sidebar h3 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 18px;
  color: #0a2d4a;
}
.filter-group {
  margin-bottom: 20px;
}
.filter-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: normal;
  color: #333;
  cursor: pointer;
  font-size: 14px;
}
.filter-group input[type="checkbox"],
.filter-group input[type="radio"] {
  margin-right: 6px;
}
.filter-group .range-inputs {
  display: flex;
  gap: 10px;
}
.filter-group .range-inputs input {
  width: 50%;
  padding: 6px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
}

/* Price range sliders */
.range-sliders input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  outline: none;
}
.range-sliders input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #0a2d4a;
  cursor: pointer;
}
.range-sliders input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #0a2d4a;
  cursor: pointer;
  border: none;
}
/* Buttons in filter */
.sidebar button {
  padding: 8px 14px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 14px;
}
.sidebar button.secondary {
  background: #e9eef3;
  color: #0a2d4a;
  border: 1px solid #0a2d4a;
}
.sidebar button:not(.secondary) {
  background: #0a2d4a;
  color: #fff;
}

/* Catalogue content */
.content {
  flex: 1;
}
.content .controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.view-toggle {
  display: flex;
  gap: 8px;
}
.view-toggle button {
  border: 1px solid #ccc;
  background: #fff;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 4px;
}
.view-toggle button.active {
  background: #0a2d4a;
  color: #fff;
}

.sort-select {
  margin-left: auto;
}
.sort-select select {
  padding: 6px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

/* Card grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.product-card {
  background: #fff;
  border: 1px solid #e9eef3;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.06);
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 15px;
  gap: 8px;
  overflow: hidden;
  /* Указатель курсора и плавное наведение */
  cursor: pointer;
  /* Плавные анимации для перемещения, тени и цвета фона */
  transition: transform 0.2s ease, box-shadow 0.25s ease, background-color 0.2s ease;
  will-change: transform, box-shadow;
}

/* Эффект наведения для карточек (товаров и категорий) */
.product-card:hover {
  /* Легкий подъем и усиление тени */
  transform: translateY(-6px) scale(1.01);
  /* Двухслойная тень для современного эффекта и тонкое «кольцо» */
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.12), 0 0 0 1px rgba(26, 77, 122, 0.08);
  /* Светлый фон помогает визуально выделить карточку. Если изображение закрывает фон,
     эффект заметен на других участках карточки: название, цена и кнопки. */
  background-color: #f6fafd;
}

/* Отключаем указатель и тень для кнопок внутри карточки */
.product-card .actions button {
  cursor: pointer;
  transition: none;
}
.product-card .flags {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.product-card .flag {
  background: #ff6f61;
  color: #fff;
  padding: 2px 8px;
  font-size: 10px;
  border-radius: 9999px;
  text-transform: uppercase;
}
.product-card .flag.sale { background: #e67e22; }
.product-card .flag.hit { background: #27ae60; }
.product-card .flag.new { background: #2980b9; }
.product-card .flag.free_delivery { background: #8e44ad; }

.product-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 4px;
  background-color: #f3f6fb;
}
.product-card .name {
  font-weight: bold;
  margin: 10px 0 2px;
  font-size: 15px;
  line-height: 1.3;
  color: #0a2d4a;
}
.product-card .sku {
  font-size: 12px;
  color: #6b7280;
}
.product-card .rating {
  font-size: 12px;
  color: #f39c12;
}
.product-card .price {
  font-weight: bold;
  margin-top: 4px;
  font-size: 18px;
  color: #0a2d4a;
}
.product-card .availability {
  font-size: 12px;
  margin-top: 5px;
  color: #27ae60;
}
.product-card .availability.on_order {
  color: #d35400;
}
.product-card .availability.expected {
  color: #c0392b;
}

.product-card .actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
}
.product-card .actions button {
  flex: 1;
  padding: 5px 8px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: #0a2d4a;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}
.product-card .actions button.secondary {
  background: #e9eef3;
  color: #0a2d4a;
  border: 1px solid #0a2d4a;
}

/* Table view */
.product-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
.product-table th,
.product-table td {
  border: 1px solid #e0e0e0;
  padding: 10px;
  text-align: left;
  vertical-align: top;
}
.product-table th {
  background: #f0f4f8;
}
.product-table img {
  max-width: 80px;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* List view */
.product-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}
.product-item {
  display: flex;
  gap: 15px;
  padding: 12px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  cursor: pointer;
  align-items: center;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.product-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  background-color: #f6fafd;
}
.product-item img {
  max-width: 120px;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 4px;
}
.product-item .details {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-item .details .name {
  font-weight: bold;
  margin-bottom: 4px;
  font-size: 16px;
}
.product-item .details .sku,
.product-item .details .rating,
.product-item .details .price,
.product-item .details .availability {
  font-size: 14px;
  margin-bottom: 4px;
}
.product-item .details .actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.product-item .details .actions button {
  padding: 6px 10px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 14px;
}
.product-item .details .actions button.secondary {
  background: #e9eef3;
  color: #0a2d4a;
  border: 1px solid #0a2d4a;
}
.product-item .details .actions button:not(.secondary) {
  background: #0a2d4a;
  color: #fff;
}

/* Table view */
.product-table tr {
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.product-table tr:hover {
  background-color: #f6fafd;
}
.product-list .product-item {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  padding: 15px;
  display: flex;
  gap: 20px;
}
.product-item img {
  width: 200px;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 4px;
}
.product-item .details {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* ========= Help CTA ========= */
.help-cta {
  background: linear-gradient(135deg, #0a2d4a 0%, #1a4d7a 60%, #2563a0 100%);
  box-shadow: 0 8px 32px rgba(10, 45, 74, 0.25);
}

/* ========= SEO Content Block ========= */
.seo-content-block {
  background: #f8f9fb;
  border: 1px solid #e9ecef;
}
.seo-content-block .seo-intro { line-height: 1.75; color: #333; }
.seo-content-block .seo-full { display: none; margin-top: .75rem; line-height: 1.75; color: #444; }
.seo-content-block .seo-full.show { display: block; }
.seo-toggle-btn {
  background: none; border: none; color: #1a4d7a; font-weight: 600;
  cursor: pointer; padding: 0; margin-top: .5rem; font-size: .9rem;
  transition: color .2s;
}
.seo-toggle-btn:hover { color: #0a2d4a; text-decoration: underline; }

/* ========= Steps (How to Buy) ========= */
.step-icon-wrap {
  width: 68px; height: 68px;
  background: linear-gradient(135deg, #0a2d4a, #1a6daa);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative;
  box-shadow: 0 6px 20px rgba(10, 45, 74, 0.22);
  transition: transform .3s, box-shadow .3s;
}
.step-icon-wrap:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 10px 28px rgba(10, 45, 74, 0.32);
}
.step-icon-wrap i {
  font-size: 1.5rem; color: #fff;
}
.step-num {
  position: absolute; top: -6px; right: -6px;
  width: 24px; height: 24px;
  background: #23A455; color: #fff;
  border-radius: 50%; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(35,164,85,.35);
}
.step-title { font-weight: 600; color: #0a2d4a; }
.step-col { position: relative; }
@media (min-width: 768px) {
  .step-col:not(:last-child)::after {
    content: ''; position: absolute;
    top: 34px; right: -10px;
    width: 20px; height: 2px;
    background: linear-gradient(90deg, #0a2d4a, transparent);
  }
}

/* ========= Advantage Cards ========= */
.adv-card {
  background: #fff;
  border: 1px solid #edf0f4;
  box-shadow: 0 4px 16px rgba(0,0,0,0.05);
  transition: transform .3s, box-shadow .3s;
}
.adv-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}
.adv-icon-wrap {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, rgba(10,45,74,0.08), rgba(26,77,122,0.15));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.adv-icon-wrap i {
  font-size: 1.4rem; color: #1a4d7a;
}

/* ========= Article Cards ========= */
.article-card-new {
  background: #fff;
  border: 1px solid #edf0f4;
  box-shadow: 0 4px 14px rgba(0,0,0,0.04);
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.article-card-new:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 28px rgba(0,0,0,0.1);
  border-color: #1a4d7a;
}
.article-icon-wrap {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, rgba(10,45,74,0.06), rgba(26,109,170,0.12));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
}
.article-icon-wrap i {
  font-size: 1.2rem; color: #1a4d7a;
}

/* Smaller CTA buttons on product page */
.product-details .btn {
  padding: 6px 10px;
  font-size: 14px;
  border-radius: 6px;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
}
.pagination button {
  border: 1px solid #ccc;
  background: #fff;
  margin: 0 5px;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
}
.pagination button.active {
  background: #0a2d4a;
  color: #fff;
  border-color: #0a2d4a;
}
.pagination button[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* -------------------------------------------------------------------- */
/* Галерея миниатюр для страницы товара */

/* Общий класс для миниатюр изображений в карточке товара */
.thumb-image {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  margin-right: 5px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.thumb-image:hover {
  opacity: 0.8;
}

/* Миниатюра для видео. На основе изображения с наложенным значком воспроизведения */
.video-thumb {
  position: relative;
  display: inline-block;
  width: 80px;
  height: 60px;
  margin-right: 5px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.video-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.video-thumb::after {
  content: '\25BA'; /* Юникод-символ «play» */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  color: rgba(255, 255, 255, 0.9);
  pointer-events: none;
}
.video-thumb:hover {
  opacity: 0.8;
}

/* Notification animations */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Header buttons hover effects */
header button:hover {
  background: rgba(255,255,255,0.2) !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Product card buttons */
.product-card button,
.product-item button,
.product-table button,
.product-info .actions button {
  transition: all 0.2s ease;
}

.product-card button:hover,
.product-item button:hover,
.product-table button:hover,
.product-info .actions button:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Popup buttons */
.popup-overlay button {
  transition: all 0.2s ease;
}

.popup-overlay button:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Product page action buttons */
.product-info .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0 0;
}
.product-info .actions button {
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 6px;
}
.product-info .actions button.secondary {
  background: #e9eef3;
  color: #0a2d4a;
  border: 1px solid #0a2d4a;
}

/* Responsive behaviour */
@media (max-width: 900px) {
  .container {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    padding-right: 0;
    margin-bottom: 20px;
  }
  .filter-toggle {
    display: block;
    margin-bottom: 10px;
  }
}

@media (max-width: 600px) {
  .product-card {
    padding: 10px;
  }
  .product-card .actions button {
    font-size: 10px;
    padding: 4px 6px;
  }
}

/* Wide layout: expand content containers nearly to full width on desktop */
@media (min-width: 1200px) {
  .container {
    max-width: 96vw !important;
  }
}
@media (min-width: 1400px) {
  .container {
    max-width: 96vw !important;
  }
}

/* Footer styling - unified across all pages */
.footer {
  background: linear-gradient(135deg, #0a2d4a 0%, #1a4d7a 100%);
  color: white;
  padding: 3rem 0 2rem 0;
  margin-top: 3rem;
}

.footer h5, .footer h6 {
  color: white;
  font-weight: 600;
}

.footer a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer a:hover {
  color: #00ff00;
}

.footer .social-links {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}

.footer .social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.footer .social-links a:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}

.footer hr {
  border-color: rgba(255,255,255,0.2);
}