/* ============================================================
   Bundle Discount Widget — Frontend Styles
   Prefix: bd-   (nu se suprapune cu Journal3 j-/jp- sau OC3)
   ============================================================ */

/* ------ Container principal ------ */
.bd-bundle-widget {
    border: 2px solid #f0ad4e;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
    background: #fffdf5;
    box-sizing: border-box;
}

/* ------ Header ------ */
.bd-bundle-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    color: #8a6d3b;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0ad4e;
}

.bd-bundle-icon {
    font-style: normal;
    line-height: 1;
}

.bd-bundle-title {
    font-weight: 700;
}

/* ------ Item (un produs complementar din listă) ------ */
.bd-bundle-item {
    padding: 12px 0;
    border-top: 1px solid #f5deb3;
}

.bd-bundle-item:first-of-type {
    padding-top: 0;
    border-top: none;
}

/* ------ Body ------ */
.bd-bundle-body {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* ------ Checkbox selecție produs complementar ------ */
.bd-bundle-check {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.bd-bundle-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Un singur produs complementar disponibil — nu există alegere de făcut */
.bd-bundle-check-hidden {
    display: none;
}

/* ------ Imagine produs complementar ------ */
.bd-bundle-thumb {
    flex-shrink: 0;
}

.bd-bundle-thumb-link {
    display: block;
    text-decoration: none;
}

.bd-bundle-thumb-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: block;
}

/* ------ Info produs complementar ------ */
.bd-bundle-info {
    flex: 1;
    min-width: 160px;
}

.bd-bundle-name {
    font-weight: 600;
    color: #333;
    text-decoration: none;
    display: block;
    margin-bottom: 4px;
    line-height: 1.3;
}

.bd-bundle-name:hover {
    color: #f0ad4e;
    text-decoration: underline;
}

.bd-bundle-price {
    color: #555;
    margin-bottom: 6px;
    font-size: 14px;
}

.bd-bundle-badge {
    display: inline-block;
    background: #5cb85c;
    color: #fff;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

/* ------ Total economii (combinat, live pe măsură ce se bifează) ------ */
.bd-bundle-total-savings {
    margin-top: 12px;
    padding: 8px 12px;
    background: #dff0d8;
    color: #3c763d;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
}

/* ------ Footer / Buton unic ------ */
.bd-bundle-footer {
    margin-top: 12px;
}

.bd-bundle-btn-all {
    max-width: 320px;
    width: 100%;
    display: block;
}

.bd-bundle-btn-all:disabled,
.bd-bundle-btn-all[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ------ Mesaj "deja în coș" ------ */
.bd-bundle-note {
    color: #5cb85c;
    font-size: 13px;
    margin-top: 6px;
    display: block;
}

/* ------ Responsive ------ */
@media (max-width: 480px) {
    .bd-bundle-body {
        flex-direction: column;
        align-items: flex-start;
    }

    .bd-bundle-thumb-img {
        width: 64px;
        height: 64px;
    }

    .bd-bundle-btn-all {
        max-width: 100%;
    }
}

/* ============================================================
   Widget compact — pagina coșului (sugestii, un card per produs)
   ============================================================ */
.bd-cart-widget {
    border: 2px solid #f0ad4e;
    border-radius: 6px;
    padding: 15px;
    margin: 20px 0;
    background: #fffdf5;
    box-sizing: border-box;
}

/* ------ Carousel: săgeți + viewport cu overflow ascuns + track glisant ------ */
.bd-cart-carousel {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bd-cart-viewport {
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.bd-cart-track {
    display: flex;
    transition: transform 0.3s ease;
}

.bd-cart-arrow {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #f0ad4e;
    background: #fff;
    color: #8a6d3b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    padding: 0;
}

.bd-cart-arrow:hover {
    background: #f0ad4e;
    color: #fff;
}

/* ------ Fiecare "slot" ocupă un procent fix din viewport — 5 pe desktop,
   3 pe tabletă, 2 pe mobil (trebuie sincronizat cu visibleCount() din JS) ------ */
.bd-cart-slot {
    flex: 0 0 20%;
    max-width: 20%;
    box-sizing: border-box;
    padding: 0 8px;
}

@media (max-width: 992px) {
    .bd-cart-slot {
        flex-basis: 33.3333%;
        max-width: 33.3333%;
    }
}

@media (max-width: 480px) {
    .bd-cart-slot {
        flex-basis: 100%;
        max-width: 100%;
        padding: 0 6px;
    }
}

.bd-cart-card {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
}

.bd-cart-thumb-link {
    display: block;
}

.bd-cart-thumb-img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: block;
    background: #fff;
}

.bd-cart-name {
    font-weight: 600;
    color: #333;
    text-decoration: none;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bd-cart-name:hover {
    color: #f0ad4e;
    text-decoration: underline;
}

.bd-cart-price {
    color: #555;
    font-size: 14px;
}

.bd-cart-add-btn {
    width: 100%;
    margin-top: auto;
}
