/* Custom CSS for SanDiegoEcommerce */

/* Add to Cart Animation */
.flying-item {
    position: fixed;
    z-index: 9999;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.8s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

/* Heart Animation */
.flying-heart {
    position: fixed;
    z-index: 9999;
    color: #ff3366;
    font-size: 30px;
    transition: all 0.8s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

/* Heart Pulse Animation */
.heart-pulse {
    animation: heartPulse 1s infinite;
}

@keyframes heartPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
        color: #ff3366;
    }
    100% {
        transform: scale(1);
    }
}

/* Cart Count Animation */
.cart-count-animation {
    animation: cartCountPulse 0.5s;
}

.cart-counter-increase {
    animation: counterIncrease 0.5s ease;
}

.cart-counter-decrease {
    animation: counterDecrease 0.5s ease;
}

.cart-counter-animate {
    animation: counterPulse 0.5s ease;
}

@keyframes cartCountPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.5);
        background-color: var(--service-primary, #008751);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes counterPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.5);
        background-color: #008751;
    }
}

@keyframes counterIncrease {
    0% {
        transform: scale(1);
        background-color: #008751;
    }
    50% {
        transform: scale(1.5);
        background-color: #28a745;
    }
    100% {
        transform: scale(1);
        background-color: #008751;
    }
}

@keyframes counterDecrease {
    0% {
        transform: scale(1);
        background-color: #008751;
    }
    50% {
        transform: scale(1.5);
        background-color: #ffc107;
    }
    100% {
        transform: scale(1);
        background-color: #008751;
    }
}

/* Toast Animations */
.toast {
    transition: all 0.3s ease;
}

.toast.hide {
    transform: translateX(100%);
    opacity: 0;
}

/* Loading Spinner */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
}

.loading-spinner .spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--service-primary, #008751);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Toast Actions */
.toast-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
    gap: 8px;
}

.toast-btn {
    padding: 4px 8px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.toast-btn-primary {
    background-color: var(--service-primary, #008751);
    color: white;
}

.toast-btn-primary:hover {
    background-color: #006b3e;
}

/* Toast Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background-color: var(--service-primary, #008751);
    width: 0;
    animation: toast-progress-animation 5s linear forwards;
}

@keyframes toast-progress-animation {
    to {
        width: 100%;
    }
}

/* Cart Product Animation */
.cart-product-animation {
    animation: cart-product-pulse 0.5s;
}

@keyframes cart-product-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(0, 135, 81, 0);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 10px rgba(0, 135, 81, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 rgba(0, 135, 81, 0);
    }
}

/* Tracking Page Styles */
.tracking-container {
    max-width: 800px;
    margin: 0 auto;
}

.tracking-header {
    background-color: var(--service-primary, #008751);
    color: white;
    padding: 20px;
    border-radius: 8px 8px 0 0;
}

.tracking-form {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.tracking-timeline {
    position: relative;
    padding-left: 30px;
    margin-top: 20px;
}

.tracking-timeline::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #e9ecef;
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
}

.timeline-marker {
    position: absolute;
    left: -30px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-content {
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.timeline-date {
    color: #6c757d;
    font-size: 0.85rem;
}

.timeline-title {
    margin: 5px 0;
    font-weight: 600;
}

.timeline-location {
    display: flex;
    align-items: center;
    margin-top: 5px;
    color: #495057;
}

.timeline-location i {
    margin-right: 5px;
    color: var(--service-primary, #008751);
}

.timeline-notes {
    margin-top: 8px;
    font-size: 0.9rem;
}

/* Status Colors */
.status-delivered {
    background-color: #28a745;
}

.status-in-transit {
    background-color: #ffc107;
}

.status-pending {
    background-color: #17a2b8;
}

.status-failed {
    background-color: #dc3545;
}

.status-processing {
    background-color: #6610f2;
}

/* Shipment Details Card */
.shipment-details {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 30px;
}

.shipment-details h5 {
    color: var(--service-primary, #008751);
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.detail-label {
    font-weight: 600;
    color: #495057;
}

.detail-value {
    text-align: right;
    color: #212529;
}

/* In Cart Button Styles */
.btn.in-cart {
    background-color: #28a745 !important;
    color: white !important;
    border-color: #28a745 !important;
    transition: all 0.3s ease;
}

.btn.in-cart:hover {
    background-color: #218838 !important;
    border-color: #1e7e34 !important;
}

.btn.in-cart i {
    animation: checkmark-pulse 1s;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .detail-row {
        flex-direction: column;
    }

    .detail-value {
        text-align: left;
        margin-top: 5px;
    }
}
