/* --- BASE --- */
:root {
    --c-black: #111111;
    --c-dark-grey: #333333;
    --c-light-grey: #999999;
    --c-border: #E5E5E5;
    --bg-right: #FAFAFA;
    --font-main: 'Manrope', sans-serif;
    --error-red: #d32f2f;
    --trust-title-grey: #555555;
    --trust-text-grey: #888888;
    --trust-icon-grey: #757575;
}

body {
    margin: 0;
    font-family: var(--font-main);
    color: var(--c-black);
    -webkit-font-smoothing: antialiased;
}

/* --- LAYOUT --- */
.checkout-split-layout {
    display: grid;
    grid-template-columns: 65% 35%;
    min-height: 100vh;
}

/* --- LEFT COLUMN --- */
.checkout-left {
    background: #fff;
    padding: 80px 6%;
    border-right: 1px solid var(--c-border);
}

.form-container {
    max-width: 680px;
    margin-left: auto;
    margin-right: 20px;
}

.page-main-title {
    font-size: 32px;
    font-weight: 400;
    margin-bottom: 50px;
    letter-spacing: -0.01em;
    text-transform: uppercase;
}

.checkout-section { margin-bottom: 45px; }

.section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- INPUTS --- */
.input-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

.field-wrap {
    margin-bottom: 25px;
    position: relative;
}

.field-label {
    display: block;
    font-size: 11px;
    color: var(--c-light-grey);
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-underline {
    width: 100%;
    height: 40px;
    border: none;
    border-bottom: 1px solid var(--c-border);
    border-radius: 0;
    font-family: var(--font-main);
    font-size: 15px;
    color: var(--c-black);
    padding: 0;
    transition: border-color 0.3s;
    outline: none;
    background: transparent;
}

.input-underline:focus { border-bottom-color: var(--c-black); }
.input-underline::placeholder { color: #ddd; }
.input-underline:disabled { background: #fdfdfd; cursor: not-allowed; }
.input-error { display: none; font-size: 11px; color: var(--error-red); margin-top: 4px; }
.input-underline.error { border-bottom-color: var(--error-red); }

/* Dropdowns */
.relative-wrap { position: relative; }
.dropdown-list {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    border: 1px solid #111;
    z-index: 100;
    max-height: 250px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.dropdown-list.active { display: block; }
.dropdown-item {
    padding: 10px 15px; font-size: 13px; cursor: pointer; border-bottom: 1px solid #f5f5f5;
}
.dropdown-item:hover { background: #f2f2f2; }
.dropdown-item .d-small { font-size: 11px; color: #888; display: block; margin-top: 2px;}


/* --- PAYMENT --- */
.payment-grid-compact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.pay-card-small { cursor: pointer; }
.pay-card-small input { display: none; }

.pcs-content {
    border: 1px solid var(--c-border);
    padding: 15px;
    text-align: center;
    transition: all 0.2s;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 70px;
}

.pcs-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 5px;
    letter-spacing: 0.05em;
}

.pcs-sub { font-size: 11px; color: var(--c-light-grey); line-height: 1.4; }

.pay-card-small input:checked + .pcs-content {
    background: var(--c-black);
    color: #fff;
    border-color: var(--c-black);
}
.pay-card-small input:checked + .pcs-content .pcs-sub { color: #ccc; }


/* --- CHECKBOX --- */
.checkbox-wrapper {
    display: flex; align-items: center; cursor: pointer; user-select: none;
}
.checkbox-wrapper input { display: none; }
.custom-check {
    width: 18px; height: 18px; border: 1px solid #ccc; margin-right: 12px; position: relative; transition: 0.2s; flex-shrink: 0;
}
.custom-check::after {
    content: ''; position: absolute; left: 5px; top: 1px; width: 5px; height: 9px;
    border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); opacity: 0;
}
.checkbox-wrapper input:checked + .custom-check {
    background: var(--c-black); border-color: var(--c-black);
}
.checkbox-wrapper input:checked + .custom-check::after { opacity: 1; }
.check-text { font-size: 13px; color: var(--c-dark-grey); }


/* --- BUTTON --- */
.action-block { margin-top: 50px; }
.btn-checkout {
    width: 100%; height: 60px; background: var(--c-black); color: #fff; border: none;
    font-family: var(--font-main); font-size: 15px; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; cursor: pointer; transition: background 0.3s;
}
.btn-checkout:hover { background: #333; }


/* --- RIGHT COLUMN --- */
.checkout-right {
    background: var(--bg-right);
    padding: 80px 8%;
}

.summary-box {
    position: sticky;
    top: 40px;
}

.summary-title {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 30px;
}

.sum-row {
    display: flex; justify-content: space-between;
    margin-bottom: 15px; font-size: 14px; color: var(--trust-title-grey);
}

.sum-line { height: 1px; background: #e0e0e0; margin: 25px 0; }

.sum-total {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 16px; font-weight: 600; margin-bottom: 40px;
}
#total-display { font-size: 22px; }


/* --- TRUST BLOCK (ICONS) --- */
.trust-block {
    margin-top: 30px;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    padding: 25px 0;
}

.trust-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}
.trust-item:last-child { margin-bottom: 0; }

.ti-icon {
    width: 24px; height: 24px;
    text-align: center;
    margin-right: 15px;
    flex-shrink: 0;
}
/* Колір іконок */
.ti-icon svg path { stroke: var(--trust-icon-grey); }

.ti-text { display: flex; flex-direction: column; }
.ti-text strong {
    font-size: 12px; font-weight: 700; margin-bottom: 4px;
    text-transform: uppercase; color: var(--trust-title-grey); letter-spacing: 0.05em;
}
.ti-text span {
    font-size: 12px; color: var(--trust-text-grey); line-height: 1.4;
}

.help-section {
    margin-top: 30px; font-size: 13px;
}
.help-section a { color: var(--c-black); text-decoration: none; font-weight: 700; }

/* MOBILE */
@media (max-width: 1024px) {
    .checkout-split-layout { grid-template-columns: 1fr; }
    .checkout-right { order: -1; padding: 40px 20px; border-bottom: 1px solid #eee; }
    .checkout-left { padding: 40px 20px; border: none; }
    .input-row-3 { grid-template-columns: 1fr; gap: 0; }
    .payment-grid-compact { grid-template-columns: 1fr; }
}