/* Product lists of the pryalka theme: cards, home blocks, category page */

/* Grid: 2 columns on a phone, 3 on a tablet, 4 on a laptop, 6 on a wide screen */
.pt-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 576px) {
  .pt-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (min-width: 992px) {
  .pt-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .pt-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  /* With a side column there is less room */
  #column-left ~ #content .pt-grid,
  #content:has(+ #column-right) .pt-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.pt-col {
  min-width: 0;
}

/* Card */
.pt-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid #ececec;
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  transition: box-shadow 0.15s;
}

.pt-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.pt-card:focus-within {
  outline: 2px solid var(--ph-link);
  outline-offset: 2px;
}

.pt-image {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 8px;
}

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

.pt-out .pt-image img {
  opacity: 0.6;
}

.pt-discount {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--ph-brand);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

/* As on a marketplace: a thin outline over the photo, filled in the brand colour once the product is liked; a soft
   white halo keeps the outline seen on a dark photo */
.pt-wishlist {
  position: absolute;
  z-index: 2;
  top: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: none;
  color: #8a8a8a;
  font-size: 20px;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.9));
  transition: color 0.15s, transform 0.15s;
}

.pt-wishlist .pt-heart-on,
.pt-wishlist.active .pt-heart-off {
  display: none;
}

.pt-wishlist.active .pt-heart-on {
  display: inline;
}

.pt-wishlist:active {
  transform: scale(0.88);
}

/* A bigger target on touch screens, the same look */
.pt-wishlist::before {
  content: "";
  position: absolute;
  inset: -6px;
}

.pt-wishlist:hover {
  color: #2b2b2b;
}

.pt-wishlist.active {
  color: var(--ph-brand);
}

.pt-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 4px;
  padding: 6px 12px 12px;
}

/* As on a marketplace: the price leads, the name follows in two lines of plain text */
.pt-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  color: #2b2b2b;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
}

.pt-name:hover,
.pt-card:hover .pt-name {
  color: var(--ph-accent);
}

/* The whole card opens the product */
.pt-name::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}

.pt-name:focus-visible {
  outline: none;
}

/* The tags of the product (category and manufacturer pages) */
.pt-tag {
  overflow: hidden;
  color: #757575;
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Darker than the stock green: 4.6:1 */
.pt-stock {
  color: #1e7b34;
  font-size: 12px;
}

.pt-out .pt-stock {
  color: #9a9a9a;
}

.pt-bottom {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

.pt-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 6px;
}

.pt-price-new {
  color: #2b2b2b;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.pt-from {
  color: #6c6c6c;
  font-size: 13px;
}

/* #6c6c6c: 5.3:1, the light grey was 2.8:1 */
.pt-price-old {
  color: #6c6c6c;
  font-size: 13px;
  text-decoration: line-through;
}

.pt-price-old + .pt-price-new,
.pt-price .pt-price-new:has(+ .pt-price-old) {
  color: var(--ph-accent);
}

.pt-form,
.pt-buy {
  position: relative;
  z-index: 2;
}

.pt-form {
  margin: 0;
}

/* Outlined, "to the cart" as "choose a colour": dozens of filled buttons in a grid weigh too much; filled on hover */
.pt-buy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  height: 38px;
  border: 1px solid var(--ph-accent);
  border-radius: 8px;
  background: #fff;
  color: var(--ph-accent);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.pt-buy:hover,
.pt-buy:focus-visible {
  background: var(--ph-accent);
  color: #fff;
}

.pt-buy-none,
.pt-buy-none:hover {
  border-color: #f2f2f2;
  background: #f2f2f2;
  color: #9a9a9a;
  cursor: default;
}

@media (max-width: 575.98px) {
  .pt-body {
    padding: 2px 8px 8px;
  }

  .pt-name {
    font-size: 13px;
  }

  .pt-price-new {
    font-size: 18px;
  }

  .pt-buy {
    height: 34px;
    font-size: 13px;
  }
}

/* Home */
#common-home {
  padding-top: 16px;
}

/* One row of tabs; on a narrow screen it scrolls sideways instead of wrapping */
.pt-tabs {
  flex-wrap: nowrap;
  gap: 4px 24px;
  margin-bottom: 16px;
  border-bottom: 1px solid #ececec;
  overflow-x: auto;
  scrollbar-width: none;
}

.pt-tabs::-webkit-scrollbar {
  display: none;
}

.pt-tabs .nav-item {
  flex: none;
}

.pt-tabs .nav-link {
  white-space: nowrap;
  padding: 10px 0;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: none;
  color: #6c6c6c;
  font-size: 18px;
  font-weight: 600;
}

.pt-tabs .nav-link.active {
  border-bottom-color: var(--ph-brand);
  color: #2b2b2b;
}

.pt-more-wrap {
  margin: 20px 0 8px;
  text-align: center;
}

.pt-more {
  min-width: 220px;
}

.pt-home-text {
  margin: 40px 0 24px;
  padding-top: 24px;
  border-top: 1px solid #ececec;
  color: #4a4a4a;
}

.pt-home-text h1 {
  font-size: 24px;
}

.pt-home-text h2 {
  font-size: 18px;
}

@media (max-width: 575.98px) {
  .pt-tabs {
    gap: 4px 16px;
  }

  .pt-tabs .nav-link {
    font-size: 16px;
  }

  .pt-home-text h1 {
    font-size: 20px;
  }
}

/* Category */
.pt-heading {
  font-size: 28px;
  margin-bottom: 16px;
}

/* Subcategories: chips in up to two rows (all on demand); one row that scrolls sideways on a phone */
.pt-subcats {
  margin-bottom: 20px;
}

.pt-subcats-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 112px;
  overflow: hidden;
}

.pt-subcats.open .pt-subcats-list {
  max-height: none;
}

.pt-subcat {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 52px;
  padding: 4px 14px 4px 6px;
  border: 1px solid #ececec;
  border-radius: 26px;
  background: #fff;
  color: #2b2b2b;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}

.pt-subcat:hover {
  border-color: var(--ph-accent);
  color: var(--ph-accent);
}

.pt-subcat-img,
.pt-subcat-img img {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.pt-subcat-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ph-tint);
  color: var(--ph-accent);
  font-weight: 700;
}

.pt-subcat-name small {
  color: #9a9a9a;
}

.pt-subcats-toggle {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: #1f8bb8;
  font-size: 14px;
}

.pt-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.pt-select {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 14px;
  color: #6c6c6c;
}

.pt-select .form-select {
  width: auto;
  min-width: 180px;
}

.pt-select-limit .form-select {
  min-width: 80px;
}

.pt-pagination {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 24px 0;
}

.pt-pagination .pagination {
  margin: 0;
  flex-wrap: wrap;
  justify-content: center;
}

.pt-results {
  color: #9a9a9a;
  font-size: 13px;
}

/* Journal2 wrapped some descriptions in its folded panel ("partial-collapse"): Bootstrap 5 hides .collapse, and
   the theme cuts the text itself */
.pt-intro .collapse,
.pt-description .collapse {
  display: block;
}

.pt-intro .partial-collapse > a[data-toggle="collapse"],
.pt-description .partial-collapse > a[data-toggle="collapse"] {
  display: none;
}

/* The text before the splitter of the description: a few lines over the products, the rest by the button */
.pt-intro {
  margin: 0 0 16px;
  color: #4a4a4a;
}

.pt-intro-text {
  position: relative;
  max-height: 4.5em;
  overflow: hidden;
  line-height: 1.5;
}

.pt-intro-text > :last-child {
  margin-bottom: 0;
}

.pt-intro.cut .pt-intro-text::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5em;
  background: linear-gradient(rgba(255, 255, 255, 0), #fff);
}

.pt-intro.open .pt-intro-text {
  max-height: none;
}

.pt-intro.open .pt-intro-text::after {
  content: none;
}

.pt-intro-toggle {
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ph-accent);
  font-size: 14px;
}

.pt-intro-toggle:hover {
  color: var(--ph-accent-dark, #bf3f0e);
}

.pt-description {
  margin: 32px 0 16px;
  padding-top: 20px;
  border-top: 1px solid #ececec;
  color: #4a4a4a;
}

/* The SEO texts bring their own headings: kept quieter than the page heading */
.pt-description h2,
.pt-description h3 {
  margin: 0 0 12px;
  color: #2b2b2b;
  font-size: 20px;
  line-height: 1.3;
}

.pt-description::after {
  content: "";
  display: block;
  clear: both;
}

.pt-description-img {
  float: left;
  max-width: 160px;
  margin: 0 20px 12px 0;
  border-radius: 8px;
}

@media (max-width: 575.98px) {
  .pt-heading {
    font-size: 21px;
  }

  .pt-subcats-list {
    flex-wrap: nowrap;
    max-height: none;
    margin: 0 -12px;
    padding: 0 12px 4px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .pt-subcats-list::-webkit-scrollbar {
    display: none;
  }

  .pt-subcat {
    flex: none;
    height: 46px;
    font-size: 13px;
  }

  .pt-subcat-img,
  .pt-subcat-img img {
    width: 34px;
    height: 34px;
  }

  .pt-subcats-toggle {
    display: none;
  }

  /* Two selects side by side, the labels are in the options already */
  .pt-toolbar {
    flex-wrap: nowrap;
    gap: 8px;
  }

  .pt-select {
    flex: 1;
    min-width: 0;
  }

  .pt-select span {
    display: none;
  }

  .pt-select .form-select,
  .pt-select-limit .form-select {
    width: 100%;
    min-width: 0;
  }

  .pt-select-limit {
    flex: 0 0 90px;
  }

  .pt-description-img {
    max-width: 96px;
    margin-right: 12px;
  }
}

/* The pages of products (category, search, specials, brand): the heading with the number of products, then one row
   of tools */
.pt-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin-bottom: 16px;
}

.pt-head .pt-heading {
  margin: 0;
}

.pt-count {
  color: #9a9a9a;
  font-size: 14px;
  white-space: nowrap;
}

.pt-tools {
  margin-bottom: 16px;
}

.pt-tools .pt-toolbar {
  margin-bottom: 0;
}

.pt-tools .pf + .pt-toolbar {
  margin-top: 12px;
}

.pt-select > i {
  display: none;
}

/* Below a laptop: "Фильтры" and the sort side by side, the sort takes the rest of the row; the number per page goes (more products
   come with "show more"), the chosen filters wrap under the row */
@media (max-width: 991.98px) {
  .pt-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }

  .pt-tools .pf,
  .pt-tools .pf-bar {
    display: contents;
  }

  .pt-tools .pf-open {
    flex: none;
    justify-content: center;
  }

  .pt-tools .pf + .pt-toolbar {
    margin-top: 0;
  }

  .pt-tools .pt-toolbar {
    flex: 1 1 0;
    min-width: 0;
    flex-wrap: nowrap;
  }

  .pt-tools .pf-chips,
  .pt-tools .pf-none {
    flex-basis: 100%;
    order: 3;
    margin-top: 0;
  }

  .pt-tools .pt-select {
    position: relative;
    flex: 1;
    min-width: 0;
  }

  .pt-tools .pt-select span,
  .pt-tools .pt-select-limit {
    display: none;
  }

  .pt-tools .pt-select > i {
    display: block;
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #2b2b2b;
    font-size: 13px;
    pointer-events: none;
  }

  .pt-tools .pt-select .form-select {
    width: 100%;
    min-width: 0;
    height: 38px;
    padding: 0 30px 0 34px;
    border-color: #dcdcdc;
    border-radius: 19px;
    color: #2b2b2b;
    font-size: 14px;
    text-overflow: ellipsis;
    background-position: right 12px center;
  }

  .pt-head {
    gap: 2px 10px;
    margin-bottom: 12px;
  }
}

@media (max-width: 575.98px) {
  .pt-heading {
    font-size: 19px;
    line-height: 1.25;
  }

  .pt-count {
    font-size: 13px;
  }
}

/* Search: the options folded under the heading */
.pt-refine {
  margin-bottom: 16px;
  border: 1px solid #ececec;
  border-radius: 10px;
}

.pt-refine summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  color: #2b2b2b;
  font-size: 14px;
  cursor: pointer;
  list-style: none;
}

.pt-refine summary::-webkit-details-marker {
  display: none;
}

.pt-refine summary::after {
  content: "\f078";
  margin-left: auto;
  color: #9a9a9a;
  font: var(--fa-font-solid);
  font-size: 11px;
  transition: transform 0.2s;
}

.pt-refine[open] summary::after {
  transform: rotate(180deg);
}

.pt-refine-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 14px 14px;
}

.pt-refine-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pt-refine-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  font-size: 14px;
}

.pt-refine-checks .form-check {
  margin: 0;
}

.pt-refine-form .btn {
  align-self: flex-start;
}

@media (max-width: 575.98px) {
  .pt-refine-row {
    grid-template-columns: 1fr;
  }

  .pt-refine-form .form-control,
  .pt-refine-form .form-select {
    font-size: 16px;
  }

  .pt-refine-form .btn {
    align-self: stretch;
  }
}

/* The note of pryalka_search ("no exact matches, similar spelling shown"): a quiet line, not an alert box */
#product-search .alert-info {
  margin: -4px 0 12px;
  padding: 0;
  border: 0;
  background: none;
  color: #6c6c6c;
  font-size: 14px;
}

/* Nothing found, no products */
.pt-empty {
  margin: 24px 0;
  padding: 32px 20px;
  border-radius: 10px;
  background: #fafafa;
  color: #4a4a4a;
  text-align: center;
}

.pt-empty > i {
  margin-bottom: 12px;
  color: #c4c4c4;
  font-size: 32px;
}

.pt-empty p:last-of-type {
  margin-bottom: 0;
}

.pt-empty .btn {
  margin-top: 16px;
}

/* Round categories over the home tabs, as on a marketplace: one row that scrolls sideways; on a wide screen with
   arrows at the edges (catalog.js shows them while there is more to scroll) */
.pt-circles {
  position: relative;
  margin: 4px 0 24px;
}

.pt-circles ul {
  display: flex;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 2px 0 4px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}

.pt-circles ul::-webkit-scrollbar {
  display: none;
}

.pt-circles li {
  flex: none;
  width: 96px;
  scroll-snap-align: start;
}

.pt-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #2b2b2b;
  font-size: 13px;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}

.pt-circle-img {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #f4f4f4;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
}

.pt-circle-img img {
  width: 62%;
  height: 62%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.pt-circle-letter {
  color: var(--ph-accent);
  font-size: 26px;
  font-weight: 700;
}

.pt-circle-sale .pt-circle-img {
  background: var(--ph-brand);
  color: #fff;
  font-size: 28px;
}

.pt-circle-sale .pt-circle-name {
  color: var(--ph-accent);
  font-weight: 600;
}

.pt-circle-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  max-width: 100%;
  overflow: hidden;
}

.pt-circle:hover .pt-circle-img {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

.pt-circle:hover .pt-circle-name {
  color: var(--ph-accent);
}

/* The arrows and the fading edge: only while the row can be scrolled that way */
.pt-circles-arrow {
  position: absolute;
  top: 22px;
  z-index: 2;
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.16);
  color: #2b2b2b;
  transition: color 0.15s, transform 0.15s;
}

.pt-circles-arrow:hover {
  color: var(--ph-accent);
  transform: scale(1.06);
}

.pt-circles-prev {
  left: -12px;
}

.pt-circles-next {
  right: -12px;
}

.pt-circles.can-prev .pt-circles-prev,
.pt-circles.can-next .pt-circles-next {
  display: flex;
}

.pt-circles.can-next ul {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 64px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 64px), transparent);
}

.pt-circles.can-prev.can-next ul {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 64px, #000 calc(100% - 64px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 64px, #000 calc(100% - 64px), transparent);
}

.pt-circles.can-prev:not(.can-next) ul {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 64px);
  mask-image: linear-gradient(to right, transparent, #000 64px);
}

/* A phone scrolls with the finger: no arrows, the row runs to the screen edges */
@media (max-width: 767.98px) {
  .pt-circles {
    margin: 0 -12px 18px;
  }

  .pt-circles ul {
    gap: 12px;
    padding: 2px 12px 4px;
    /* Snapping keeps the padding: the row starts unscrolled, the first circle is not faded */
    scroll-padding-inline: 12px;
  }

  .pt-circles-arrow {
    display: none !important;
  }

  .pt-circles li {
    width: 72px;
  }

  .pt-circle {
    font-size: 12px;
  }

  .pt-circle-img {
    width: 64px;
    height: 64px;
  }
}

/* The left column menus (topics of the blog, stock category list): a card of rows with the accent on the current one */
#column-left .list-group {
  --bs-list-group-border-color: #ececec;
  --bs-list-group-border-radius: 10px;
  border: 1px solid #ececec;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

#column-left .list-group-item {
  padding: 11px 16px;
  border: 0;
  border-top: 1px solid #f1f1f1;
  border-left: 3px solid transparent;
  border-radius: 0;
  font-size: 14px;
  color: #333;
  transition: background-color .15s, color .15s;
}

#column-left .list-group-item:first-child {
  border-top: 0;
}

#column-left a.list-group-item:hover,
#column-left a.list-group-item:focus {
  background: var(--ph-tint);
  color: var(--ph-accent);
}

#column-left .list-group-item.active {
  background: var(--ph-tint);
  border-color: #f1f1f1;
  border-left-color: var(--ph-brand);
  color: var(--ph-accent);
  font-weight: 600;
}

/* The blog: titles, authors and links of the text in the colours of the site instead of the stock blue */
#product-category #content > .mb-3 > h2 > a {
  color: #333;
  font-weight: 600;
  text-decoration: none;
}

#product-category #content > .mb-3 > h2 > a:hover {
  color: var(--ph-accent);
}

#product-category #content > .mb-3 .list-inline a,
#cms-blog #content p > a,
#cms-blog #content a:not(.btn) {
  color: var(--ph-accent);
  text-decoration: none;
}

#product-category #content > .mb-3 .list-inline a:hover,
#cms-blog #content p > a:hover,
#cms-blog #content a:not(.btn):hover {
  color: var(--ph-accent-dark);
  text-decoration: underline;
}

/* An information page: what to do after reading (the categories, the bestsellers) */
.pt-info-next {
  margin-top: 32px;
  padding-top: 8px;
  border-top: 1px solid #ececec;
}

.pt-info-next h2 {
  margin: 20px 0 14px;
  font-size: 20px;
  font-weight: 700;
}

.pt-lead {
  margin: 0 0 24px;
  padding: 16px 20px;
  border-left: 4px solid var(--ph-brand);
  border-radius: 8px;
  background: var(--ph-tint);
}

.pt-lead p:last-child {
  margin-bottom: 0;
}
