/* SanCombo recently viewed products. Version 1.0.0. */

.recently-viewed {
    --rv-red: #ef1b24;
    --rv-red-dark: #cf1018;
    --rv-text: #2c2c2c;
    --rv-muted: #7b7b7b;
    --rv-border: rgba(208, 208, 208, 0.68);
    position: relative;
    width: 100%;
    padding: 42px 0 52px;
    overflow: hidden;
    border-top: 1px solid var(--rv-border);
    border-bottom: 1px solid var(--rv-border);
    color: var(--rv-text);
    background:
        radial-gradient(circle at 7% 0%, rgba(239, 27, 36, 0.08), transparent 30%),
        linear-gradient(180deg, #fff 0%, #f9f7f7 100%);
}

.recently-viewed,
.recently-viewed * {
    box-sizing: border-box;
}

.recently-viewed__container {
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    padding: 0 20px;
}

.recently-viewed__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
    padding: 0 34px;
}

.recently-viewed__heading-wrap {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 15px;
}

.recently-viewed__heading-icon {
    display: grid;
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(239, 27, 36, 0.2);
    border-radius: 15px;
    color: var(--rv-red);
    background: #fff;
    box-shadow: 0 9px 26px rgba(239, 27, 36, 0.1);
}

.recently-viewed__heading-icon svg {
    width: 27px;
    height: 27px;
}

.recently-viewed__eyebrow {
    display: block;
    margin-bottom: 2px;
    color: var(--rv-red);
    font-family: "Fira Sans", sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.recently-viewed__header h2 {
    margin: 0;
    color: #292929;
    font-family: "Raleway", sans-serif;
    font-size: clamp(22px, 2vw, 32px);
    font-weight: 750;
    line-height: 1.16;
}

.recently-viewed__header p {
    margin: 5px 0 0;
    color: var(--rv-muted);
    font-family: "Fira Sans", sans-serif;
    font-size: 13px;
}

.recently-viewed__navigation {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
}

.recently-viewed__counter {
    margin-right: 5px;
    color: #8b8b8b;
    font-family: "Fira Sans", sans-serif;
    font-size: 11px;
    font-weight: 600;
}

.recently-viewed__arrow {
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    border: 1px solid #d9d9d9;
    border-radius: 11px;
    color: #4d4d4d;
    background: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.recently-viewed__arrow:hover:not(:disabled) {
    border-color: var(--rv-red);
    color: #fff;
    background: var(--rv-red);
    transform: translateY(-1px);
}

.recently-viewed__arrow:disabled {
    opacity: 0.35;
    cursor: default;
    box-shadow: none;
}

.recently-viewed__arrow svg {
    width: 20px;
    height: 20px;
}

.recently-viewed__viewport {
    position: relative;
    padding: 4px 34px 12px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-color: rgba(239, 27, 36, 0.35) transparent;
    scrollbar-width: thin;
    outline: none;
}

.recently-viewed__viewport:focus-visible {
    border-radius: 16px;
    box-shadow: inset 0 0 0 2px rgba(239, 27, 36, 0.45);
}

.recently-viewed__viewport::-webkit-scrollbar {
    height: 6px;
}

.recently-viewed__viewport::-webkit-scrollbar-track {
    background: transparent;
}

.recently-viewed__viewport::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(239, 27, 36, 0.28);
}

.recently-viewed__track {
    display: grid;
    grid-auto-columns: min(82vw, 310px);
    grid-auto-flow: column;
    gap: 14px;
}

.recently-viewed-card {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    scroll-snap-align: start;
    border: 1px solid var(--rv-border);
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(36, 36, 36, 0.045);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.recently-viewed-card:hover {
    border-color: rgba(239, 27, 36, 0.52);
    box-shadow: 0 15px 38px rgba(52, 31, 31, 0.11);
    transform: translateY(-3px);
}

.recently-viewed-card__visual {
    position: relative;
    min-height: 218px;
    padding: 12px;
    background: linear-gradient(145deg, #fff 0%, #fafafa 100%);
}

.recently-viewed-card__image {
    position: relative;
    display: block;
    width: 100%;
    height: 194px;
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
}

.recently-viewed-card__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 220ms ease;
}

.recently-viewed-card:hover .recently-viewed-card__image img {
    transform: scale(1.035);
}

.recently-viewed-card__history-label {
    position: absolute;
    z-index: 2;
    top: 20px;
    left: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    color: #555;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
    font-family: "Fira Sans", sans-serif;
    font-size: 9px;
    font-weight: 650;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.recently-viewed-card__history-label svg {
    width: 13px;
    height: 13px;
    color: var(--rv-red);
}

.recently-viewed-card__icon-button {
    display: grid;
    padding: 0;
    place-items: center;
    border: 1px solid #e2e2e2;
    color: #fff;
    background: #d1d5db;
    cursor: pointer;
    transition: border-color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.recently-viewed-card__icon-button:hover {
    transform: scale(1.04);
}

.recently-viewed-card__wishlist {
    position: absolute;
    z-index: 3;
    top: 18px;
    right: 18px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.recently-viewed-card__wishlist.is-active,
.recently-viewed-card__wishlist.n_btn_remove_wishlist {
    border-color: var(--rv-red);
    background: var(--rv-red);
}

.recently-viewed-card__wishlist svg {
    width: 20px;
    height: 20px;
}

.recently-viewed-card__badges {
    position: absolute;
    z-index: 2;
    right: 20px;
    bottom: 18px;
    display: flex;
    max-width: calc(100% - 40px);
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.recently-viewed-card__badges span {
    display: block;
    max-width: 145px;
    padding: 4px 8px;
    overflow: hidden;
    border-radius: 6px;
    font-family: "Raleway", sans-serif;
    font-size: 9px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recently-viewed-card__body {
    display: flex;
    min-height: 270px;
    flex: 1;
    flex-direction: column;
    padding: 14px 16px 16px;
    border-top: 1px solid #ededed;
}

.recently-viewed-card__meta {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    font-family: "Fira Sans", sans-serif;
    font-size: 9px;
}

.recently-viewed-card__meta a {
    min-width: 0;
    overflow: hidden;
    color: var(--rv-red);
    font-weight: 700;
    text-decoration: none;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.recently-viewed-card__meta a:hover {
    color: var(--rv-red-dark);
}

.recently-viewed-card__meta span {
    flex: 0 0 auto;
    color: #999;
}

.recently-viewed-card__title {
    display: -webkit-box;
    min-height: 43px;
    margin-top: 8px;
    overflow: hidden;
    color: #303030;
    font-family: "Raleway", sans-serif;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.45;
    text-decoration: none;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.recently-viewed-card__title:hover {
    color: var(--rv-red);
}

.recently-viewed-card__availability {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 7px;
    color: #777;
    font-family: "Fira Sans", sans-serif;
    font-size: 9px;
}

.recently-viewed-card__availability > span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.12);
}

.recently-viewed-card__availability.is-available {
    color: #27834b;
}

.recently-viewed-card__availability.is-available > span {
    background: #22a75a;
    box-shadow: 0 0 0 3px rgba(34, 167, 90, 0.12);
}

.recently-viewed-card__price {
    display: flex;
    min-height: 35px;
    align-items: baseline;
    gap: 7px;
    margin-top: 8px;
    font-family: "Fira Sans", sans-serif;
}

.recently-viewed-card__price strong {
    color: #252525;
    font-size: 19px;
    font-weight: 750;
    white-space: nowrap;
}

.recently-viewed-card__price.is-special strong {
    color: var(--rv-red);
}

.recently-viewed-card__price strong.is-request {
    color: var(--rv-red);
    font-size: 15px;
}

.recently-viewed-card__price del {
    color: #9a9a9a;
    font-size: 11px;
    white-space: nowrap;
}

.recently-viewed-card__price > span {
    padding: 2px 5px;
    border-radius: 5px;
    color: #fff;
    background: var(--rv-red);
    font-size: 9px;
    font-weight: 700;
}

.recently-viewed-card__actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 42px;
    gap: 7px;
    margin-top: auto;
}

.recently-viewed-card__cart-slot {
    min-width: 0;
}

.recently-viewed-card__cart-slot > button,
.recently-viewed-card__cart-slot > a,
.recently-viewed-card__compare {
    display: inline-flex;
    width: 100%;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 11px;
    border-radius: 10px;
    font-family: "Fira Sans", sans-serif;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease, transform 150ms ease;
}

.recently-viewed-card__cart-button {
    border: 1px solid var(--rv-red);
    color: #fff;
    background: var(--rv-red);
}

.recently-viewed-card__cart-button:hover:not(:disabled) {
    border-color: var(--rv-red-dark);
    background: var(--rv-red-dark);
    transform: translateY(-1px);
}

.recently-viewed-card__cart-button svg {
    width: 17px;
    height: 17px;
}

.recently-viewed-card__cart-button.is-disabled {
    border-color: #ddd;
    color: #888;
    background: #eee;
    cursor: not-allowed;
}

.recently-viewed-card__in-cart,
.recently-viewed-card__cart-slot > a {
    border: 1px solid #b9dfc7;
    color: #217342 !important;
    background: #edf9f1 !important;
}

.recently-viewed-card__cart-slot > a:hover {
    background: #e1f5e8 !important;
}

.recently-viewed-card__compare {
    padding: 0;
    border: 1px solid #dedede;
    color: #777;
    background: #f2f2f2;
}

.recently-viewed-card__compare:hover,
.recently-viewed-card__compare.is-active {
    border-color: rgba(239, 27, 36, 0.32);
    color: var(--rv-red);
    background: #fff0f1;
}

.recently-viewed-card__compare svg {
    width: 19px;
    height: 19px;
}

.recently-viewed-card__one-click {
    width: 100%;
    margin-top: 7px;
    padding: 5px 4px 0;
    border: 0;
    color: var(--rv-red);
    background: transparent;
    font-family: "Fira Sans", sans-serif;
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
}

.recently-viewed-card__one-click:hover {
    color: var(--rv-red-dark);
    text-decoration: underline;
}

.recently-viewed button:focus-visible,
.recently-viewed a:focus-visible {
    outline: 2px solid var(--rv-red);
    outline-offset: 2px;
}

@media (min-width: 600px) {
    .recently-viewed__track {
        grid-auto-columns: calc((100% - 16px) / 2);
        gap: 16px;
    }
}

@media (min-width: 900px) {
    .recently-viewed__track {
        grid-auto-columns: calc((100% - 36px) / 3);
        gap: 18px;
    }
}

@media (min-width: 1280px) {
    .recently-viewed__track {
        grid-auto-columns: calc((100% - 60px) / 4);
        gap: 20px;
    }
}

@media (min-width: 1600px) {
    .recently-viewed__track {
        grid-auto-columns: calc((100% - 88px) / 5);
        gap: 22px;
    }
}

@media (max-width: 767px) {
    .recently-viewed {
        padding: 28px 0 34px;
    }

    .recently-viewed__container {
        padding: 0;
    }

    .recently-viewed__header {
        align-items: center;
        margin-bottom: 18px;
        padding: 0 16px;
    }

    .recently-viewed__heading-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }

    .recently-viewed__heading-icon svg {
        width: 23px;
        height: 23px;
    }

    .recently-viewed__header h2 {
        font-size: 20px;
    }

    .recently-viewed__header p,
    .recently-viewed__counter {
        display: none;
    }

    .recently-viewed__navigation {
        display: none;
    }

    .recently-viewed__viewport {
        padding: 3px 16px 12px;
    }

    .recently-viewed-card__visual {
        min-height: 196px;
    }

    .recently-viewed-card__image {
        height: 172px;
    }

    .recently-viewed-card__body {
        min-height: 264px;
        padding: 13px 14px 14px;
    }
}

@media (max-width: 420px) {
    .recently-viewed__heading-wrap {
        gap: 10px;
    }

    .recently-viewed__heading-icon {
        width: 40px;
        height: 40px;
    }

    .recently-viewed__eyebrow {
        font-size: 9px;
    }

    .recently-viewed__header h2 {
        font-size: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .recently-viewed *,
    .recently-viewed__viewport {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
