/* =========================================================
   Checkout Wizard — shared styles (Sepet → Adres → Ödeme)
   Brand: #1d396d
   ========================================================= */

:root {
    --checkout-brand: #1d396d;
    --checkout-brand-dark: #0f2847;
    --checkout-muted: #6b7280;
    --checkout-border: #e5e7eb;
    --checkout-bg: #f5f7fb;
    --checkout-success: #16a34a;
    --checkout-danger: #dc2626;
    --checkout-radius: 12px;
    --checkout-shadow: 0 4px 16px rgba(29, 57, 109, 0.07);
    --checkout-fs: 16px;
    --checkout-fs-sm: 14px;
    --checkout-fs-lg: 17px;
    --checkout-fs-xl: 20px;
}

.checkout-shell {
    background: var(--checkout-bg);
    padding: 32px 0 72px;
    min-height: 50vh;
    font-size: var(--checkout-fs);
    line-height: 1.5;
    color: #1f2937;
}

.checkout-shell * {
    box-sizing: border-box;
}

.checkout-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.checkout-layout {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    width: 100%;
    max-width: none;
    margin: 0;
}

.checkout-sidebar {
    width: 270px;
    flex-shrink: 0;
    position: sticky;
    top: 24px;
}

.checkout-main {
    flex: 1;
    min-width: 0;
    font-size: var(--checkout-fs);
}

/* --------- Stepper --------- */
.checkout-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-radius: var(--checkout-radius);
    padding: 20px 16px;
    box-shadow: var(--checkout-shadow);
    border: 1px solid var(--checkout-border);
}

.checkout-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    padding-bottom: 24px;
    text-decoration: none;
    color: inherit;
    pointer-events: none;
}

.checkout-step:last-child {
    padding-bottom: 0;
}

.checkout-step:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 15px;
    top: 34px;
    width: 2px;
    height: calc(100% - 18px);
    background: var(--checkout-border);
    z-index: 0;
}

.checkout-step.is-completed:not(:last-child)::after,
.checkout-step.is-active:not(:last-child)::after {
    background: var(--checkout-brand);
}

.checkout-step.is-completed {
    pointer-events: auto;
    cursor: pointer;
}

.checkout-step.is-completed:hover .checkout-step-title {
    color: var(--checkout-brand);
}

.checkout-step-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #d1d5db;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    z-index: 1;
    transition: background 0.2s ease;
}

.checkout-step.is-completed .checkout-step-circle {
    background: var(--checkout-brand);
}

.checkout-step.is-active .checkout-step-circle {
    background: var(--checkout-brand);
    box-shadow: 0 0 0 3px rgba(29, 57, 109, 0.14);
}

.checkout-step-body {
    padding-top: 4px;
    min-width: 0;
}

.checkout-step-title {
    margin: 0;
    font-size: 15px !important;
    font-weight: 650;
    color: #9ca3af;
    line-height: 1.3;
}

.checkout-step.is-completed .checkout-step-title,
.checkout-step.is-active .checkout-step-title {
    color: #111827;
}

.checkout-step-desc {
    margin: 4px 0 0;
    font-size: 13px !important;
    color: var(--checkout-muted);
    line-height: 1.4;
}

.checkout-security {
    margin-top: 14px;
    background: #fff;
    border-radius: var(--checkout-radius);
    padding: 14px;
    box-shadow: var(--checkout-shadow);
    border: 1px solid var(--checkout-border);
    text-align: center;
}

.checkout-security img {
    max-width: 100%;
    height: auto;
    max-height: 34px;
    object-fit: contain;
    margin: 5px auto;
    display: block;
}

.checkout-security-label {
    font-size: 11px;
    color: var(--checkout-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
    font-weight: 700;
}

/* --------- Cards / form --------- */
.checkout-card {
    background: #fff;
    border-radius: var(--checkout-radius);
    padding: 24px 28px;
    box-shadow: var(--checkout-shadow);
    border: 1px solid var(--checkout-border);
    margin-bottom: 18px;
}

.checkout-card-title {
    font-size: var(--checkout-fs-xl) !important;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--checkout-border);
}

.checkout-card-title i {
    color: var(--checkout-brand);
    font-size: 1.05rem;
}

.checkout-hint {
    font-size: var(--checkout-fs-sm) !important;
    color: var(--checkout-muted);
    margin: 0 0 18px;
    line-height: 1.5;
}

.checkout-form-row {
    display: flex;
    gap: 14px;
    margin-bottom: 12px;
}

.checkout-form-group {
    flex: 1;
    margin-bottom: 12px;
    min-width: 0;
}

.checkout-form-group.full-width {
    flex: 1 1 100%;
}

.checkout-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    font-size: var(--checkout-fs-sm) !important;
}

.checkout-label em {
    font-weight: 400;
    color: var(--checkout-muted);
    font-style: normal;
    font-size: 13px;
}

.checkout-input,
.checkout-select,
.checkout-textarea {
    width: 100%;
    padding: 11px 14px !important;
    border: 1.5px solid var(--checkout-border);
    border-radius: 10px;
    font-size: var(--checkout-fs) !important;
    background: #fafbfc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    color: #111827;
    min-height: 46px !important;
}

.checkout-textarea {
    min-height: 100px;
    resize: vertical;
}

.checkout-input:focus,
.checkout-select:focus,
.checkout-textarea:focus {
    outline: none;
    border-color: var(--checkout-brand);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(29, 57, 109, 0.12);
}

.checkout-input.error,
.checkout-select.error,
.checkout-textarea.error {
    border-color: var(--checkout-danger);
}

.checkout-error {
    color: var(--checkout-danger);
    font-size: 0.8rem;
    margin-top: 4px;
    display: none;
}

.checkout-error.show {
    display: block;
}

/* --------- Summary --------- */
.checkout-summary {
    background: #fff;
    border-radius: var(--checkout-radius);
    padding: 22px;
    box-shadow: var(--checkout-shadow);
    border: 1px solid var(--checkout-border);
    position: sticky;
    top: 24px;
}

.checkout-summary-title {
    font-size: 18px !important;
    font-weight: 700;
    color: #111827;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f3f4f6;
}

.checkout-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    font-size: var(--checkout-fs) !important;
    color: #4b5563;
    border-bottom: 1px solid #f3f4f6;
}

.checkout-summary-row.total {
    border-bottom: none;
    border-top: 2px solid #f3f4f6;
    margin-top: 6px;
    padding-top: 14px;
    font-size: 20px !important;
    font-weight: 700;
    color: var(--checkout-brand);
}

.checkout-summary-row .free,
.checkout-summary-row .discount {
    color: var(--checkout-success);
    font-weight: 600;
}

.checkout-summary-row .discount-neg {
    color: var(--checkout-danger);
    font-weight: 600;
}

/* --------- Actions --------- */
.checkout-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.checkout-actions .checkout-back {
    color: var(--checkout-muted);
    text-decoration: none;
    font-size: var(--checkout-fs-sm) !important;
    font-weight: 550;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 4px;
    transition: color 0.2s ease;
}

.checkout-actions .checkout-back:hover {
    color: var(--checkout-brand);
}

.checkout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--checkout-brand) 0%, var(--checkout-brand-dark) 100%);
    color: #fff !important;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 16px !important;
    font-weight: 650;
    cursor: pointer;
    text-decoration: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(29, 57, 109, 0.22);
    min-height: 48px;
}

.checkout-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(29, 57, 109, 0.3);
    color: #fff !important;
}

.checkout-btn:disabled,
.checkout-btn.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.checkout-btn-block {
    width: 100%;
}

.checkout-actions-end {
    margin-left: auto;
}

/* --------- Payment method cards --------- */
.checkout-method-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.checkout-method-card {
    background: #fff;
    border-radius: var(--checkout-radius);
    padding: 24px;
    border: 2px solid var(--checkout-border);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    height: 100%;
    position: relative;
}

.checkout-method-card:hover {
    border-color: var(--checkout-brand);
    box-shadow: var(--checkout-shadow);
    transform: translateY(-2px);
}

.checkout-method-card.selected {
    border-color: var(--checkout-brand);
    background: linear-gradient(180deg, rgba(29, 57, 109, 0.04) 0%, #fff 40%);
    box-shadow: 0 8px 24px rgba(29, 57, 109, 0.12);
}

.checkout-method-card.selected::after {
    content: "\f00c";
    font-family: "Font Awesome 5 Free", "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    top: 14px;
    right: 14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--checkout-brand);
    color: #fff;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checkout-method-icon {
    font-size: 1.75rem;
    color: var(--checkout-brand);
    margin-bottom: 10px;
}

.checkout-method-title {
    font-size: 18px !important;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px;
}

.checkout-method-desc {
    color: var(--checkout-muted);
    font-size: var(--checkout-fs-sm) !important;
    margin: 0 0 10px;
}

.checkout-method-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.checkout-method-features li {
    padding: 5px 0;
    color: #4b5563;
    font-size: var(--checkout-fs-sm) !important;
}

.checkout-method-features li i {
    color: var(--checkout-success);
    margin-right: 8px;
}

/* Cart table polish inside checkout card */
.checkout-card .shop_table,
.checkout-shell .shop_table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--checkout-fs) !important;
}

.checkout-card .shop_table th,
.checkout-card .shop_table td,
.checkout-shell .shop_table th,
.checkout-shell .shop_table td {
    padding: 12px 10px !important;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
    vertical-align: middle;
    font-size: var(--checkout-fs) !important;
}

.checkout-card .shop_table th,
.checkout-shell .shop_table th {
    color: var(--checkout-brand) !important;
    font-weight: 700 !important;
    background: #f8fafc;
    font-size: 13px !important;
    letter-spacing: 0.02em;
}

.checkout-card .product-name,
.checkout-card .product-name a,
.checkout-shell .product-name,
.checkout-shell .product-name a {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #111827 !important;
}

.checkout-card .product-price,
.checkout-card .product-subtotal,
.checkout-shell .product-price,
.checkout-shell .product-subtotal {
    font-size: 15px !important;
    font-weight: 600;
    color: #1f2937;
}

.checkout-card .product-thumbnail img,
.checkout-shell .product-thumbnail img {
    width: 56px !important;
    height: 56px !important;
    border-radius: 8px;
    object-fit: cover;
}

.checkout-card .product-remove i,
.checkout-shell .product-remove i {
    font-size: 16px !important;
}

/* Discount: compact row, not full-bleed */
.checkout-discount {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch;
    gap: 10px;
    margin: 16px 0;
    width: 100%;
    max-width: 420px;
}

.checkout-discount input,
.checkout-discount .checkout-discount-input {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 10px 14px !important;
    border: 1.5px solid var(--checkout-border) !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    line-height: 1.4 !important;
    min-height: 44px !important;
    height: 44px !important;
    background: #fafbfc !important;
    box-sizing: border-box;
    color: #111827 !important;
}

.checkout-discount input::placeholder,
.checkout-discount .checkout-discount-input::placeholder {
    font-size: 15px !important;
    color: #9ca3af !important;
    opacity: 1;
}

.checkout-discount input:focus,
.checkout-discount .checkout-discount-input:focus {
    outline: none;
    border-color: var(--checkout-brand) !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(29, 57, 109, 0.12);
}

.checkout-discount button,
.checkout-discount .checkout-discount-btn {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 96px;
    max-width: 120px;
    background: var(--checkout-brand) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 18px !important;
    cursor: pointer;
    font-weight: 650;
    font-size: 15px !important;
    white-space: nowrap;
    min-height: 44px !important;
    height: 44px !important;
}

.checkout-discount button:hover,
.checkout-discount .checkout-discount-btn:hover {
    background: var(--checkout-brand-dark) !important;
}

/* Breadcrumb subtitle helper */
.checkout-breadcrumb-sub {
    color: rgba(255, 255, 255, 0.9) !important;
    margin: 8px 0 0;
    font-size: 15px !important;
}

@media (min-width: 1600px) {
    .checkout-container {
        max-width: 1280px;
    }
}

/* --------- Responsive --------- */
@media (max-width: 991px) {
    .checkout-container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .checkout-layout {
        flex-direction: column;
        gap: 20px;
    }

    .checkout-sidebar {
        width: 100%;
        position: static;
    }

    .checkout-steps {
        flex-direction: row;
        overflow-x: auto;
        gap: 4px;
        padding: 14px 10px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .checkout-steps::-webkit-scrollbar {
        display: none;
    }

    .checkout-step {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding-bottom: 0;
        min-width: 72px;
        flex: 1 1 0;
    }

    .checkout-step:not(:last-child)::after {
        left: calc(50% + 18px);
        top: 15px;
        width: calc(100% - 20px);
        height: 2px;
    }

    .checkout-step-circle {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .checkout-step-desc {
        display: none;
    }

    .checkout-step-title {
        font-size: 13px !important;
        margin-top: 4px;
    }

    .checkout-security {
        display: none;
    }

    .checkout-summary {
        position: static;
    }

    .checkout-method-grid {
        grid-template-columns: 1fr;
    }

    .checkout-actions {
        position: sticky;
        bottom: 0;
        z-index: 20;
        background: linear-gradient(180deg, transparent 0%, #f5f7fb 28%, #f5f7fb 100%);
        padding: 16px 0 8px;
        margin-left: -4px;
        margin-right: -4px;
        padding-left: 4px;
        padding-right: 4px;
    }
}

@media (max-width: 576px) {
    .checkout-shell {
        padding: 20px 0 60px;
    }

    .checkout-card {
        padding: 18px 16px;
    }

    .checkout-form-row {
        flex-direction: column;
        gap: 0;
    }

    .checkout-discount {
        flex-direction: column !important;
    }

    .checkout-discount input,
    .checkout-discount .checkout-discount-input {
        min-width: 0 !important;
        width: 100% !important;
        font-size: 15px !important;
        min-height: 44px !important;
        height: 44px !important;
    }

    .checkout-discount button,
    .checkout-discount .checkout-discount-btn {
        width: 100% !important;
        max-width: none;
        font-size: 15px !important;
        min-height: 44px !important;
        height: 44px !important;
    }

    .checkout-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .checkout-actions-end {
        margin-left: 0;
        width: 100%;
    }

    .checkout-btn {
        width: 100%;
    }

    .checkout-actions .checkout-back {
        justify-content: center;
        width: 100%;
    }

    .payment-card {
        border-radius: 14px !important;
    }
}
