/* SALEPIX Product Extend - Modern Card Layout */

/* Grid Container */
.spx-products-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Scrollable Grid - ALWAYS VISIBLE SCROLLBAR */
.spx-products-grid.spx-scrollable {
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.5rem;
}

/* Expandable Grid - "More" Button Mode */
.spx-products-grid.spx-expandable {
    overflow: hidden;
    position: relative;
    transition: max-height 0.5s ease-out;
}

.spx-products-grid.spx-expandable.spx-expanded {
    overflow: visible;
}

/* Custom Scrollbar - Webkit (Safari, Chrome) - FORCE VISIBILITY */
.spx-products-grid.spx-scrollable::-webkit-scrollbar {
    -webkit-appearance: none !important;
    width: 10px !important;
}

.spx-products-grid.spx-scrollable::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 8px;
}

.spx-products-grid.spx-scrollable::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 8px;
}

.spx-products-grid.spx-scrollable::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Product Card */

.spx-product-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 2px solid transparent;
    background: #f8f9fa;
    transition: all 0.2s ease;

}

.spx-product-card .productbox-prices_netto {
    display: none;
}

.spx-product-card .productbox-price {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.spx-product-card .spx-discount-badge {
    font-size: .9rem;
    margin-top: 0.25rem;
}

.spx-product-card:hover {
    background: #f2f2f2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Clickable Card */
.spx-product-card-clickable {
    cursor: pointer;
    user-select: none;
    position: relative;
}

/* Selected Card */
.spx-card-selected {
    background: var(--slpx-counter-background, #f2f2f2) !important;
    border-radius: 4px;
    border: 2px solid;
}

/* Card with Checkbox */
.spx-product-card-with-checkbox {
    padding-left: 0.75rem;
}

/* Checkbox */
.spx-product-checkbox {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.spx-product-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin: 0;
}

/* Product Image */
.spx-product-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
}

.spx-product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Product Info */
.spx-product-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    position: relative;
}

.spx-product-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    @media (max-width: 768px) {
        flex-direction: column;
        gap: 0;
        align-items: start;
    }
}

.spx-discount-badge {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    padding: 4px 6px;
    border-radius: 4px;
}

.spx-product-discount-flag {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #000;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
}

.splx-group-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

input.form-control.spx-addon-quantity {
    padding: 5px;
}

/* Product Name */
/* Product Price Row */
/* Product Price Wrapper */
.spx-product-price-wrapper {
    font-size: 1.1rem;
    font-weight: 500;
}

.spx-price-original {
    text-decoration: line-through;
    font-size: 1rem;
}

.spx-price-discounted .js-product-counter-price {
    color: var(--slpx-color-primary, #212529);
    font-weight: 600;
}

.spx-product-price-wrapper .price_wrapper {
    margin: 0;
}

.spx-addon-counter {
    width: 150px;
    margin-top: 5px;

    @media (max-width: 768px) {
        width: 100%;
    }
}

.spx-addon-counter input {
    text-align: center;
}

.spx-product-price-wrapper .price {
    font-size: 1rem;
    font-weight: 600;
}

.spx-addon-qty-btn {
    padding: 5px;
}

.spx-addon-qty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    font-size: 1rem;
    line-height: 1;
    font-weight: 600;
}

.spx-product-price-wrapper .price-old {
    font-size: 0.85rem;
}

.spx-product-price-wrapper .vat_info {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Product Price */
/* Product Quantity Dropdown */
.spx-product-quantity {
    flex-shrink: 0;
    text-align: center;
}

.spx-addon-quantity {
    appearance: textfield;
    -moz-appearance: textfield;
}

.spx-addon-quantity::-webkit-outer-spin-button,
.spx-addon-quantity::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Service Group */
/* Expand Button Container */
.spx-expand-btn-container {
    margin-top: 1rem;
}

/* Hide button after expansion */
.spx-expand-btn.spx-hidden {
    display: none;
}

/* Responsive */
@media (max-width: 576px) {
    .spx-product-card {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .spx-product-image {
        width: 60px;
        height: 60px;
    }
}

.spx_cart__basket-items .spx-product-quantity {
    display: flex;
    align-items: center;
    justify-content: center;
}

.spx_cart__basket-items .spx-product-quantity .spx-addon-counter {
    @media (min-width: 768px) {
        margin-top: 0;
        padding: 0;
        height: 34px;
    }
}