/* Enhanced Savings Message Styles */
.savings-message {
    background-color: #e8f5e9;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    color: #2e7d32;
    font-size: 16px;
    text-align: center;
    line-height: 1.5;
}

.savings-message.with-coupon {
    background-color: #e3f2fd;
    color: #1565c0;
}

/* Coupon Section in Total Area Styles */
.total-section .coupon-section {
    margin: 15px 0;
    padding: 0;
    border: none;
    background-color: transparent;
}

.total-section .coupon-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.total-section .coupon-wrapper input {
    flex: 1;
    /*margin-right: 10px;
    border-radius: 4px;
    border: 1px solid #ccc;*/
    padding: 8px 12px;
}

.total-section .apply-coupon-button {
    background-color: #203e5b;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.total-section .apply-coupon-button:hover {
    background-color: #152c41;
}

.total-section .coupon-message {
    font-size: 14px;
    margin-top: 5px;
}

.total-section .coupon-message.success {
    color: #28a745;
}

.total-section .coupon-message.error {
    color: #dc3545;
}

/* Payment Section Styles */
.card-details {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.card-details h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #203e5b;
    font-size: 20px;
}

/* Improved Order Summary Styles */
.total-section {
    background-color: #f9f9f9;
    border-radius: 10px;
    padding: 20px;
    margin: 25px 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.total-section h2 {
    color: var(--primary-color);
    font-size: 22px;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 700;
}

.order-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 15px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.item-details {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.item-name {
    display: flex;
    flex-direction: column;
}

.item-title {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 16px;
}

.item-subtitle {
    color: #666;
    font-size: 14px;
    margin-top: 2px;
}

.item-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.item-original-price {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
}

.item-current-price {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 16px;
}

.order-divider {
    height: 1px;
    background-color: #e0e0e0;
    margin: 15px 0;
}

.discount-applied {
    background-color: #e8f5e9;
    padding: 10px 15px;
    border-radius: 6px;
    margin: 10px 0;
}

.discount-details {
    display: flex;
    justify-content: space-between;
}

.discount-label {
    font-weight: 600;
    color: #2e7d32;
}

.discount-amount {
    font-weight: 700;
    color: #2e7d32;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-weight: 700;
}

.total-label {
    font-size: 18px;
    color: var(--primary-color);
}

.total-price {
    text-align: right;
}

.original-total {
    display: block;
    text-decoration: line-through;
    color: #999;
    font-size: 16px;
}

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

.savings-message {
    background-color: #e8f5e9;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    color: #2e7d32;
    font-size: 16px;
    text-align: center;
    font-weight: 600;
    line-height: 1.5;
}

/* Coupon styles repositioned above total */
.coupon-section {
    margin: 10px 0;
}

.coupon-wrapper {
    display: flex;
    align-items: center;
    border-radius: 6px;
    overflow: hidden;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.coupon-wrapper input {
    flex: 1;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-right: none;
    border-radius: 6px 0 0 6px;
    font-size: 14px;
    text-align: center;
    font-weight: 600;
}

.coupon-wrapper input::placeholder {
    font-weight: normal;
}

.coupon-wrapper input:focus {
    outline: none;
}

.coupon-wrapper .apply-coupon-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    border-radius: 0 6px 6px 0;
}

.coupon-wrapper .apply-coupon-button:hover {
    background-color: #16324d;
}

.coupon-wrapper .apply-coupon-button.applied {
    background-color: #2e7d32;
    cursor: default;
}

.coupon-message {
    margin-top: 8px;
    font-size: 14px;
}

.coupon-message.success {
    color: #2e7d32;
}

.coupon-message.error {
    color: #c62828;
}

/* Discount applied styles */
.discount-applied {
    padding: 10px 0;
    margin: 5px 0;
}

.discount-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.discount-label {
    font-weight: 600;
    color: var(--primary-color);
}

.discount-amount {
    font-weight: 700;
    color: #2e7d32;
}

/* Responsive styles */
@media (max-width: 768px) {
    .total-section .coupon-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .total-section .coupon-wrapper input {
        margin-right: 0;
        /*margin-bottom: 10px;*/
    }
    
    .total-section .apply-coupon-button {
        width: 100%;
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .total-section {
        padding: 15px;
        margin: 15px 0;
    }
    
    .item-title {
        font-size: 15px;
    }
    
    .item-subtitle {
        font-size: 13px;
    }
    
    .current-total {
        font-size: 22px;
    }
    
    .coupon-wrapper .apply-coupon-button {
        padding: 12px 15px;
    }
}
