/* Order Placement — App-like Checkout */
:root {
    --ord-primary: #0B1F3A;
    --ord-secondary: #102C57;
    --ord-accent: #FF6B00;
    --ord-light: #F8FAFC;
    --ord-gray: #475569;
    --ord-border: rgba(11, 31, 58, 0.1);
    --ord-radius: 0.85rem;
    --ord-shadow: 0 20px 56px rgba(11, 31, 58, 0.1);
}

body.site-order-placement {
    --navy: var(--ord-primary);
    --accent: var(--ord-accent);
    background: var(--ord-light);
}

.ord-hero {
    background: linear-gradient(135deg, var(--ord-primary), var(--ord-secondary));
    padding: clamp(2.5rem, 6vw, 4rem) 0;
    color: #fff;
}
.ord-eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.7rem;
    font-weight: 700;
    color: #ff8533;
    margin-bottom: 0.65rem;
}
.ord-hero__title {
    font-size: clamp(1.85rem, 4vw, 2.75rem);
    font-weight: 800;
    margin-bottom: 0.65rem;
}
.ord-hero__lead {
    color: rgba(255,255,255,0.82);
    max-width: 560px;
    margin-bottom: 1.25rem;
}
.ord-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.25rem;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.75);
}
.ord-trust i { color: var(--ord-accent); margin-right: 0.35rem; }

.ord-section { padding: clamp(2rem, 5vw, 3.5rem) 0 clamp(3rem, 8vw, 5rem); }
.ord-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.5rem;
    align-items: start;
}
.ord-card {
    background: #fff;
    border-radius: calc(var(--ord-radius) * 1.25);
    border: 1px solid var(--ord-border);
    box-shadow: var(--ord-shadow);
    padding: clamp(1.25rem, 3vw, 2rem);
}

.ord-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 2rem;
}
.ord-step {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ord-gray);
    padding: 0.65rem 0.35rem;
    border-radius: 0.55rem;
    background: var(--ord-light);
}
.ord-step span {
    display: block;
    width: 1.65rem;
    height: 1.65rem;
    line-height: 1.65rem;
    border-radius: 50%;
    background: #e2e8f0;
    color: var(--ord-gray);
    font-size: 0.75rem;
    margin: 0 auto 0.35rem;
}
.ord-step.is-active {
    background: rgba(255,107,0,0.08);
    color: var(--ord-primary);
}
.ord-step.is-active span,
.ord-step.is-done span {
    background: var(--ord-accent);
    color: #fff;
}
.ord-step.is-done { color: var(--ord-primary); }

.ord-panel { display: none; }
.ord-panel.is-active { display: block; animation: ordFade 0.35s ease; }
@keyframes ordFade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}
.ord-panel__title {
    font-size: clamp(1.15rem, 2.5vw, 1.45rem);
    font-weight: 800;
    color: var(--ord-primary);
    margin-bottom: 1rem;
}
.ord-panel__title--sm { margin-bottom: 0.35rem; }
.ord-panel__desc { color: var(--ord-gray); font-size: 0.92rem; margin-bottom: 1rem; }

.ord-grid { display: grid; gap: 1rem; }
.ord-grid--2 { grid-template-columns: 1fr 1fr; }
.ord-field--full { grid-column: 1 / -1; }
.ord-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ord-primary);
    margin-bottom: 0.4rem;
}
.ord-req { color: #dc3545; }
.ord-input {
    width: 100%;
    min-height: 48px;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--ord-border);
    border-radius: 0.55rem;
    font-size: 1rem;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.ord-input:focus {
    outline: none;
    border-color: var(--ord-accent);
    box-shadow: 0 0 0 3px rgba(255,107,0,0.12);
}
.ord-input.is-invalid { border-color: #dc3545; }
.ord-error { color: #dc3545; font-size: 0.82rem; margin-top: 0.35rem; }
.ord-mb { margin-bottom: 1rem; }
.ord-mt { margin-top: 1.25rem; }

.ord-items { display: grid; gap: 1rem; margin-bottom: 1rem; }
.ord-item {
    border: 1px solid var(--ord-border);
    border-radius: var(--ord-radius);
    padding: 1rem;
    background: var(--ord-light);
}
.ord-item__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
}
.ord-item__label { color: var(--ord-primary); font-size: 0.92rem; }
.ord-item__remove {
    border: 0;
    background: none;
    color: #dc3545;
    font-size: 0.82rem;
    font-weight: 600;
    min-height: 44px;
    padding: 0 0.5rem;
    cursor: pointer;
}
.ord-item__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.75rem;
}

.ord-add-item {
    width: 100%;
    min-height: 52px;
    border: 2px dashed rgba(255,107,0,0.45);
    background: rgba(255,107,0,0.05);
    color: var(--ord-accent);
    font-weight: 700;
    border-radius: var(--ord-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.2s ease;
}
.ord-add-item:hover { background: rgba(255,107,0,0.1); }

.ord-alert {
    background: #fff3cd;
    border: 1px solid #ffecb5;
    color: #664d03;
    padding: 0.85rem 1rem;
    border-radius: 0.55rem;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.ord-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--ord-border);
}
.ord-actions--split { justify-content: space-between; }

.ord-payment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.ord-payment-card { cursor: pointer; margin: 0; }
.ord-payment-card input { position: absolute; opacity: 0; pointer-events: none; }
.ord-payment-card__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.75rem;
    min-height: 88px;
    border: 2px solid var(--ord-border);
    border-radius: var(--ord-radius);
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--ord-primary);
    text-align: center;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.ord-payment-card.is-selected .ord-payment-card__inner,
.ord-payment-card input:checked + .ord-payment-card__inner {
    border-color: var(--ord-accent);
    background: rgba(255,107,0,0.06);
}
.ord-payment-card__inner i { font-size: 1.35rem; color: var(--ord-accent); }

.ord-gateway-notice {
    background: rgba(16,44,87,0.06);
    border: 1px solid var(--ord-border);
    padding: 1rem;
    border-radius: 0.55rem;
    font-size: 0.9rem;
    color: var(--ord-gray);
    margin-bottom: 1rem;
}
.ord-gateway-notice i { color: var(--ord-accent); margin-right: 0.35rem; }

.ord-manual {
    background: var(--ord-light);
    border: 1px solid var(--ord-border);
    border-radius: var(--ord-radius);
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.ord-manual__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ord-primary);
    margin-bottom: 1rem;
}

.ord-summary-wrap { position: relative; }
.ord-summary {
    background: #fff;
    border: 1px solid var(--ord-border);
    border-radius: calc(var(--ord-radius) * 1.25);
    padding: 1.25rem;
    box-shadow: var(--ord-shadow);
    position: sticky;
    top: 5.5rem;
}
.ord-summary__title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--ord-primary);
    margin-bottom: 1rem;
}
.ord-summary__row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--ord-gray);
    border-bottom: 1px solid var(--ord-border);
}
.ord-summary__row--total {
    border-bottom: 0;
    padding-top: 0.85rem;
    font-size: 1.05rem;
    color: var(--ord-primary);
    font-weight: 700;
}
.ord-summary__note {
    font-size: 0.75rem;
    color: var(--ord-gray);
    margin: 0.85rem 0 0;
    line-height: 1.5;
}

.ord-summary-toggle {
    display: none;
    width: 100%;
    min-height: 52px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    border: 0;
    border-top: 1px solid var(--ord-border);
    background: #fff;
    padding: 0.85rem 1rem;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    box-shadow: 0 -8px 24px rgba(11,31,58,0.08);
}

@media (max-width: 991.98px) {
    .ord-layout { grid-template-columns: 1fr; }
    .ord-item__grid { grid-template-columns: 1fr 1fr; }
    .ord-grid--2 { grid-template-columns: 1fr; }
    .ord-steps { grid-template-columns: repeat(2, 1fr); }
    .ord-summary {
        display: none;
        position: fixed;
        bottom: calc(52px + env(safe-area-inset-bottom, 0px));
        left: 0;
        right: 0;
        z-index: 1039;
        border-radius: 1rem 1rem 0 0;
        max-height: 50vh;
        overflow-y: auto;
    }
    .ord-summary.is-open { display: block; }
    .ord-summary-toggle {
        display: flex;
        padding-bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
        min-height: calc(52px + env(safe-area-inset-bottom, 0px));
    }
    .ord-section { padding-bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 575.98px) {
    .ord-item__grid { grid-template-columns: 1fr; }
    .ord-payment-grid { grid-template-columns: 1fr 1fr; }
    .ord-actions { flex-direction: column; }
    .ord-actions .btn { width: 100%; min-height: 48px; }
}

@media (max-width: 374.98px) {
    .ord-steps span + br { display: none; }
    .ord-step { font-size: 0.65rem; }
}
