/* Shopping Cart Styles */

.cart-container {
    padding: 2rem 0;
    min-height: 60vh;
    background-color: #f8f9fa;
}

.cart-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
}

/* Cart Items */
.cart-item {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.cart-item:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.cart-item-content {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.item-top-section {
    display: contents;
}

.item-image-wrapper {
    flex-shrink: 0;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.cart-item-image-placeholder {
    width: 80px;
    height: 80px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 1.5rem;
    border: 1px solid #e9ecef;
}

.item-details {
    flex-grow: 1;
    min-width: 0;
}

.item-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.item-name a:hover {
    color: #667eea !important;
}

.item-category {
    font-size: 0.8125rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.item-price {
    font-size: 0.875rem;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 0;
}

.item-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.quantity-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #495057;
    margin-bottom: 0;
}

.quantity-input {
    width: 60px;
    text-align: center;
    font-size: 0.875rem;
    padding: 0.25rem;
}

.item-subtotal {
    text-align: right;
}

.subtotal-label {
    font-size: 0.75rem;
    color: #6c757d;
    display: block;
    margin-bottom: 0.125rem;
}

.item-subtotal strong {
    font-size: 1rem;
    color: #212529;
}

.item-remove-form {
    margin: 0;
}

.btn-remove {
    color: #dc3545;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0.25rem 0.5rem;
}

.btn-remove:hover {
    color: white;
    background-color: #dc3545;
}

/* Cart Summary */
.cart-summary {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 90px;
}

.summary-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 1.25rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
    color: #495057;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.total-amount {
    font-size: 1.5rem;
    color: #667eea;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 10px;
}

.empty-cart i {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1.5rem;
}

.empty-cart h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.75rem;
}

.empty-cart p {
    font-size: 1rem;
    color: #6c757d;
}

/* Responsive Design */
@media (max-width: 991px) {
    .cart-summary {
        position: static;
        margin-top: 2rem;
    }
}

@media (max-width: 767px) {
    .cart-container {
        padding: 1.5rem 0;
    }

    .cart-title {
        font-size: 1.375rem; /* Increased for better visibility */
        font-weight: 700;
    }

    /* IMPROVED: Better card spacing and padding */
    .cart-item {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .cart-item-content {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
    }

    .item-top-section {
        display: flex;
        gap: 1rem;
        align-items: center;
        margin-bottom: 1rem;
    }

    /* IMPROVED: Slightly larger images for better product visibility */
    .item-image-wrapper {
        flex-shrink: 0;
        width: 85px;
    }

    .cart-item-image,
    .cart-item-image-placeholder {
        width: 85px;
        height: 85px;
    }

    .item-details {
        text-align: left;
        flex-grow: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* IMPROVED: Larger, more readable text */
    .item-name {
        font-size: 1rem; /* Increased from 0.9375rem */
        margin-bottom: 0.35rem;
        line-height: 1.35;
        font-weight: 700;
    }

    .item-category {
        font-size: 0.85rem; /* Increased from 0.8125rem */
        margin-bottom: 0.3rem;
        line-height: 1.3;
    }

    .item-price {
        font-size: 0.95rem; /* Increased from 0.875rem */
        margin-bottom: 0;
        line-height: 1.3;
        font-weight: 700;
    }

    /* IMPROVED: Better spaced actions */
    .item-actions {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding-top: 1rem;
        border-top: 1px solid #e9ecef;
        gap: 0.75rem;
    }

    .quantity-wrapper {
        order: 1;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .quantity-label {
        white-space: nowrap;
        font-size: 0.875rem;
        font-weight: 600;
    }

    .quantity-input {
        font-size: 0.9rem; /* Slightly larger */
        padding: 0.4rem;
        width: 65px; /* Slightly wider */
    }

    .item-subtotal {
        order: 2;
        text-align: center;
        flex-grow: 1;
    }

    .subtotal-label {
        font-size: 0.8rem; /* Increased from 0.75rem */
        display: block;
        font-weight: 600;
    }

    .item-subtotal strong {
        font-size: 1.05rem; /* Increased from 0.9375rem */
        display: block;
        font-weight: 800;
    }

    .item-remove-form {
        order: 3;
    }

    .btn-remove {
        font-size: 1rem; /* Larger for easier tapping */
        padding: 0.4rem 0.6rem;
    }

    /* IMPROVED: Better summary card */
    .cart-summary {
        padding: 1.5rem;
        margin-top: 1.5rem;
    }

    .summary-title {
        font-size: 1.25rem; /* Increased */
        font-weight: 700;
    }

    .summary-row {
        font-size: 0.95rem; /* Increased from 0.875rem */
    }

    .summary-total {
        font-size: 1rem; /* Slightly increased */
        font-weight: 700;
    }

    .total-amount {
        font-size: 1.5rem; /* Increased from 1.25rem */
        font-weight: 800;
    }

    .empty-cart {
        padding: 3rem 1.5rem;
    }

    .empty-cart i {
        font-size: 3rem;
    }

    .empty-cart h4 {
        font-size: 1.25rem;
    }

    .empty-cart p {
        font-size: 0.9375rem;
    }
}

@media (max-width: 575px) {
    /* IMPROVED: Keep images visible on very small screens */
    .item-image-wrapper {
        width: 80px;
    }

    .cart-item-image,
    .cart-item-image-placeholder {
        width: 80px;
        height: 80px;
    }

    /* IMPROVED: Maintain readable text on small screens */
    .item-name {
        font-size: 0.95rem;
        line-height: 1.3;
    }

    .item-category {
        font-size: 0.8rem;
    }

    .item-price {
        font-size: 0.9rem;
    }

    .quantity-input {
        width: 60px; /* Increased from 55px for easier input */
        font-size: 0.875rem;
    }

    .item-subtotal strong {
        font-size: 1rem;
    }

    .subtotal-label {
        font-size: 0.75rem;
    }

    .cart-title {
        font-size: 1.25rem;
    }

    .summary-title {
        font-size: 1.125rem;
    }

    .total-amount {
        font-size: 1.375rem;
    }
}
