/* Yummy Nutro Combo Bundles — Frontend */

/* Make the WooCommerce cart form wrap so the combo box takes a full row
   and doesn't stretch the sibling quantity/button vertically. */
.woocommerce div.product form.cart,
form.cart {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
}

/* Combo box gets its own full-width row above quantity and button. */
.yncb-combo-box {
    flex: 0 0 100% !important;
    width: 100% !important;
    order: -1;
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    padding: 18px 20px;
    margin: 18px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,.03);
}

/* Reset any weird height that themes might have applied to siblings. */
.woocommerce div.product form.cart .quantity,
.woocommerce div.product form.cart .single_add_to_cart_button,
form.cart .quantity,
form.cart .single_add_to_cart_button {
    height: auto !important;
    align-self: center !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    writing-mode: horizontal-tb !important;
    white-space: nowrap !important;
    min-height: 0 !important;
}

/* Normalize the quantity +/- buttons back to horizontal. */
.woocommerce div.product form.cart .quantity input.qty,
form.cart .quantity input.qty {
    height: auto !important;
    min-height: 40px !important;
    padding: 6px 8px !important;
    text-align: center !important;
    writing-mode: horizontal-tb !important;
}

/* Add-to-cart button — force normal horizontal layout. */
.woocommerce div.product form.cart .single_add_to_cart_button,
form.cart button.single_add_to_cart_button {
    padding: 12px 24px !important;
    min-height: 44px !important;
    height: auto !important;
    line-height: 1.2 !important;
    writing-mode: horizontal-tb !important;
    flex: 0 0 auto !important;
}
.yncb-title { margin: 0 0 12px; font-size: 18px; }
.yncb-section-title {
    font-size: 11px; font-weight: 700; color: #64748b;
    letter-spacing: .06em; text-transform: uppercase;
    margin: 6px 0 8px;
}

.yncb-fixed-items, .yncb-choice-group { margin-bottom: 14px; }

.yncb-item-row {
    display: grid; grid-template-columns: 60px 1fr 100px;
    gap: 12px; align-items: center;
    padding: 10px; border: 1px solid #f1f5f9; border-radius: 8px;
    margin-bottom: 8px; cursor: default;
}
.yncb-thumb img { width: 60px; height: 60px; border-radius: 6px; object-fit: cover; }
.yncb-name-wrap a { text-decoration: none; color: #0f172a; font-weight: 600; }
.yncb-qty { color: #64748b; font-size: 12px; margin-left: 4px; }
.yncb-price { text-align: right; font-weight: 700; color: #0f172a; }
.yncb-variation-note { color: #64748b; font-size: 12px; margin-top: 2px; }

/* Choice groups */
.yncb-choice-group {
    background: #fffbeb; border: 1px solid #fde68a;
    border-radius: 10px; padding: 12px 14px;
}
.yncb-choice-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.yncb-choice-badge {
    background: #b45309; color: #fff;
    padding: 3px 9px; border-radius: 8px;
    font-size: 11px; font-weight: 800; letter-spacing: .06em;
}
.yncb-choice-item {
    grid-template-columns: 24px 60px 1fr 100px;
    background: #fff; border-color: #fde68a; cursor: pointer;
    transition: box-shadow .15s, border-color .15s;
}
.yncb-choice-item:has(input:checked) {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245,158,11,.12);
    background: #fffdf7;
}
.yncb-choice-radio { accent-color: #f59e0b; width: 18px; height: 18px; }

/* Variation picker */
.yncb-variation-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.yncb-attr-label {
    font-size: 12px; color: #475569;
    display: flex; align-items: center; gap: 4px;
}
.yncb-attr-label select {
    padding: 4px 8px; border: 1px solid #e2e8f0; border-radius: 6px;
    font-size: 12px; background: #fff;
}

/* Totals */
.yncb-combo-totals { width: 100%; margin-top: 14px; border-collapse: collapse; }
.yncb-combo-totals td { padding: 6px 0; }
.yncb-combo-totals td:last-child { text-align: right; }
.yncb-combo-totals .yncb-combo-row td { font-size: 18px; border-top: 1px dashed #e2e8f0; padding-top: 10px; }
.yncb-combo-totals .yncb-savings { color: #059669; font-weight: 700; }

/* Cart */
.yncb-child-indent { padding-left: 20px; color: #475569; }
.yncb-included { color: #059669; font-weight: 600; }
.yncb-child-qty { color: #64748b; font-size: 13px; }

@media (max-width: 600px) {
    .yncb-item-row { grid-template-columns: 50px 1fr 80px; }
    .yncb-choice-item { grid-template-columns: 22px 50px 1fr 80px; }
}
