/* Cart page ----------------------------------------------------------- */

/* Page header (siyah kaplama görsel) */
.page-header {
    background-image: url('../images/header-bg.jpg');
    background-size: cover;
    background-position: center;
    padding: 14rem 0 4rem 0;
    text-align: center;
    color: #fff;
    position: relative;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.page-header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4rem;
    position: relative;
    z-index: 2;
}

.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    opacity: 0.85;
}

/* Section */
.cart-section {
    padding: 4rem 0 6rem;
    background: #fff;
}

.cart-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 4rem;
}

.cart-flash {
    background: #f0faf3;
    color: #0f5c31;
    border: 1px solid #cce9d6;
    padding: 0.85rem 1.15rem;
    border-radius: 3px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    margin-bottom: 1.75rem;
}

/* Empty */
.cart-empty {
    text-align: center;
    padding: 4rem 1rem 5rem;
}

.cart-empty h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.9rem;
    font-weight: 400;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
}

.cart-empty p {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: #777;
    margin-bottom: 2rem;
}

/* Layout */
.cart-layout {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 3rem;
    align-items: start;
}

/* Items */
.cart-item {
    display: grid;
    grid-template-columns: 110px 1fr auto;
    gap: 1.5rem;
    padding: 1.75rem 0;
    border-bottom: 1px solid #eee;
}

.cart-item:first-child {
    border-top: 1px solid #eee;
}

.cart-item-img {
    display: block;
    width: 110px;
    height: 110px;
    background: #f6f6f6;
    border: 1px solid #eee;
    border-radius: 3px;
    overflow: hidden;
}

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

.cart-item-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.cart-item-brand {
    font-family: 'Poppins', sans-serif;
    font-size: 0.7rem;
    letter-spacing: 0.14em;
    color: #999;
}

.cart-item-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    color: #1a1a1a;
    text-decoration: none;
}

.cart-item-title:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cart-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    color: #666;
    margin-top: 0.15rem;
}

.cart-item-unit {
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    color: #999;
    margin-top: auto;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.85rem;
}

.cart-qty {
    display: flex;
    align-items: center;
    border: 1px solid #d9d9d9;
    border-radius: 2px;
    overflow: hidden;
}

.cart-qty .qty-btn {
    width: 34px;
    height: 38px;
    border: 0;
    background: #fff;
    font-size: 1rem;
    color: #1a1a1a;
    cursor: pointer;
    transition: background 0.2s ease;
}

.cart-qty .qty-btn:hover {
    background: #f2f2f2;
}

.cart-qty .qty-input {
    width: 42px;
    height: 38px;
    border: 0;
    border-left: 1px solid #eee;
    border-right: 1px solid #eee;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    color: #1a1a1a;
    -moz-appearance: textfield;
}

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

.cart-item-total {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: #1a1a1a;
}

.cart-remove {
    background: none;
    border: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 0.78rem;
    color: #b42318;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.2s ease;
}

.cart-remove:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.cart-items-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.75rem;
}

.cart-continue {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    color: #1a1a1a;
    text-decoration: none;
}

.cart-continue:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cart-clear {
    background: none;
    border: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 0.82rem;
    color: #999;
    cursor: pointer;
}

.cart-clear:hover {
    color: #b42318;
}

/* Summary */
.cart-summary {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 2rem;
    position: sticky;
    top: 2rem;
}

.summary-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    font-weight: 400;
    color: #1a1a1a;
    margin-bottom: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-family: 'Poppins', sans-serif;
    font-size: 0.88rem;
    color: #333;
    padding: 0.5rem 0;
}

.summary-muted {
    color: #999;
}

.summary-divider {
    height: 1px;
    background: #e5e5e5;
    margin: 0.75rem 0;
}

.summary-total {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1a1a1a;
}

.btn-checkout {
    width: 100%;
    margin-top: 1.5rem;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    padding: 1.05rem 2rem;
    border: 1px solid var(--color-ink);
    background: var(--color-ink);
    color: #fff;
    cursor: pointer;
}

.btn-checkout:disabled {
    background: #e5e5e5;
    border-color: #e5e5e5;
    color: #999;
    cursor: not-allowed;
}

.summary-note {
    font-family: 'Poppins', sans-serif;
    font-size: 0.74rem;
    color: #999;
    line-height: 1.5;
    margin-top: 0.85rem;
    text-align: center;
}

/* Responsive */
@media (max-width: 900px) {
    .cart-container {
        padding: 0 1.5rem;
    }
    .cart-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .cart-summary {
        position: static;
    }
}

@media (max-width: 560px) {
    .cart-item {
        grid-template-columns: 84px 1fr;
    }
    .cart-item-img {
        width: 84px;
        height: 84px;
    }
    .cart-item-actions {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

/* Checkout'a bağlanan özet butonu ve kargo notu ---------------------------- */
.btn-checkout-link {
    display: block;
    text-align: center;
    text-decoration: none;
}

.summary-free-note {
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem;
    color: #7a6a3f;
    background: #fbf9f4;
    border: 1px solid #ece4d4;
    border-radius: 3px;
    padding: 0.55rem 0.7rem;
    margin: 0.5rem 0 0;
    line-height: 1.5;
}

.cart-flash-error {
    background: #fdf3f2;
    color: #8f2018;
    border-color: #f3d4d1;
}
