/* ============================================================
   Bundle Product Module – Frontend Styles
   PrestaShop 8.x compatible
   ============================================================ */

/* --- Container --- */
.bundle-selector {
    margin: 28px 0;
    padding: 22px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: #f9f9f9;
    font-family: inherit;
}

.bundle-selector__header {
    margin-bottom: 18px;
}

.bundle-selector__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 6px;
    color: #333;
}

.bundle-selector__subtitle {
    font-size: 0.88rem;
    color: #666;
    margin: 0 0 10px;
    line-height: 1.5;
}

.bundle-selector__counter-row {
    font-size: 0.9rem;
    color: #444;
}

.bundle-counter,
.bundle-required {
    font-size: 1rem;
}

/* --- Product grid --- */
.bundle-selector__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.bundle-item {
    width: 130px;
    border: 2px solid #dde0e3;
    border-radius: 8px;
    padding: 10px 8px;
    text-align: center;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
}

.bundle-item.is-selected {
    border-color: #25b9d7;
    box-shadow: 0 0 0 3px rgba(37, 185, 215, 0.15);
}

.bundle-item__image-wrap {
    margin-bottom: 8px;
}

.bundle-item__img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
    display: block;
    margin: 0 auto;
}

.bundle-item__no-img {
    width: 80px;
    height: 80px;
    background: #eef0f2;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: #aaa;
    font-size: 2rem;
}

.bundle-item__name {
    font-size: 0.76rem;
    color: #444;
    line-height: 1.35;
    min-height: 32px;
    margin-bottom: 8px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* --- +/- Controls --- */
.bundle-item__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.bundle-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #f4f4f4;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s;
    padding: 0;
    color: #333;
}

.bundle-btn:hover:not(:disabled) {
    background: #e0e0e0;
    border-color: #aaa;
}

.bundle-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.bundle-btn--plus { color: #1a9fb5; }
.bundle-btn--minus { color: #c0392b; }

.bundle-item__qty {
    min-width: 26px;
    font-weight: 700;
    font-size: 1rem;
    color: #222;
    text-align: center;
}

/* --- Footer --- */
.bundle-selector__footer {
    border-top: 1px solid #dde0e3;
    padding-top: 16px;
}

.bundle-progress {
    height: 7px;
    background: #e0e0e0;
    border-radius: 4px;
    margin-bottom: 12px;
    overflow: hidden;
}

.bundle-progress__bar {
    height: 100%;
    background: #25b9d7;
    border-radius: 4px;
    transition: width 0.35s ease, background 0.35s ease;
}

.bundle-progress__bar.is-complete {
    background: #27ae60;
}

.bundle-selector__status {
    font-size: 0.88rem;
    margin: 0 0 12px;
    min-height: 1.4em;
}

.bundle-status--warning { color: #e67e22; font-weight: 500; }
.bundle-status--success { color: #27ae60; font-weight: 600; }
.bundle-status--error   { color: #c0392b; font-weight: 500; }

.bundle-save-btn {
    display: inline-block;
    margin-bottom: 10px;
}

.bundle-save-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: auto; /* keep cursor visible */
}

.bundle-save-feedback {
    font-size: 0.85rem;
    padding: 7px 12px;
    border-radius: 5px;
    min-height: 0;
    transition: opacity 0.4s;
}

.bundle-save-feedback:empty {
    display: none;
}

.bundle-save-feedback.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.bundle-save-feedback.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* --- Responsive --- */
@media (max-width: 576px) {
    .bundle-item {
        width: 100px;
    }
    .bundle-item__img,
    .bundle-item__no-img {
        width: 64px;
        height: 64px;
    }
}

/* ── Bundle cart list ──────────────────────────────────────── */
.bundle-cart-list {
    list-style: none;
    margin: 6px 0 0 0;
    padding: 6px 10px;
    background: #f5f9fb;
    border-left: 3px solid #25b9d7;
    border-radius: 0 4px 4px 0;
    font-size: 0.82rem;
}
.bundle-cart-list__item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 0;
    color: #444;
    line-height: 1.4;
}
.bundle-cart-list__qty {
    font-weight: 700;
    color: #25b9d7;
    min-width: 22px;
    text-align: right;
}
.bundle-cart-list__name {
    flex: 1;
}
