.product-option .thumbnail,
.modal .thumbnail,
.select2-container .thumbnail {
	display: block;
	padding: 4px;
	line-height: 1.42857143;
	background-color: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
}

.product-option .thumbnail,
.modal .thumbnail {
	margin-bottom: 20px;
}

.select2-container .thumbnail {
	margin-bottom: 0;
}

.product-option .thumbnail > img,
.modal .thumbnail > img,
.select2-container .thumbnail > img {
	margin-right: auto;
	margin-left: auto;
	display: block;
	max-width: 100%;
	height: auto;
}

.select2-container * {
	box-sizing: border-box;
}

.modal .thumbnails {
	overflow: auto;
	clear: both;
	list-style: none;
	padding: 0;
	margin: 0;
}

.modal .thumbnails > li {
	margin-left: 20px;
}

.modal .thumbnails {
	margin-left: -20px;
}

.modal .thumbnails > img {
	width: 100%;
}

.modal .image-additional a {
	margin-bottom: 20px;
	padding: 5px;
	display: block;
	border: 1px solid #ddd;
}

.modal .image-additional {
	max-width: 78px;
}

.modal .thumbnails .image-additional {
	float: left;
	margin-left: 20px;
}

/* ============================================================
   Product In Option — Card Layout (new)
   ============================================================ */

/* ---- Filter dropdown ---- */
.pio-filter-group {
    margin-bottom: 16px;
}
.pio-filter-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.pio-filter-select {
    max-width: 320px;
    border-radius: 6px;
    border: 1px solid #d0d0d0;
    height: 40px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    padding: 0 12px;
    cursor: pointer;
    transition: border-color .2s;
    width: 100%;
}
.pio-filter-select:focus {
    outline: none;
    border-color: #e37c16;
    box-shadow: 0 0 0 3px rgba(227,124,22,.15);
}

/* ---- Section header ---- */
.pio-section-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
    margin-top: 4px;
}
.pio-selected-count {
    font-size: 13px;
    color: #555;
}

/* ---- Card list ---- */
.pio-cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ---- Single card ---- */
.pio-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
    position: relative;
}
.pio-card:hover {
    border-color: #b0b0b0;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.pio-card.pio-card--selected {
    border-color: #e37c16;
    box-shadow: 0 2px 10px rgba(227,124,22,.18);
}
.pio-card.filter-hidden {
    display: none !important;
}

/* ---- Checkbox ---- */
.pio-card-check {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
}
.pio-card-check input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    transition: background .2s, border-color .2s;
    position: relative;
    flex-shrink: 0;
    margin: 0;
}
.pio-card-check input[type="checkbox"]:checked {
    background-color: #e37c16;
    border-color: #e37c16;
}
.pio-card-check input[type="checkbox"]:checked::after {
    content: '';
    display: block;
    position: absolute;
    top: 2px;
    left: 5px;
    width: 6px;
    height: 10px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

/* ---- Thumbnail ---- */
.pio-card-thumb {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 5px;
    overflow: hidden;
    border: 1px solid #ececec;
    background: #f7f7f7;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pio-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ---- Product info ---- */
.pio-card-info {
    flex: 1;
    min-width: 0;
}
.pio-card-main-name {
    font-size: 11px;
    color: #888;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pio-card-option-name {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    line-height: 1.3;
    margin-bottom: 3px;
}
.pio-card-sku {
    font-size: 11px;
    color: #aaa;
}

/* ---- Price block ---- */
.pio-card-price {
    flex-shrink: 0;
    text-align: right;
    min-width: 100px;
}
.pio-price-original {
    font-size: 12px;
    color: #aaa;
    text-decoration: line-through;
    display: block;
    line-height: 1.2;
}
.pio-price-main {
    font-size: 17px;
    font-weight: 700;
    color: #222;
    display: block;
    line-height: 1.3;
}
.pio-price-save {
    display: inline-block;
    margin-top: 3px;
    padding: 1px 7px;
    background: #e8f5e9;
    color: #2e7d32;
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
}

/* ---- Qty stepper ---- */
.pio-card-qty {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    margin-left: 10px;
}
.pio-qty-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #d0d0d0;
    background: #f5f5f5;
    color: #444;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.pio-qty-btn:hover {
    background: #e0e0e0;
    border-color: #b0b0b0;
}
.pio-qty-btn.pio-qty-minus {
    border-radius: 4px 0 0 4px;
}
.pio-qty-btn.pio-qty-plus {
    border-radius: 0 4px 4px 0;
}
.pio-qty-input {
    width: 40px;
    height: 30px;
    border: 1px solid #d0d0d0;
    border-left: none;
    border-right: none;
    text-align: center;
    font-size: 14px;
    color: #333;
    background: #fff;
    padding: 0;
    -moz-appearance: textfield;
}
.pio-qty-input::-webkit-inner-spin-button,
.pio-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ---- Order summary ---- */
.pio-order-summary {
    display: block;
    margin-top: 20px;
    padding: 14px 18px;
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    width: 100%;
    box-sizing: border-box;
}
.pio-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}
.pio-summary-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.pio-summary-heading {
    font-size: 13px;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
}
.pio-summary-meta {
    font-size: 13px;
    color: #777;
}
.pio-summary-prices {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.pio-summary-total-old {
    font-size: 13px;
    color: #aaa;
    text-decoration: line-through;
}
.pio-summary-total-new {
    font-size: 18px;
    font-weight: 700;
    color: #222;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    .pio-card {
        flex-wrap: wrap;
        align-items: center;
    }
    /* Info block moves to top, full width */
    .pio-card-info {
        order: -1;
        width: 100%;
        flex: none;
        margin-bottom: 8px;
    }
    /* Checkbox + thumb stay on the left, second row */
    .pio-card-check {
        order: 0;
    }
    .pio-card-thumb {
        order: 1;
    }
    /* Price pushes to the right on same row */
    .pio-card-price {
        order: 2;
        flex: 1;
        min-width: auto;
        text-align: right;
    }
    /* Qty on far right */
    .pio-card-qty {
        order: 3;
        margin-left: 8px;
    }
}
