/* ═══════════════════════════════════════════════
   COMBO BUILDER — Modern Design
   ═══════════════════════════════════════════════ */

/* ── Page Header ─────────────────────────────── */
.combo-page-header {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 60%, #1a1a2e 100%);
    border-radius: 16px;
    padding: 28px 32px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    box-shadow: 0 8px 32px rgba(15,52,96,0.35);
    animation: fadeSlideDown 0.5s ease;
}
@keyframes fadeSlideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.combo-page-header::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 260px; height: 260px;
    background: radial-gradient(circle, rgba(230,57,70,0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.combo-page-header::after {
    content: '';
    position: absolute;
    bottom: -60px; left: 30%;
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(57,73,171,0.2) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.combo-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 1;
    position: relative;
    z-index: 1;
}
.combo-page-banner {
    width: 70px; height: 70px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.2);
    flex-shrink: 0;
}
.combo-page-title h1 {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px;
    line-height: 1.2;
}
.combo-page-title p {
    color: rgba(255,255,255,0.55);
    margin: 0;
    font-size: 13px;
}
.combo-header-tiers {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}
.combo-header-tiers .tier-badge {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    transition: all 0.25s;
    backdrop-filter: blur(4px);
}
.combo-header-tiers .tier-badge.active {
    background: #e63946;
    border-color: #e63946;
    box-shadow: 0 4px 12px rgba(230,57,70,0.4);
}

/* ── FBT Box ─────────────────────────────────── */
.fbt-box {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
    margin-bottom: 24px;
    animation: fadeUp 0.5s ease 0.1s both;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Products Row ────────────────────────────── */
.fbt-products {
    display: flex;
    align-items: flex-start;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 0;
    padding-bottom: 28px;
    border-bottom: 2px dashed #eee;
    margin-bottom: 28px;
    overflow-x: auto;
}

/* ── Product Card ────────────────────────────── */
.fbt-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 0;
    min-width: 170px;
    max-width: 260px;
    text-align: center;
    position: relative;
    padding: 0 12px;
    animation: fadeUp 0.5s ease both;
}
.fbt-item:nth-child(1) { animation-delay: 0.15s; }
.fbt-item:nth-child(3) { animation-delay: 0.25s; }
.fbt-item:nth-child(5) { animation-delay: 0.35s; }

.fbt-outofstock { opacity: 0.45; }

/* Image wrapper */
.fbt-img-wrap {
    position: relative;
    display: block;
    width: 100%;
    padding-top: 100%;
    border: 2px solid #f0f0f0;
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
    background: #f9f9fb;
}
.fbt-img-wrap:hover {
    border-color: #e63946;
    box-shadow: 0 8px 24px rgba(230,57,70,0.18);
    transform: translateY(-4px);
}
.fbt-img-wrap img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: contain;
    padding: 14px;
    transition: transform 0.3s ease;
}
.fbt-img-wrap:hover img { transform: scale(1.06); }

/* Discount badge */
.fbt-discount-badge {
    position: absolute;
    top: 10px; left: 10px;
    background: linear-gradient(135deg, #2e7d32, #43a047);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 6px;
    z-index: 1;
    box-shadow: 0 2px 6px rgba(46,125,50,0.35);
}

/* Product info */
.fbt-info { margin-top: 14px; width: 100%; }
.fbt-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
    text-decoration: none;
    line-height: 1.5;
    margin-bottom: 8px;
    min-height: 40px;
    transition: color 0.2s;
}
.fbt-name:hover { color: #e63946; }
.fbt-price-row { margin-bottom: 7px; }
.fbt-price {
    font-size: 18px;
    font-weight: 800;
    color: #e63946;
    letter-spacing: -0.3px;
}
.fbt-old-price {
    font-size: 12px;
    color: #b0b0b0;
    text-decoration: line-through;
    margin-left: 5px;
}
.fbt-badges {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 5px;
}

/* Badges */
.cbadge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1px;
}
.cbadge-required { background: #fff0f1; color: #c62828; border: 1px solid #ffcdd2; }
.cbadge-optional { background: #f1f8e9; color: #33691e; border: 1px solid #dcedc8; }
.cbadge-stock    { background: #e8f5e9; color: #2e7d32; border: 1px solid #c8e6c9; }
.cbadge-nostock  { background: #fce4ec; color: #880e4f; border: 1px solid #f8bbd0; }

/* Plus separator */
.fbt-plus {
    font-size: 28px;
    font-weight: 700;
    color: #e63946;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    margin-top: 72px;
    align-self: flex-start;
    background: #fff0f1;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 22px;
    box-shadow: 0 2px 8px rgba(230,57,70,0.15);
}

/* ── Summary Section ─────────────────────────── */
.fbt-summary-inner {
    background: linear-gradient(135deg, #f8faff 0%, #f0f4ff 100%);
    border-radius: 14px;
    padding: 24px 32px;
    border: 1px solid #e8eeff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
    box-shadow: 0 2px 12px rgba(57,73,171,0.08);
}
.fbt-summary-rows { flex: 1; min-width: 240px; }
.fbt-sum-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    color: #555;
    border-bottom: 1px solid #e8eeff;
}
.fbt-sum-row:last-child { border-bottom: none; }
.fbt-total-row {
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #444;
    white-space: nowrap;
    padding-top: 10px;
}
.fbt-total-row strong {
    color: #e63946;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.fbt-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 220px;
    align-items: center;
    margin: 0 auto;
}

/* Buttons */
.btn-combo-add {
    width: 100%;
    background: linear-gradient(135deg, #e63946, #c62828);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 15px 24px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(230,57,70,0.35);
    letter-spacing: 0.2px;
}
.btn-combo-add:hover {
    background: linear-gradient(135deg, #c62828, #b71c1c);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(230,57,70,0.45);
}
.btn-combo-add:active { transform: translateY(0); }
.btn-combo-add:disabled { background: #bbb; box-shadow: none; transform: none; cursor: not-allowed; }

.btn-combo-save {
    width: 100%;
    background: transparent;
    color: #3949ab;
    border: 2px solid #3949ab;
    border-radius: 10px;
    padding: 11px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-combo-save:hover {
    background: #3949ab;
    color: #fff;
    box-shadow: 0 4px 14px rgba(57,73,171,0.3);
    transform: translateY(-1px);
}

/* Messages */
.combo-message {
    margin-top: 10px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}
.msg-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.msg-error   { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }

/* ── Sticky Bar ──────────────────────────────── */
.combo-sticky-bar {
    position: fixed;
    bottom: -90px;
    left: 0; right: 0;
    background: linear-gradient(90deg, #1a1a2e 0%, #16213e 100%);
    color: #fff;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    transition: bottom 0.35s cubic-bezier(0.4,0,0.2,1);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}
.combo-sticky-bar.visible { bottom: 0; }
.sticky-info { display: flex; flex-direction: column; gap: 2px; }
.sticky-info span { font-size: 11px; opacity: 0.65; }
.sticky-info strong { font-size: 20px; font-weight: 800; }
.btn-sticky-add {
    background: linear-gradient(135deg, #e63946, #c62828);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(230,57,70,0.4);
    display: flex;
    align-items: center;
    gap: 8px;
}
.btn-sticky-add:hover { background: linear-gradient(135deg, #c62828, #b71c1c); transform: scale(1.03); }

/* ── Tier badges (global) ────────────────────── */
.tier-badge {
    background: #fff8e1;
    border: 1px solid #ffc107;
    border-radius: 20px;
    padding: 4px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #333;
    transition: all 0.2s;
}
.tier-badge.active { background: #e63946; border-color: #e63946; color: #fff; }

/* ── Quick Combo Widget ──────────────────────── */
.combo-quick-box {
    border: 2px solid #e63946;
    border-radius: 14px;
    padding: 18px;
    margin-top: 25px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(230,57,70,0.1);
}
.combo-quick-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-weight: 700;
    font-size: 15px;
    color: #e63946;
}
.combo-quick-name { color: #555; font-weight: 400; font-size: 13px; margin-left: auto; }
.combo-quick-item { margin-bottom: 10px; }
.combo-quick-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #f0f0f0;
    transition: border 0.2s, background 0.2s;
}
.combo-quick-label:hover { border-color: #e63946; background: #fff8f8; }
.combo-quick-label input { accent-color: #e63946; width: 18px; height: 18px; }
.combo-quick-label img { width: 45px; height: 45px; object-fit: contain; border-radius: 6px; }
.combo-quick-item-info { flex: 1; }
.cqi-name  { display: block; font-size: 13px; font-weight: 600; color: #222; }
.cqi-price { display: block; font-size: 13px; color: #e63946; font-weight: 700; }
.cqi-badge { font-size: 10px; padding: 2px 7px; border-radius: 10px; font-weight: 600; }
.cqi-badge.required { background: #ffebee; color: #c62828; }
.combo-quick-tiers { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.qtier {
    background: #fff8e1;
    border: 1px solid #ffd54f;
    border-radius: 20px;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #555;
}
.combo-quick-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}
.combo-quick-totals { display: flex; flex-direction: column; }
.cqt-label { font-size: 12px; color: #888; }
.cqt-price { font-size: 18px; font-weight: 700; color: #222; }
.cqt-saving { font-size: 12px; color: #2e7d32; font-weight: 600; }
.btn-quick-add {
    background: linear-gradient(135deg, #e63946, #c62828);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 3px 10px rgba(230,57,70,0.3);
}
.btn-quick-add:hover { background: #c62828; transform: translateY(-1px); }
.combo-quick-msg {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

/* ── Responsive ──────────────────────────────── */
@media (max-width: 767px) {
    .combo-page-header { padding: 20px; gap: 14px; }
    .combo-page-title h1 { font-size: 18px; }
    .fbt-box { padding: 16px; }
    .fbt-products {
        flex-direction: column;
        align-items: stretch;
        overflow-x: visible;
    }
    .fbt-item {
        flex-direction: row;
        text-align: left;
        max-width: 100%;
        min-width: unset;
        gap: 14px;
        padding: 10px 0;
    }
    .fbt-img-wrap {
        width: 80px; min-width: 80px;
        padding-top: 0; height: 80px;
        flex-shrink: 0;
    }
    .fbt-img-wrap img {
        position: static;
        width: 100%; height: 100%;
    }
    .fbt-info { margin-top: 0; flex: 1; }
    .fbt-name { min-height: unset; }
    .fbt-badges { justify-content: flex-start; }
    .fbt-plus {
        width: 100%; margin: 0;
        border-radius: 0;
        border-top: 1px dashed #eee;
        border-bottom: 1px dashed #eee;
        justify-content: center;
        height: 32px;
        background: transparent;
        box-shadow: none;
    }
    .fbt-summary-inner {
        flex-direction: column;
        align-items: stretch;
        max-width: 100%;
        gap: 14px;
        padding: 18px;
    }
    .fbt-summary-rows { min-width: unset; }
    .fbt-total-row { justify-content: center; }
    .fbt-total-row strong { font-size: 24px; }
    .fbt-actions { min-width: unset; width: 100%; }
    .combo-sticky-bar { padding: 10px 16px; }
    .sticky-info strong { font-size: 16px; }
    .btn-sticky-add { padding: 10px 16px; font-size: 14px; }
}
