/*!
MIT License

Copyright (c) 2026 Levente Lenart

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
*/
/* ONe recently viewed products 1.2.2 — MIT License, see ../LICENSE.
 * Load this stylesheet after the webshop's existing rules.
 * Stock dots reuse the existing fetis-stockbox classes and colours.
 */
.one-rv {
  --one-rv-accent: #1d71b8;
  --one-rv-radius: 24px;
  --one-rv-shadow: 0 4px 18px rgba(0, 0, 0, .07);
  --one-rv-shadow-hover: 0 12px 28px rgba(0, 0, 0, .14);
  margin: 24px 0;
  color: inherit;
  font-family: inherit;
}

.one-rv .one-rv__title {
  margin: 0 0 20px;
  font-size: 1.25rem;
  font-weight: 600;
}

.one-rv .one-rv__grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.one-rv .one-rv__item {
  display: flex;
  min-width: 0;
  margin: 0;
  padding: 0;
}

.one-rv .one-rv__card {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  padding: 18px 16px 16px;
  border: 1px solid rgba(0, 0, 0, .04);
  border-radius: var(--one-rv-radius);
  background: #fff;
  box-shadow: var(--one-rv-shadow);
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.one-rv .one-rv__card:focus-within {
  box-shadow: var(--one-rv-shadow-hover);
}

@media (hover: hover) and (pointer: fine) {
  .one-rv .one-rv__card:hover {
    box-shadow: var(--one-rv-shadow-hover);
    transform: translateY(-2px);
  }
}

.one-rv .one-rv__link {
  display: flex;
  flex-direction: column;
  width: 100%;
  color: inherit;
  text-decoration: none;
}

.one-rv .one-rv__header {
  min-width: 0;
}

.one-rv .one-rv__link:hover {
  color: var(--one-rv-accent);
  text-decoration: none;
}

.one-rv .one-rv__link:focus-visible,
.one-rv .one-rv__cart:focus-visible {
  outline: 3px solid var(--one-rv-accent);
  outline-offset: 3px;
}

.one-rv .one-rv__image {
  display: block;
  width: 100%;
  height: 150px;
  margin: 0 0 16px;
  object-fit: contain;
}

.one-rv .one-rv__image[hidden] {
  display: none;
}

.one-rv .one-rv__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: .875rem;
}

.one-rv .one-rv__name {
  margin: 0 0 8px;
  font-size: .95rem;
  font-weight: 500;
  line-height: 1.5;
  max-height: 6em;
  overflow: hidden;
  text-overflow: clip;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow-wrap: anywhere;
}

.one-rv .one-rv__sku {
  display: block;
  margin: 0 0 14px;
  color: #666;
  font-size: .75rem;
  overflow-wrap: anywhere;
}

/* Existing price_column / transactional_price / gr_net_unit / crossed / discount.
 * Only the recommender's sizing and layout are adjusted here; no grey panel.
 */
.one-rv .one-rv__price {
  margin: auto 0 14px;
  padding: 0;
  background: transparent;
}

.one-rv .one-rv__price-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 4px 8px;
  margin: 0 0 4px;
}

.one-rv .one-rv__catalog-price.crossed {
  font-family: inherit;
  font-size: .9rem;
  line-height: 1.35;
}

.one-rv .one-rv__discount.discount {
  margin: 0;
  padding: 3px 7px;
  font-family: inherit;
  font-size: .75rem;
  line-height: 1.35;
}

.one-rv .one-rv__price-value.transactional_price {
  margin: 0 0 3px;
  color: var(--one-rv-accent);
  font-family: inherit;
  font-size: clamp(1.05rem, 1.55vw, 1.7rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: normal;
  overflow-wrap: anywhere;
}

.one-rv .one-rv__price-unit.gr_net_unit {
  margin: 0;
  color: var(--one-rv-accent);
  font-family: inherit;
  font-size: .78rem;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: normal;
  overflow-wrap: anywhere;
}

.one-rv .one-rv__price--unknown {
  color: #666;
  font-size: .85rem;
}

/* Native warehouse grid and dot colours remain driven by fetis-stockbox CSS. */
.one-rv .one-rv__stocks {
  width: 100%;
  max-width: none;
  margin: 0 0 14px;
  padding: 0;
  font-size: .75rem;
  line-height: 1.45;
}

.one-rv .one-rv__warehouse-list {
  max-width: none;
  margin: 0;
  padding: 0;
  list-style: none;
}

.one-rv .one-rv__stock-row {
  grid-template-columns: 10px minmax(0, 1fr) max-content;
  column-gap: 5px;
  min-height: 22px;
  font-size: .72rem;
  line-height: 1.45;
}

.one-rv .one-rv__stock-name {
  overflow: visible;
  white-space: normal;
  overflow-wrap: anywhere;
  text-overflow: clip;
}

.one-rv .one-rv__stock-dot {
  width: 8px;
  height: 8px;
}

.one-rv .one-rv__stock-row--unknown .one-rv__stock-dot {
  border-color: #909090;
  background-color: transparent;
}

.one-rv .one-rv__cart {
  display: block;
  width: 100%;
  margin-top: 0;
  padding: 10px;
  border: 1px solid var(--one-rv-accent);
  border-radius: 10px;
  background-color: var(--one-rv-accent);
  color: #fff;
  font: inherit;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
}

.one-rv .one-rv__cart:hover:not(:disabled) {
  filter: brightness(.94);
}

.one-rv .one-rv__cart.btn.btn-primary:disabled,
.one-rv .one-rv__cart.btn.btn-primary:disabled:hover {
  border-color: #ddd !important;
  background-color: #e5e5e5 !important;
  background-image: none !important;
  color: #666 !important;
  opacity: 1 !important;
  filter: none;
  box-shadow: none;
  cursor: default;
}

.one-rv .one-rv__feedback {
  min-height: 1.4em;
  margin: 8px 0 0;
  font-size: .75rem;
  line-height: 1.4;
}

.one-rv .one-rv__costs {
  margin: 0 0 14px;
}

/* Share the footer tracks within each card row, while keeping name and SKU
 * together in a naturally sized header. Price markup remains unchanged.
 */
@supports (grid-template-rows: subgrid) {
  .one-rv .one-rv__item {
    display: grid;
    grid-row: span 6;
    grid-template-rows: subgrid;
    row-gap: 0;
  }

  .one-rv .one-rv__card {
    display: grid;
    grid-row: 1 / -1;
    grid-template-rows: subgrid;
    row-gap: 0;
  }

  .one-rv .one-rv__header {
    grid-row: 1;
    align-self: start;
  }

  .one-rv .one-rv__price {
    grid-row: 2;
    align-self: end;
    margin-top: 0;
  }

  .one-rv .one-rv__costs {
    grid-row: 3;
    align-self: end;
  }

  .one-rv .one-rv__stocks {
    grid-row: 4;
    align-self: end;
  }

  .one-rv .one-rv__cart {
    grid-row: 5;
    align-self: start;
  }

  .one-rv .one-rv__feedback[role="status"] {
    grid-row: 6;
    align-self: start;
  }
}

@media (max-width: 1199px) {
  .one-rv .one-rv__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .one-rv .one-rv__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (width < 585px) {
  .one-rv .one-rv__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .one-rv .one-rv__card {
    padding: 14px 10px 12px;
    border-radius: 18px;
  }

  .one-rv .one-rv__image {
    height: 110px;
    margin-bottom: 12px;
  }

  .one-rv .one-rv__name {
    font-size: .85rem;
  }

  .one-rv .one-rv__price-info {
    justify-content: flex-start;
    column-gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .one-rv .one-rv__card {
    transition: none;
  }

  .one-rv .one-rv__card:hover {
    transform: none;
  }
}
