/* =============================================
   Ensemble Bundle Selector v2 — Frontend Styles
   ============================================= */

.ebs-wrap {
    margin-bottom: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Bundle Cards Grid ── */
.ebs-bundles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

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

.ebs-bundle {
    position: relative;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 14px 14px;
    cursor: pointer;
    background: #fff;
    transition: border-color .2s, box-shadow .2s, background .2s;
    text-align: center;
    user-select: none;
}

.ebs-bundle:hover {
    border-color: #c8a882;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
}

.ebs-bundle--active {
    border-color: #c8713a !important;
    background: #fdf5ed !important;
    box-shadow: 0 4px 16px rgba(200,113,58,.15);
}

.ebs-popular-tag {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #c8713a;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: .3px;
}

.ebs-bundle__radio {
    display: flex;
    justify-content: center;
    margin-bottom: 8px;
}

.ebs-radio-dot {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 50%;
    transition: border-color .2s, background .2s;
    position: relative;
}

.ebs-radio-dot--active {
    border-color: #c8713a;
    background: #c8713a;
}

.ebs-radio-dot--active::after {
    content: '';
    position: absolute;
    width: 7px;
    height: 7px;
    background: #fff;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.ebs-bundle__label {
    font-weight: 700;
    font-size: 14px;
    color: #1e293b;
    margin-bottom: 6px;
}

.ebs-bundle__badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
    letter-spacing: .2px;
}

.ebs-badge--teal {
    background: #e0f2f1;
    color: #00695c;
    border: 1px solid #b2dfdb;
}

.ebs-badge--orange {
    background: #c8713a;
    color: #fff;
}

.ebs-bundle__price {
    font-size: 18px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 2px;
}

.ebs-bundle__original {
    font-size: 13px;
    color: #94a3b8;
    text-decoration: line-through;
}

/* ── Selectors Table ── */
.ebs-selector-table {
    background: #fdf5ed;
    border: 1px solid #f0d9c0;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.ebs-sel-header {
    display: grid;
    grid-template-columns: 40px 1fr 1fr;
    gap: 12px;
    font-size: 12px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0d9c0;
}

.ebs-sel-row {
    display: grid;
    grid-template-columns: 40px 1fr 1fr;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}

.ebs-sel-row:last-child { margin-bottom: 0; }

.ebs-sel-num {
    font-weight: 700;
    color: #c8713a;
    font-size: 13px;
}

.ebs-sel-select {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 13px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    padding-right: 30px;
    transition: border-color .2s;
}

.ebs-sel-select:focus {
    outline: none;
    border-color: #c8713a;
    box-shadow: 0 0 0 3px rgba(200,113,58,.15);
}

/* ── Action Buttons ── */
.ebs-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 4px;
}

@media (max-width: 480px) {
    .ebs-actions { grid-template-columns: 1fr; }
}

.ebs-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .1s, box-shadow .2s, opacity .2s;
    letter-spacing: .2px;
    line-height: 1;
    width: 100%;
}

.ebs-btn:active { transform: scale(0.98); }

.ebs-btn:disabled,
.ebs-btn--loading {
    opacity: .65;
    cursor: not-allowed;
    transform: none !important;
}

/* Add to cart — dark green */
.ebs-btn--cart {
    background: #1a3a1a;
    color: #fff;
    box-shadow: 0 2px 10px rgba(26,58,26,.25);
}

.ebs-btn--cart:hover:not(:disabled) {
    background: #142e14;
    box-shadow: 0 4px 18px rgba(26,58,26,.35);
}

/* Buy now — warm orange */
.ebs-btn--buynow {
    background: #c8713a;
    color: #fff;
    box-shadow: 0 2px 10px rgba(200,113,58,.3);
}

.ebs-btn--buynow:hover:not(:disabled) {
    background: #b5612e;
    box-shadow: 0 4px 18px rgba(200,113,58,.4);
}

/* ── Feedback message ── */
.ebs-msg {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.ebs-msg--success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.ebs-msg--error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
