/* ═══════════════════════════════════════════════════════════════════════════
   Proton Bundles — Luxury Modern UI v3.0
   ═══════════════════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --pb-primary: #0f172a;
    --pb-primary-light: #334155;
    --pb-primary-dark: #020617;
    
    --pb-accent: #c5a059;
    --pb-accent-hover: #b08942;
    --pb-accent-gold: linear-gradient(135deg, #e6ca85 0%, #c5a059 50%, #997530 100%);
    --pb-accent-gold-soft: rgba(197, 160, 89, 0.12);
    
    --pb-success: #10b981;
    --pb-warning: #f59e0b;
    --pb-danger: #ef4444;

    --pb-bg: #ffffff;
    --pb-bg-soft: #f8fafc;
    --pb-bg-glass: rgba(255, 255, 255, 0.92);
    --pb-border: #e2e8f0;
    --pb-border-gold: rgba(197, 160, 89, 0.35);

    --pb-text: #0f172a;
    --pb-text-sub: #475569;
    --pb-text-muted: #64748b;

    --pb-shadow-sm: 0 2px 6px rgba(15, 23, 42, 0.04);
    --pb-shadow: 0 8px 20px -4px rgba(15, 23, 42, 0.06), 0 4px 8px -2px rgba(15, 23, 42, 0.03);
    --pb-shadow-lg: 0 20px 30px -6px rgba(15, 23, 42, 0.08), 0 8px 12px -4px rgba(15, 23, 42, 0.04);
    --pb-shadow-gold: 0 10px 25px -5px rgba(197, 160, 89, 0.3);

    --pb-glow: 0 0 25px rgba(197, 160, 89, 0.2);

    --pb-radius-lg: 24px;
    --pb-radius: 16px;
    --pb-radius-sm: 12px;
    --pb-radius-xs: 8px;

    --pb-transition: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --pb-spring: 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ── Base Form ──────────────────────────────────────────────────────────────── */
.proton-bundle-form {
    margin: 2.5rem 0;
    font-family: 'Plus Jakarta Sans', 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ── Main Container ─────────────────────────────────────────────────────────── */
.proton-fixed-bundle,
.proton-custom-builder {
    background: var(--pb-bg);
    border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius-lg);
    padding: 2.5rem;
    box-shadow: var(--pb-shadow-lg);
    position: relative;
    overflow: hidden;
    animation: protonFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Shimmer Gold Line Header Accent */
.proton-fixed-bundle::before,
.proton-custom-builder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--pb-accent-gold);
}

@keyframes protonFadeIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Header ─────────────────────────────────────────────────────────────────── */
.proton-bundle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.proton-bundle-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--pb-text);
    margin: 0;
    letter-spacing: -0.025em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.proton-bundle-badge {
    background: var(--pb-accent-gold-soft);
    color: #8a6a27;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.45rem 1.1rem;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 1px solid var(--pb-border-gold);
    box-shadow: 0 2px 6px rgba(197, 160, 89, 0.1);
}

/* ── Progress Section ───────────────────────────────────────────────────────── */
.proton-builder-progress-wrap {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 1.5rem;
    border-radius: var(--pb-radius);
    margin-bottom: 2.5rem;
    border: 1px solid var(--pb-border);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.8);
}

.proton-progress-track {
    height: 7px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.proton-progress-bar {
    height: 100%;
    background: var(--pb-accent-gold);
    width: 0%;
    border-radius: 99px;
    transition: width var(--pb-transition);
}

.proton-progress-text {
    font-size: 0.88rem;
    color: var(--pb-text-sub);
    font-weight: 600;
}

/* ── Selection Area ─────────────────────────────────────────────────────────── */
.proton-builder-dropdowns-wrap {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.proton-builder-slot {
    background: var(--pb-bg);
    border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all var(--pb-transition);
    box-shadow: var(--pb-shadow-sm);
    animation: protonSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

@keyframes protonSlideUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.proton-builder-slot:nth-child(1) { animation-delay: 0.04s; }
.proton-builder-slot:nth-child(2) { animation-delay: 0.08s; }
.proton-builder-slot:nth-child(3) { animation-delay: 0.12s; }
.proton-builder-slot:nth-child(4) { animation-delay: 0.16s; }

.proton-builder-slot:hover {
    border-color: #cbd5e1;
    box-shadow: var(--pb-shadow);
    transform: translateY(-2px);
}

.proton-builder-slot.proton-slot-filled {
    border-color: var(--pb-border-gold);
    background: linear-gradient(135deg, #fffdf8 0%, #fff9eb 100%);
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.1);
}

.proton-slot-badge {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    background: var(--pb-bg-soft);
    border: 1px solid var(--pb-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    color: var(--pb-text-sub);
    transition: all var(--pb-transition);
}

.proton-builder-slot.proton-slot-filled .proton-slot-badge {
    background: var(--pb-accent-gold);
    color: white;
    border-color: transparent;
    box-shadow: var(--pb-shadow-gold);
}

.proton-slot-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.proton-slot-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--pb-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.proton-slot-label .required {
    color: var(--pb-danger);
}

.proton-builder-select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    background-color: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569'%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 1.2rem center;
    background-size: 1.15rem;
    border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius-sm);
    padding: 0.85rem 3rem 0.85rem 1.1rem;
    font-size: 0.95rem;
    color: var(--pb-text);
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--pb-transition);
}

.proton-builder-select:focus {
    outline: none;
    border-color: var(--pb-accent);
    box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.15);
}

/* ── Builder Footer / Fixed Footer ─────────────────────────────────────────── */
.proton-builder-footer,
.proton-bundle-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 1.75rem 2rem;
    border-radius: var(--pb-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    box-shadow: 0 15px 30px -5px rgba(15, 23, 42, 0.25);
}

.proton-builder-summary-info {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

/* ── Selection Count Badge ──────────────────────────────────────────────────── */
.proton-builder-selection-count {
    font-size: 0.85rem;
    font-weight: 700;
    color: #e6ca85;
    background: rgba(197, 160, 89, 0.15);
    padding: 0.4rem 1rem;
    border-radius: 99px;
    display: inline-block;
    border: 1px solid rgba(197, 160, 89, 0.25);
}

.proton-builder-selection-count.proton-count-pulse {
    animation: protonCountPop 0.4s var(--pb-spring);
}

@keyframes protonCountPop {
    0% { transform: scale(1); }
    40% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

/* ── Pricing ────────────────────────────────────────────────────────────────── */
.proton-builder-pricing,
.proton-bundle-pricing-wrap {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.proton-final-price-row {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
}

.proton-price-label {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #94a3b8;
}

.proton-builder-total,
.proton-final-price {
    font-size: 1.85rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.03em;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.proton-old-price {
    text-decoration: line-through;
    color: #64748b;
    font-size: 1.1rem;
    font-weight: 600;
}

.proton-savings-badge {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    padding: 0.3rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* ── Add to Cart Button ─────────────────────────────────────────────────────── */
.proton-bundle-btn {
    flex: 1;
    max-width: 280px;
    height: 56px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.75rem;
    background: var(--pb-accent-gold) !important;
    color: #0f172a !important;
    border: none !important;
    border-radius: var(--pb-radius-sm) !important;
    font-weight: 800 !important;
    font-size: 1.05rem !important;
    letter-spacing: 0.01em !important;
    cursor: pointer !important;
    transition: all var(--pb-transition) !important;
    box-shadow: var(--pb-shadow-gold) !important;
}

.proton-bundle-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #ebd499 0%, #d4ae65 50%, #ad8840 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 25px -4px rgba(197, 160, 89, 0.45) !important;
}

.proton-bundle-btn:disabled {
    background: #334155 !important;
    color: #64748b !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

.proton-btn-icon {
    display: inline-block;
    transition: transform var(--pb-transition);
}

.proton-bundle-btn:hover:not(:disabled) .proton-btn-icon {
    transform: translateX(5px);
}

/* ── Fixed Bundle Items List ────────────────────────────────────────────────── */
.proton-bundle-items-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.proton-bundle-item-row {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: var(--pb-bg);
    border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius);
    margin-bottom: 0;
    box-shadow: var(--pb-shadow-sm);
    transition: all var(--pb-transition);
}

.proton-bundle-item-row:hover {
    box-shadow: var(--pb-shadow);
    border-color: var(--pb-border-gold);
    transform: translateY(-2px);
}

.proton-bundle-item-row.out-of-stock {
    opacity: 0.6;
    background: var(--pb-bg-soft);
}

.proton-bundle-item-thumb img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: var(--pb-radius-sm);
    margin-right: 1.5rem;
    border: 1px solid var(--pb-border);
    box-shadow: var(--pb-shadow-sm);
}

.proton-bundle-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.proton-item-name {
    font-weight: 700;
    color: var(--pb-text);
    font-size: 1.05rem;
    display: block;
    line-height: 1.3;
}

.proton-item-qty {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--pb-text-sub);
    background: var(--pb-bg-soft);
    padding: 0.2rem 0.7rem;
    border-radius: 99px;
    border: 1px solid var(--pb-border);
}

.proton-bundle-item-price {
    font-weight: 800;
    color: var(--pb-text);
    font-size: 1.05rem;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {

    .proton-fixed-bundle,
    .proton-custom-builder {
        padding: 1.5rem;
    }

    .proton-builder-slot {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .proton-bundle-footer,
    .proton-builder-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 1.25rem;
        padding: 1.5rem;
    }

    .proton-bundle-btn {
        max-width: none !important;
        width: 100%;
    }
}

/* Shake Animation */
@keyframes protonShake {
    0%, 100% { transform: translateX(0); }
    18% { transform: translateX(-6px); }
    36% { transform: translateX(6px); }
    54% { transform: translateX(-4px); }
    72% { transform: translateX(4px); }
    90% { transform: translateX(-2px); }
}

.proton-shake {
    animation: protonShake 0.55s ease !important;
}