/* ═══════════════════════════════════════════════════════════════════════════
   Proton Bundles — Premium Light UI v2.5
   ═══════════════════════════════════════════════════════════════════════════ */

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

:root {
    --pb-primary: #3b82f6;
    --pb-primary-light: #60a5fa;
    --pb-primary-dark: #2563eb;
    --pb-accent: #8b5cf6;
    --pb-success: #10b981;
    --pb-warning: #f59e0b;
    --pb-danger: #ef4444;

    --pb-bg: #ffffff;
    --pb-bg-soft: #f8fafc;
    --pb-bg-hover: #f1f5f9;
    --pb-border: #e2e8f0;

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

    --pb-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --pb-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --pb-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --pb-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    --pb-glow: 0 0 20px rgba(59, 130, 246, 0.15);

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

    --pb-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --pb-spring: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ── Base Form ──────────────────────────────────────────────────────────────── */
.proton-bundle-form {
    margin: 2.5rem 0;
    font-family: '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 ease forwards;
}

/* Subtle accent background gradient */
.proton-fixed-bundle::before,
.proton-custom-builder::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--pb-primary) 0%, var(--pb-accent) 100%);
}

@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.5rem;
    font-weight: 800;
    color: var(--pb-text);
    margin: 0;
    letter-spacing: -0.02em;
}

.proton-bundle-badge {
    background: var(--pb-bg-soft);
    color: var(--pb-primary-dark);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.4rem 1rem;
    border-radius: 99px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid var(--pb-border);
}

/* ── Progress Section ───────────────────────────────────────────────────────── */
.proton-builder-progress-wrap {
    background: var(--pb-bg-soft);
    padding: 1.5rem;
    border-radius: var(--pb-radius);
    margin-bottom: 2.5rem;
    border: 1px solid var(--pb-border);
}

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

.proton-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--pb-primary) 0%, var(--pb-accent) 100%);
    width: 0%;
    border-radius: 99px;
    transition: width var(--pb-transition);
}

.proton-progress-text {
    font-size: 0.9rem;
    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;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all var(--pb-transition);
    box-shadow: var(--pb-shadow-sm);
    animation: protonSlideUp 0.4s ease 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.05s;
}

.proton-builder-slot:nth-child(2) {
    animation-delay: 0.1s;
}

.proton-builder-slot:nth-child(3) {
    animation-delay: 0.15s;
}

.proton-builder-slot:nth-child(4) {
    animation-delay: 0.2s;
}

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

.proton-builder-slot.proton-slot-filled {
    border-color: var(--pb-primary-light);
    background: #eff6ff;
}

.proton-slot-badge {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    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;
    color: var(--pb-text-sub);
    transition: all var(--pb-transition);
}

.proton-builder-slot.proton-slot-filled .proton-slot-badge {
    background: var(--pb-primary);
    color: white;
    border-color: var(--pb-primary);
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}

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

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

.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='%2364748b'%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 1rem center;
    background-size: 1.25rem;
    border: 1px solid var(--pb-border);
    border-radius: var(--pb-radius-xs);
    padding: 0.85rem 3rem 0.85rem 1rem;
    font-size: 1rem;
    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-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* ── Builder Footer ─────────────────────────────────────────────────────────── */
.proton-builder-footer,
.proton-bundle-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    background: var(--pb-bg-soft);
    padding: 1.5rem;
    border-radius: var(--pb-radius);
    border: 1px solid var(--pb-border);
}

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

/* ── Selection Count Badge ──────────────────────────────────────────────────── */
.proton-builder-selection-count {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pb-primary-dark);
    background: #dbeafe;
    padding: 0.4rem 1rem;
    border-radius: 99px;
    display: inline-block;
}

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

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

    40% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

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

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

.proton-builder-total,
.proton-final-price {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--pb-text);
    letter-spacing: -0.02em;
}

.proton-old-price {
    text-decoration: line-through;
    color: var(--pb-text-muted);
    font-size: 1.1rem;
    font-weight: 600;
}

.proton-savings-badge {
    background: #dcfce7;
    color: #166534;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
}

/* ── Add to Cart Button ─────────────────────────────────────────────────────── */
.proton-bundle-btn {
    flex: 1;
    max-width: 300px;
    height: 56px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.75rem;
    background: var(--pb-text) !important;
    color: white !important;
    border: none !important;
    border-radius: var(--pb-radius-sm) !important;
    font-weight: 700 !important;
    font-size: 1.05rem !important;
    cursor: pointer !important;
    transition: all var(--pb-transition) !important;
    box-shadow: var(--pb-shadow) !important;
}

.proton-bundle-btn:hover:not(:disabled) {
    background: var(--pb-primary) !important;
    transform: translateY(-2px);
    box-shadow: var(--pb-shadow-lg), var(--pb-glow) !important;
}

.proton-bundle-btn:disabled {
    background: #cbd5e1 !important;
    color: #f8fafc !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(4px);
}

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

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

.proton-bundle-item-row:hover {
    box-shadow: var(--pb-shadow);
    border-color: #cbd5e1;
}

.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-xs);
    margin-right: 1.25rem;
    border: 1px solid var(--pb-border);
}

.proton-bundle-item-info {
    flex: 1;
}

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

.proton-item-qty {
    display: block;
    font-size: 0.85rem;
    color: var(--pb-text-muted);
    margin-top: 0.25rem;
}

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

/* ── 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;
    }

    .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;
}