/* Cart page layout */
.cart-page {
    padding-bottom: 48px;
}

/* Breadcrumb (Ana Sayfa / Sepetim) ile h1 aynı sol hiza */
.cart-page-section > .container > #bread-top {
    margin-left: 0;
    margin-right: 0;
}

.cart-page-section > .container > #bread-top > #breadcrumb {
    padding-left: 0;
    padding-right: 0;
    max-width: 100%;
    flex: 0 0 100%;
}

.cart-page-section > .container > #bread-top #breadcrumb p {
    margin-bottom: 12px;
}

.cart-page-title {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin: 0 0 28px;
    font-family: "Mulish", sans-serif;
    padding: 0;
}

.cart-page-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    align-items: start;
}

/* Product items */
.cart-page-items {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.cart-page-items-box {
    background: #fff;
    border: 1px solid #e8ecf0;
    border-radius: 12px;
    overflow: hidden;
}

.cart-items-head {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) auto auto auto;
    gap: 16px 18px;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #e8ecf0;
    background: #fafafa;
    font-family: "Mulish", sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #333;
}

.cart-items-head__product {
    grid-column: 1 / 3;
}

.cart-items-head__qty {
    text-align: center;
    min-width: 116px;
}

.cart-items-head__price {
    text-align: center;
    width: 120px;
    min-width: 120px;
}

.cart-items-head__action {
    width: 36px;
}

.cart-item {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) auto auto auto;
    gap: 16px 18px;
    align-items: center;
    padding: 20px;
    background: #fff;
    border: none;
    border-radius: 0;
    border-bottom: 1px solid #eef1f4;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    display: block;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e8ecf0;
    aspect-ratio: 1;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cart-item-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    gap: 0;
}

.cart-item-brand {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 4px;
    line-height: 1.35;
}

.cart-item-brand a {
    color: #111;
    text-decoration: underline;
}

.cart-item-name {
    font-size: 17px;
    font-weight: 700;
    color: #333;
    margin: 0 0 4px;
    line-height: 1.35;
    width: 100%;
}

.cart-item-category,
.cart-item-options,
.cart-item-gram {
    display: block;
    margin: 0 0 4px;
    padding: 0;
    font-family: "Mulish", sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    color: #888;
    width: 100%;
}

.cart-item-gram {
    margin-bottom: 0;
    color: #666;
}

.cart-item-qty {
    display: inline-flex;
    align-items: center;
    justify-self: center;
    border: 1px solid #e0e4e8;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    height: 40px;
    min-width: 116px;
}

.cart-item-qty__btn {
    width: 36px;
    height: 100%;
    border: none;
    background: #f7f7f7;
    color: #333;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.cart-item-qty__btn:hover {
    background: #eee6e3;
    color: #453326;
}

.cart-item-qty__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.cart-item-qty__input {
    width: 44px;
    height: 100%;
    border: none;
    border-left: 1px solid #e0e4e8;
    border-right: 1px solid #e0e4e8;
    text-align: center;
    font-family: "Mulish", sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #333;
    background: #fff;
    -moz-appearance: textfield;
}

.cart-item-qty__input::-webkit-outer-spin-button,
.cart-item-qty__input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-item-price-wrap {
    width: 120px;
    min-width: 120px;
    text-align: center;
    justify-self: center;
}

.cart-item-price {
    font-size: 15px;
    font-weight: 700;
    color: #333;
    margin: 0;
    white-space: nowrap;
}

.cart-item-remove {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #f0c9c4;
    background: #fff8f7;
    color: #c0392b;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.cart-item-remove .fa {
    font-size: 15px;
    line-height: 1;
}

.cart-item-remove:hover {
    color: #fff;
    border-color: #c0392b;
    background: #c0392b;
    text-decoration: none;
}

/* Summary sidebar */
.cart-page-summary {
    position: sticky;
    top: 24px;
    background: #fafafa;
    border: 1px solid #e8ecf0;
    border-radius: 12px;
    padding: 20px;
}

.cart-page-summary-title {
    font-size: 18px;
    font-weight: 700;
    color: #333;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #453326;
}

.cart-summary-product {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e8ecf0;
}

.cart-summary-product:last-of-type {
    border-bottom: none;
}

.cart-summary-thumb {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #e8ecf0;
}

.cart-summary-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-summary-info {
    flex: 1;
    min-width: 0;
}

.cart-summary-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-summary-qty {
    font-size: 12px;
    color: #888;
    margin: 0 0 4px;
}

.cart-summary-price {
    font-size: 14px;
    font-weight: 700;
    color: #111;
    margin: 0;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 14px;
    color: #666;
    border-top: 1px solid #453326;
}

.cart-summary-row strong {
    color: #333;
}

.cart-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-top: 1px solid #453326;
    margin-top: 4px;
}

.cart-summary-total span {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.cart-summary-total strong {
    font-size: 20px;
    font-weight: 800;
    color: #333;
}

.cart-page-checkout-btn {
    display: block;
    width: 100%;
    margin-top: 16px;
    padding: 14px 20px;
    background: #fff;
    color: #111 !important;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    border-radius: 8px;
    border: 1px solid #111;
    text-decoration: none !important;
    transition: background 0.2s, color 0.2s;
}

.cart-page-checkout-btn:hover {
    background: #111;
    color: #fff !important;
}

.cart-page-empty {
    padding: 40px;
    text-align: center;
    background: #f8f9fb;
    border-radius: 12px;
    border: 1px solid #e8ecf0;
}

.cart-page-empty p {
    margin: 0 0 16px;
    font-size: 16px;
    color: #666;
}

/* Responsive */
@media (max-width: 991px) {
    .cart-page-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .cart-page-summary {
        position: static;
    }

    .cart-items-head {
        display: none;
    }

    .cart-page-items-box {
        border: none;
        background: transparent;
        border-radius: 0;
        overflow: visible;
    }

    .cart-item {
        grid-template-columns: 100px minmax(0, 1fr) auto;
        grid-template-areas:
            "image body remove"
            "image qty price";
        gap: 12px 14px;
        border: 1px solid #e8ecf0;
        border-radius: 12px;
        margin-bottom: 12px;
        border-bottom: 1px solid #e8ecf0;
    }

    .cart-item:last-child {
        margin-bottom: 0;
    }

    .cart-item-image { grid-area: image; }
    .cart-item-body { grid-area: body; }
    .cart-item-qty { grid-area: qty; justify-self: start; min-width: 0; }
    .cart-item-price-wrap { grid-area: price; justify-self: end; align-self: center; }
    .cart-item-remove { grid-area: remove; justify-self: end; align-self: start; }
}

@media (max-width: 575px) {
    .cart-item {
        grid-template-columns: 84px minmax(0, 1fr) auto;
        padding: 14px;
    }

    .cart-page-title {
        font-size: 26px;
    }

    .cart-item-name {
        font-size: 15px;
    }

    .cart-item-price {
        font-size: 15px;
    }

    .cart-item-price-wrap {
        min-width: 0;
    }

    .cart-item-qty {
        height: 36px;
    }

    .cart-item-qty__btn {
        width: 32px;
    }

    .cart-item-qty__input {
        width: 36px;
        font-size: 13px;
    }
}
