/* cart.css - Fully Responsive + Exact Match to Your Screenshot */
:root {
    --gold-yellow: #FFB300;
    --gold-hover: #e6a200;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --border-color: #e5e5e5;
    --bg-light: #f9f9f9;
    --red-delete: #ef4444;
}

* {
    box-sizing: border-box;
}

.cart-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 20px 20px 80px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #fff;
}

.back-btn {
    background: none;
    border: none;
    font-size: 17px;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px 0 10px 20px;
    font-weight: 500;
    padding-top: 3.5rem;
}

.back-btn:hover {
    color: #000;
}

.cart-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 20px 20px 30px;
    text-align: left;
}

.cart-content {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}

/* ======================== CART ITEMS ======================== */
.cart-items-section */ .cart-items-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cart-item {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    background: white;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.item-image-wrapper {
    position: relative;
    flex-shrink: 0;
    width: 120px;
    height: 170px;
    border-radius: 10px;
    overflow: hidden;
}

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

.discount-badge {
    position: absolute;
    top: -8px;
    left: -8px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 6px;
    z-index: 2;
}

.item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.item-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
}

.item-author {
    font-size: 14.5px;
    color: var(--text-secondary);
    margin: 0;
}

.item-rating {
    display: flex;
    gap: 3px;
    font-size: 16px;
    margin: 4px 0;
}

.star {
    color: #ddd;
}

.star-full {
    color: #fbbf24;
}

.star-half {
    background: linear-gradient(90deg, #fbbf24 50%, #ddd 50%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.item-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 8px;
}

.item-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-end;
    margin-left: auto;
}

/* Quantity Selector - Circle Style */
.quantity-selector {
    display: flex;
    align-items: center;
    background: #f0f0f0;
    border-radius: 50px;
    padding: 6px;
    width: fit-content;
}

.qty-btn {
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: #f8f8f8;
}

.qty-btn:active {
    background: #e0e0e0;
}

.qty-input {
    width: 50px;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 16px;
    font-weight: 600;
    pointer-events: none;
}

/* Delete Button */
.delete-btn {
    background: none;
    border: none;
    color: var(--red-delete);
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: background 0.2s;
}

.delete-btn:hover {
    background: #feecec;
}

/* ======================== ORDER SUMMARY ======================== */
.order-summary {
    background: white;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.summary-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 15px;
    color: #333;
}

.summary-total {
    border-top: 1px solid #eee;
    padding-top: 16px;
    margin-top: 16px;
    font-weight: 600;
}

.summary-total .summary-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.free-delivery-notice {
    margin: 16px 0;
    padding-top: 12px;
    /* background: #fff8e1; */
    /* border-radius: 8px; */
    font-size: 12px;
    color: #4d4d4d;
    /* text-align: center; */
   
}

/* .free-delivery-notice.success {
    background: #ecfdf5;
    color: #065f46;
    border-color: #86efac;
} */

.btn-checkout {
    width: 100%;
    padding: 18px;
    background: var(--gold-yellow);
    color: #000;
    border: none;
    border-radius: 50px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 24px;
    transition: background 0.3s;
}

.btn-checkout:hover {
    background: var(--gold-hover);
}

/* ======================== RESPONSIVE ======================== */
@media (max-width: 1024px) {
    .cart-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .order-summary {
        position: static;
    }
}

@media (max-width: 768px) {
    .cart-container {
        padding: 15px 15px 60px;
    }

    .cart-title {
        font-size: 28px;
        margin-left: 15px;
    }

    .back-btn {
        margin-left: 15px;
    }

    .cart-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px;
    }

    .item-image-wrapper {
        width: 140px;
        height: 200px;
        margin: 0 auto;
    }

    .item-actions {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        margin-left: 0;
        margin-top: 10px;
    }

    .quantity-selector {
        order: 2;
    }
}

@media (max-width: 480px) {
    .cart-title {
        font-size: 26px;
    }

    .item-title {
        font-size: 17px;
    }

    .item-price {
        font-size: 20px;
    }

    .qty-btn {
        width: 44px;
        height: 44px;
        font-size: 22px;
    }

    .qty-input {
        width: 56px;
        font-size: 17px;
    }

    .order-summary {
        padding: 20px;
        border-radius: 12px;
    }

    .summary-total .summary-value {
        font-size: 22px;
    }

    .btn-checkout {
        padding: 16px;
        font-size: 16px;
    }
}

@media (max-width: 360px) {
    .cart-container {
        padding: 10px;
    }

    .cart-item {
        padding: 16px;
    }
}

.delete-btn svg {
    stroke: currentColor !important;
    fill: none !important;
}