/* Append: Catalog + Product page styles */

/* ---------- BREADCRUMBS ---------- */
.breadcrumbs {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink-3);
  padding: 10px 0 12px;
  flex-wrap: wrap;
}
.breadcrumbs a { color: var(--ink-3); transition: color .15s; }
.breadcrumbs a:hover { color: var(--blue); }
.breadcrumbs .sep { color: var(--bg-soft-2); }
.breadcrumbs .current { color: var(--ink-2); font-weight: 500; }

/* ---------- CATALOG PAGE HEADER ---------- */
.catalog-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin: 12px 0 28px; gap: 24px; flex-wrap: wrap;
}
.catalog-head h1 {
  font-family: 'Rubik', sans-serif; font-weight: 700;
  font-size: 36px; color: var(--ink-2); line-height: 1.1;
}
.catalog-head .count { font-size: 14px; color: var(--ink-3); margin-top: 8px; }
.catalog-head .tags {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.catalog-head .tag {
  padding: 8px 16px; border-radius: 99px;
  background: var(--bg-soft); color: var(--ink-2);
  font-family: 'Rubik', sans-serif; font-weight: 600; font-size: 13px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.catalog-head .tag:hover, .catalog-head .tag.active {
  background: var(--blue); color: #fff;
}

/* ---------- CATEGORY DESCRIPTION (under products) ---------- */
.cat-description {
  font-size: 15px; line-height: 1.6; color: var(--ink-3);
  margin: 8px 0 60px;
  padding: 24px 28px;
  background: var(--bg-soft);
  border-radius: 12px;
}
.cat-description p { margin: 0 0 10px; }
.cat-description p:last-child { margin-bottom: 0; }
.cat-description h2, .cat-description h3 {
  font-family: 'Rubik', sans-serif; color: var(--ink-2);
  margin: 16px 0 8px; font-weight: 600;
}
.cat-description h2 { font-size: 20px; }
.cat-description h3 { font-size: 17px; }
.cat-description h2:first-child, .cat-description h3:first-child { margin-top: 0; }

/* ---------- SUBCATEGORIES STRIP ---------- */
.subcategories {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 0 0 4px;
}
.subcat-chip {
  display: inline-flex; align-items: center;
  padding: 8px 16px; border-radius: 99px;
  background: var(--bg-soft); color: var(--ink-2);
  font-family: 'Rubik', sans-serif; font-weight: 500; font-size: 13px;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.subcat-chip:hover { background: var(--blue); color: #fff; }

/* ---------- CATALOG LAYOUT ---------- */
.catalog-layout {
  display: grid;
  /* minmax(0,…): без цього min-content тулбару (селект сортування) розтягує
     колонку ширше за екран і картки товарів вилазять за його межі */
  grid-template-columns: minmax(0, 1fr); /* filter sidebar hidden for now — full-width results */
  gap: 28px;
  align-items: flex-start;
  padding-bottom: 60px;
}
.catalog-layout > * { min-width: 0; }

/* ---------- FILTER SIDEBAR (hidden for now) ---------- */
.filters {
  display: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  position: sticky; top: 20px;
}
.filters h3 {
  font-family: 'Rubik', sans-serif; font-weight: 700;
  font-size: 18px; color: var(--ink-2);
  margin-bottom: 18px;
  display: flex; justify-content: space-between; align-items: center;
}
.filters h3 button {
  font-size: 12px; color: var(--blue); font-family: 'Rubik', sans-serif;
  font-weight: 500;
}
.filters h3 button:hover { color: var(--blue-dark); text-decoration: underline; }
.filter-group { border-top: 1px solid var(--line); padding: 18px 0; }
.filter-group:first-of-type { border-top: none; padding-top: 0; }
.filter-group:last-of-type { padding-bottom: 0; }
.filter-group-title {
  font-family: 'Rubik', sans-serif; font-weight: 600; font-size: 14px;
  color: var(--ink-2); margin-bottom: 12px;
  display: flex; justify-content: space-between; align-items: center;
  cursor: pointer;
}
.filter-group-title .chev { color: var(--blue); transition: transform .2s; }
.filter-group.collapsed .filter-group-title .chev { transform: rotate(-90deg); }
.filter-group.collapsed .filter-body { display: none; }
.filter-body { display: flex; flex-direction: column; gap: 10px; }
.filter-check {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--ink-2);
  cursor: pointer;
  user-select: none;
}
.filter-check input { display: none; }
.filter-check .box {
  width: 18px; height: 18px; flex-shrink: 0;
  border: 1.5px solid var(--bg-soft-2);
  border-radius: 5px;
  display: grid; place-items: center;
  background: #fff;
  transition: background .15s, border-color .15s;
}
.filter-check input:checked + .box {
  background: var(--blue); border-color: var(--blue);
}
.filter-check input:checked + .box::after {
  content: ''; width: 10px; height: 6px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
}
.filter-check:hover .box { border-color: var(--blue); }
.filter-check .count { margin-left: auto; color: var(--muted); font-size: 12px; }

.price-range { display: flex; flex-direction: column; gap: 12px; }
.price-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.price-inputs input {
  width: 100%; padding: 10px 12px;
  border: 1px solid var(--bg-soft-2);
  border-radius: 8px;
  font-family: 'Rubik', sans-serif; font-size: 14px;
  outline: none;
  transition: border-color .15s;
}
.price-inputs input:focus { border-color: var(--blue); }
/* Прибрати стрілки-лічильники у number-інпутів */
.price-inputs input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.price-inputs input[type=number]::-webkit-outer-spin-button,
.price-inputs input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.price-slider {
  position: relative; height: 4px;
  background: var(--bg-soft); border-radius: 2px;
}
.price-slider .track {
  position: absolute; top: 0; bottom: 0;
  background: var(--blue); border-radius: 2px;
}
.price-slider {
  margin: 8px 4px;
}
.price-slider .thumb {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 2px solid var(--blue);
  cursor: pointer; touch-action: none;
  z-index: 1;
}

.apply-filters {
  margin-top: 16px;
  padding: 12px 20px; width: 100%;
  background: var(--blue); color: #fff;
  border-radius: 12px;
  font-family: 'Rubik', sans-serif; font-weight: 700; font-size: 14px;
  transition: background .15s;
}
.apply-filters:hover { background: var(--blue-dark); }

/* ---------- TOOLBAR ---------- */
.catalog-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 20px;
  background: var(--bg-soft);
  border-radius: 12px;
  margin-bottom: 20px;
  gap: 16px; flex-wrap: wrap;
}
.toolbar-left { display: flex; align-items: center; gap: 16px; font-size: 14px; color: var(--ink-3); min-width: 0; }
.toolbar-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; min-width: 0; max-width: 100%; }
.toolbar-select {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 10px;
  font-family: 'Rubik', sans-serif; font-weight: 500; font-size: 13px;
  color: var(--ink-2); cursor: pointer;
  min-width: 0; max-width: 100%;
}
.toolbar-select > span { white-space: nowrap; }
.toolbar-select:hover { border-color: var(--blue); }
.toolbar-select select {
  border: none; outline: none; background: transparent;
  font: inherit; color: inherit; cursor: pointer;
  /* селект не має диктувати ширину — інакше найдовший пункт розсуває тулбар */
  min-width: 0; max-width: 100%; text-overflow: ellipsis;
}
.view-toggle { display: flex; gap: 4px; }
.view-toggle button {
  width: 36px; height: 36px; border-radius: 8px;
  background: #fff; border: 1px solid var(--line);
  color: var(--ink-3);
  display: grid; place-items: center;
  cursor: pointer;
  transition: all .15s;
}
.view-toggle button.active { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ---------- PRODUCT GRID + CARDS ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.product-grid.list { grid-template-columns: 1fr; }
/* Step the grid down on narrower viewports (below 1024 the rules further down take over) */
@media (min-width: 1025px) and (max-width: 1280px) { .product-grid:not(.list) { grid-template-columns: repeat(3, 1fr); } }
.product-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s, border-color .2s;
  cursor: pointer;
  position: relative;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
  border-color: rgba(32,116,181,0.3);
}
.product-img {
  position: relative;
  aspect-ratio: 1/1;
  background: var(--bg-soft);
  overflow: hidden;
}
.product-img img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.product-badges {
  position: absolute; top: 12px; left: 12px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
}
/* Бейдж «Ukraine Facility» у картці товару — зменшена версія бейджа зі сторінки товару */
.product-badges .badge-uf {
  width: auto; height: 40px; display: block; border: 0;
  filter: drop-shadow(0 2px 6px rgba(0, 18, 47, .25));
}
.badge {
  padding: 4px 10px; border-radius: 99px;
  font-family: 'Rubik', sans-serif; font-weight: 700; font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.badge-new { background: var(--cyan); color: #fff; }
.badge-sale { background: var(--yellow); color: var(--ink); }
.badge-hit { background: var(--blue); color: #fff; }
.badge-stock { background: rgba(31,138,91,0.15); color: #1f8a5b; }
.badge-ua {
  background: linear-gradient(180deg, #4a90d9 0 50%, #f5c542 50% 100%);
  color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}
.catalog-empty { padding: 40px 0; color: var(--ink-3); font-size: 15px; }

/* Зірковий рейтинг у модалці відгуку */
.review-rating-input { display: inline-flex; gap: 4px; }
.review-rating-input .rri-star { cursor: pointer; line-height: 0; color: rgba(0,0,0,0.15); transition: color .12s; }
.review-rating-input .rri-star input { position: absolute; opacity: 0; width: 0; height: 0; }
.review-rating-input .rri-star.is-filled { color: var(--yellow); }
.catalog-pagination { margin-top: 28px; }
.product-body {
  padding: 16px 20px 20px;
  display: flex; flex-direction: column; gap: 8px;
  flex: 1;
}
.product-cat {
  font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.product-title {
  font-family: 'Rubik', sans-serif; font-weight: 700;
  font-size: 16px; line-height: 1.3; color: var(--blue);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 42px;
}
.product-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--ink-3);
}
.product-rating { display: flex; align-items: center; gap: 4px; }
.product-rating .stars { color: var(--yellow); }
.product-price-row {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-top: auto; padding-top: 12px;
  border-top: 1px solid var(--line);
}
.product-price {
  font-family: 'Rubik', sans-serif; font-weight: 700;
  font-size: 22px; color: var(--ink-2); line-height: 1;
}
.product-price .old {
  display: block; font-size: 13px; font-weight: 400;
  color: var(--muted); text-decoration: line-through; margin-bottom: 2px;
}
.product-more {
  height: 40px; padding: 0 16px; border-radius: 40px;
  background: #00a046; color: #fff;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Rubik', sans-serif; font-weight: 600; font-size: 14px;
  white-space: nowrap;
  transition: background .15s, transform .12s;
}
.product-more:hover { background: var(--blue-dark); color: #fff; }
.product-more:active { transform: scale(0.96); }

/* List view */
.product-grid.list .product-card {
  flex-direction: row;
  align-items: stretch;
}
.product-grid.list .product-img {
  flex: 0 0 280px;
  aspect-ratio: auto;
  align-self: stretch;
}
.product-grid.list .product-body { padding: 20px 24px; }

/* ---------- PAGINATION ---------- */
.pagination {
  display: flex; justify-content: center; align-items: center;
  gap: 6px;
  margin-top: 36px;
}
.page-btn {
  min-width: 40px; height: 40px; padding: 0 12px;
  border-radius: 10px;
  background: #fff; border: 1px solid var(--line);
  color: var(--ink-2);
  font-family: 'Rubik', sans-serif; font-weight: 600; font-size: 14px;
  display: grid; place-items: center;
  cursor: pointer;
  transition: all .15s;
}
.page-btn:hover { border-color: var(--blue); color: var(--blue); }
.page-btn.active { background: var(--blue); color: #fff; border-color: var(--blue); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-btn.dots { border: none; background: transparent; }

/* ---------- PRODUCT PAGE ---------- */
.product-page {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 32px;
  padding-bottom: 0;
}

/* Gallery */
.pgallery { position: relative; }
.pgallery-main {
  position: relative;
  background: var(--bg-soft);
  border-radius: var(--radius);
  aspect-ratio: 1/1;
  overflow: hidden;
  margin-bottom: 16px;
}
.pgallery-main img {
  width: 100%; height: 100%;
  object-fit: cover;
  border: 2px solid var(--bg-soft);
  box-sizing: border-box;
}
.pgallery-badges {
  position: absolute; top: 16px; left: 16px;
  display: flex; align-items: center; gap: 8px;
}
.pgallery-badges .badge-uf {
  width: auto; height: 56px; display: block; border: 0;
  filter: drop-shadow(0 2px 6px rgba(0, 18, 47, .25));
}
.pgallery-fav {
  position: absolute; top: 16px; right: 16px;
  width: 44px; height: 44px; border-radius: 50%;
  background: #fff;
  display: grid; place-items: center;
  color: var(--ink-3);
  box-shadow: 0 2px 8px rgba(15,23,42,0.1);
  cursor: pointer;
  transition: color .15s, transform .12s;
}
.pgallery-fav.active { color: #e02d3c; }
.pgallery-arrows {
  position: absolute; left: 0; right: 0; top: 50%;
  transform: translateY(-50%);
  display: flex; justify-content: space-between;
  padding: 0 16px;
  pointer-events: none;
}
.pgallery-arrows button {
  width: 44px; height: 44px; border-radius: 50%;
  background: #fff; color: var(--blue);
  display: grid; place-items: center;
  pointer-events: auto;
  box-shadow: 0 4px 14px rgba(15,23,42,0.1);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.pgallery-arrows button:hover { background: var(--blue); color: #fff; }
.pgallery-thumbs {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px;
}
.pgallery-thumb {
  aspect-ratio: 1/1;
  background: var(--bg-soft);
  border-radius: 12px;
  border: 2px solid transparent;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .15s, transform .12s;
}
.pgallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pgallery-thumb.active { border-color: var(--blue); }
.pgallery-thumb:hover { transform: translateY(-2px); }
.pgallery-note {
  margin: 12px 0 0;
  font-size: 12px; line-height: 1.4;
  color: var(--ink-3, #8a94a6);
}

/* Product info column */
.pinfo h1 {
  font-family: 'Rubik', sans-serif; font-weight: 700;
  font-size: 32px; line-height: 1.2;
  color: var(--ink-2); margin-bottom: 12px;
}
.pinfo-meta {
  display: flex; align-items: center; gap: 16px;
  font-size: 13px; color: var(--ink-3);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.pinfo-meta .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--bg-soft-2); }
.pinfo-meta .stars { color: var(--yellow); display: inline-flex; gap: 2px; }
.pinfo-stock { color: #1f8a5b; font-weight: 600; }
.pinfo-stock.out { color: #e02d3c; }

.pinfo-price-box {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}
/* Позначка програми фінансової підтримки Ukraine Facility */
.pinfo-uf {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px;
  font-size: 14px; font-weight: 600;
  color: var(--ink-2); line-height: 1.35;
}
.pinfo-uf img { width: 36px; height: 36px; flex: none; }
.pinfo-price {
  font-family: 'Rubik', sans-serif; font-weight: 700;
  font-size: 40px; color: var(--ink-2); line-height: 1;
  display: flex; align-items: baseline; gap: 16px;
}
.pinfo-price .old {
  font-size: 22px; color: var(--muted);
  text-decoration: line-through; font-weight: 400;
}
.pinfo-price .discount {
  font-size: 13px; padding: 4px 10px;
  background: var(--yellow); color: var(--ink);
  border-radius: 99px;
  font-family: 'Rubik', sans-serif; font-weight: 700;
}
.pinfo-price-hint {
    display: none!important;
  font-size: 13px; color: var(--ink-3);
  margin-top: 10px;
}

.pinfo-bullets {
  list-style: none; padding: 0; margin: 0 0 24px;
  display: flex; flex-direction: column; gap: 12px;
}
.pinfo-bullets li {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: 14px; color: var(--ink-2);
  line-height: 1.5;
}
.pinfo-bullets li .ic {
  width: 24px; height: 24px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--cyan);
  color: #fff;
  display: grid; place-items: center;
}

.pinfo-actions {
  display: flex; gap: 12px; margin-bottom: 24px;
  flex-wrap: wrap;
}
.qty-stepper {
  display: flex; align-items: center;
  background: #fff;
  border: 1px solid var(--bg-soft-2);
  border-radius: 12px;
  overflow: hidden;
  height: 56px;
}
.qty-stepper button {
  width: 44px; height: 100%;
  font-size: 20px; color: var(--blue);
  font-weight: 700;
  transition: background .15s;
}
.qty-stepper button:hover { background: var(--bg-soft); }
.qty-stepper button:disabled { color: var(--bg-soft-2); cursor: not-allowed; }
.qty-stepper input {
  width: 48px; text-align: center;
  border: none; outline: none;
  font-family: 'Rubik', sans-serif; font-weight: 700;
  font-size: 16px; color: var(--ink-2);
  background: transparent;
}
.pinfo-cta {
  flex: 1; min-width: 100px;
  padding: 0 28px; height: 56px;
  border-radius: 40px;
  background: #00a046; color: #fff;
  font-family: 'Rubik', sans-serif; font-weight: 700; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  cursor: pointer;
  transition: background .15s, transform .12s;
}
.pinfo-cta:hover { background: var(--blue-dark); }
.pinfo-cta:active { transform: scale(0.98); }
.pinfo-cta.added { background: #1f8a5b; }
.pinfo-cta.outline {
  background: transparent;
  border: 2px solid var(--blue);
  color: var(--blue);
}
.pinfo-cta.outline:hover { background: var(--blue); color: #fff; }

.pinfo-extras {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.pinfo-extra {
  display: flex; align-items: flex-start; gap: 12px;
}
.pinfo-extra-ic {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 12px;
  background: var(--bg-soft); color: var(--blue);
  display: grid; place-items: center;
}
.pinfo-extra-text { font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.pinfo-extra-text strong { display: block; font-weight: 600; margin-bottom: 2px; }

/* Tabs */
.ptabs {
  margin-top: 40px;
  padding-bottom: 60px;
}
.ptabs-head {
  display: flex; gap: 8px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
  overflow-x: auto;
}
.ptab {
  padding: 14px 20px;
  font-family: 'Rubik', sans-serif; font-weight: 600; font-size: 15px;
  color: var(--ink-3);
  border-bottom: 3px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.ptab:hover { color: var(--blue); }
.ptab.active { color: var(--blue); border-color: var(--blue); }
.ptab-panel {
  font-size: 15px; line-height: 1.7; color: var(--ink-2);
  max-width: 900px;
}
.ptab-panel p { margin-bottom: 16px; }
.ptab-panel h3 {
  font-family: 'Rubik', sans-serif; font-weight: 700; font-size: 20px;
  color: var(--ink-2); margin: 28px 0 12px;
}

.specs-table {
  width: 100%; border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.specs-table tr:nth-child(even) { background: var(--bg-soft); }
.specs-table th, .specs-table td {
  padding: 14px 20px;
  text-align: left; font-size: 14px;
  border-bottom: 1px solid var(--line);
}
.specs-table tr:last-child th,
.specs-table tr:last-child td { border-bottom: none; }
.specs-table th {
  font-family: 'Rubik', sans-serif; font-weight: 600;
  color: var(--ink-3); width: 40%;
}
.specs-table td { color: var(--ink-2); }

/* Reviews */
.review-summary {
  display: grid; grid-template-columns: auto 1fr; gap: 32px;
  align-items: center;
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 28px;
}
.review-score {
  text-align: center;
  border-right: 1px solid var(--bg-soft-2);
  padding-right: 32px;
}
.review-score .num {
  font-family: 'Rubik', sans-serif; font-weight: 700; font-size: 48px;
  color: var(--ink-2); line-height: 1;
}
.review-score .stars { color: var(--yellow); margin: 8px 0; }
.review-score .count { font-size: 13px; color: var(--ink-3); }
.review-bars { display: flex; flex-direction: column; gap: 6px; }
.review-bar { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--ink-3); }
.review-bar .label { width: 60px; }
.review-bar .track { flex: 1; height: 6px; background: var(--bg-soft-2); border-radius: 3px; overflow: hidden; }
.review-bar .fill { height: 100%; background: var(--yellow); }
.review-bar .pct { width: 32px; text-align: right; }

.review-list { display: flex; flex-direction: column; gap: 16px; }
.review-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.review-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.review-author { display: flex; align-items: center; gap: 12px; }
.review-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--blue); color: #fff;
  display: grid; place-items: center;
  font-family: 'Rubik', sans-serif; font-weight: 700; font-size: 16px;
}
.review-name { font-family: 'Rubik', sans-serif; font-weight: 600; font-size: 15px; color: var(--ink-2); }
.review-date { font-size: 12px; color: var(--muted); }
.review-stars { color: var(--yellow); }
.review-body { font-size: 14px; color: var(--ink-2); line-height: 1.6; }

/* Related products section */
.related-section { padding: 60px 0; }

/* ---------- Responsive: catalog + product ---------- */
@media (max-width: 1024px) {
  .catalog-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-page { grid-template-columns: 1fr; gap: 32px; }
  .pinfo h1 { font-size: 26px; }
  .pgallery-thumbs { grid-template-columns: repeat(5, 1fr); }
  .review-summary { grid-template-columns: 1fr; gap: 20px; text-align: center; }
  .review-score { border-right: none; border-bottom: 1px solid var(--bg-soft-2); padding: 0 0 20px; }
}

@media (max-width: 640px) {
  .catalog-head h1 { font-size: 26px; }
  .product-grid { grid-template-columns: 1fr; }
  .product-grid.list .product-card { flex-direction: column; }
  .product-grid.list .product-img { flex: none; aspect-ratio: 4/3; }
  .pgallery-thumbs { grid-template-columns: repeat(4, 1fr); }
  .pinfo h1 { font-size: 22px; }
  .pinfo-price { font-size: 32px; }
  .pinfo-extras { grid-template-columns: 1fr; }
  .pinfo-actions { flex-direction: column; }
  .qty-stepper { width: 100%; justify-content: space-between; }
  .qty-stepper input { flex: 1; }
  .pinfo-cta { width: 100%; min-height: 48px; }
  .ptab { padding: 12px 14px; font-size: 14px; }
  .catalog-toolbar { padding: 12px 14px; }
  .toolbar-left { flex-direction: column; align-items: flex-start; gap: 6px; }
  /* Сортування займає весь рядок, перемикач вигляду — праворуч від нього */
  .toolbar-right { width: 100%; gap: 10px; flex-wrap: nowrap; }
  .toolbar-select { flex: 1 1 auto; min-width: 0; }
  .toolbar-select select { flex: 1 1 auto; min-width: 0; width: 100%; }
  .view-toggle { flex: 0 0 auto; }
}

/* Related-products grid: 4 across on desktop, responsive down. Uses a class
   (not an inline style) so the breakpoints below can override it. */
.product-grid.related-grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) { .product-grid.related-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .product-grid.related-grid { grid-template-columns: 1fr; } }

/* Image + title in a product card link through to the product page. */
.product-img-link { display: block; width: 100%; height: 100%; }
a.product-title { text-decoration: none; }
a.product-title:hover { color: var(--cyan); }

a.contact-link { background: var(--bg-soft);}

/* ---------------------------------------------------------------------------
   Опції товару (колір ДСП, колір HPL тощо) на сторінці товару.
   Вибір їде у форму швидкого замовлення — кошика на сайті немає.
   --------------------------------------------------------------------------- */
.pinfo-options {
  display: flex; flex-direction: column; gap: 18px;
  margin-bottom: 24px;
}
.popt-label {
  font-size: 14px; font-weight: 600; color: var(--ink-2);
  margin-bottom: 10px;
}
.popt-req { color: #e11d48; }
.popt-values { display: flex; flex-wrap: wrap; gap: 8px; }
.popt-chip { cursor: pointer; }
.popt-chip input {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}
.popt-chip .popt-txt {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: 40px;
  border: 1px solid var(--line); background: #fff;
  font-size: 14px; line-height: 1.2; color: var(--ink-2);
  transition: border-color .15s, background .15s, color .15s;
}
.popt-chip:hover .popt-txt { border-color: var(--blue); }
.popt-chip input:checked + .popt-txt {
  background: var(--blue); border-color: var(--blue); color: #fff;
}
.popt-chip input:focus-visible + .popt-txt { outline: 2px solid var(--blue); outline-offset: 2px; }
.popt-chip em { font-style: normal; font-size: 13px; opacity: .75; }
.popt-picked { color: var(--ink-3); font-weight: 500; }

/* Значення з кольором («rgb(0,74,255):Синій» у назві) або з картинкою
   малюються квадратиком-зразком; назва показується тултіпом. */
.popt-chip-sw { position: relative; display: inline-flex; }
.popt-sw {
  display: block; width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, .15);
  background-size: cover; background-position: center;
  transition: box-shadow .15s, border-color .15s, transform .12s;
}
.popt-chip-sw:hover .popt-sw { transform: scale(1.05); }
.popt-chip-sw input:checked + .popt-sw {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(32, 116, 181, .35);
}
.popt-chip-sw input:focus-visible + .popt-sw { outline: 2px solid var(--blue); outline-offset: 3px; }
.popt.is-invalid .popt-sw { border-color: #e11d48; }

/* Тултіп із назвою кольору */
.popt-chip-sw::after {
  content: attr(data-tip);
  position: absolute; left: 50%; bottom: calc(100% + 8px);
  transform: translate(-50%, 4px);
  padding: 6px 10px; border-radius: 8px;
  background: var(--ink-2); color: #fff;
  font-size: 12px; line-height: 1.2; white-space: nowrap;
  opacity: 0; pointer-events: none; z-index: 5;
  transition: opacity .15s, transform .15s;
}
.popt-chip-sw::before {
  content: ''; position: absolute; left: 50%; bottom: calc(100% + 3px);
  transform: translate(-50%, 4px);
  border: 5px solid transparent; border-top-color: var(--ink-2);
  opacity: 0; pointer-events: none; z-index: 5;
  transition: opacity .15s, transform .15s;
}
.popt-chip-sw:hover::after,
.popt-chip-sw:hover::before,
.popt-chip-sw:focus-within::after,
.popt-chip-sw:focus-within::before { opacity: 1; transform: translate(-50%, 0); }
.popt-field input,
.popt-field textarea {
  width: 100%; box-sizing: border-box;
  padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 14px; color: var(--ink);
  background: var(--bg-soft); transition: border-color .15s, background .15s;
}
.popt-field input:focus,
.popt-field textarea:focus { outline: none; border-color: var(--blue); background: #fff; }
.popt-field textarea { resize: vertical; }
.popt-error { color: #e11d48; font-size: 12px; margin-top: 6px; }
.popt.is-invalid .popt-txt { border-color: #e11d48; }

/* Обрані опції у модалці замовлення */
.order-options {
  background: var(--bg-soft); border-radius: var(--radius-sm);
  padding: 12px 14px; margin: 0 0 20px;
  display: flex; flex-direction: column; gap: 6px;
}
.order-options[hidden] { display: none; }
.order-option {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 13px; color: var(--ink-3);
}
.order-option strong { color: var(--ink-2); font-weight: 600; text-align: right; }


/* SEO related products */

.seo-related-products {
    margin-top: 50px;
    margin-bottom: 50px;
}

.seo-related-header {
    margin-bottom: 24px;
}

.seo-related-header h2 {
    margin: 0;
    font-size: 26px;
    font-weight: 600;
}

.seo-related-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 20px;
}

.seo-related-item {
    min-width: 0;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s, border-color .2s;
    cursor: pointer;
    position: relative;
}

.seo-related-image {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    margin-bottom: 12px;
}

.seo-related-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.seo-related-name {
    display: block;
    padding: 0 10px 0 10px;
    font-size: 14px;
    line-height: 1.4;
    color: #337ab7;
    font-weight: 500;
    text-decoration: none;
}

.seo-related-name:hover {
    text-decoration: underline;
}

.seo-related-price {
    margin-top: 8px;
    padding: 0 10px 10px 10px;
    font-weight: 600;
}

.seo-related-price-old {
    margin-left: 7px;
    text-decoration: line-through;
    opacity: .6;
}

@media (max-width: 1199px) {

    .seo-related-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

}

@media (max-width: 767px) {

    .seo-related-products {
        margin-top: 35px;
        margin-bottom: 35px;
    }

    .seo-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

}
