.hashteq-products-shortcode {
    position: relative;
    --htq-columns: 4;
    --htq-gap: 20px;
    --htq-price-size: 24px;
}

.hashteq-products-viewport {
    overflow: hidden;
    touch-action: pan-y pinch-zoom;
}

.hashteq-products-track {
    display: flex;
    gap: var(--htq-gap);
    transition: transform 0.35s ease;
    will-change: transform;
}

.hashteq-products-shortcode.is-grid .hashteq-products-track {
    display: grid;
    grid-template-columns: repeat(var(--htq-columns), minmax(0, 1fr));
    gap: var(--htq-gap);
}

.hashteq-products-shortcode.is-slider .hashteq-product-card {
    flex: 0 0 calc((100% - (var(--htq-gap) * (var(--htq-columns) - 1))) / var(--htq-columns));
}

.hashteq-product-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    padding: 0;
}

.hashteq-product-image-link {
    display: block;
    position: relative;
    background: #f8fafc;
    overflow: hidden;
    margin: 0;
}

.hashteq-product-media {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.hashteq-product-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    background: #ffffff;
}

.hashteq-product-image-placeholder {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.hashteq-product-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 9px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: #dc2626;
}

.hashteq-product-body {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hashteq-product-brand {
    display: inline-flex;
    align-self: flex-start;
    padding: 2px 8px;
    border-radius: 9999px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    line-height: 1.2;
    margin-bottom: 2px;
}

.hashteq-product-title {
    margin: 0;
    font-size: 17px;
    line-height: 1.3;
    min-height: calc(1.3em * 2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.hashteq-product-title a {
    color: #0f172a;
    text-decoration: none;
}

.hashteq-product-footer {
    margin-top: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 8px;
}

.hashteq-product-price-col {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hashteq-product-price-wrap {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-height: 0;
    flex-wrap: wrap;
}

.hashteq-product-price {
    font-size: var(--htq-price-size);
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
}

.hashteq-product-retailer-sub {
    font-size: 12px;
    color: #64748b;
    line-height: 1.2;
}

.hashteq-product-price-old {
    font-size: 15px;
    color: #94a3b8;
    text-decoration: line-through;
}

.hashteq-product-price-empty {
    color: #64748b;
    font-weight: 600;
}

.hashteq-product-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    background: linear-gradient(90deg, #2563eb 0%, #1e40af 100%);
    color: #fff;
    border-radius: 8px;
    padding: 8px 11px;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}

.hashteq-product-button:hover,
.hashteq-product-button:focus {
    background: linear-gradient(90deg, #1d4ed8 0%, #1e3a8a 100%);
    color: #fff;
}

.hashteq-products-nav {
    position: absolute;
    top: 36%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 9999px;
    border: none;
    background: rgba(15, 23, 42, 0.86);
    color: #fff;
    cursor: pointer;
    z-index: 3;
    line-height: 1;
    font-size: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.hashteq-products-nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.hashteq-products-prev {
    left: -10px;
}

.hashteq-products-next {
    right: -10px;
}

@media (max-width: 1024px) {
    .hashteq-products-shortcode {
        --htq-columns: 2;
    }
}

@media (max-width: 640px) {
    .hashteq-products-shortcode.is-slider {
        width: 100vw;
        margin-left: calc(50% - 50vw);
        margin-right: calc(50% - 50vw);
        padding-left: 4px;
        padding-right: 4px;
        --htq-price-size: 21px;
    }

    .hashteq-products-shortcode {
        --htq-columns: 1;
    }

    .hashteq-products-nav {
        top: 36%;
        width: 38px;
        height: 38px;
        font-size: 24px;
        background: rgba(15, 23, 42, 0.78);
    }

    .hashteq-products-prev {
        left: 2px;
    }

    .hashteq-products-next {
        right: 2px;
    }
}
