/* 
 * Cart and Checkout Styles 
 */

/* Cart Item */
.cart-item {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background-color: white;
    padding: 5px;
    border: 1px solid #eee;
    border-radius: 5px;
}

.cart-item-title {
    font-weight: 500;
    margin-bottom: 10px;
}

.cart-item-price {
    font-weight: 600;
    color: var(--bs-primary);
}

.cart-item-quantity {
    width: 80px;
}

.cart-item-total {
    font-weight: 600;
    color: var(--bs-primary);
}

.cart-item-remove {
    color: var(--bs-danger);
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.cart-item-remove:hover {
    color: #a71d2a;
}

/* Cart Summary */
.cart-summary {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
}

.cart-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #dee2e6;
}

.cart-summary-item:last-child {
    border-bottom: none;
}

.cart-summary-label {
    font-weight: 500;
}

.cart-summary-value {
    font-weight: 600;
}

.cart-summary-total {
    font-size: 1.2rem;
    font-weight: 700;
    padding: 15px 0;
}

.cart-summary-total .cart-summary-value {
    color: var(--bs-primary);
}

.cart-actions {
    margin-top: 20px;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 40px 0;
}

.empty-cart-icon {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 20px;
}

/* Checkout */
.checkout-section {
    margin-bottom: 30px;
}

.section-title {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
}

.shipping-address {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.shipping-address-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.shipping-address-name {
    font-weight: 600;
}

.shipping-address-details {
    line-height: 1.6;
}

.payment-method {
    display: block;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s;
}

.payment-method:hover,
.payment-method.active {
    border-color: var(--bs-primary);
    background-color: rgba(0, 123, 255, 0.05);
}

.payment-method-header {
    display: flex;
    justify-content: space-between;
}

.payment-method-title {
    font-weight: 500;
    display: flex;
    align-items: center;
}

.payment-method-title img {
    max-height: 24px;
    margin-right: 10px;
}

.payment-method-details {
    margin-top: 10px;
    display: none;
}

.payment-method.active .payment-method-details {
    display: block;
}

/* Order Summary */
.order-summary {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    position: sticky;
    top: 20px;
}

.order-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    margin-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
}

.order-summary-title {
    font-weight: 600;
    margin-bottom: 0;
}

.order-summary-edit {
    font-size: 0.9rem;
}

.order-summary-items {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.order-item {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.order-item:last-child {
    border-bottom: none;
}

.order-item-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-right: 10px;
}

.order-item-details {
    flex-grow: 1;
}

.order-item-name {
    font-weight: 500;
    margin-bottom: 5px;
}

.order-item-price {
    font-size: 0.9rem;
    color: var(--bs-primary);
}

.order-item-quantity {
    background-color: #e9ecef;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-left: 10px;
}

.order-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #dee2e6;
}

.order-summary-row:last-child {
    border-bottom: none;
    padding-top: 15px;
    padding-bottom: 15px;
    font-weight: 700;
    font-size: 1.1rem;
}

.order-summary-label {
    color: #666;
}

.order-summary-value {
    font-weight: 600;
}

.checkout-btn {
    margin-top: 20px;
}

/* Order Complete */
.order-complete {
    text-align: center;
    padding: 40px 0;
}

.order-complete-icon {
    font-size: 4rem;
    color: var(--bs-success);
    margin-bottom: 20px;
}

.order-complete-number {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.order-complete-actions {
    margin-top: 30px;
}

/* Responsive Styles */
@media (max-width: 767px) {
    .cart-item-image {
        width: 60px;
        height: 60px;
    }
    
    .cart-item-title {
        font-size: 0.9rem;
    }
    
    .cart-item-quantity {
        width: 60px;
    }
    
    .order-summary {
        position: static;
        margin-top: 30px;
    }
}
