.klew-showcase,
.klew-featured {
    --klew-primary: #173b8f;
    --klew-accent: #11877f;
    --klew-text: #162033;
    --klew-muted: #6d7788;
    --klew-border: #e5eaf1;
    --klew-surface: #fff;
    --klew-soft: #f5f8fc;
    --klew-gap: 24px;
    --klew-columns: 4;
    --klew-slides: 4;
    font-family: inherit;
    color: var(--klew-text);
    box-sizing: border-box;
}

.klew-showcase *,
.klew-featured * {
    box-sizing: border-box;
}

.klew-showcase a,
.klew-featured a {
    text-decoration: none;
}

.klew-showcase button,
.klew-showcase input,
.klew-showcase select {
    font: inherit;
}

.klew-showcase__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.klew-showcase__heading {
    max-width: 760px;
}

.klew-showcase__title {
    margin: 0 0 8px;
    color: var(--klew-text);
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 900;
    line-height: 1.35;
}

.klew-showcase__description {
    color: var(--klew-muted);
    font-size: 15px;
    line-height: 1.9;
}

.klew-showcase__view-all {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    color: var(--klew-primary);
    font-size: 14px;
    font-weight: 800;
    transition: gap .2s ease;
}

.klew-showcase__view-all:hover {
    gap: 12px;
    color: var(--klew-accent);
}

.klew-filters {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding: 12px;
    border: 1px solid var(--klew-border);
    border-radius: 16px;
    background: var(--klew-surface);
}

.klew-filters__categories,
.klew-filters__tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.klew-filter-button {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--klew-muted);
    padding: 9px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    transition: .2s ease;
}

.klew-filter-button:hover {
    background: var(--klew-soft);
    color: var(--klew-primary);
}

.klew-filter-button.is-active {
    background: var(--klew-primary);
    color: #fff;
}

.klew-search {
    position: relative;
    display: block;
}

.klew-search__icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--klew-muted);
    font-size: 21px;
    line-height: 1;
    pointer-events: none;
}

.klew-search__input,
.klew-sort__select {
    height: 40px;
    border: 1px solid var(--klew-border) !important;
    border-radius: 10px !important;
    background: #fff !important;
    color: var(--klew-text) !important;
    box-shadow: none !important;
    outline: 0;
    font-size: 13px;
}

.klew-search__input {
    width: 230px;
    padding: 0 38px 0 12px !important;
}

.klew-sort__select {
    min-width: 145px;
    padding: 0 12px !important;
}

.klew-search__input:focus,
.klew-sort__select:focus {
    border-color: var(--klew-primary) !important;
}

.klew-result-count {
    color: var(--klew-muted);
    font-size: 13px;
    white-space: nowrap;
}

.klew-result-count strong {
    color: var(--klew-primary);
    font-size: 15px;
}

.klew-showcase__items {
    display: grid;
    grid-template-columns: repeat(var(--klew-columns), minmax(0, 1fr));
    gap: var(--klew-gap);
}

.klew-showcase--list .klew-showcase__items {
    grid-template-columns: 1fr;
}

.klew-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--klew-border);
    border-radius: 18px;
    background: var(--klew-surface);
    box-shadow: 0 12px 34px rgba(23, 59, 143, .07);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.klew-card:hover {
    transform: translateY(-4px);
    border-color: rgba(23, 59, 143, .22);
    box-shadow: 0 18px 44px rgba(23, 59, 143, .13);
}

.klew-card[hidden] {
    display: none !important;
}

.klew-card__media {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(180deg, #f8fbff 0%, var(--klew-soft) 100%);
}

.klew-card__image-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 16px;
}

.klew-card__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center center;
    transition: transform .45s ease;
}

.klew-showcase[data-image-fit="contain"] .klew-card__image {
    object-fit: contain;
}

.klew-showcase[data-image-fit="cover"] .klew-card__image {
    object-fit: cover;
}

.klew-card:hover .klew-card__image {
    transform: scale(1.04);
}

.klew-card__badge {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    max-width: calc(100% - 28px);
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--klew-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.3;
    box-shadow: 0 7px 20px rgba(17, 135, 127, .22);
}

.klew-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 20px;
}

.klew-card__category {
    margin-bottom: 7px;
    color: var(--klew-accent);
    font-size: 12px;
    font-weight: 800;
}

.klew-card__title {
    margin: 0 0 10px;
    color: var(--klew-text);
    font-size: 19px;
    font-weight: 900;
    line-height: 1.55;
}

.klew-card__title a {
    color: inherit;
}

.klew-card__title a:hover {
    color: var(--klew-primary);
}

.klew-card__meta {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin: -2px 0 12px;
    color: var(--klew-muted);
    font-size: 12px;
}

.klew-card__meta span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.klew-card__meta span:not(:last-child)::after {
    content: "";
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #c5ccd7;
}

.klew-card__excerpt {
    margin-bottom: 18px;
    color: var(--klew-muted);
    font-size: 13px;
    line-height: 1.9;
}

.klew-card__footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid var(--klew-border);
}

.klew-card__price {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.klew-card__price-label {
    color: var(--klew-muted);
    font-size: 11px;
}

.klew-card__price-value {
    color: var(--klew-primary);
    font-size: 16px;
    font-weight: 900;
    line-height: 1.45;
    white-space: normal;
}

.klew-card__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 0 0 auto;
    min-height: 42px;
    padding: 9px 14px;
    border-radius: 11px;
    background: var(--klew-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    transition: .2s ease;
}

.klew-card__button:hover {
    background: var(--klew-accent);
    color: #fff;
    transform: translateX(-2px);
}

/* Distinct card skins */
.klew-skin--modern .klew-card {
    background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
}

.klew-skin--modern .klew-card__media::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 40px;
    background: linear-gradient(to top, rgba(255,255,255,.9), rgba(255,255,255,0));
    pointer-events: none;
}

.klew-skin--minimal .klew-card {
    border-color: transparent;
    border-radius: 20px;
    box-shadow: none;
    background: transparent;
}

.klew-skin--minimal .klew-card:hover {
    transform: translateY(-2px);
    box-shadow: none;
    border-color: transparent;
}

.klew-skin--minimal .klew-card__media {
    border-radius: 20px;
    background: #f7f9fc;
    box-shadow: inset 0 0 0 1px rgba(22, 32, 51, .05);
}

.klew-skin--minimal .klew-card__body {
    padding: 16px 4px 4px;
}

.klew-skin--minimal .klew-card__footer {
    padding-top: 12px;
    border-top-style: dashed;
}

.klew-skin--minimal .klew-card__button {
    padding-inline: 0;
    color: var(--klew-primary);
    background: transparent;
    border-radius: 0;
}

.klew-skin--minimal .klew-card__button:hover {
    color: var(--klew-accent);
    background: transparent;
    transform: translateX(-2px);
}

.klew-skin--outlined .klew-card {
    border-width: 2px;
    border-radius: 20px;
    box-shadow: none;
}

.klew-skin--outlined .klew-card__media {
    background: #fff;
    border-bottom: 1px solid var(--klew-border);
}

.klew-skin--outlined .klew-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: linear-gradient(180deg, var(--klew-primary), var(--klew-accent));
}

.klew-skin--outlined .klew-card__body {
    padding-right: 22px;
}

.klew-skin--outlined .klew-card__button {
    border: 1px solid currentColor;
    background: transparent;
    color: var(--klew-primary);
}

.klew-skin--outlined .klew-card__button:hover {
    background: var(--klew-primary);
    color: #fff;
}

.klew-skin--glass .klew-card {
    background: linear-gradient(180deg, rgba(255,255,255,.88) 0%, rgba(247,250,255,.78) 100%);
    border-color: rgba(255,255,255,.8);
    box-shadow: 0 18px 42px rgba(23, 59, 143, .1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.klew-skin--glass .klew-card__media {
    background: radial-gradient(circle at top left, rgba(23,59,143,.1), transparent 40%), linear-gradient(180deg, rgba(255,255,255,.85), rgba(240,245,255,.95));
}

.klew-skin--glass .klew-card__footer {
    background: rgba(255,255,255,.34);
    margin: auto -20px -20px;
    padding: 16px 20px 20px;
    border-top-color: rgba(22,32,51,.08);
}

.klew-showcase--list .klew-card {
    display: grid;
    grid-template-columns: minmax(260px, 36%) 1fr;
    align-items: stretch;
}

.klew-showcase--list .klew-card__media {
    height: 100%;
    min-height: 250px;
}

.klew-showcase--list .klew-card__body {
    padding: 24px;
}

.klew-showcase--list .klew-card__title {
    font-size: 22px;
}

.klew-showcase--list .klew-card__footer {
    justify-content: flex-start;
    gap: 30px;
}

/* Carousel */
.klew-showcase--carousel {
    position: relative;
}

.klew-carousel__stage {
    position: relative;
    padding-inline: 36px;
}

.klew-carousel__viewport {
    overflow: hidden;
    touch-action: pan-y;
    padding: 6px;
    margin: -6px;
}

.klew-showcase--carousel .klew-showcase__items {
    display: flex;
    gap: var(--klew-gap);
    direction: rtl;
    transition: transform .55s cubic-bezier(.22, .7, .24, 1);
    will-change: transform;
}

.klew-showcase--carousel .klew-card {
    flex: 0 0 calc((100% - (var(--klew-gap) * (var(--klew-slides) - 1))) / var(--klew-slides));
}

.klew-carousel__arrows {
    pointer-events: none;
}

.klew-carousel__arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid var(--klew-border);
    border-radius: 14px;
    background: #fff;
    color: var(--klew-primary);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(23,59,143,.11);
    transform: translateY(-50%);
    transition: .2s ease;
    pointer-events: auto;
}

.klew-carousel__arrow--prev {
    right: 0;
}

.klew-carousel__arrow--next {
    left: 0;
}

.klew-carousel__arrow:hover:not(:disabled) {
    background: var(--klew-primary);
    border-color: var(--klew-primary);
    color: #fff;
}

.klew-carousel__arrow:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.klew-carousel__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 18px;
    min-height: 14px;
}

.klew-carousel__dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: #cbd3df;
    cursor: pointer;
    transition: .2s ease;
}

.klew-carousel__dot.is-active {
    width: 24px;
    background: var(--klew-primary);
}

.klew-empty {
    padding: 30px;
    border: 1px dashed var(--klew-border);
    border-radius: 16px;
    background: var(--klew-soft);
    color: var(--klew-muted);
    text-align: center;
    line-height: 1.8;
}

.klew-empty--filtered {
    margin-top: 18px;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Featured widget */
.klew-featured {
    position: relative;
    display: grid;
    grid-template-columns: 1.03fr .97fr;
    overflow: hidden;
    border: 1px solid var(--klew-border);
    border-radius: 28px;
    background: linear-gradient(135deg, #f8faff 0%, #eef4fc 100%);
    box-shadow: 0 24px 70px rgba(23, 59, 143, .11);
}

.klew-featured__media {
    position: relative;
    min-height: 460px;
    overflow: hidden;
    background: #eaf0f9;
}

.klew-featured__image {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    object-fit: cover;
}

.klew-featured__media::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 35%;
    background: linear-gradient(to top, rgba(7, 22, 47, .16), transparent);
    pointer-events: none;
}

.klew-featured__badge {
    position: absolute;
    z-index: 2;
    top: 24px;
    right: 24px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--klew-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 9px 25px rgba(17, 135, 127, .25);
}

.klew-featured__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(30px, 5vw, 70px);
}

.klew-featured__eyebrow {
    margin-bottom: 12px;
    color: var(--klew-accent);
    font-size: 13px;
    font-weight: 900;
}

.klew-featured__title {
    margin: 0 0 14px;
    color: var(--klew-text);
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 950;
    line-height: 1.35;
}

.klew-featured__meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.klew-featured__meta span {
    padding: 6px 10px;
    border: 1px solid var(--klew-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, .7);
    color: var(--klew-muted);
    font-size: 12px;
    font-weight: 700;
}

.klew-featured__description {
    max-width: 650px;
    margin-bottom: 23px;
    color: var(--klew-muted);
    font-size: 15px;
    line-height: 2;
}

.klew-featured__price {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 26px;
}

.klew-featured__price span {
    color: var(--klew-muted);
    font-size: 12px;
}

.klew-featured__price strong {
    color: var(--klew-primary);
    font-size: clamp(22px, 3vw, 31px);
    font-weight: 950;
}

.klew-featured__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.klew-featured__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 50px;
    padding: 12px 20px;
    border-radius: 13px;
    font-size: 14px;
    font-weight: 900;
    transition: .2s ease;
}

.klew-featured__button--primary {
    background: var(--klew-primary);
    color: #fff;
}

.klew-featured__button--primary:hover {
    background: var(--klew-accent);
    color: #fff;
    transform: translateY(-2px);
}

.klew-featured__button--secondary {
    border: 1px solid var(--klew-primary);
    color: var(--klew-primary);
    background: transparent;
}

.klew-featured__button--secondary:hover {
    background: #fff;
    color: var(--klew-primary);
}

.klew-featured--image-left {
    direction: ltr;
}

.klew-featured--image-left > * {
    direction: rtl;
}

.klew-featured--overlay {
    display: block;
    min-height: 520px;
    background: #102a63;
}

.klew-featured--overlay .klew-featured__media {
    position: absolute;
    inset: 0;
    min-height: 0;
}

.klew-featured--overlay .klew-featured__media::after {
    height: 100%;
    background: linear-gradient(90deg, rgba(8, 24, 57, .15), rgba(8, 24, 57, .9));
}

.klew-featured--overlay .klew-featured__content {
    position: relative;
    z-index: 3;
    min-height: 520px;
    width: min(650px, 70%);
    color: #fff;
}

.klew-featured--overlay .klew-featured__title,
.klew-featured--overlay .klew-featured__price strong {
    color: #fff;
}

.klew-featured--overlay .klew-featured__description,
.klew-featured--overlay .klew-featured__price span {
    color: rgba(255, 255, 255, .78);
}

.klew-featured--overlay .klew-featured__meta span {
    border-color: rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.klew-featured--overlay .klew-featured__button--secondary {
    border-color: #fff;
    color: #fff;
}

.klew-featured--compact {
    grid-template-columns: 320px 1fr;
}

.klew-featured--compact .klew-featured__media {
    min-height: 300px;
}

.klew-featured--compact .klew-featured__content {
    padding: 32px;
}

.klew-featured--compact .klew-featured__title {
    font-size: 30px;
}

.klew-featured--compact .klew-featured__description {
    margin-bottom: 15px;
}

.klew-featured--compact .klew-featured__price {
    margin-bottom: 17px;
}

@media (max-width: 1024px) {
    .klew-showcase {
        --klew-columns: 2;
        --klew-slides: 2;
    }

    .klew-featured {
        grid-template-columns: 1fr 1fr;
    }

    .klew-featured__content {
        padding: 36px;
    }

    .klew-featured--compact {
        grid-template-columns: 260px 1fr;
    }
}

@media (max-width: 767px) {
    .klew-showcase {
        --klew-columns: 1;
        --klew-slides: 1;
        --klew-gap: 16px;
    }

    .klew-showcase__header {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 20px;
    }

    .klew-filters {
        align-items: stretch;
        flex-direction: column;
    }

    .klew-filters__categories {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .klew-filter-button {
        flex: 0 0 auto;
    }

    .klew-filters__tools {
        display: grid;
        grid-template-columns: 1fr;
    }

    .klew-search__input,
    .klew-sort__select {
        width: 100%;
        min-width: 0;
    }

    .klew-result-count {
        padding: 2px 4px;
    }

    .klew-card__footer {
        align-items: stretch;
        flex-direction: column;
    }

    .klew-card__button {
        width: 100%;
    }

    .klew-showcase--list .klew-card {
        display: block;
    }

    .klew-showcase--list .klew-card__media {
        height: 220px;
        min-height: 0;
    }

    .klew-showcase--list .klew-card__body {
        padding: 20px;
    }

    .klew-carousel__stage {
        padding-inline: 0;
    }

    .klew-carousel__arrow {
        top: auto;
        bottom: 12px;
        transform: none;
    }

    .klew-carousel__arrow--prev {
        right: 10px;
    }

    .klew-carousel__arrow--next {
        left: 10px;
    }

    .klew-carousel__dots {
        margin-top: 12px;
        padding-inline: 64px;
    }

    .klew-featured,
    .klew-featured--compact {
        display: flex;
        flex-direction: column;
        grid-template-columns: none;
    }

    .klew-featured--image-left {
        direction: rtl;
    }

    .klew-featured__media,
    .klew-featured--compact .klew-featured__media {
        min-height: 280px;
    }

    .klew-featured__content,
    .klew-featured--compact .klew-featured__content {
        padding: 26px 22px;
    }

    .klew-featured--overlay {
        display: block;
        min-height: 540px;
    }

    .klew-featured--overlay .klew-featured__content {
        width: 100%;
        min-height: 540px;
        justify-content: flex-end;
    }

    .klew-featured--overlay .klew-featured__media::after {
        background: linear-gradient(to top, rgba(8, 24, 57, .94), rgba(8, 24, 57, .08));
    }

    .klew-featured__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .klew-featured__button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .klew-card,
    .klew-card__image,
    .klew-card__button,
    .klew-carousel__track,
    .klew-featured__button {
        transition: none !important;
    }
}
