:root {
    --primary-main: #059669;
    --primary-light: #10b981;
    --primary-soft: rgba(16, 185, 129, 0.12);
    --primary-dark: #047857;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --checkout-radius: 16px;
    --checkout-radius-lg: 24px;
    --checkout-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { min-height: 0; min-width: 0; box-sizing: border-box; }

body.checkout-page {
    background: linear-gradient(165deg, var(--bg-page) 0%, #f1f5f9 100%);
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
}

.checkout-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.checkout-header .header-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkout-header .brand-logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-main);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: color var(--checkout-transition);
}

.checkout-header .brand-logo:hover {
    color: var(--primary-dark);
}

.checkout-header .back-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 99px;
    transition: all var(--checkout-transition);
    border: 1px solid transparent;
}

.checkout-header .back-link:hover {
    color: var(--primary-main);
    background: var(--bg-card);
    border-color: var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.checkout-main {
    max-width: 1100px;
    margin: 0 auto 4rem;
    padding: 0 1.5rem;
}

/* Hero Section */
.checkout-hero {
    text-align: center;
    padding: 3rem 0 2rem;
}

.checkout-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}

.checkout-subtitle {
    font-size: 1.0625rem;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Progress Indicator updated */
.checkout-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 2;
}

.step-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-muted);
    transition: all var(--checkout-transition);
}

.step-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color var(--checkout-transition);
}

.progress-step.active .step-icon {
    background: var(--primary-main);
    border-color: var(--primary-main);
    color: white;
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.progress-step.active .step-label {
    color: var(--primary-main);
    font-weight: 600;
}

.progress-line {
    flex: 1;
    height: 2px;
    background: var(--border-color);
    margin: 0 1rem;
    transform: translateY(-10px);
    transition: background var(--checkout-transition);
}

/* Layout */
.checkout-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .checkout-grid { grid-template-columns: 1fr; }
    .checkout-hero { padding: 2rem 0; }
}

.card {
    background: var(--bg-card);
    border-radius: var(--checkout-radius-lg);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0,0,0,0.02);
    padding: 2.5rem;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.summary-card {
    position: sticky;
    top: 6rem;
    padding: 2rem;
}

@media (max-width: 600px) {
    .card { padding: 1.5rem; }
}

/* Typography & Titles */
.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    margin-top: 2.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-main);
}

.section-title:first-child { margin-top: 0; }
.section-title svg { color: var(--primary-main); flex-shrink: 0; }

/* Package Selection */
.package-selector {
    display: grid;
    gap: 1rem;
}

.package-card {
    border: 2px solid var(--border-color);
    border-radius: var(--checkout-radius);
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    transition: all var(--checkout-transition);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: var(--bg-card);
    position: relative;
    overflow: hidden;
}

.package-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.package-card.selected {
    border-color: var(--primary-main);
    background: #f0fdf4;
}

.package-card.selected::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-main);
}

.package-radio {
    accent-color: var(--primary-main);
    width: 1.25rem;
    height: 1.25rem;
    transform: scale(1.1);
    cursor: pointer;
}

.package-info { flex: 1; }
.package-name {
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    color: var(--text-main);
}
.package-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-main);
}
.package-price-hint { font-size: 0.75rem; font-weight: 500; color: var(--text-muted); }

/* Forms & Floating Labels */
.checkout-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 600px) {
    .checkout-form .form-row { grid-template-columns: 1fr; }
}

.form-group { margin-bottom: 1.5rem; }

/* Normal labels for selects/checkboxes */
.form-label:not(.form-floating .form-label) {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
    color: var(--text-main);
}

/* Floating Label Styles */
.form-floating {
    position: relative;
}

.form-floating .form-input {
    width: 100%;
    padding: 1.25rem 1rem 0.625rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--checkout-radius);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--checkout-transition);
    background: var(--bg-card);
    color: var(--text-main);
    line-height: 1.5;
}

.form-floating .form-label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
    pointer-events: none;
    transition: all var(--checkout-transition);
    transform-origin: left top;
}

/* Float label when focused or has value */
.form-floating .form-input:focus ~ .form-label,
.form-floating .form-input:not(:placeholder-shown) ~ .form-label {
    top: 6px;
    transform: translateY(0) scale(0.75);
    color: var(--primary-main);
    font-weight: 500;
}

/* Standard Input Overrides */
.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--checkout-radius);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--checkout-transition);
    background: var(--bg-card);
}

.form-input:hover { border-color: #cbd5e1; }
.form-input:focus {
    outline: none;
    border-color: var(--primary-main);
    box-shadow: 0 0 0 4px var(--primary-soft);
}
.form-input:invalid:not(:placeholder-shown) {
    border-color: #f87171;
    box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.1);
}

textarea.form-input {
    resize: vertical;
}
.form-floating textarea.form-input {
    padding-top: 1.5rem;
}
.form-floating textarea.form-input ~ .form-label {
    top: 1rem;
    transform: translateY(0);
}

.input-helper, .optional-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 400;
}

.field-error {
    font-size: 0.8125rem;
    color: #dc2626;
    margin-top: 0.35rem;
    display: block;
    font-weight: 500;
    animation: slideDown 0.2s ease-out;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Password Section */
.password-field-group { position: relative; }
.password-actions {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 0.25rem;
    z-index: 5;
}

.btn-password-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--checkout-transition);
}
.btn-password-action:hover {
    background: #f1f5f9;
    color: var(--text-main);
}
.password-warning {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: 0.75rem;
    line-height: 1.5;
    background: #fff8f1;
    padding: 0.75rem;
    border-radius: 8px;
    border-left: 3px solid #f59e0b;
}

/* Custom Checkbox */
.checkbox-group { margin-top: 1.5rem; }
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9375rem;
    cursor: pointer;
    line-height: 1.5;
    color: var(--text-main);
}
.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
    margin: 0;
}
.checkbox-custom {
    position: relative;
    top: 2px;
    width: 20px;
    height: 20px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    flex-shrink: 0;
    transition: all var(--checkout-transition);
    display: inline-block;
}
.checkbox-label:hover input ~ .checkbox-custom {
    border-color: var(--primary-main);
}
.checkbox-label input:checked ~ .checkbox-custom {
    background: var(--primary-main);
    border-color: var(--primary-main);
}
.checkbox-custom:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.checkbox-label input:checked ~ .checkbox-custom:after {
    display: block;
    animation: checkAnim 0.2s ease-out;
}
@keyframes checkAnim {
    0% { opacity: 0; transform: rotate(45deg) scale(0.5); }
    100% { opacity: 1; transform: rotate(45deg) scale(1); }
}
.checkbox-label a { color: var(--primary-main); text-decoration: none; font-weight: 500; transition: color var(--checkout-transition);}
.checkbox-label a:hover { text-decoration: underline; color: var(--primary-dark);}

/* Summary Card & Discount */
.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.875rem;
    color: var(--text-muted);
    font-size: 0.9375rem;
}
.summary-divider {
    height: 1px;
    background: var(--border-color);
    margin: 1.5rem 0;
}
.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 1.375rem;
    color: var(--text-main);
    margin-bottom: 1.5rem;
}

.discount-section {
    margin-top: 1.5rem;
    background: #f8fafc;
    border-radius: 12px;
    padding: 1rem;
    border: 1px dashed var(--border-color);
}

.discount-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.25rem 0.25rem 0.25rem 0.75rem;
    transition: border var(--checkout-transition), box-shadow var(--checkout-transition);
}

.discount-input-wrapper:focus-within {
    border-color: var(--primary-main);
    box-shadow: 0 0 0 3px var(--primary-soft);
}

.discount-icon { color: var(--text-muted); margin-right: 0.5rem; }
.discount-input {
    flex: 1;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 0.9375rem;
    background: transparent;
    padding: 0.5rem 0;
}
.btn-discount-apply {
    padding: 0.6rem 1.25rem;
    background: linear-gradient(135deg, var(--primary-main) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--checkout-transition);
    box-shadow: 0 4px 10px rgba(5, 150, 105, 0.2);
}
.btn-discount-apply:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(5, 150, 105, 0.3);
}
.btn-discount-apply:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(5, 150, 105, 0.2);
}
.btn-discount-apply:disabled { opacity: 0.7; cursor: wait; box-shadow: none; transform: none; }
.form-message { font-size: 0.875rem; margin-top: 0.5rem; font-weight: 500; }

.btn-checkout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 1.125rem;
    background: var(--primary-main);
    color: white;
    border: none;
    border-radius: var(--checkout-radius);
    font-size: 1.125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--checkout-transition);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
    position: relative;
    overflow: hidden;
}

.btn-checkout::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: none;
}
.btn-checkout:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(5, 150, 105, 0.35);
}
.btn-checkout:hover:not(:disabled)::after {
    animation: shine 1.5s infinite;
}
@keyframes shine { 100% { left: 200%; } }

.btn-checkout:disabled {
    background: #cbd5e1;
    box-shadow: none;
    cursor: not-allowed;
    transform: translateY(0);
}

.submit-hint {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 0.75rem;
}

.trust-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap;
}

.trust-badges img {
    height: 24px;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all var(--checkout-transition);
}

.trust-badges img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* Utilities */
.error-banner {
    background: #fef2f2;
    color: #b91c1c;
    padding: 1rem 1.5rem;
    border-radius: var(--checkout-radius);
    margin-bottom: 1.5rem;
    border: 1px solid #fecaca;
    font-weight: 500;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Instructor selection specific */
.instructor-quantity-selector {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--border-color);
}
.subsection-title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.25rem;
}
.subsection-helper {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.package-selection-guide {
    margin-bottom: 0.25rem;
}
.package-selection-guide .subsection-title {
    margin-bottom: 0.5rem;
}
.package-selection-guide .subsection-helper {
    margin-bottom: 0.75rem;
}
.package-selection-guide .subsection-helper:last-of-type {
    margin-bottom: 1.25rem;
}

/* Paket rehberi: bilgi kutusu ile aynı görsel dil */
.checkout-guide-panel {
    background: var(--primary-soft);
    border: 1px solid rgba(5, 150, 105, 0.2);
    border-radius: var(--checkout-radius);
    padding: 1rem 1.125rem;
    margin-bottom: 1.25rem;
}
.package-selection-guide.checkout-guide-panel .subsection-title {
    margin-top: 0;
}
.package-selection-guide.checkout-guide-panel .subsection-helper:last-of-type {
    margin-bottom: 0;
}

.checkout-info-box {
    background: var(--primary-soft);
    border: 1px solid rgba(5, 150, 105, 0.2);
    border-radius: var(--checkout-radius);
    padding: 1rem 1.125rem;
    margin-bottom: 1.25rem;
}
.checkout-info-box-header {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.625rem;
}
.checkout-info-box-icon {
    flex-shrink: 0;
    color: var(--primary-main);
    margin-top: 0.125rem;
}
.checkout-info-box-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
    flex: 1;
    line-height: 1.35;
}
.checkout-info-box-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0 0 0.5rem;
}
.checkout-info-box-text:last-child {
    margin-bottom: 0;
}
