/* Cart Styling for Artista Pizzeria */

/* Floating Cart Button */
.floating-cart-btn {
    position: fixed;
    bottom: 80px; /* Above the designer badge */
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #d4af37;
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: slideIn 0.5s ease;
}

.floating-cart-btn:hover {
    background-color: #b8941f;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.floating-cart-btn i {
    font-size: 1.5rem;
}

.floating-cart-counter {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #d32f2f;
    color: white;
    border-radius: 50%;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 0 6px;
    border: 2px solid white;
    display: none;
}

@keyframes slideIn {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
    }
}

.floating-cart-btn.pulse {
    animation: pulse 0.5s ease;
}

/* Cart Tooltip */
.cart-tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #333;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-tooltip::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid #333;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.floating-cart-btn:hover .cart-tooltip {
    opacity: 1;
}

/* Add to Cart Button */
.add-to-cart-btn {
    background-color: #d4af37;
    color: #333;
    border: none;
    padding: 8px 16px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.add-to-cart-btn:hover {
    background-color: #b8941f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.add-to-cart-btn i {
    font-size: 0.85rem;
}

/* Cart Notification */
.cart-notification {
    position: fixed;
    bottom: 30px;
    right: -350px;
    background-color: #4caf50;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: right 0.3s ease;
    z-index: 10001;
}

.cart-notification.show {
    right: 30px;
}

.cart-notification i {
    font-size: 1.2rem;
}

/* Cart Modal */
.cart-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    display: flex;
    justify-content: flex-end;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-modal.show {
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 1;
    visibility: visible;
}

.cart-content {
    width: 450px;
    max-width: 90vw;
    height: 100%;
    background-color: white;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.cart-modal.show .cart-content {
    transform: translateX(0);
}

/* Cart Header */
.cart-header {
    padding: 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f5f0;
}

.cart-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: #333;
    margin: 0;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-cart:hover {
    color: #333;
}

/* Cart Items */
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.empty-cart {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    margin-top: 50px;
}

.cart-item {
    background-color: #f8f5f0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.cart-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cart-item-info {
    margin-bottom: 12px;
}

.cart-item h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: #333;
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.item-size {
    display: inline-block;
    background-color: #d4af37;
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 12px;
    font-family: 'Open Sans', sans-serif;
}

.cart-item-desc {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
    margin: 0 0 4px 0;
}

.cart-item-category {
    font-size: 0.85rem;
    color: #999;
    font-style: italic;
    margin: 0;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Quantity Controls */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: white;
    border-radius: 20px;
    padding: 4px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: none;
    background-color: #d4af37;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.qty-btn:hover {
    background-color: #b8941f;
    transform: scale(1.1);
}

.qty-btn i {
    font-size: 0.7rem;
}

.quantity {
    font-weight: bold;
    min-width: 30px;
    text-align: center;
}

.cart-item-price {
    font-weight: bold;
    font-size: 1.1rem;
    color: #333;
    margin-left: auto;
}

.remove-btn {
    background: none;
    border: none;
    color: #d32f2f;
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s ease;
}

.remove-btn:hover {
    color: #b71c1c;
    transform: scale(1.1);
}

/* Cart Footer */
.cart-footer {
    padding: 20px;
    background-color: #f8f5f0;
    border-top: 2px solid #d4af37;
}

.cart-totals {
    margin-bottom: 20px;
}

.total-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    color: #333;
    font-size: 1rem;
}

.total-line.tax-line {
    color: #666;
    font-size: 0.95rem;
    padding: 5px 0;
}

.total-line.final-total {
    border-top: 2px solid #d4af37;
    margin-top: 10px;
    padding-top: 15px;
    font-size: 1.3rem;
    font-weight: bold;
}

.total-price {
    color: #d4af37;
    font-size: 1.5rem;
    font-weight: bold;
}

.cart-actions {
    margin-bottom: 20px;
}

.clear-cart-btn {
    width: 100%;
    background-color: #f44336;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.clear-cart-btn:hover {
    background-color: #d32f2f;
}

/* Order Instructions */
.order-instructions {
    background-color: white;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.order-instructions p {
    color: #666;
    font-size: 0.95rem;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.call-to-order {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #4caf50;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.call-to-order:hover {
    background-color: #388e3c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.call-to-order i {
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .floating-cart-btn {
        width: 56px;
        height: 56px;
        bottom: 70px;
        right: 15px;
    }

    .floating-cart-btn i {
        font-size: 1.3rem;
    }

    .cart-tooltip {
        display: none;
    }

    .cart-content {
        width: 100%;
        max-width: 100%;
    }

    .cart-header h2 {
        font-size: 1.5rem;
    }

    .cart-item {
        padding: 12px;
    }

    .cart-item h4 {
        font-size: 1.1rem;
    }

    .cart-item-desc {
        font-size: 0.85rem;
    }

    .cart-item-controls {
        flex-wrap: wrap;
    }

    .cart-total {
        font-size: 1.1rem;
    }

    .total-price {
        font-size: 1.3rem;
    }

    .call-to-order {
        font-size: 1rem;
        padding: 10px 20px;
    }

    .cart-notification {
        bottom: 20px;
    }

    .cart-notification.show {
        right: 20px;
    }
}

@media (max-width: 480px) {
    .floating-cart-btn {
        width: 50px;
        height: 50px;
        bottom: 65px;
        right: 12px;
    }

    .floating-cart-btn i {
        font-size: 1.2rem;
    }

    .floating-cart-counter {
        min-width: 20px;
        height: 20px;
        font-size: 0.7rem;
        top: -3px;
        right: -3px;
    }

    .cart-header {
        padding: 16px;
    }

    .cart-items {
        padding: 12px;
    }

    .cart-footer {
        padding: 16px;
    }

    .qty-btn {
        width: 24px;
        height: 24px;
    }

    .cart-item-price {
        font-size: 1rem;
    }
}