﻿/* ==========================================================
   Başlıktaki sepet butonu (tüm sayfalar)
   ========================================================== */
.sepetsag {
    padding: 22px 0 10px 0;
}

a.hsepet {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 9px 18px 9px 12px;
    border-radius: 14px;
    background: #0c71b3;
    color: #fff;
    text-decoration: none;
    font-family: 'Open Sans', sans-serif;
    box-shadow: 0 4px 14px rgba(12, 113, 179, .28);
    transition: background-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

    a.hsepet:hover,
    a.hsepet:focus-visible {
        background: #0a5e96;
        color: #fff;
        text-decoration: none;
        transform: translateY(-1px);
        box-shadow: 0 8px 20px rgba(12, 113, 179, .34);
    }

    a.hsepet:focus-visible {
        outline: 3px solid rgba(12, 113, 179, .35);
        outline-offset: 2px;
    }

.hsepet-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .16);
}

    .hsepet-icon svg {
        display: block;
    }

.hsepet-badge {
    position: absolute;
    top: -7px;
    right: -8px;
    min-width: 21px;
    height: 21px;
    padding: 0 6px;
    border-radius: 999px;
    border: 2px solid #fff;
    background: #bc3726;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 17px;
    text-align: center;
}

.hsepet-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    text-align: left;
}

.hsepet-label {
    font-size: 12px;
    opacity: .85;
    letter-spacing: .2px;
}

.hsepet-total {
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .sepetsag {
        text-align: center;
        padding: 10px 0;
    }

    a.hsepet {
        padding: 7px 14px 7px 10px;
    }
}

/* ==========================================================
   Sepet sayfası
   ========================================================== */
.msp {
    --msp-blue: #0c71b3;
    --msp-blue-dark: #0a5e96;
    --msp-red: #bc3726;
    --msp-green: #12804a;
    --msp-text: #1f2933;
    --msp-muted: #6b7785;
    --msp-line: #e6eaef;
    --msp-soft: #f5f8fb;
    font-family: 'Open Sans', sans-serif;
    color: var(--msp-text);
    padding-bottom: 32px;
}

    .msp *,
    .msp *::before,
    .msp *::after {
        box-sizing: border-box;
    }

.msp-head {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 8px 0 14px;
}

    .msp-head h1 {
        margin: 0;
        font-family: 'Open Sans', sans-serif;
        font-size: 26px;
        font-weight: 700;
        color: var(--msp-text);
    }

.msp-count {
    font-size: 14px;
    color: var(--msp-muted);
}

/* Adımlar */
.msp-steps {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0 0 22px;
    padding: 0;
    font-size: 13px;
    color: var(--msp-muted);
}

    .msp-steps li {
        display: flex;
        align-items: center;
        gap: 8px;
        flex: 1;
        padding-bottom: 10px;
        border-bottom: 3px solid var(--msp-line);
    }

        .msp-steps li span {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 22px;
            height: 22px;
            border-radius: 50%;
            background: var(--msp-line);
            font-size: 12px;
            font-weight: 700;
        }

        .msp-steps li.is-active {
            color: var(--msp-blue);
            font-weight: 600;
            border-color: var(--msp-blue);
        }

            .msp-steps li.is-active span {
                background: var(--msp-blue);
                color: #fff;
            }

/* Yerleşim */
.msp-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 24px;
    align-items: start;
}

/* Ürünler */
.msp-items {
    container: msp-items / inline-size;
    background: #fff;
    border: 1px solid var(--msp-line);
    border-radius: 14px;
    overflow: hidden;
}

.msp-item {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) auto 96px 36px;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--msp-line);
}

.msp-thumb {
    width: 76px;
    height: 76px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--msp-soft);
    border: 1px solid var(--msp-line);
}

    .msp-thumb img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.msp-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--msp-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.msp-meta {
    margin-top: 4px;
    font-size: 13px;
    color: var(--msp-muted);
}

.msp-dot {
    margin: 0 4px;
}

/* Adet seçici */
.msp-qty {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--msp-line);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.msp-qty-btn {
    width: 34px;
    height: 36px;
    border: 0;
    background: var(--msp-soft);
    color: var(--msp-text);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

    .msp-qty-btn:hover {
        background: var(--msp-blue);
        color: #fff;
    }

.msp .msp-qty-input {
    width: 44px;
    height: 36px;
    border: 0;
    border-left: 1px solid var(--msp-line);
    border-right: 1px solid var(--msp-line);
    padding: 0;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--msp-text);
    background: #fff;
}

    .msp .msp-qty-input:focus {
        outline: 2px solid var(--msp-blue);
        outline-offset: -2px;
    }

.msp-line-total {
    font-size: 16px;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.msp-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: var(--msp-muted);
    transition: background-color .15s ease, color .15s ease;
}

    .msp-remove:hover,
    .msp-remove:focus-visible {
        background: #fdecea;
        color: var(--msp-red);
    }

.msp-items-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: var(--msp-soft);
}

.msp-link {
    color: var(--msp-blue);
    font-weight: 600;
    font-size: 14px;
}

    .msp-link:hover {
        color: var(--msp-blue-dark);
    }

/* Butonlar */
.msp .msp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.msp .msp-btn-primary {
    background: var(--msp-blue);
    color: #fff;
    box-shadow: 0 6px 16px rgba(12, 113, 179, .28);
}

    .msp .msp-btn-primary:hover {
        background: var(--msp-blue-dark);
        color: #fff;
        text-decoration: none;
    }

    .msp .msp-btn-primary:disabled {
        opacity: .7;
        cursor: progress;
    }

.msp .msp-btn-dark {
    background: var(--msp-text);
    color: #fff;
}

    .msp .msp-btn-dark:hover {
        background: #000;
    }

.msp .msp-btn-ghost {
    background: #fff;
    border-color: var(--msp-line);
    color: var(--msp-text);
}

    .msp .msp-btn-ghost:hover {
        border-color: var(--msp-blue);
        color: var(--msp-blue);
    }

/* Özet */
.msp-summary {
    position: sticky;
    top: 16px;
    padding: 20px;
    background: #fff;
    border: 1px solid var(--msp-line);
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(15, 35, 60, .06);
}

    .msp-summary h2 {
        margin: 0 0 14px;
        font-family: 'Open Sans', sans-serif;
        font-size: 18px;
        font-weight: 700;
        color: var(--msp-text);
    }

.msp-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 0;
    font-size: 14px;
}

    .msp-row small {
        color: var(--msp-muted);
        font-size: 12px;
    }

    .msp-row span:last-child {
        font-weight: 600;
        white-space: nowrap;
    }

.msp-row-discount {
    color: var(--msp-green);
}

.msp-row-muted span:last-child {
    font-weight: 400;
    font-size: 12px;
    color: var(--msp-muted);
}

.msp-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 10px;
    padding-top: 14px;
    border-top: 1px dashed var(--msp-line);
    font-size: 15px;
    font-weight: 600;
}

    .msp-total strong {
        font-size: 22px;
        color: var(--msp-text);
    }

.msp-old {
    margin-right: 6px;
    font-size: 13px;
    font-weight: 400;
    color: var(--msp-muted);
    text-decoration: line-through;
}

/* Kampanya kodu */
.msp-coupon {
    margin: 16px 0;
}

.msp-coupon-form {
    display: flex;
    gap: 8px;
}

    .msp-coupon-form input[type=text] {
        flex: 1;
        min-width: 0;
        height: 42px;
        padding: 0 12px;
        border: 1px solid var(--msp-line);
        border-radius: 10px;
        font-size: 14px;
        color: var(--msp-text);
    }

        .msp-coupon-form input[type=text]:focus {
            outline: none;
            border-color: var(--msp-blue);
            box-shadow: 0 0 0 3px rgba(12, 113, 179, .15);
        }

.msp-coupon-active {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border: 1px dashed var(--msp-green);
    border-radius: 10px;
    background: #ecf8f1;
    color: var(--msp-green);
    font-size: 14px;
}

    .msp-coupon-active a {
        color: var(--msp-red);
        font-weight: 600;
    }

.msp-msg {
    display: block;
    margin-top: 8px;
    font-size: 13px;
}

.msp-msg-ok {
    color: var(--msp-green);
}

.msp-msg-err {
    color: var(--msp-red);
}

.msp .msp-checkout {
    width: 100%;
    min-height: 52px;
    font-size: 16px;
    letter-spacing: .3px;
}

.msp-trust {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    font-size: 12px;
    color: var(--msp-muted);
}

    .msp-trust li {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 3px 0;
    }

    .msp-trust svg {
        color: var(--msp-green);
        flex: none;
    }

/* Boş sepet */
.msp-empty {
    padding: 56px 24px;
    border: 1px dashed var(--msp-line);
    border-radius: 14px;
    background: var(--msp-soft);
    text-align: center;
    color: var(--msp-muted);
}

    .msp-empty svg {
        color: var(--msp-blue);
    }

    .msp-empty h2 {
        margin: 14px 0 6px;
        font-family: 'Open Sans', sans-serif;
        font-size: 20px;
        font-weight: 700;
        color: var(--msp-text);
    }

    .msp-empty p {
        margin: 0 0 20px;
    }

/* Güncellenirken */
.msp.is-loading .msp-items {
    opacity: .55;
    pointer-events: none;
    transition: opacity .2s ease;
}

/* Duyarlı */
@media (max-width: 1199px) {
    .msp-grid {
        grid-template-columns: 1fr;
    }

    .msp-summary {
        position: static;
    }
}

@media (max-width: 600px) {
    .msp-head h1 {
        font-size: 22px;
    }

    .msp-items-foot {
        flex-direction: column-reverse;
        align-items: stretch;
        text-align: center;
    }
}

/* Ürün listesi dar kaldığında (mobil veya özet kutusunun yanında) kart iki satıra iner */
@container msp-items (max-width: 620px) {
    .msp-item {
        grid-template-columns: 64px minmax(0, 1fr) auto;
        grid-template-areas:
            "thumb info remove"
            "thumb qty total";
        gap: 10px 12px;
        padding: 14px;
    }

    .msp-thumb {
        grid-area: thumb;
        width: 64px;
        height: 64px;
        align-self: start;
    }

    .msp-info {
        grid-area: info;
    }

    .msp-qty {
        grid-area: qty;
        justify-self: start;
    }

    .msp-line-total {
        grid-area: total;
    }

    .msp-remove {
        grid-area: remove;
        align-self: start;
        justify-self: end;
        width: 32px;
        height: 32px;
    }
}
