
/* ---- Section Container ---- */
.block.block-recently-viewed-products {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0;
    gap: 24px;
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
}

/* ---- Title ---- */
.block.block-recently-viewed-products > .title {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0;
    gap: 10px;
    width: 100%;
    border: none;
}

.block.block-recently-viewed-products > .title strong {
    font-family: 'Poppins', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 28px;
    line-height: 36px;
    letter-spacing: -0.005em;
    color: #161616;
}

/* ---- Cards Container ---- */
.block.block-recently-viewed-products > .listbox {
    position: relative;
    width: 100%;
    display: flex !important;
    align-items: center;
}

.block.block-recently-viewed-products .list {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    padding: 0;
    gap: 20px;
    list-style: none;
    margin: 0;
    overflow-x: auto;
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
    flex: 1;
    min-width: 0;
}

.block.block-recently-viewed-products .list::-webkit-scrollbar {
    display: none;
}

.block.block-recently-viewed-products .list li:last-child {
    margin-right: 0;
}

/* ---- Product Card ---- */
.block.block-recently-viewed-products .list li {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 12px;
    gap: 8px;
    min-width: 240px;
    max-width: 240px;
    height: 340px;
    background: #F7F7F7;
    border-radius: 10px;
    flex: none;
    flex-grow: 0;
}

/* ---- Product Image ---- */
.block.block-recently-viewed-products .list li a.product-picture {
    display: flex !important;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 0 4px;
    width: 138px;
    height: 138px;
    border-radius: 4px;
    overflow: hidden;
    text-decoration: none;
}

.block.block-recently-viewed-products .product-picture img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    width: auto;
}

/* ---- Product Info ---- */
.block.block-recently-viewed-products .product-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    gap: 16px;
    width: 220px;
    flex: 1;
}

.block.block-recently-viewed-products .product-info-top {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0;
    gap: 8px;
    width: 220px;
}

/* ---- Product Name ---- */
.block.block-recently-viewed-products .product-name {
    font-family: 'Open Sans', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 18px;
    line-height: 28px;
    color: #000000;
    text-align: center;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    width: 220px;
}


/* ---- Price Section ---- */
.block.block-recently-viewed-products .price-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
    gap: 12px;
    width: 220px;
}

.block.block-recently-viewed-products .starts-from {
    font-family: 'Open Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 22px;
    color: #7A7A7A;
    text-align: center;
    width: 220px;
}

.block.block-recently-viewed-products .price-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 0;
    gap: 4px;
}

.block.block-recently-viewed-products .actual-price {
    font-family: 'Open Sans', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 18px;
    line-height: 28px;
    color: #2B2B2B;
    text-align: center;
}

.block.block-recently-viewed-products .old-price {
    font-family: 'Open Sans', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 22px;
    color: #666666;
    text-align: center;
    text-decoration-line: line-through;
}

/* ---- Customize Button ---- */
.block.block-recently-viewed-products .customize-btn {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 12px 16px;
    width: 120px;
    height: 40px;
    border: 1.5px solid #2CA960;
    border-radius: 10px;
    background: transparent;
    font-family: 'Open Sans', sans-serif;
    font-style: normal;
    font-weight: 600;
    font-size: 14px;
    line-height: 22px;
    letter-spacing: 0.005em;
    color: #4A9D5F;
    text-decoration: none;
    cursor: pointer;
    margin-top: auto;
}

.block.block-recently-viewed-products .customize-btn:hover {
    background: #2CA960;
    color: #fff;
}

/* ---- Scroll Arrow ---- */
.block.block-recently-viewed-products .scroll-arrow {
    box-sizing: border-box;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 14px 17px;
    gap: 10px;
    width: 45px;
    height: 45px;
    background: #FAFAFA;
    border: 1.07px solid #CCCCCC;
    box-shadow: 0px 0px 5.36px rgba(0, 0, 0, 0.1);
    border-radius: 22.5px;
    cursor: pointer;
    z-index: 2;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.block.block-recently-viewed-products .scroll-arrow-left {
    left: 10px;
}

.block.block-recently-viewed-products .scroll-arrow-right {
    right: 10px;
}

.block.block-recently-viewed-products .scroll-arrow:hover {
    background: #F0F0F0;
}

.block.block-recently-viewed-products .scroll-arrow.hidden {
    display: none;
}

.block.block-recently-viewed-products .scroll-arrow svg {
    width: 8px;
    height: 14px;
}

/* Prevent mobile collapse behavior */
.block.block-recently-viewed-products > .listbox {
    display: flex !important;
}

/* Remove collapse arrow indicator and clickable appearance from title */
.block.block-recently-viewed-products > .title {
    cursor: default;
    background: none !important;
    background-color: transparent !important;
    background-image: none !important;
}

.block.block-recently-viewed-products > .title::before,
.block.block-recently-viewed-products > .title::after {
    display: none !important;
    content: none !important;
}

.block.block-recently-viewed-products > .title strong::before,
.block.block-recently-viewed-products > .title strong::after {
    display: none !important;
    content: none !important;
}

/* ---- Mobile Responsive ---- */
@media (max-width: 767px) {
    .block.block-recently-viewed-products > .title strong {
        font-size: 22px;
        line-height: 30px;
    }

    .block.block-recently-viewed-products .list li {
        min-width: 42vw;
        max-width: 42vw;
        height: auto;
        padding: 12px 8px;
        flex-shrink: 0;
    }

    .block.block-recently-viewed-products .product-picture {
        width: 100px;
        height: 100px;
    }

    .block.block-recently-viewed-products .product-info,
    .block.block-recently-viewed-products .product-info-top,
    .block.block-recently-viewed-products .product-name,
    .block.block-recently-viewed-products .price-section,
    .block.block-recently-viewed-products .starts-from {
        width: 100%;
    }

    .block.block-recently-viewed-products .product-name {
        font-size: 14px;
        line-height: 20px;
    }

    .block.block-recently-viewed-products .actual-price {
        font-size: 16px;
        line-height: 24px;
    }

    .block.block-recently-viewed-products .customize-btn {
        width: 100px;
        height: 36px;
        font-size: 12px;
    }

    .block.block-recently-viewed-products .scroll-arrow {
        width: 36px;
        height: 36px;
        padding: 10px 13px;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
    }

    .block.block-recently-viewed-products .scroll-arrow-left {
        left: 10px;
    }

    .block.block-recently-viewed-products .scroll-arrow-right {
        right: 10px;
    }

    .block.block-recently-viewed-products .list {
        scroll-snap-type: x mandatory;
    }

    .block.block-recently-viewed-products .list li {
        scroll-snap-align: start;
    }
}

/* ---- Tablet Responsive ---- */
@media (min-width: 768px) and (max-width: 1024px) {
    .block.block-recently-viewed-products .list li {
        min-width: 30vw;
        max-width: 30vw;
        flex-shrink: 0;
        scroll-snap-align: start;
    }

    .block.block-recently-viewed-products .list {
        scroll-snap-type: x mandatory;
    }

    .block.block-recently-viewed-products .scroll-arrow {
        width: 40px;
        height: 40px;
        padding: 12px 15px;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
    }

    .block.block-recently-viewed-products .scroll-arrow-left {
        left: 10px;
    }

    .block.block-recently-viewed-products .scroll-arrow-right {
        right: 10px;
    }
}
