/* Cart Styles */

.cart-section {
    padding: 40px 0 60px;
    color: var(--light-text);
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 20px;
}

/* Cart Container */
.cart-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

/* Cart Items */
.cart-items {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
}

.cart-item {
    display: grid;
    grid-template-columns: 80px 1fr 120px 100px 40px;
    gap: 15px;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cart-item:last-child {
    border-bottom: none;
}

.item-image img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.item-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.item-details h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.item-details h3 a {
    color: var(--light-text);
    text-decoration: none;
}

.item-details h3 a:hover {
    color: var(--primary-color);
}

.item-color, .item-storage {
    font-size: 14px;
    color: var(--gray-text);
    display: flex;
    align-items: center;
    gap: 5px;
}

.color-circle {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-right: 5px;
}

.item-price {
    font-size: 15px;
    color: var(--gray-text);
}

/* Quantity Controls */
.item-quantity {
    display: flex;
    align-items: center;
}

.quantity-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 4px;
    color: var(--light-text);
    cursor: pointer;
    transition: background-color 0.3s;
}

.quantity-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.quantity-input {
    width: 40px;
    height: 28px;
    text-align: center;
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin: 0 5px;
    color: var(--light-text);
    -moz-appearance: textfield; /* Firefox */
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.item-total {
    font-size: 16px;
    font-weight: 600;
}

.remove-btn {
    background: none;
    border: none;
    color: #ff4d4d;
    cursor: pointer;
    transition: color 0.3s;
    padding: 8px;
}

.remove-btn:hover {
    color: #ff8080;
}

/* Cart Summary */
.cart-summary {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 20px;
    position: sticky;
    top: 20px;
}

.cart-summary h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.summary-row.total {
    margin-top: 20px;
    font-weight: 600;
    font-size: 18px;
}

.discount-amount {
    color: #ff6b6b;
}

/* Coupon Section */
.coupon-section {
    margin: 20px 0;
    padding: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.coupon-form {
    display: flex;
    gap: 10px;
}

.coupon-input {
    flex-grow: 1;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 4px;
    padding: 10px 12px;
    color: var(--light-text);
}

.coupon-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.coupon-input:disabled {
    background-color: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
}

.apply-coupon,
.remove-coupon {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0 15px;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.apply-coupon:hover {
    background-color: #e65c00;
}

.remove-coupon {
    background-color: #ff4d4d;
}

.remove-coupon:hover {
    background-color: #e64545;
}

.coupon-message {
    margin-top: 8px;
    font-size: 14px;
    height: 0;
    overflow: hidden;
    transition: height 0.3s;
}

.coupon-message.show {
    height: 20px;
}

.coupon-message .success {
    color: #4caf50;
}

.coupon-message .error {
    color: #ff4d4d;
}

/* Checkout Button */
.checkout-btn {
    display: block;
    width: 100%;
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 12px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    margin: 20px 0;
    transition: background-color 0.3s;
}

.checkout-btn:hover {
    background-color: #e65c00;
}

/* Payment Methods */
.payment-methods {
    text-align: center;
}

.payment-methods p {
    margin-bottom: 10px;
    font-size: 14px;
    color: var(--gray-text);
}

.payment-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.payment-icons i {
    font-size: 24px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.payment-icons i:hover {
    opacity: 1;
}

/* Empty Cart */
.empty-cart {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.empty-cart-message {
    text-align: center;
    max-width: 400px;
}

.empty-cart-message i {
    font-size: 48px;
    color: var(--gray-text);
    margin-bottom: 20px;
}

.empty-cart-message h2 {
    font-size: 24px;
    margin-bottom: 15px;
}

.empty-cart-message p {
    color: var(--gray-text);
    margin-bottom: 20px;
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #e65c00;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    background-color: #333;
    color: white;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.error {
    background-color: #ff4d4d;
}

/* Responsive */
@media (max-width: 991px) {
    .cart-container {
        grid-template-columns: 1fr;
    }
    
    .cart-summary {
        position: static;
    }
}

@media (max-width: 768px) {
    .cart-item {
        grid-template-columns: 70px 1fr;
        gap: 15px;
        padding: 15px 0;
    }
    
    .item-quantity {
        grid-column: 1 / 2;
        grid-row: 2;
    }
    
    .item-total {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
    }
    
    .item-remove {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        align-self: start;
    }
}

@media (max-width: 480px) {
    .coupon-form {
        flex-direction: column;
    }
}
