.smartcart-recommendations {
    margin: 2em 0;
    clear: both;
}

.smartcart-products {
    display: grid;
    gap: 1.5em;
}

.smartcart-products--grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.smartcart-products--list {
    grid-template-columns: 1fr;
}

.smartcart-products--list .smartcart-product-card {
    display: flex;
    align-items: center;
    gap: 1.5em;
}

.smartcart-products--list .smartcart-product-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    flex-shrink: 0;
}

.smartcart-products--list .smartcart-product-info {
    flex: 1;
}

.smartcart-product-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.smartcart-product-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.smartcart-product-image {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.smartcart-product-title {
    font-size: 1em;
    margin: 0.5em 0.75em;
    line-height: 1.3em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.smartcart-product-price {
    display: block;
    padding: 0 0.75em;
    font-size: 1.1em;
    font-weight: bold;
    color: #2c3e50;
}

.smartcart-add-to-cart {
    margin: 0.75em;
    width: calc(100% - 1.5em);
    text-align: center;
}

.smartcart-products--slider {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    scroll-snap-type: x mandatory;
    padding-bottom: 1em;
    scroll-behavior: smooth;
}

.smartcart-products--slider .smartcart-product-card {
    flex: 0 0 260px;
    scroll-snap-align: start;
}

.smartcart-products--slider::-webkit-scrollbar {
    height: 8px;
}

.smartcart-products--slider::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.smartcart-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.smartcart-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.smartcart-popup-content {
    background: #fff;
    padding: 2em;
    border-radius: 8px;
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}

.smartcart-popup-close {
    position: absolute;
    top: 0.75em;
    right: 0.75em;
    background: none;
    border: none;
    font-size: 1.8em;
    cursor: pointer;
    line-height: 1;
    color: #666;
}

@media (max-width: 782px) {
    .smartcart-products--grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .smartcart-products--list .smartcart-product-card {
        flex-direction: column;
    }

    .smartcart-products--list .smartcart-product-image {
        width: 100%;
        height: 180px;
    }
}
