.cart-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #DE826B;
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 2000;
    transform: translateY(-100px);
    opacity: 0;
    transition: transform 0.4s ease-out, opacity 0.4s ease-out;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.cart-notification::before {
    content: '✓';
    margin-right: 10px;
    font-weight: bold;
    font-size: 16px;
}

.cart-notification.show {
    transform: translateY(0);
    opacity: 1;
}

.cart-counter {
    display: none;
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #DE826B;
    color: white;
    font-size: 12px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.add-to-cart-button {
    display: inline-block;
    background-color: #DE826B;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    border: none;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(222, 130, 107, 0.2);
}

.add-to-cart-button:hover {
    background-color: #c66b55;
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(222, 130, 107, 0.3);
}

.add-to-cart-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(222, 130, 107, 0.2);
}

.add-to-cart-button i {
    margin-right: 5px;
}

/* Estilos para carrito vacío para carrito.php */
.empty-cart {
    text-align: center;
    padding: 40px 0;
}

.empty-cart .empty-image {
    max-width: 120px;
    margin-bottom: 20px;
    opacity: 0.6;
}

.empty-cart h3 {
    font-size: 22px;
    color: #333;
    margin-bottom: 10px;
}

.empty-cart p {
    color: #666;
    margin-bottom: 20px;
}

/* Estilos para los items en carrito.php */
.cart-container {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
    padding: 30px;
    margin-bottom: 30px;
}

.cart-items {
    margin-bottom: 30px;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 20px;
    margin-bottom: 15px;
    background-color: #f9f9f9;
    border-radius: 10px;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cart-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.item-image {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

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

.item-details {
    flex: 1;
}

.item-details h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 5px;
}

.item-code {
    color: #888;
    font-size: 14px;
    margin-bottom: 8px;
}

.item-price {
    color: #DE826B;
    font-weight: 600;
    font-size: 18px;
}

.item-quantity {
    display: flex;
    align-items: center;
    margin: 0 20px;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    background-color: #DE826B;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.quantity-btn:hover {
    background-color: #c66b55;
}

.quantity {
    margin: 0 15px;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
    user-select: none; /* Prevent text selection */
    -webkit-user-select: none;
    -moz-user-select: none;
}

.item-total {
    font-weight: bold;
    font-size: 18px;
    min-width: 80px;
    text-align: right;
    color: #333;
}

.remove-item {
    width: 32px;
    height: 32px;
    background-color: #f1f1f1;
    color: #888;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-left: 15px;
    transition: all 0.2s;
    font-size: 20px;
}

.remove-item:hover {
    background-color: #ffebeb;
    color: #ff4757;
}

/* Estilos para el resumen del carrito */
.cart-summary {
    background-color: #f9f9f9;
    padding: 20px 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    font-size: 16px;
}

.summary-row.total {
    border-bottom: none;
    font-size: 20px;
    font-weight: 700;
    color: #DE826B;
    margin-bottom: 20px;
}

.checkout-button {
    width: 100%;
    padding: 15px;
    background-color: #DE826B;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 8px rgba(222,130,107,0.3);
}

.checkout-button:hover {
    background-color: #c66b55;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(222,130,107,0.4);
}

.checkout-button:active {
    transform: translateY(0);
}

.checkout-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Responsive styles */
@media (max-width: 768px) {
    .cart-item {
        flex-wrap: wrap;
        padding: 15px;
    }
    
    .item-details {
        width: calc(100% - 120px);
    }
    
    .item-quantity {
        order: 3;
        margin: 10px 0 0 120px;
    }
    
    .item-total {
        order: 4;
        margin-top: 15px;
        margin-left: auto;
    }
    
    .remove-item {
        position: absolute;
        top: 15px;
        right: 15px;
    }
}

@media (max-width: 480px) {
    .cart-item {
        padding: 12px;
    }
    
    .item-image {
        width: 80px;
        height: 80px;
        margin-right: 15px;
    }
    
    .item-details {
        width: calc(100% - 95px);
    }
    
    .item-quantity {
        margin-left: 95px;
    }
    
    .item-details h3 {
        font-size: 16px;
    }
}

/* Hide spinner buttons on number inputs for all browsers */
/* Chrome, Safari, Edge, Opera */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Firefox */
input[type=number] {
    -moz-appearance: textfield;
}

.quantity-input {
    width: 35px;
    text-align: center;
    border: none;
    background: transparent;
    margin: 0 5px;
    padding: 3px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
    cursor: default; /* Change cursor to indicate it's not editable */
    pointer-events: none; /* Prevent any interaction */
    user-select: none; /* Prevent text selection */
    -webkit-user-select: none;
    -moz-user-select: none;
}
