/* ==========================================================================
   PLACE ORDER WIZARD — Interactive homepage section
   ========================================================================== */

.place-order-section {
    position: relative;
    padding: 100px 0;
    overflow: hidden;
}

.place-order-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 20%, rgba(212, 175, 55, 0.12), transparent 55%),
        radial-gradient(ellipse 60% 50% at 85% 80%, rgba(212, 175, 55, 0.08), transparent 50%),
        linear-gradient(165deg, #0f0e0c 0%, #1a1814 40%, #12110f 100%);
    z-index: 0;
}

.place-order-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.5;
}

.place-order-orbs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.po-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    animation: poOrbFloat 10s ease-in-out infinite;
}

.po-orb--a {
    width: 280px;
    height: 280px;
    background: rgba(212, 175, 55, 0.18);
    top: 15%;
    left: 8%;
}

.po-orb--b {
    width: 200px;
    height: 200px;
    background: rgba(212, 175, 55, 0.1);
    bottom: 20%;
    right: 12%;
    animation-delay: -3s;
}

.po-orb--c {
    width: 140px;
    height: 140px;
    background: rgba(255, 255, 255, 0.06);
    top: 55%;
    left: 55%;
    animation-delay: -6s;
}

@keyframes poOrbFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(20px, -24px); }
}

.place-order-inner {
    position: relative;
    z-index: 1;
}

.place-order-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 48px;
}

.place-order-header .section-kicker {
    color: var(--color-gold);
}

.place-order-header h2 {
    font-family: var(--font-display);
    font-size: clamp(1.85rem, 4vw, 2.75rem);
    color: var(--color-white);
    margin: 12px 0 16px;
    line-height: 1.15;
}

.place-order-header p {
    color: rgba(255, 255, 255, 0.65);
    font-size: 1.02rem;
    line-height: 1.65;
}

/* Wizard card */
.place-order-wizard {
    max-width: 820px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 20px;
    padding: 36px 32px 28px;
    backdrop-filter: blur(16px);
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: box-shadow 0.5s ease, border-color 0.5s ease;
    animation: wizardBorderPulse 5s ease-in-out infinite;
}

@keyframes wizardBorderPulse {
    0%, 100% {
        border-color: rgba(212, 175, 55, 0.2);
        box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    }
    50% {
        border-color: rgba(212, 175, 55, 0.38);
        box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45), 0 0 48px rgba(212, 175, 55, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }
}

.place-order-wizard.po-success {
    border-color: rgba(37, 211, 102, 0.5);
    box-shadow: 0 0 60px rgba(37, 211, 102, 0.15), 0 24px 80px rgba(0, 0, 0, 0.45);
}

/* Progress */
.place-order-progress {
    margin-bottom: 32px;
}

.place-order-progress-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.place-order-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-gold-dark), var(--color-gold), #f0d878);
    border-radius: 4px;
    transition: width 0.65s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.5);
}

.place-order-progress-fill.po-pulse {
    animation: poProgressPulse 0.6s ease;
}

@keyframes poProgressPulse {
    0% { box-shadow: 0 0 8px rgba(212, 175, 55, 0.4); }
    50% { box-shadow: 0 0 28px rgba(212, 175, 55, 0.85); }
    100% { box-shadow: 0 0 12px rgba(212, 175, 55, 0.5); }
}

/* Step dots */
.place-order-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 28px;
}

.po-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.po-dot.active {
    background: var(--color-gold);
    border-color: var(--color-gold);
    transform: scale(1.25);
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.6);
}

.po-dot.done {
    background: rgba(212, 175, 55, 0.45);
    border-color: rgba(212, 175, 55, 0.5);
}

.place-order-step-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 600;
}

/* Steps — stacked for crossfade transitions */
.place-order-steps-wrap {
    position: relative;
    min-height: 280px;
    transition: min-height 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.place-order-step {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(40px) scale(0.98);
    filter: blur(4px);
    transition: none;
    pointer-events: none;
}

.place-order-step.active {
    position: relative;
    opacity: 1;
    visibility: visible;
    transform: translateX(0) scale(1);
    filter: blur(0);
    pointer-events: auto;
    animation: poStepEnterFwd 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.place-order-step.po-exit-fwd {
    position: absolute;
    animation: poStepExitFwd 0.4s cubic-bezier(0.55, 0, 1, 0.45) forwards;
    pointer-events: none;
}

.place-order-step.po-exit-back {
    position: absolute;
    animation: poStepExitBack 0.4s cubic-bezier(0.55, 0, 1, 0.45) forwards;
    pointer-events: none;
}

.place-order-step.po-enter-back {
    animation: poStepEnterBack 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes poStepEnterFwd {
    from { opacity: 0; transform: translateX(48px) scale(0.96); filter: blur(6px); }
    to { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); }
}

@keyframes poStepEnterBack {
    from { opacity: 0; transform: translateX(-48px) scale(0.96); filter: blur(6px); }
    to { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); }
}

@keyframes poStepExitFwd {
    from { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); }
    to { opacity: 0; transform: translateX(-40px) scale(0.97); filter: blur(4px); }
}

@keyframes poStepExitBack {
    from { opacity: 1; transform: translateX(0) scale(1); filter: blur(0); }
    to { opacity: 0; transform: translateX(40px) scale(0.97); filter: blur(4px); }
}

/* Stagger option cards on step enter */
.place-order-step.active .place-order-option {
    opacity: 0;
    transform: translateY(16px);
    animation: poOptionIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: calc(var(--oi, 0) * 0.06s + 0.12s);
}

@keyframes poOptionIn {
    to { opacity: 1; transform: translateY(0); }
}

.place-order-option.po-just-selected {
    animation: poSelectPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes poSelectPop {
    0% { transform: scale(1); }
    40% { transform: scale(1.04) translateY(-4px); }
    100% { transform: translateY(-2px) scale(1.02); }
}

/* Ripple on tap */
.po-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.35);
    transform: scale(0);
    animation: poRipple 0.55s ease-out forwards;
    pointer-events: none;
    z-index: 3;
}

@keyframes poRipple {
    to { transform: scale(2.8); opacity: 0; }
}

.place-order-question {
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: var(--color-white);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.place-order-question i {
    color: var(--color-gold);
    font-size: 1.1rem;
}

.place-order-hint {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.88rem;
    margin-bottom: 24px;
}

/* Option grid */
.place-order-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.place-order-options--compact {
    grid-template-columns: 1fr;
}

.place-order-options--stack {
    grid-template-columns: 1fr;
}

.place-order-options--multi .place-order-option.selected {
    border-color: var(--color-gold);
    background: rgba(212, 175, 55, 0.15);
}

.place-order-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 18px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    color: rgba(255, 255, 255, 0.85);
    transition:
        transform 0.3s cubic-bezier(0.25, 1, 0.5, 1),
        border-color 0.3s ease,
        background 0.3s ease,
        box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.place-order-options--compact .place-order-option,
.place-order-options--stack .place-order-option {
    flex-direction: row;
    align-items: center;
}

.place-order-option::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), transparent 60%);
    opacity: 0;
    transition: opacity 0.35s ease;
}

.place-order-option:hover {
    transform: translateY(-3px);
    border-color: rgba(212, 175, 55, 0.45);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.place-order-option:hover::before {
    opacity: 1;
}

.place-order-option.selected {
    border-color: var(--color-gold);
    background: rgba(212, 175, 55, 0.12);
    box-shadow: 0 0 0 1px var(--color-gold), 0 12px 32px rgba(212, 175, 55, 0.15);
    transform: translateY(-2px) scale(1.02);
}

.place-order-option.selected::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 0.75rem;
    color: var(--color-gold);
    animation: poCheckPop 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

@keyframes poCheckPop {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.po-option-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(212, 175, 55, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gold);
    font-size: 1rem;
    flex-shrink: 0;
}

.po-option-label {
    font-size: 0.92rem;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.po-option-sub {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
    position: relative;
    z-index: 1;
}

/* Step 5 split */
.place-order-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.place-order-split-label {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-gold);
    margin-bottom: 12px;
    font-weight: 600;
}

/* Form step */
.place-order-form .form-control {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--color-white);
}

.place-order-form .form-control:focus {
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.place-order-form label {
    color: rgba(255, 255, 255, 0.7);
}

.place-order-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.po-shake {
    animation: poShake 0.45s ease;
}

@keyframes poShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* Summary */
.place-order-summary {
    margin-top: 20px;
    padding: 16px;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 12px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.place-order-summary.visible {
    opacity: 1;
    transform: translateY(0);
}

.po-summary-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-gold);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.po-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.82rem;
}

.po-summary-row:last-child {
    border-bottom: none;
}

.po-summary-row span {
    color: rgba(255, 255, 255, 0.5);
}

.po-summary-row strong {
    color: rgba(255, 255, 255, 0.9);
    text-align: right;
    font-weight: 600;
}

/* Navigation */
.place-order-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.place-order-back {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.2);
}

.place-order-back:hover:not(:disabled) {
    border-color: var(--color-gold);
    color: var(--color-gold);
}

.place-order-back:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.place-order-next,
.place-order-submit {
    margin-left: auto;
    min-width: 160px;
    justify-content: center;
    gap: 8px;
}

.place-order-submit {
    background: #25D366;
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    font-family: inherit;
    font-size: 0.95rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.place-order-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(37, 211, 102, 0.35);
}

/* Trust strip */
.place-order-trust {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px 32px;
    margin-top: 36px;
}

.place-order-trust span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
    display: flex;
    align-items: center;
    gap: 8px;
}

.place-order-trust i {
    color: var(--color-gold);
}

@media (max-width: 768px) {
    .place-order-section {
        padding: 72px 0;
    }

    .place-order-wizard {
        padding: 24px 18px 20px;
        border-radius: 16px;
    }

    .place-order-options {
        grid-template-columns: 1fr;
    }

    .place-order-split {
        grid-template-columns: 1fr;
    }

    .place-order-nav {
        flex-wrap: wrap;
    }

    .place-order-next,
    .place-order-submit {
        width: 100%;
        margin-left: 0;
    }

    .place-order-back {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .place-order-step.active {
        animation: none;
    }

    .place-order-option:hover,
    .place-order-option.selected {
        transform: none;
    }
}
