/* Linseoo Product Bundles — Frontend Styles */

.lpb-bundle-wrap *,
.lpb-bundle-wrap *::before,
.lpb-bundle-wrap *::after {
    box-sizing: border-box;
}

.lpb-bundle-wrap {
    margin: 20px 0;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    overflow: hidden;
    font-family: inherit;
    width: 100%;
    max-width: 100%;
    float: none;
    clear: both;
}

/* Header */
.lpb-bundle-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #1a3a5c 0%, #2271b1 100%);
    color: #fff;
    padding: 12px 18px;
    gap: 12px;
}
.lpb-bundle-title {
    font-weight: 700;
    font-size: 15px;
    letter-spacing: .2px;
}
.lpb-bundle-badge {
    background: #ff6b35;
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Items */
.lpb-bundle-items {
    padding: 8px 12px;
    background: #fff;
}

.lpb-bundle-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 6px;
    border-bottom: 1px solid #f0f0f0;
    transition: background .15s;
}
.lpb-bundle-item:last-child { border-bottom: none; }
.lpb-bundle-item.lpb-selected { background: #f0f7ff; border-radius: 6px; }

/* Thumbnail */
.lpb-item-thumb-wrap {
    position: relative;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
}
.lpb-item-img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e8e8e8;
    display: block;
}
.lpb-item-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff6b35;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 4px;
    border-radius: 4px;
    line-height: 1.2;
}

/* Body */
.lpb-item-body {
    flex: 1;
    min-width: 0;
}
.lpb-item-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    white-space: normal;
    word-break: break-word;
    margin-bottom: 3px;
}
.lpb-item-name:hover { color: #2271b1; text-decoration: underline; }
.lpb-item-qty-badge {
    display: inline-block;
    background: #e8e8e8;
    color: #555;
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 4px;
    font-weight: 600;
}
.lpb-variation-selector {
    width: 100%;
    max-width: 220px;
    font-size: 12px;
    padding: 4px 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-top: 4px;
    color: #333;
}

/* Precios */
.lpb-item-price-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}
.lpb-price-original {
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
}
.lpb-price-discounted {
    font-size: 14px;
    font-weight: 700;
    color: #2ecc71;
}

/* Botón toggle icono */
.lpb-item-toggle {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border: 2px solid #2271b1;
    background: transparent;
    color: #2271b1;
    font-size: 20px;
    font-weight: 700;
    padding: 0;
    border-radius: 6px;
    cursor: pointer;
    transition: all .2s;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lpb-item-toggle .lpb-toggle-add::before { content: '+'; }
.lpb-item-toggle .lpb-toggle-remove { display: none; }
.lpb-item-toggle .lpb-toggle-remove::before { content: '✓'; }
.lpb-item-toggle:hover {
    background: #2271b1;
    color: #fff;
}
.lpb-item-toggle.lpb-active {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}
.lpb-item-toggle.lpb-active .lpb-toggle-add { display: none; }
.lpb-item-toggle.lpb-active .lpb-toggle-remove { display: inline; }
.lpb-item-toggle.lpb-active:hover {
    background: #cc1818;
    border-color: #cc1818;
}

/* Precio del producto actualizado por bundle */
.lpb-updated-price del {
    color: #999;
    font-size: 0.85em;
    margin-right: 4px;
}
.lpb-updated-price ins {
    color: #e30054;
    font-weight: bolder;
    text-decoration: none;
}
.lpb-bundle-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #f0f7ff;
    border-top: 1px solid #d0e8ff;
    flex-wrap: wrap;
    gap: 6px;
}
.lpb-summary-text { font-size: 13px; color: #555; }
.lpb-summary-prices { display: flex; align-items: center; gap: 6px; }
.lpb-summary-base { font-size: 12px; color: #999; text-decoration: line-through; }
.lpb-summary-disc { font-size: 15px; font-weight: 700; color: #1a1a1a; }
.lpb-summary-saving { font-size: 13px; color: #27ae60; }
.lpb-summary-saving strong { font-weight: 700; }
.lpb-summary-total { display: flex; align-items: center; gap: 6px; width: 100%; padding-top: 6px; border-top: 1px solid #d0e8ff; margin-top: 4px; }
.lpb-total-base { font-size: 13px; color: #999; text-decoration: line-through; }
.lpb-total-disc { font-size: 17px; font-weight: 800; color: #1a1a1a; }

/* Notificaciones */
.lpb-bundle-notice {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}
.lpb-bundle-notice.success { background: #d4edda; color: #155724; }
.lpb-bundle-notice.error { background: #f8d7da; color: #721c24; }

/* Responsive */
@media (max-width: 480px) {
    .lpb-item-thumb-wrap { width: 44px; height: 44px; }
    .lpb-item-img { width: 44px; height: 44px; }
    .lpb-item-toggle { padding: 6px 10px; font-size: 11px; }
    .lpb-bundle-footer { flex-direction: column; align-items: stretch; }
    .lpb-add-all-btn { text-align: center; }
}
