/*
 * Makerique Boutique theme for OpenCart 4
 * Copyright (c) 2026 Heliopsy. All Rights Reserved.
 * https://makerique.com
 * SPDX-License-Identifier: LicenseRef-Proprietary
 * Proprietary and confidential. Unauthorized copying, distribution, or
 * modification of this file, by any means, is strictly prohibited.
 */

/* ── Recently viewed rail (product page) ─────────────────────────────────────
   Populated client-side from the mr_recent cookie (see footer.twig). Horizontal
   scroll on small screens, tidy grid on wide. Uses the theme's --mr-* tokens so
   it inherits the active skin. */
.mr-recently-viewed {
  margin: 2.5rem 0 1rem;
}
.mr-recently-viewed__title {
  font-size: 1.15rem;
  margin: 0 0 1rem;
  color: var(--mr-heading, inherit);
}
.mr-recently-viewed__rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 1fr);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: .5rem;
  -webkit-overflow-scrolling: touch;
}
@media (min-width: 768px) {
  .mr-recently-viewed__rail {
    grid-auto-flow: row;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    grid-auto-columns: auto;
    overflow-x: visible;
  }
}
.mr-recent-card {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  text-decoration: none;
  color: inherit;
  scroll-snap-align: start;
}
.mr-recent-card__img {
  display: block;
  overflow: hidden;
  border-radius: var(--mr-radius, .5rem);
  background: var(--mr-surface-2, #f4f1ec);
  aspect-ratio: 1 / 1;
}
.mr-recent-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}
.mr-recent-card:hover .mr-recent-card__img img { transform: scale(1.04); }
.mr-recent-card__name {
  font-size: .9rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.mr-recent-card:hover .mr-recent-card__name { color: var(--mr-primary, inherit); }
.mr-recent-card__price {
  font-weight: 700;
  font-size: .95rem;
  color: var(--mr-heading, inherit);
}
.mr-recent-card__was {
  font-weight: 400;
  opacity: .6;
  margin-right: .25rem;
}
