.nlhw-product-showcase {
    --nlhw-showcase-columns: 4;
    --nlhw-showcase-gap: 18px;
    display: grid;
    grid-template-columns: repeat(var(--nlhw-showcase-columns), minmax(0, 1fr));
    gap: var(--nlhw-showcase-gap);
    direction: rtl;
}

.nlhw-product-tabs {
    direction: rtl;
}

.nlhw-product-tab-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.nlhw-product-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 14px;
    border: 1px solid rgba(17, 24, 39, .12);
    border-radius: 999px;
    background: #fff;
    color: #111827;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.nlhw-product-tab.is-active {
    border-color: #111827;
    background: #111827;
    color: #fff;
}

.nlhw-product-tab-panel {
    display: none;
}

.nlhw-product-tab-panel.is-active {
    display: block;
}

.nlhw-product-carousel-shell {
    position: relative;
    direction: ltr;
}

.nlhw-product-layout-carousel {
    display: flex;
    gap: var(--nlhw-showcase-gap);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    direction: ltr;
    cursor: grab;
    scrollbar-width: thin;
}

.nlhw-product-layout-carousel.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
}

.nlhw-product-layout-carousel .nlhw-product-card {
    flex: 0 0 calc((100% - (var(--nlhw-showcase-gap) * (var(--nlhw-showcase-columns) - 1))) / var(--nlhw-showcase-columns));
    scroll-snap-align: start;
    direction: rtl;
}

.nlhw-product-carousel-nav {
    position: absolute;
    top: 50%;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(17, 24, 39, .12);
    border-radius: 999px;
    background: #fff;
    color: #111827;
    box-shadow: none;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.nlhw-product-carousel-prev {
    left: -14px;
}

.nlhw-product-carousel-next {
    right: -14px;
}

.nlhw-product-layout-list {
    grid-template-columns: 1fr;
}

.nlhw-product-layout-list .nlhw-product-card,
.nlhw-product-layout-hero .nlhw-product-card {
    display: grid;
    grid-template-columns: minmax(180px, 34%) 1fr;
    align-items: stretch;
}

.nlhw-product-layout-hero {
    grid-template-columns: 1fr;
}

.nlhw-product-layout-hero .nlhw-product-card:not(:first-child) {
    display: none;
}

.nlhw-product-card {
    position: relative;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(17, 24, 39, .08);
    border-radius: 18px;
    box-shadow: none;
    transition: transform .18s ease, box-shadow .18s ease;
}

.nlhw-product-card:hover {
    transform: none;
    box-shadow: none;
}

.nlhw-product-image {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    background: #fff;
    text-decoration: none;
}

.nlhw-product-layout-list .nlhw-product-image,
.nlhw-product-layout-hero .nlhw-product-image {
    aspect-ratio: auto;
    min-height: 100%;
}

.nlhw-product-image img,
.nlhw-product-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity .24s ease, transform .24s ease;
}

.nlhw-product-hover-zoom:hover .nlhw-product-img-primary {
    transform: scale(1.04);
}

.nlhw-product-hover-none:hover .nlhw-product-img-primary {
    transform: none;
}

.nlhw-product-img-secondary {
    position: absolute;
    inset: 0;
    opacity: 0;
}

.nlhw-product-hover-swap:hover .nlhw-product-img-primary {
    opacity: 0;
}

.nlhw-product-hover-swap:hover .nlhw-product-img-secondary {
    opacity: 1;
}

.nlhw-product-badges {
    position: absolute;
    top: 12px;
    right: 12px;
    left: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: flex-start;
    justify-content: flex-start;
}

.nlhw-product-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    color: #111827;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 8px 22px rgba(15, 23, 42, .12);
}

.nlhw-product-badge-sale {
    color: #fff;
    background: #ef4444;
}

.nlhw-product-content {
    display: flex;
    flex-direction: column;
    gap: 9px;
    padding: 15px;
}

.nlhw-product-layout-hero .nlhw-product-content {
    justify-content: center;
    padding: 26px;
}

.nlhw-product-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
    color: #f59e0b;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.nlhw-product-title {
    margin: 0;
    color: #111827;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.7;
}

.nlhw-product-title a {
    color: inherit;
    text-decoration: none;
}

.nlhw-product-title a:hover {
    color: #000;
}

.nlhw-product-price {
    color: #111827;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.6;
}

.nlhw-product-price del {
    margin-left: 6px;
    color: #9ca3af;
    font-size: .9em;
    font-weight: 600;
}

.nlhw-product-price ins {
    color: #ef4444;
    text-decoration: none;
}

.nlhw-product-meta {
    color: #6b7280;
    font-size: 12px;
    line-height: 1.6;
}

.nlhw-product-stock {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.nlhw-product-stock::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: currentColor;
}

.nlhw-product-stock.is-in-stock {
    color: #16a34a;
}

.nlhw-product-stock.is-out-of-stock {
    color: #ef4444;
}

.nlhw-product-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    margin-top: 3px;
    padding: 9px 14px;
    border: 0;
    border-radius: 12px;
    background: #111827;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.3;
    text-decoration: none !important;
    transition: color .18s ease, transform .18s ease, background .18s ease, border-color .18s ease;
}

.nlhw-product-button:hover {
    color: #fff;
    background: #000;
    transform: translateY(-1px);
}

.nlhw-product-empty {
    padding: 18px;
    border: 1px solid rgba(17, 24, 39, .08);
    border-radius: 14px;
    color: #6b7280;
    background: #fff;
    text-align: center;
    direction: rtl;
}

@media (max-width: 1024px) {
    .nlhw-product-showcase {
        --nlhw-showcase-columns: 3;
    }
}

@media (max-width: 767px) {
    .nlhw-product-showcase {
        --nlhw-showcase-columns: 2;
    }

    .nlhw-product-layout-list .nlhw-product-card,
    .nlhw-product-layout-hero .nlhw-product-card {
        grid-template-columns: 1fr;
    }

    .nlhw-product-layout-list .nlhw-product-image,
    .nlhw-product-layout-hero .nlhw-product-image {
        aspect-ratio: 1 / 1;
    }

    .nlhw-product-carousel-prev {
        left: 4px;
    }

    .nlhw-product-carousel-next {
        right: 4px;
    }
}

@media (max-width: 420px) {
    .nlhw-product-showcase:not(.nlhw-product-layout-carousel) {
        --nlhw-showcase-columns: 1;
    }

    .nlhw-product-layout-carousel .nlhw-product-card {
        flex-basis: 82%;
    }
}
