.ap-widget {
    --ap-accent: #2563eb;
    --ap-text: #172033;
    --ap-muted: #687386;
    --ap-border: #e8ebf1;

    width: 100%;
    margin: 28px 0;
    color: var(--ap-text);
    font-family: inherit;
}

.ap-widget *,
.ap-widget *::before,
.ap-widget *::after {
    box-sizing: border-box;
}

.ap-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.ap-heading {
    min-width: 0;
}

.ap-eyebrow {
    display: block;
    margin-bottom: 5px;
    color: var(--ap-accent);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.ap-heading h2 {
    margin: 0;
    font-size: clamp(21px, 3vw, 29px);
    line-height: 1.25;
    font-weight: 750;
    letter-spacing: -0.6px;
}

.ap-controls {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.ap-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--ap-border);
    border-radius: 50%;
    background: #fff;
    color: var(--ap-text);
    font-size: 21px;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}

.ap-arrow:hover:not(:disabled) {
    background: var(--ap-accent);
    color: #fff;
    border-color: var(--ap-accent);
}

.ap-arrow:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.ap-track-wrap {
    overflow: hidden;
    width: 100%;
}

.ap-track {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.ap-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--ap-border);
    border-radius: 15px;
    background: #fff;
    transition: box-shadow .2s, transform .2s;
}

.ap-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(20, 35, 70, .09);
}

.ap-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    padding: 12px;
    background: #fff;
}

.ap-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ap-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 14px;
}

.ap-name {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 9px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    min-height: 43px;
}

.ap-description {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 18px;
    color: var(--ap-muted);
    font-size: 12px;
    line-height: 1.6;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.ap-card-bottom {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f0f2f6;
}

.ap-price {
    color: var(--ap-accent);
    font-size: 19px;
    font-weight: 800;
    white-space: nowrap;
}

.ap-footer {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 17px;
}

.ap-counter {
    color: var(--ap-muted);
    font-size: 12px;
    white-space: nowrap;
}

.ap-progress {
    flex: 1;
    height: 3px;
    overflow: hidden;
    border-radius: 5px;
    background: #e9edf5;
}

.ap-progress span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--ap-accent);
    transition: width .25s;
}

.ap-loading {
    opacity: .5;
    pointer-events: none;
}

.ap-empty {
    padding: 20px;
    color: var(--ap-muted);
    text-align: center;
}

@media (max-width: 900px) {
    .ap-track {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
    }

    .ap-card-body {
        padding: 11px;
    }
}

@media (max-width: 600px) {
    .ap-header {
        margin-bottom: 14px;
    }

    .ap-track {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .ap-arrow {
        width: 36px;
        height: 36px;
    }

    .ap-card {
        border-radius: 12px;
    }

    .ap-name {
        font-size: 13px;
        min-height: 38px;
    }

    .ap-description {
        font-size: 11px;
    }

    .ap-price {
        font-size: 17px;
    }

    .ap-image-wrap {
        padding: 8px;
    }
}