/* style.css */

/* Load Inter font for clean aesthetics */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');
body {
    font-family: 'Inter', sans-serif;
    background-color: #F8F8F8; /* Off-white background */
    color: #333333;
}

/* Custom Tailwind Configuration for specified colors - Classes defined in custom style block in original HTML, kept here for utility */
.aura-primary { color: #6C63FF; }
.bg-aura-primary { background-color: #6C63FF; }
.hover\:bg-aura-primary-dark:hover { background-color: #5A53E0; }
.border-aura-primary { border-color: #6C63FF; }
.shadow-aura-primary { box-shadow: 0 10px 15px -3px rgba(108, 99, 255, 0.2), 0 4px 6px -2px rgba(108, 99, 255, 0.1); }
.aura-secondary { color: #FF6363; }
.bg-aura-secondary { background-color: #FF6363; }
.text-aura-success { color: #5cb85c; }
.text-aura-error { color: #d9534f; }

/* --- Global Transitions/Animations for Smoothness --- */
.transition-default { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }

/* --- Product Card Pop Animation (Triggered by JS/Intersection Observer) --- */
.product-card-pop {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.product-card-pop.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* --- Quantity Number Count Animation (CSS only for visual bounce) --- */
.quantity-bounce {
    animation: bounce 0.2s;
}
@keyframes bounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* --- Custom Truck Animation Keyframes (I. Your Custom Animation) --- */
@keyframes truck-enter {
    0% { transform: translateX(100%); }
    100% { transform: translateX(0); }
}
@keyframes box-slide-in {
    0% { transform: translateY(100%); opacity: 0; }
    50% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(0); opacity: 1; }
}
@keyframes truck-exit {
    0% { transform: translateX(0); }
    100% { transform: translateX(150%); }
}
@keyframes door-open {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(110deg); }
}
@keyframes door-close {
    0% { transform: rotateY(110deg); }
    100% { transform: rotateY(0deg); }
}

/* --- Order Cancellation Animation --- */
@keyframes slideOutAndShrink {
    0% { opacity: 1; transform: scale(1) translateX(0); height: auto; padding: 1rem; margin-bottom: 1.5rem; border-width: 1px; }
    100% { opacity: 0; transform: scale(0.8) translateX(-50px); height: 0; padding: 0; margin: 0; border: 0; }
}
.order-cancel-animation {
    animation: slideOutAndShrink 0.6s ease-in-out forwards;
}


.truck-animation-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.4s;
}
.truck-animation-container.active {
    display: flex;
    opacity: 1;
}

/* Truck Component Styling */
.truck-body {
    width: 100px;
    height: 40px;
    background: #666;
    position: relative;
    border-radius: 4px;
    transform: scaleX(-1); /* Start facing right */
}
.truck-cab {
    width: 30px;
    height: 30px;
    background: #666;
    position: absolute;
    top: -10px;
    right: 90px;
    border-top-right-radius: 5px;
    border-top-left-radius: 5px;
}
.truck-wheel {
    width: 15px;
    height: 15px;
    background: #333;
    border-radius: 50%;
    position: absolute;
    bottom: -8px;
    border: 2px solid #333;
}
.wheel-front { left: 10px; }
.wheel-back { left: 75px; }

.truck-door {
    position: absolute;
    top: 0;
    width: 5px; /* Door thickness */
    height: 40px;
    background: #555;
    transform-origin: left center;
    backface-visibility: hidden;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Springy transition */
}
.truck-door-left { left: 95px; }
.truck-door-right { left: 95px; transform-origin: right center; }
.door-open { transform: rotateY(-110deg) !important; }
.door-close { transform: rotateY(0deg) !important; }

.truck-box {
    width: 20px;
    height: 20px;
    background: #e5e7eb; /* Gray-200 */
    border: 2px solid #9ca3af; /* Gray-400 */
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
}

/* --- Page Transition (Simulated Routing) --- */
.page-section {
    display: none;
    animation: fadeIn 0.4s ease-out;
}
.page-section.active {
    display: block;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* Style for step transitions in checkout */
.checkout-step-container {
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
    will-change: transform, opacity;
}
 
/* Pulse animation for order ID */
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}
.pulse-animation {
    animation: pulse 1s infinite;
}

/* Login Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.modal.active {
    opacity: 1;
    pointer-events: auto;
}
.modal-content {
    transform: translateY(-20px);
    transition: transform 0.3s;
}
.modal.active .modal-content {
    transform: translateY(0);
}

.auth-form {
    display: none;
}
.auth-form.active {
    display: block;
}