/* =========================================================
   CHECKOUT - GALLERY SOGOLI
========================================================= */

.checkout-page {
    min-height: 100vh;
    padding: 115px 20px 125px;
}

.checkout-container {
    width: min(100%, 1100px);
    margin: 0 auto;
}


/* =========================================================
   BACK
========================================================= */

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    width: fit-content;

    margin-bottom: 20px;

    color: var(--muted);

    text-decoration: none;

    font-size: 13px;
    font-weight: 800;

    transition: .25s ease;
}

.back-link:hover {
    color: #bd6c91;
    transform: translateX(3px);
}

.back-link .ui-icon {
    width: 18px;
    height: 18px;
}


/* =========================================================
   HEADING
========================================================= */

.checkout-heading {
    margin-bottom: 22px;
}

.eyebrow {
    display: block;

    color: #b36b8d;

    font-size: 10px;
    font-weight: 900;

    letter-spacing: 2px;

    margin-bottom: 6px;
}

.checkout-heading h1 {
    margin: 0;

    color: var(--text);

    font-size: clamp(28px, 5vw, 42px);
}

.checkout-heading p {
    margin: 8px 0 0;

    color: var(--muted);

    font-size: 13px;
}


/* =========================================================
   GRID
========================================================= */

.checkout-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1.4fr)
        minmax(300px, .75fr);

    gap: 18px;

    align-items: start;
}


/* =========================================================
   GLASS
========================================================= */

.glass-card {
    border: 1px solid var(--border);

    background: var(--white-glass);

    box-shadow: var(--shadow);

    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}


/* =========================================================
   FORM CARD
========================================================= */

.checkout-form-card {
    padding: 25px;

    border-radius: 27px;
}

.section-title {
    display: flex;
    align-items: center;

    gap: 12px;

    margin-bottom: 23px;
}

.title-icon {
    width: 46px;
    height: 46px;

    flex-shrink: 0;

    display: grid;
    place-items: center;

    border-radius: 15px;

    color: #bd6c91;

    background: rgba(190,105,145,.10);
}

.title-icon .ui-icon {
    width: 21px;
    height: 21px;
}

.section-title h2 {
    margin: 0;

    color: var(--text);

    font-size: 20px;
}


/* =========================================================
   FORM GRID
========================================================= */

.form-grid {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 17px;
}

.field {
    min-width: 0;
}

.field-full {
    grid-column: 1 / -1;
}

.field label {
    display: flex;
    align-items: center;
    gap: 5px;

    margin-bottom: 7px;

    color: var(--text);

    font-size: 12px;
    font-weight: 800;
}

.field label span {
    color: var(--muted);

    font-size: 10px;

    font-weight: 500;
}


/* =========================================================
   INPUT
========================================================= */

.input-wrap,
.textarea-wrap {
    position: relative;

    display: flex;

    border: 1px solid var(--border);

    border-radius: 15px;

    background: rgba(255,255,255,.45);

    transition: .25s ease;
}

.input-wrap {
    height: 52px;

    align-items: center;

    gap: 9px;

    padding: 0 14px;
}

.textarea-wrap {
    align-items: flex-start;

    gap: 9px;

    padding: 13px 14px;
}

.input-wrap:focus-within,
.textarea-wrap:focus-within {
    border-color: rgba(190,105,145,.55);

    box-shadow:
        0 0 0 4px rgba(190,105,145,.08);
}

.input-wrap .ui-icon,
.textarea-wrap .ui-icon {
    width: 18px;
    height: 18px;

    flex-shrink: 0;

    color: #bd6c91;
}

.input-wrap input,
.textarea-wrap textarea {
    width: 100%;

    border: 0;
    outline: 0;

    background: transparent;

    color: var(--text);

    font-family: inherit;

    font-size: 13px;
}

.input-wrap input {
    height: 100%;
}

.textarea-wrap textarea {
    min-height: 80px;

    resize: vertical;

    line-height: 1.9;
}

.input-wrap input::placeholder,
.textarea-wrap textarea::placeholder {
    color: var(--muted);

    opacity: .8;
}

.field-error {
    display: block;

    min-height: 16px;

    margin-top: 4px;

    color: #c65368;

    font-size: 10px;
}


/* =========================================================
   PRIVACY
========================================================= */

.privacy-note {
    display: flex;
    align-items: center;

    gap: 9px;

    margin-top: 5px;

    padding: 13px 14px;

    border-radius: 14px;

    color: #558067;

    background: rgba(70,170,110,.07);

    font-size: 10px;
}

.privacy-note .ui-icon {
    width: 17px;
    height: 17px;

    flex-shrink: 0;
}


/* =========================================================
   SUMMARY
========================================================= */

.checkout-summary {
    position: sticky;

    top: 95px;

    padding: 23px;

    border-radius: 27px;
}

.checkout-items {
    display: grid;

    gap: 10px;

    max-height: 360px;

    overflow-y: auto;

    padding-left: 2px;
}

.checkout-item {
    display: grid;

    grid-template-columns: 55px minmax(0, 1fr) auto;

    align-items: center;

    gap: 10px;

    padding: 9px;

    border-radius: 15px;

    border: 1px solid var(--border);

    background: rgba(255,255,255,.28);
}

.item-visual {
    width: 55px;
    height: 55px;

    display: grid;
    place-items: center;

    border-radius: 13px;

    color: #bd6c91;

    background:
        radial-gradient(
            circle at 35% 30%,
            rgba(255,255,255,.9),
            rgba(224,188,205,.45)
        );

    font-size: 19px;
    font-weight: 900;
}

.item-info {
    min-width: 0;
}

.item-name {
    display: block;

    color: var(--text);

    font-size: 11px;
    font-weight: 800;

    overflow: hidden;

    white-space: nowrap;
    text-overflow: ellipsis;
}

.item-quantity {
    display: block;

    margin-top: 4px;

    color: var(--muted);

    font-size: 9px;
}

.item-price {
    color: var(--text);

    font-size: 10px;
    font-weight: 900;

    white-space: nowrap;
}


/* =========================================================
   SUMMARY LINES
========================================================= */

.summary-lines {
    display: grid;

    gap: 12px;

    margin-top: 19px;
}

.summary-lines > div {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 10px;

    color: var(--muted);

    font-size: 11px;
}

.summary-lines strong {
    color: var(--text);

    font-size: 11px;
}

.summary-total {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    margin-top: 17px;
    padding-top: 16px;

    border-top: 1px solid var(--border);
}

.summary-total span {
    color: var(--text);

    font-size: 13px;
    font-weight: 900;
}

.summary-total strong {
    color: #bd6c91;

    font-size: 18px;
    font-weight: 900;
}


/* =========================================================
   CONFIRM
========================================================= */

.confirm-check {
    display: flex;
    align-items: flex-start;

    gap: 9px;

    margin-top: 18px;

    cursor: pointer;

    color: var(--muted);

    font-size: 10px;

    line-height: 1.8;
}

.confirm-check input {
    position: absolute;

    opacity: 0;

    pointer-events: none;
}

.check-box {
    width: 20px;
    height: 20px;

    flex-shrink: 0;

    display: grid;
    place-items: center;

    margin-top: 1px;

    border-radius: 6px;

    border: 1px solid var(--border);

    background: rgba(255,255,255,.4);

    color: white;

    transition: .2s ease;
}

.check-box .ui-icon {
    width: 13px;
    height: 13px;

    opacity: 0;
}

.confirm-check input:checked + .check-box {
    background: #bd6c91;

    border-color: #bd6c91;
}

.confirm-check input:checked + .check-box .ui-icon {
    opacity: 1;
}


/* =========================================================
   SUBMIT
========================================================= */

.submit-order-btn {
    width: 100%;

    min-height: 53px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    margin-top: 16px;

    border: 0;

    border-radius: 16px;

    color: white;

    background:
        linear-gradient(
            135deg,
            #bd6c91,
            #d79ab6
        );

    box-shadow:
        0 13px 27px rgba(185,100,140,.22);

    font-family: inherit;

    font-size: 13px;
    font-weight: 900;

    cursor: pointer;

    transition: .25s ease;
}

.submit-order-btn:hover {
    transform: translateY(-2px);

    box-shadow:
        0 17px 31px rgba(185,100,140,.28);
}

.submit-order-btn:disabled {
    opacity: .6;

    cursor: not-allowed;

    transform: none;
}

.submit-order-btn .ui-icon {
    width: 18px;
    height: 18px;
}


/* =========================================================
   MESSAGE
========================================================= */

.checkout-message {
    display: none;

    margin-top: 11px;

    padding: 10px 12px;

    border-radius: 12px;

    font-size: 10px;

    line-height: 1.8;
}

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

.checkout-message.error {
    color: #b84e65;

    background: rgba(210,80,100,.08);
}

.checkout-message.success {
    color: #43815d;

    background: rgba(70,170,110,.08);
}


/* =========================================================
   EDIT CART
========================================================= */

.edit-cart-link {
    display: block;

    margin-top: 14px;

    color: var(--muted);

    text-align: center;

    text-decoration: none;

    font-size: 10px;
    font-weight: 700;

    transition: .2s ease;
}

.edit-cart-link:hover {
    color: #bd6c91;
}


/* =========================================================
   EMPTY
========================================================= */

.checkout-empty {
    display: none;

    padding: 60px 20px;

    margin-top: 20px;

    border-radius: 27px;

    text-align: center;
}

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

.empty-icon {
    width: 75px;
    height: 75px;

    display: grid;
    place-items: center;

    margin: 0 auto 17px;

    border-radius: 24px;

    color: #bd6c91;

    background: rgba(190,105,145,.09);
}

.empty-icon .ui-icon {
    width: 31px;
    height: 31px;
}

.checkout-empty h2 {
    margin: 0;

    color: var(--text);

    font-size: 21px;
}

.checkout-empty p {
    max-width: 420px;

    margin: 9px auto 20px;

    color: var(--muted);

    font-size: 12px;

    line-height: 1.9;
}

.checkout-empty a {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 44px;

    padding: 0 20px;

    border-radius: 13px;

    color: white;

    background: #bd6c91;

    text-decoration: none;

    font-size: 12px;
    font-weight: 800;
}


/* =========================================================
   DARK MODE
========================================================= */

body.dark-mode .glass-card {
    background: rgba(30,27,31,.68);
}

body.dark-mode .input-wrap,
body.dark-mode .textarea-wrap,
body.dark-mode .checkout-item {
    background: rgba(255,255,255,.035);
}

body.dark-mode .check-box {
    background: rgba(255,255,255,.04);
}

body.dark-mode .item-visual {
    background: rgba(255,255,255,.05);
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 850px) {

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

    .checkout-summary {
        position: static;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .checkout-page {
        padding: 100px 14px 115px;
    }

    .checkout-form-card,
    .checkout-summary {
        padding: 18px;

        border-radius: 22px;
    }

    .form-grid {
        grid-template-columns: 1fr;

        gap: 12px;
    }

    .field-full {
        grid-column: auto;
    }

    .checkout-heading h1 {
        font-size: 29px;
    }

    .checkout-heading p {
        font-size: 12px;
    }

    .section-title h2 {
        font-size: 18px;
    }

}
/* =========================================================
   SHIPPING OPTIONS
========================================================= */

.shipping-section {
    margin-top: 20px;
    padding-top: 18px;

    border-top: 1px solid var(--border);
}

.shipping-title {
    display: flex;
    align-items: center;

    gap: 10px;

    margin-bottom: 12px;
}

.shipping-title-icon {
    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    border-radius: 12px;

    color: #bd6c91;

    background: rgba(190,105,145,.09);
}

.shipping-title-icon .ui-icon {
    width: 18px;
    height: 18px;
}

.shipping-title strong {
    display: block;

    color: var(--text);

    font-size: 12px;
}

.shipping-title span {
    display: block;

    margin-top: 3px;

    color: var(--muted);

    font-size: 9px;
}


/* =========================================================
   SHIPPING OPTIONS
========================================================= */

.shipping-options {
    display: grid;

    gap: 9px;
}

.shipping-option {
    position: relative;

    display: flex;
    align-items: center;

    gap: 10px;

    min-height: 66px;

    padding: 10px 12px;

    border: 1px solid var(--border);

    border-radius: 15px;

    background: rgba(255,255,255,.28);

    cursor: pointer;

    transition: .25s ease;
}

.shipping-option:hover {
    border-color: rgba(190,105,145,.35);

    transform: translateY(-1px);
}

.shipping-option input {
    position: absolute;

    opacity: 0;

    pointer-events: none;
}


/* Radio */

.shipping-radio {
    width: 19px;
    height: 19px;

    flex-shrink: 0;

    display: grid;
    place-items: center;

    border: 1.5px solid var(--border);

    border-radius: 50%;

    transition: .2s ease;
}

.shipping-radio::after {
    content: "";

    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: white;

    opacity: 0;

    transform: scale(.5);

    transition: .2s ease;
}


/* Selected */

.shipping-option:has(input:checked) {
    border-color: rgba(190,105,145,.65);

    background:
        linear-gradient(
            135deg,
            rgba(190,105,145,.10),
            rgba(255,255,255,.28)
        );

    box-shadow:
        0 8px 25px rgba(190,105,145,.08);
}

.shipping-option:has(input:checked) .shipping-radio {
    border-color: #bd6c91;

    background: #bd6c91;
}

.shipping-option:has(input:checked) .shipping-radio::after {
    opacity: 1;

    transform: scale(1);
}


/* Text */

.shipping-info {
    min-width: 0;

    flex: 1;
}

.shipping-info strong {
    display: block;

    color: var(--text);

    font-size: 11px;
}

.shipping-info small {
    display: block;

    margin-top: 3px;

    color: var(--muted);

    font-size: 9px;
}

.shipping-option > b {
    color: #bd6c91;

    font-size: 10px;

    white-space: nowrap;
}


/* Dark */

body.dark-mode .shipping-option {
    background: rgba(255,255,255,.035);
}

body.dark-mode .shipping-option:has(input:checked) {
    background:
        linear-gradient(
            135deg,
            rgba(190,105,145,.13),
            rgba(255,255,255,.035)
        );
}


/* Mobile */

@media (max-width: 500px) {

    .shipping-option {
        min-height: 62px;

        padding: 9px 10px;
    }

    .shipping-option > b {
        font-size: 9px;
    }

}
/* =========================================================
   CHECKOUT DARK MODE - FIX
========================================================= */

body.dark-mode {
    --text: #f5eef2;
    --muted: #b9afb5;

    --white-glass: rgba(30, 27, 31, .72);
    --white-glass-strong: rgba(35, 31, 36, .88);

    --border: rgba(255, 255, 255, .10);

    --shadow:
        0 20px 60px rgba(0, 0, 0, .35);

    background: #151316;
    color: var(--text);
}


/* Page */

body.dark-mode .checkout-page {
    background: transparent;
}


/* Glass cards */

body.dark-mode .glass-card {
    background: rgba(30, 27, 31, .72);

    border-color:
        rgba(255, 255, 255, .09);

    box-shadow:
        0 20px 60px rgba(0, 0, 0, .30);
}


/* Inputs */

body.dark-mode .input-wrap,
body.dark-mode .textarea-wrap {
    background: rgba(255, 255, 255, .035);

    border-color:
        rgba(255, 255, 255, .10);
}

body.dark-mode .input-wrap input,
body.dark-mode .textarea-wrap textarea {
    color: #f5eef2;
}

body.dark-mode .input-wrap input::placeholder,
body.dark-mode .textarea-wrap textarea::placeholder {
    color: #8f858c;
}


/* Shipping */

body.dark-mode .shipping-option {
    background:
        rgba(255, 255, 255, .035);

    border-color:
        rgba(255, 255, 255, .09);
}

body.dark-mode .shipping-option:has(input:checked) {
    background:
        rgba(190, 105, 145, .12);

    border-color:
        rgba(190, 105, 145, .55);
}


/* Product items */

body.dark-mode .checkout-item {
    background:
        rgba(255, 255, 255, .035);

    border-color:
        rgba(255, 255, 255, .09);
}


/* Product visual */

body.dark-mode .item-visual {
    background:
        rgba(190, 105, 145, .10);

    color: #e5a5c2;
}


/* Checkbox */

body.dark-mode .check-box {
    background:
        rgba(255, 255, 255, .035);

    border-color:
        rgba(255, 255, 255, .12);
}


/* Empty */

body.dark-mode .checkout-empty {
    background:
        rgba(30, 27, 31, .72);
}


/* Header */

body.dark-mode .glass-header {
    background:
        rgba(21, 19, 22, .78);

    border-bottom-color:
        rgba(255, 255, 255, .08);
}


/* Bottom navigation */

body.dark-mode .bottom-control-bar {
    background:
        rgba(25, 22, 26, .88);

    border-color:
        rgba(255, 255, 255, .09);

    box-shadow:
        0 -10px 35px rgba(0, 0, 0, .25);
}