@font-face {
    font-family: 'CenturyGothicBold';
    src: url('../Fonts/centurygothic_bold.ttf') format('truetype');
    font-weight: bold;
}

@font-face {
    font-family: 'CenturyGothic';
    src: url('../Fonts/centurygothic.ttf') format('truetype');
    font-weight: normal;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: sans-serif;
    background-color: #FFFFFF;
    color: #363636;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    position: relative;
    /* На маленьких экранах padding уменьшится через media query ниже */
}

.logo {
    width: 70px;
    /* На маленьких экранах логотип немного уменьшится через media query ниже */
}

.btn-404 {          
    border-radius: 15px;
    border: 2px solid #363636;
    background: transparent;
    color: #363636;                
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 36px;
    font-size: 16px;
    transition: 0.3s;
    font-family: 'CenturyGothicBold', sans-serif;
}

.btn-404:hover {
    background: #363636;
    color: #FFFFFF;
}

.btn-404:hover img {
    filter: brightness(0) invert(1);
}

.icon-home {
    width: 30px;
    height: 30px;
}
.icon-user {
    width: 30px;
    height: 30px;
}

.error-image {
    width: 100%;        /* было 80% — увеличили */
    max-width: 1500px; /* было 900px — подняли потолок для широких мониторов */
    min-width: 280px;
    height: auto;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
}


/* ─── АДАПТИВ ───────────────────────────────────────────────────────────────

   @media — это условие. Стили внутри применяются ТОЛЬКО если условие выполнено.
   max-width: 768px означает: "применить эти стили если экран УЖЕ или равен 768px"
   768px — стандартная граница между планшетом и десктопом                     */

@media (max-width: 768px) {

    header {
        padding: 16px 20px;
    }

    .logo {
        width: 50px;
    }

    .btn-404 {
        padding: 8px 16px;
        /* было 14px 36px — сильно уменьшили, на планшете кнопки были великоваты */
        font-size: 13px;
        /* было 16px */
        border-width: 1.5px;
        /* было 2px — на маленьком экране border казался жирным */
        gap: 6px;
    }

    .icon-home {
        width: 18px;
        height: 18px;
        /* было 30px — иконка домика уменьшается вместе с кнопкой */
    }
    .icon-user {
        width: 18px;
        height: 18px;
        /* было 30px — иконка домика уменьшается вместе с кнопкой */
    }

    .error-image {
        width: 95%;
    }
}

@media (max-width: 480px) {

    header {
        padding: 10px 14px;
    }

    .logo {
        width: 36px;
        /* ещё компактнее — на маленьком телефоне логотип не должен давить на кнопку */
    }

    .btn-404 {
        padding: 7px 14px;
        font-size: 12px;
        border-width: 1px;
        /* 1px — тонкая обводка, на маленьком экране смотрится аккуратнее */
        gap: 5px;
        border-radius: 10px;
        /* было 15px — чуть меньше скругление под меньший размер кнопки */
    }

    .icon-home {
        width: 14px;
        height: 14px;
    }
    .icon-user {
        width: 14px;
        height: 14px;
    }

    .error-image {
        width: 100%;
    }

    main {
        padding: 0 8px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   CHECKOUT OVERLAY
   ═══════════════════════════════════════════════════════════════ */

.co-overlay {
    position: fixed; inset: 0; z-index: 9000;
    background: rgba(0,0,0,.75);
    backdrop-filter: blur(6px);
    display: flex; align-items: flex-start; justify-content: center;
    padding: 20px 16px 40px;
    overflow-y: auto;
    opacity: 0; transition: opacity .28s ease;
}
.co-overlay.co-open { opacity: 1; }

.co-wrap { width: 100%; max-width: 980px; margin: auto; }

.co-modal {
    background: #1c1c1e;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 20px;
    overflow: hidden;
    transform: translateY(24px) scale(.98);
    transition: transform .3s cubic-bezier(.22,.68,0,1.2);
    box-shadow: 0 32px 80px rgba(0,0,0,.55);
}
.co-overlay.co-open .co-modal { transform: translateY(0) scale(1); }

.co-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255,255,255,.07);
    background: rgba(255,255,255,.02);
}
.co-header-title {
    display: flex; align-items: center; gap: 10px;
    font-size: 17px; font-weight: 700; color: #fff;
}
.co-close-btn {
    width: 34px; height: 34px; border-radius: 10px;
    border: 1px solid rgba(255,255,255,.1);
    background: rgba(255,255,255,.05);
    color: rgba(255,255,255,.6);
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: background .2s, color .2s;
}
.co-close-btn:hover { background: rgba(255,255,255,.1); color: #fff; }

.co-body {
    display: grid; grid-template-columns: 1fr 320px; gap: 0;
}

/* ── Steps column ── */
.co-steps-col { padding: 24px; display: flex; flex-direction: column; gap: 16px; }

.co-section {
    background: rgba(255,255,255,.035);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 16px; overflow: hidden;
    animation: coFadeUp .35s ease both;
}
@keyframes coFadeUp {
    from { opacity:0; transform: translateY(10px); }
    to   { opacity:1; transform: translateY(0); }
}
.co-section:nth-child(2) { animation-delay: .07s; }
.co-section:nth-child(3) { animation-delay: .14s; }

.co-section-head {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    background: rgba(255,255,255,.02);
}
.co-num {
    width: 26px; height: 26px; border-radius: 50%;
    background: #FFBC00; color: #111;
    font-size: 13px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.co-section-title { font-size: 14px; font-weight: 600; color: #fff; }

.co-section-body { padding: 16px 18px; }

/* User card */
/* Auth prompt (non-logged-in checkout step 1) */
.co-auth-prompt {
    display: flex; flex-direction: column; gap: 12px;
    padding: 14px; border-radius: 12px;
    background: rgba(255,188,0,.06);
    border: 1.5px dashed rgba(255,188,0,.3);
}
.co-auth-prompt-text {
    display: flex; align-items: flex-start; gap: 10px;
}
.co-auth-prompt-text svg { flex-shrink: 0; margin-top: 2px; }
.co-auth-prompt-title { font-size: 14px; font-weight: 600; color: #fff; margin-bottom: 3px; }
.co-auth-prompt-sub { font-size: 12px; color: rgba(255,255,255,.45); }
.co-auth-btn {
    padding: 10px 16px; border-radius: 10px;
    background: #FFBC00; color: #111;
    border: none; font-size: 13px; font-weight: 700;
    cursor: pointer; font-family: inherit;
    transition: background .2s, transform .15s;
    align-self: flex-start;
}
.co-auth-btn:hover { background: #ffca2c; transform: translateY(-1px); }

/* Flash animation after login */
@keyframes coStepFlash {
    0%   { background: rgba(255,188,0,.18); }
    100% { background: transparent; }
}
.co-step-updated { animation: coStepFlash .6s ease; }

.co-user-card {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px; margin-bottom: 10px;
}
.co-user-ava {
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,188,0,.15);
    border: 1px solid rgba(255,188,0,.3);
    display: flex; align-items: center; justify-content: center;
    color: #FFBC00; flex-shrink: 0;
}
.co-user-info { flex: 1; min-width: 0; }
.co-user-name { font-size: 14px; font-weight: 600; color: #fff; }
.co-user-phone { font-size: 12px; color: rgba(255,255,255,.45); margin-top: 2px; }
.co-user-badge {
    font-size: 11px; font-weight: 600; padding: 3px 9px;
    border-radius: 20px;
    background: rgba(34,197,94,.15); color: #22c55e;
    border: 1px solid rgba(34,197,94,.25); white-space: nowrap;
}
.co-hint {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; color: rgba(255,255,255,.4); margin-top: 4px;
}

/* Options row */
.co-opts-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }

.co-opt {
    flex: 1; min-width: 100px;
    display: flex; align-items: center; justify-content: center;
    flex-direction: column; gap: 6px;
    padding: 12px 10px;
    border: 1.5px solid rgba(255,255,255,.1);
    border-radius: 12px; cursor: pointer;
    font-size: 13px; font-weight: 500; color: rgba(255,255,255,.6);
    background: rgba(255,255,255,.03);
    transition: border-color .2s, color .2s, background .2s, transform .15s;
    user-select: none; text-align: center;
}
.co-opt svg { opacity: .5; transition: opacity .2s; }
.co-opt:hover:not(.co-opt-disabled) {
    border-color: rgba(255,188,0,.4); color: rgba(255,255,255,.9);
    background: rgba(255,188,0,.06); transform: translateY(-1px);
}
.co-opt:hover:not(.co-opt-disabled) svg { opacity: .8; }
.co-opt.active {
    border-color: #FFBC00; color: #fff;
    background: rgba(255,188,0,.1);
}
.co-opt.active svg { opacity: 1; }
.co-opt.co-opt-disabled {
    opacity: .35; cursor: not-allowed;
    pointer-events: none;
}
.co-opt-badge {
    font-size: 10px; font-weight: 600; padding: 2px 7px;
    border-radius: 20px;
    background: rgba(255,188,0,.15); color: #FFBC00;
}
.co-opt-badge-muted { background: rgba(255,255,255,.08); color: rgba(255,255,255,.35); }

/* Delivery details */
.co-detail { animation: coFadeUp .25s ease both; }
.co-hidden { display: none !important; }

.co-pickup-card {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 12px; padding: 12px 14px;
    margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px;
}
.co-pickup-row {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: rgba(255,255,255,.7);
}
.co-map-wrap { border-radius: 12px; overflow: hidden; }

.co-label { display: block; font-size: 12px; color: rgba(255,255,255,.5); margin-bottom: 7px; }
.co-input {
    width: 100%; padding: 10px 14px;
    background: rgba(255,255,255,.06);
    border: 1.5px solid rgba(255,255,255,.1);
    border-radius: 10px; color: #fff; font-size: 14px;
    outline: none; transition: border-color .2s;
    font-family: inherit;
}
.co-input::placeholder { color: rgba(255,255,255,.3); }
.co-input:focus { border-color: #FFBC00; }
.co-input.co-input-error { border-color: #ef4444; }

.co-info-note {
    display: flex; align-items: flex-start; gap: 7px;
    font-size: 12px; color: rgba(255,255,255,.45);
    margin-top: 10px; line-height: 1.5;
}
.co-info-note svg { flex-shrink: 0; margin-top: 1px; }

/* Payment info */
.co-payment-info {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 12px 14px;
    background: rgba(255,188,0,.06);
    border: 1px solid rgba(255,188,0,.15);
    border-radius: 12px;
    animation: coFadeUp .2s ease;
}
.co-payment-info svg { flex-shrink: 0; margin-top: 2px; }
.co-payment-info-title { font-size: 13px; font-weight: 600; color: #fff; margin-bottom: 4px; }
.co-payment-info-sub { font-size: 12px; color: rgba(255,255,255,.45); line-height: 1.5; }

/* ── Sidebar ── */
.co-sidebar {
    background: rgba(255,255,255,.025);
    border-left: 1px solid rgba(255,255,255,.07);
    padding: 24px 20px;
    display: flex; flex-direction: column; gap: 0;
    position: sticky; top: 0; align-self: start;
}
.co-sidebar-title {
    font-size: 15px; font-weight: 700; color: #fff;
    margin-bottom: 14px;
}
.co-items {
    display: flex; flex-direction: column; gap: 8px;
    margin-bottom: 14px;
    max-height: 260px; overflow-y: auto;
    padding-right: 4px;
}
.co-items::-webkit-scrollbar { width: 3px; }
.co-items::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 3px; }

.co-cart-item {
    display: flex; justify-content: space-between; align-items: flex-start;
    gap: 10px; padding: 8px 10px;
    background: rgba(255,255,255,.04);
    border-radius: 9px; font-size: 12px;
}
.co-ci-name { color: rgba(255,255,255,.7); flex: 1; line-height: 1.4; }
.co-ci-price { color: #fff; font-weight: 600; white-space: nowrap; }

.co-total {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 0; border-top: 1px solid rgba(255,255,255,.07);
    font-size: 14px; color: rgba(255,255,255,.6);
    margin-bottom: 10px;
}
.co-total-val { font-size: 20px; font-weight: 700; color: #FFBC00; }

.co-delivery-note {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; color: rgba(255,255,255,.5);
    margin-bottom: 16px; min-height: 18px;
}

.co-error-msg {
    font-size: 12px; color: #ef4444;
    background: rgba(239,68,68,.1);
    border: 1px solid rgba(239,68,68,.2);
    border-radius: 8px; padding: 8px 12px;
    margin-bottom: 10px;
}

.co-confirm-btn {
    width: 100%; padding: 14px;
    background: #FFBC00; color: #111;
    border: none; border-radius: 12px;
    font-size: 15px; font-weight: 700;
    cursor: pointer; font-family: inherit;
    transition: background .2s, transform .15s, box-shadow .2s;
    box-shadow: 0 4px 20px rgba(255,188,0,.3);
    margin-bottom: 12px;
}
.co-confirm-btn:hover:not(:disabled) {
    background: #ffca2c; transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(255,188,0,.4);
}
.co-confirm-btn:active:not(:disabled) { transform: translateY(0); }
.co-confirm-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.co-legal {
    font-size: 11px; color: rgba(255,255,255,.3);
    line-height: 1.6;
}
.co-legal-a { color: rgba(255,188,0,.6); text-decoration: none; }
.co-legal-a:hover { color: #FFBC00; }

/* ── Mobile ── */
@media (max-width: 680px) {
    .co-overlay { padding: 0; align-items: flex-end; }
    .co-wrap { max-width: 100%; margin: 0; }
    .co-modal { border-radius: 20px 20px 0 0; max-height: 92vh; overflow-y: auto; }
    .co-body { grid-template-columns: 1fr; }
    .co-sidebar {
        border-left: none; border-top: 1px solid rgba(255,255,255,.07);
        position: static;
    }
    .co-steps-col { padding: 16px; }
    .co-opts-row { flex-direction: column; }
    .co-opt { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 11px 14px; }
}
}