/* DE Bundle Builder — Frontend */

.debb-bundle-notice {
    background: linear-gradient(135deg, #f0f9ff 0%, #e8f5e9 100%);
    border: 2px solid #4caf50;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.debb-bundle-notice h4 {
    margin: 0 0 8px;
    font-size: 1.1em;
    color: #2e7d32;
}

.debb-bundle-name {
    font-weight: 600;
    font-size: 1.05em;
    margin: 0 0 4px;
}

.debb-bundle-desc {
    color: #555;
    margin: 0 0 12px;
}

.debb-bundle-products {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
}

.debb-bundle-products li {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.debb-individual-price {
    color: #888;
}

.debb-bundle-pricing {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.debb-original {
    text-decoration: line-through;
    color: #999;
    font-size: .95em;
}

.debb-bundle-price {
    font-size: 1.3em;
    font-weight: 700;
    color: #2e7d32;
}

.debb-savings {
    background: #4caf50;
    color: #fff;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: .85em;
    font-weight: 600;
}

.debb-suggest-all {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 10px 14px;
    margin-bottom: 12px;
    border-radius: 0 4px 4px 0;
}

.debb-add-bundle-btn {
    background: #4caf50 !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 24px !important;
    font-size: 1em !important;
    border-radius: 6px !important;
    cursor: pointer;
    transition: background .2s;
}

.debb-add-bundle-btn:hover {
    background: #388e3c !important;
}

.debb-add-bundle-btn.loading {
    opacity: .6;
    pointer-events: none;
}

/* Bundles grid (shortcode) */

.debb-bundles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin: 24px 0;
}

.debb-bundle-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
    transition: box-shadow .2s;
}

.debb-bundle-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
}

.debb-bundle-card h3 {
    margin: 0 0 8px;
}

/* BYOB */

.debb-byob-wrap {
    max-width: 960px;
    margin: 0 auto;
}

.debb-byob-instructions {
    font-size: 1.05em;
    color: #555;
}

.debb-byob-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin: 20px 0;
}

.debb-byob-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
    position: relative;
}

.debb-byob-item:hover {
    border-color: #90caf9;
}

.debb-byob-item.selected {
    border-color: #4caf50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, .3);
}

.debb-byob-item input[type="checkbox"] {
    position: absolute;
    top: 8px;
    right: 8px;
}

.debb-byob-thumb img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.debb-byob-name {
    font-weight: 600;
    margin: 8px 0 4px;
    font-size: .9em;
}

.debb-byob-price {
    color: #2e7d32;
    font-weight: 700;
}

.debb-byob-summary {
    background: #f5f5f5;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

.debb-byob-totals {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.debb-byob-discount-line {
    color: #e53935;
}

.debb-byob-add-btn {
    background: #1976d2 !important;
    color: #fff !important;
    border: none !important;
    padding: 10px 24px !important;
    border-radius: 6px !important;
    font-size: 1em !important;
    cursor: pointer;
    transition: background .2s;
}

.debb-byob-add-btn:hover:not(:disabled) {
    background: #1565c0 !important;
}

.debb-byob-add-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* Suggestions */

.debb-suggestions {
    background: linear-gradient(135deg, #fff8e1 0%, #fff3e0 100%);
    border: 2px solid #ff9800;
    border-radius: 8px;
    padding: 20px;
    margin: 24px 0;
}

.debb-suggestions h3 {
    margin: 0 0 16px;
    color: #e65100;
}

.debb-suggestion-card {
    background: #fff;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}

.debb-suggestion-card:last-child {
    margin-bottom: 0;
}

.debb-suggestion-card p {
    margin: 0 0 8px;
}

.debb-complete-bundle-btn {
    background: #ff9800 !important;
    color: #fff !important;
    border: none !important;
    padding: 8px 20px !important;
    border-radius: 6px !important;
    cursor: pointer;
    transition: background .2s;
}

.debb-complete-bundle-btn:hover {
    background: #f57c00 !important;
}

/* Toast */

.debb-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #323232;
    color: #fff;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: .95em;
    z-index: 99999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
    animation: debb-slide-in .3s ease;
}

.debb-toast.success {
    background: #2e7d32;
}

.debb-toast.error {
    background: #c62828;
}

@keyframes debb-slide-in {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 600px) {
    .debb-bundles-grid {
        grid-template-columns: 1fr;
    }

    .debb-byob-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .debb-byob-summary {
        flex-direction: column;
        text-align: center;
    }

    .debb-byob-totals {
        flex-direction: column;
        gap: 8px;
    }

    .debb-bundle-pricing {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}
