
.checkout-page {
    padding: 2.5rem 0 5rem;
    min-height: 80vh;
    background: var(--bg-primary);
    font-family: inherit;
    color: var(--text-primary);
}

.checkout-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.checkout-topbar h1 {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.checkout-subtitle {
    margin: 0.35rem 0 0;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 400;
}

.checkout-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.2s;
}

.checkout-back:hover {
    color: var(--text-primary);
}

.checkout-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 1.5rem;
    align-items: start;
}

.checkout-main,
.checkout-summary-section {
    min-width: 0;
}

.checkout-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.checkout-panel:last-child {
    margin-bottom: 0;
}

.checkout-panel-title {
    margin: 0 0 1.25rem;
    font-size: 1.125rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkout-panel-title i {
    color: var(--accent-color);
    font-size: 1.2rem;
}

.guest-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    margin-bottom: 1rem;
    border-radius: 999px;
    background: rgba(var(--accent-rgb), 0.1);
    color: var(--accent-color);
    font-size: 0.75rem;
    font-weight: 600;
}

.co-input-group {
    margin-bottom: 1rem;
}

.co-input-group:last-child {
    margin-bottom: 0;
}

.co-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.co-input {
    width: 100%;
    padding: 0.8rem 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--input-bg, var(--bg-secondary));
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9375rem;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.co-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.co-input::placeholder {
    color: var(--text-muted);
}

.co-error {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.875rem 1rem;
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger, #ef4444);
    font-size: 0.875rem;
    line-height: 1.45;
}

.checkout-payment-methods {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.checkout-payment-methods.is-single .pm-box {
    cursor: default;
}

.pm-box {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1rem 1.05rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-secondary);
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.pm-box:hover:not(.is-disabled) {
    border-color: rgba(var(--accent-rgb), 0.45);
}

.pm-box.pm-active {
    border-color: var(--accent-color);
    background: rgba(var(--accent-rgb), 0.08);
    box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.12);
}

.pm-box.is-disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.pm-box {
    position: relative;
}

/* Radyo gorunmez ama klavyeyle odaklanabilir; odak halkasi kartin uzerinde */
.pm-box input[type="radio"] {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.pm-box.is-odak {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* ayri kural: :has() desteklenmezse yukaridaki (JS ile eklenen .is-odak) kural dusmesin */
.pm-box:has(input:focus-visible) {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

.pm-info {
    display: flex;
    flex-direction: column;
}

.pm-icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--accent-color);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.pm-info {
    flex: 1;
    min-width: 0;
}

.pm-name {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--text-primary);
}

.pm-desc {
    margin-top: 0.15rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.pm-meta {
    text-align: right;
    flex-shrink: 0;
}

.pm-meta-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.pm-meta-value {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--success, #10b981);
    font-variant-numeric: tabular-nums;
}

.pm-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: transparent;
    transition: all 0.2s;
}

.pm-box.pm-active .pm-check {
    border-color: var(--accent-color);
    background: var(--accent-color);
    color: #04140a;
}

.summary-card {
    position: sticky;
    top: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1.5rem;
}

.summary-title {
    margin: 0 0 1.25rem;
    font-size: 1.125rem;
    font-weight: 700;
}

.summary-items {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
    margin-bottom: 1rem;
}

.summary-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.summary-item-thumb {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
}

.summary-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.summary-item-info {
    flex: 1;
    min-width: 0;
}

.summary-item-name {
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--text-primary);
}

.summary-item-meta {
    margin-top: 0.2rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.summary-item-price {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.summary-row.total {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.summary-row.total .total-amount {
    font-size: 1.25rem;
    font-variant-numeric: tabular-nums;
}

.btn-checkout {
    width: 100%;
    margin-top: 1rem;
    border: none;
    border-radius: 10px;
    padding: 0.95rem 1rem;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background 0.2s, transform 0.2s;
}

.checkout-page .btn-checkout.btn-active {
    background: var(--accent-color);
    color: #04140a;
}

.checkout-page .btn-checkout.btn-active:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(var(--accent-rgb), 0.28);
}

.checkout-page .btn-checkout:hover:not(.btn-active) {
    box-shadow: none;
}

.btn-checkout.btn-disabled,
.btn-checkout:disabled {
    background: var(--bg-hover);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

.checkout-page .co-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.12);
}

.checkout-page .co-error {
    border-color: rgba(239, 68, 68, 0.25);
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger);
}

/* Ozet DOM'da formdan once gelir: masaustunde sagda, mobilde ustte (odeme dugmesinin altina dusmez) */
.odm-yerlesim {
    grid-template-areas: "ana yan";
}

.odm-yerlesim > .odm-ana {
    grid-area: ana;
}

.odm-yerlesim > .odm-yan {
    grid-area: yan;
}

.odm-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

@media (max-width: 1024px) {
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .odm-yerlesim {
        grid-template-areas: "yan" "ana";
    }

    .summary-card {
        position: static;
    }
}

@media (max-width: 768px) {
    .checkout-page {
        padding: 1.25rem 0 3rem;
    }

    .checkout-page .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .checkout-topbar {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 1.25rem;
    }

    .checkout-topbar h1 {
        font-size: 1.25rem;
    }

    .checkout-panel,
    .summary-card {
        padding: 1.15rem 1rem;
        border-radius: 12px;
    }

    .pm-box {
        padding: 0.9rem;
    }

    .pm-icon-wrap {
        width: 38px;
        height: 38px;
        font-size: 1.05rem;
    }

    .summary-item-thumb {
        width: 48px;
        height: 48px;
    }
}
