/* TS - Product Bundle — frontend styles */

.tspb-includes {
    margin: 1em 0 1.5em;
    padding: .5em .75em .5em .25em;
    background: #f7f7f7;
    border: 1px solid #ececec;
    border-radius: 4px;
}

.tspb-includes-title {
    font-size: 1em;
    margin: 0 0 .5em;
    font-weight: 600;
}

.tspb-includes-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tspb-includes-item {
    display: flex;
    align-items: center;
    gap: .75em;
    padding: .5em 0;
}

.tspb-includes-item + .tspb-includes-item {
    border-top: 1px solid #e5e5e5;
}

/* Thumbnail (~50px square) */
.tspb-includes-thumb {
    flex: 0 0 50px;
    width: 50px;
    height: 50px;
    display: block;
    overflow: hidden;
    border-radius: 4px;
    background: #fff;
}

.tspb-includes-thumb a,
.tspb-includes-thumb img,
.tspb-includes-thumb-img {
    display: block;
    width: 50px;
    height: 50px;
    object-fit: cover;
}

/* Name block — takes the remaining space */
.tspb-includes-main {
    flex: 1 1 auto;
    min-width: 0;
}

.tspb-includes-name {
    display: block;
    text-decoration: none;
    word-break: break-word;
    line-height: 1.3;
}

.tspb-includes-name:hover {
    text-decoration: underline;
}

/* Simple product "Model Name" line — smaller text */
.tspb-includes-model {
    display: block;
    margin-top: 2px;
    font-size: .8em;
    color: #666;
    line-height: 1.35;
}

/* Variation attribute lines — same size as the product name */
.tspb-includes-variant {
    display: block;
    line-height: 1.3;
}

/* Price + stock badge stacked vertically on the right */
.tspb-includes-meta {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    text-align: right;
}

.tspb-includes-price {
    color: #555;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}

.tspb-includes-badge {
    font-size: .75em;
    padding: 1px 8px;
    border-radius: 10px;
    white-space: nowrap;
    line-height: 1.4;
}

.tspb-includes-item.is-in-stock .tspb-includes-badge {
    background: #e8f5e9;
    color: #1b5e20;
}

.tspb-includes-item.is-out-of-stock .tspb-includes-badge {
    background: #ffebee;
    color: #b71c1c;
}

.tspb-includes-item.is-out-of-stock .tspb-includes-name,
.tspb-includes-item.is-out-of-stock .tspb-includes-model,
.tspb-includes-item.is-out-of-stock .tspb-includes-variant,
.tspb-includes-item.is-out-of-stock .tspb-includes-price {
    text-decoration: line-through;
    opacity: 0.7;
}

.tspb-includes-item.is-out-of-stock .tspb-includes-thumb img,
.tspb-includes-item.is-out-of-stock .tspb-includes-thumb-img {
    opacity: 0.6;
}

/* ------------------------------------------------------------------
   Cart / checkout / order styling for bundle groups
   ------------------------------------------------------------------ */

.tspb-arrow {
    display: inline-block;
    color: #666;
    margin-right: 4px;
    font-weight: 400;
}

tr.tspb-bundle-child,
li.tspb-bundle-child,
.tspb-bundle-child {
    opacity: 0.6;
    background: rgba(0, 0, 0, 0.02);
}

tr.tspb-bundle-child td.product-name,
li.tspb-bundle-child .product-name,
.tspb-bundle-child .product-name {
    padding-left: 2em;
}

.tspb-bundle-child .product-thumbnail,
.tspb-bundle-child .product-name {
    position: relative;
}

.tspb-bundle-child .product-thumbnail {
    padding-left: 2em;
}

.tspb-cart-child-qty {
    display: inline-block;
    min-width: 2em;
    text-align: center;
    color: #555;
}
