/**
 * SWIFT TRAND - Main Stylesheet
 */

:root {
    --primary-color: #ff6b35;
    --secondary-color: #004e89;
    --success-color: #00c853;
    --danger-color: #ff1744;
    --warning-color: #ff9100;
    --info-color: #00b0ff;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --border-color: #dee2e6;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f5f5f5;
}

/* Auth Pages */
.auth-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.auth-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    margin: 1rem;
}

.auth-form-card {
    border: none;
    box-shadow: none;
}

.logo .brand-name {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.logo .brand-tagline {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin-bottom: 0;
}

/* Navigation */
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.navbar-brand:hover {
    color: var(--secondary-color) !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff8c61 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.hero-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Search Bar */
.search-container {
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    border-radius: 50px;
    padding: 1rem 1.5rem;
    border: none;
    box-shadow: var(--shadow-lg);
}

.search-btn {
    border-radius: 50px;
    padding: 1rem 2rem;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    font-weight: 600;
    transition: var(--transition);
}

.search-btn:hover {
    background-color: #003366;
    transform: translateY(-2px);
}

/* Product Cards */
.product-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    overflow: hidden;
    height: 100%;
    border: none;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: var(--light-color);
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-15min {
    background-color: var(--success-color);
    color: white;
}

.badge-discount {
    background-color: var(--danger-color);
    color: white;
}

.badge-outofstock {
    background-color: var(--gray-color);
    color: white;
}

.product-info {
    padding: 1rem;
}

.product-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-name:hover {
    color: var(--primary-color);
}

.product-unit {
    font-size: 0.85rem;
    color: var(--gray-color);
    margin-bottom: 0.5rem;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.current-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-color);
}

.original-price {
    font-size: 0.9rem;
    color: var(--gray-color);
    text-decoration: line-through;
}

.discount-percent {
    font-size: 0.85rem;
    color: var(--success-color);
    font-weight: 600;
}

.add-btn {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
}

.add-btn:hover {
    background-color: #e55a2b;
    transform: translateY(-2px);
}

.add-btn:disabled {
    background-color: var(--gray-color);
    cursor: not-allowed;
    transform: none;
}

/* Categories */
.category-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    padding: 1.5rem;
    cursor: pointer;
    border: none;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.category-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.category-name {
    font-weight: 600;
    color: var(--dark-color);
}

/* Cart */
.cart-item {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1rem;
    margin-bottom: 1rem;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.quantity-btn:hover {
    background-color: var(--light-color);
}

.quantity-input {
    width: 50px;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.25rem;
}

/* Checkout */
.order-summary {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.summary-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.summary-label {
    color: var(--gray-color);
}

.summary-value {
    font-weight: 600;
}

.summary-total {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Order Status */
.order-timeline {
    position: relative;
    padding-left: 2rem;
}

.order-timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.75rem;
    top: 0.25rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background-color: var(--border-color);
    border: 2px solid white;
}

.timeline-item.completed::before {
    background-color: var(--success-color);
}

.timeline-item.current::before {
    background-color: var(--primary-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(255, 107, 53, 0);
    }
}

/* Loading States */
.btn-loader {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Location Selector */
.location-selector {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1rem;
    margin-bottom: 1rem;
}

.location-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.location-btn:hover {
    text-decoration: underline;
}

/* Mobile Navigation */
.mobile-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 0.5rem 0;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--gray-color);
    font-size: 0.75rem;
    padding: 0.5rem;
    transition: var(--transition);
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    color: var(--primary-color);
}

.mobile-nav-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .hero-section p {
        font-size: 1rem;
    }
    
    .product-image {
        height: 150px;
    }
    
    .auth-card {
        padding: 1.5rem;
        margin: 0.5rem;
    }
}

/* Utility Classes */
.text-primary-custom {
    color: var(--primary-color) !important;
}

.bg-primary-custom {
    background-color: var(--primary-color) !important;
}

.btn-primary-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary-custom:hover {
    background-color: #e55a2b;
    border-color: #e55a2b;
}

.card-custom {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.shadow-custom {
    box-shadow: var(--shadow);
}

.rounded-custom {
    border-radius: var(--border-radius);
}

/* Admin Sidebar */
.admin-sidebar {
    background: #1a1a2e;
    min-height: 100vh;
    color: white;
}

.admin-sidebar .nav-link {
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 4px;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(255,255,255,0.1);
    color: white;
}
