.xmed-sales-slot {
    --xmed-green: #54ad58;
    --xmed-navy: #183153;
    --xmed-border: #e2e8ef;
    box-sizing: border-box;
    max-width: 1380px;
    margin: 28px auto;
    padding: 20px clamp(14px, 2vw, 24px);
    border: 1px solid var(--xmed-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(24, 49, 83, .07);
}

.xmed-sales-slot:not(.is-ready) {
    min-height: 100px;
}

.xmed-sales-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.xmed-sales-heading h2 {
    margin: 0;
    color: var(--xmed-navy);
    font-size: clamp(1.35rem, 2.2vw, 1.8rem);
    font-weight: 750;
}

.xmed-sales-controls {
    display: flex;
    gap: 8px;
}

.xmed-sales-controls button {
    width: 38px;
    height: 38px;
    border: 1px solid #cbd6e1;
    border-radius: 50%;
    background: #fff;
    color: var(--xmed-navy);
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.xmed-sales-track {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    grid-template-rows: 1fr;
    gap: 14px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-behavior: smooth;
    scroll-snap-type: inline mandatory;
    scrollbar-width: thin;
}

.xmed-sales-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--xmed-border);
    border-radius: 14px;
    background: #fff;
    scroll-snap-align: start;
    transition: box-shadow .18s ease, border-color .18s ease;
}

.xmed-sales-card:hover {
    border-color: #7fc584;
    box-shadow: 0 10px 24px rgba(24, 49, 83, .10);
}

.xmed-sales-card__image {
    position: relative;
    display: flex;
    height: clamp(175px, 15vw, 215px);
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: #fff;
}

.xmed-sales-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.xmed-sales-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 12px;
    border-top: 1px solid #edf1f4;
}

.xmed-sales-card h3 {
    display: -webkit-box;
    min-height: 3.15em;
    margin: 7px 0 12px;
    overflow: hidden;
    color: #132a47;
    font-size: 1rem;
    font-weight: 650;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.xmed-sales-card h3 a {
    color: inherit;
    text-decoration: none;
}

.xmed-sales-rating {
    color: #ecaa00;
    font-size: .88rem;
    white-space: nowrap;
}

.xmed-sales-rating strong {
    color: #19375b;
}

.xmed-sales-rating small {
    color: #708096;
}

.xmed-sales-rating--new {
    color: #4b8c50;
    font-weight: 650;
}

.xmed-sales-card__footer {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    margin-top: auto;
}

.xmed-sales-price {
    display: flex;
    min-height: 24px;
    align-items: baseline;
    gap: 8px;
    color: #122b4d;
    font-size: 1.12rem;
    font-weight: 800;
}

.xmed-sales-add-form {
    margin: 0;
}

.xmed-sales-button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 9px 14px;
    border-radius: 9px;
    background: var(--xmed-green);
    color: #fff !important;
    font-weight: 700;
    text-decoration: none !important;
    width: 100%;
    border: 0;
    cursor: pointer;
}

.xmed-sales-button:hover {
    background: #419b46;
}

@media (min-width: 992px) {
    .xmed-sales-track {
        grid-auto-columns: calc((100% - 42px) / 4);
    }
}

@media (min-width: 640px) and (max-width: 991.98px) {
    .xmed-sales-track {
        grid-auto-columns: calc((100% - 14px) / 2);
    }
}

@media (max-width: 639.98px) {
    .xmed-sales-slot {
        width: 100%;
        margin: 24px 0;
        padding: 18px 12px;
        border: 1px solid var(--xmed-border);
        border-radius: 16px;
        overflow: hidden;
    }

    .xmed-sales-track {
        grid-auto-columns: calc(100% - 46px);
        gap: 12px;
        padding-bottom: 8px;
    }

    .xmed-sales-controls {
        display: none;
    }

    .xmed-sales-card__image {
        height: 180px;
    }

    .xmed-sales-card {
        border-radius: 14px;
    }

    .xmed-sales-heading h2 {
        font-size: 1.22rem;
        line-height: 1.25;
    }

}

@media (prefers-reduced-motion: reduce) {
    .xmed-sales-card {
        animation: none;
        transition: none;
    }
}
