/* Product Select from Category */
.m4pps-wrapper {
    margin: 20px 0;
    padding: 18px 20px;
    border: 1px solid #eeeeee;
    border-radius: 12px;
    background: #fafafa;
}

.m4pps-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #232f3e;
    margin: 0 0 4px;
}

.m4pps-subtitle {
    font-size: 0.85rem;
    color: #777777;
    margin: 0 0 14px;
}

/* Select dropdown */
.m4pps-select-wrapper {
    margin-bottom: 14px;
}

.m4pps-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #dddddd;
    border-radius: 10px;
    background: #ffffff;
    color: #232f3e;
    font-size: 0.92rem;
    font-weight: 500;
    appearance: auto;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.m4pps-select:focus {
    border-color: #232f3e;
    outline: none;
    box-shadow: 0 0 0 3px rgba(35, 47, 62, 0.1);
}

/* Product card (after selection) */
.m4pps-product-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid #eeeeee;
    border-radius: 10px;
    transition: box-shadow 0.2s ease;
}

.m4pps-product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Card image */
.m4pps-card-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
}

.m4pps-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #eeeeee;
}

/* Card info */
.m4pps-card-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.m4pps-card-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #232f3e;
    text-decoration: none;
}

.m4pps-card-name:hover {
    color: #ad1f00;
}

.m4pps-card-reference {
    font-size: 0.78rem;
    color: #999999;
}

.m4pps-card-prices {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin-top: 4px;
}

.m4pps-card-price-net {
    font-weight: 700;
    font-size: 1rem;
    color: #232f3e;
}

.m4pps-card-price-gross {
    font-size: 0.82rem;
    color: #777777;
}

/* Stock */
.m4pps-card-stock {
    font-size: 0.78rem;
    font-weight: 600;
    margin-top: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 4px;
    width: fit-content;
}

.m4pps-card-stock.status-in {
    background: #e8f5e9;
    color: #1b5e20;
}

.m4pps-card-stock.status-low {
    background: #fff8e1;
    color: #8a6d00;
}

.m4pps-card-stock.status-out {
    background: #fdecea;
    color: #8a1410;
}

/* Card actions */
.m4pps-card-actions {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

/* Quantity */
.m4pps-card-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid #dddddd;
    border-radius: 8px;
    overflow: hidden;
}

.m4pps-qty-btn {
    background: #f5f5f5;
    border: none;
    color: #232f3e;
    width: 34px;
    height: 36px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.m4pps-qty-btn:hover {
    background: #e5e5e5;
}

.m4pps-qty-input {
    width: 46px;
    height: 36px;
    text-align: center;
    border: none;
    border-left: 1px solid #dddddd;
    border-right: 1px solid #dddddd;
    font-weight: 600;
    font-size: 0.95rem;
    color: #232f3e;
    -moz-appearance: textfield;
}

.m4pps-qty-input::-webkit-inner-spin-button,
.m4pps-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Add to cart button */
.m4pps-add-btn {
    background: #232f3e;
    color: #ffffff;
    border: 1px solid #232f3e;
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.m4pps-add-btn:hover {
    background: #ffffff;
    color: #232f3e;
}

.m4pps-add-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 576px) {
    .m4pps-product-card {
        flex-wrap: wrap;
    }
    .m4pps-card-actions {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
    }
}
