/**
 * DigiMitro FoodHub - Main Stylesheet
 * Responsive design for food delivery platform
 */

/* ========================================
   GLOBAL STYLES
   ======================================== */

:root {
    --primary-color: #ff6b35;
    --secondary-color: #f7931e;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --dark-color: #333333;
    --light-color: #f8f9fa;
    --border-color: #dee2e6;
}

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

body {
    font-family: 'Roboto', 'Arial', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #ffffff;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */

.main-header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.75rem;
    font-weight: bold;
    color: var(--primary-color) !important;
}

.navbar-brand img {
    height: 40px;
    margin-right: 10px;
}

.navbar-nav .nav-link {
    color: var(--dark-color) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

.btn-login, .btn-signup {
    margin-left: 10px;
}

.user-menu {
    position: relative;
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 10px 0;
    margin-top: 10px;
}

.user-menu:hover .user-dropdown {
    display: block;
}

.user-dropdown a {
    display: block;
    padding: 10px 20px;
    color: var(--dark-color);
}

.user-dropdown a:hover {
    background-color: var(--light-color);
}

/* ========================================
   BANNER SLIDER
   ======================================== */

.banner-slider {
    margin-top: 0;
}

.carousel-inner img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.6);
    padding: 20px;
    border-radius: 10px;
    bottom: 50px;
}

.carousel-caption h2 {
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
    margin-bottom: 10px;
}

.carousel-caption p {
    font-size: 1.2rem;
    color: white;
}

/* ========================================
   SEARCH SECTION
   ======================================== */

.search-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 50px 0;
    color: white;
}

.search-box {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.search-box h3 {
    color: var(--dark-color);
    margin-bottom: 30px;
}

.search-form .form-control-lg {
    height: 50px;
    border-radius: 8px;
}

.search-form .btn-lg {
    height: 50px;
    border-radius: 8px;
}

/* ========================================
   RESTAURANT LISTING
   ======================================== */

.restaurant-listing {
    padding: 50px 0;
    background-color: var(--light-color);
}

.restaurant-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.restaurant-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.restaurant-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.restaurant-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.restaurant-card:hover .restaurant-image img {
    transform: scale(1.1);
}

.closed-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
}

.restaurant-info {
    padding: 20px;
}

.restaurant-info h5 {
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.restaurant-meta {
    margin-bottom: 10px;
}

.restaurant-meta .cuisine {
    color: #666;
    font-size: 0.9rem;
}

.restaurant-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin: 10px 0;
}

.restaurant-stats .rating {
    color: var(--dark-color);
    font-weight: 600;
}

.restaurant-stats .delivery-time {
    color: #666;
}

.restaurant-footer {
    padding-top: 10px;
}

.restaurant-footer .min-order {
    color: #666;
    font-size: 0.9rem;
}

/* ========================================
   MENU ITEMS
   ======================================== */

.menu-section {
    padding: 40px 0;
}

.menu-category {
    margin-bottom: 40px;
}

.menu-category h4 {
    color: var(--dark-color);
    font-weight: bold;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: 20px;
}

.menu-item-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    transition: box-shadow 0.3s ease;
}

.menu-item-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.menu-item-info {
    flex: 1;
}

.menu-item-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.veg-icon, .nonveg-icon {
    width: 18px;
    height: 18px;
    border: 2px solid;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}

.veg-icon {
    border-color: #28a745;
}

.nonveg-icon {
    border-color: #dc3545;
}

.veg-icon::before {
    content: '';
    width: 10px;
    height: 10px;
    background: #28a745;
    border-radius: 50%;
}

.nonveg-icon::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 8px solid #dc3545;
}

.menu-item-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--dark-color);
}

.menu-item-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.menu-item-price {
    font-weight: bold;
    color: var(--dark-color);
    font-size: 1.1rem;
}

.menu-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
}

.menu-item-image {
    width: 120px;
    height: 100px;
    border-radius: 8px;
    object-fit: cover;
    margin-left: 15px;
}

.add-to-cart-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.add-to-cart-btn:hover {
    background: var(--secondary-color);
}

.quantity-control {
    display: flex;
    align-items: center;
    background: var(--primary-color);
    border-radius: 5px;
    overflow: hidden;
}

.quantity-control button {
    background: transparent;
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s ease;
}

.quantity-control button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.quantity-control .quantity {
    color: white;
    padding: 0 15px;
    font-weight: 600;
}

/* ========================================
   CART & CHECKOUT
   ======================================== */

.cart-section {
    padding: 40px 0;
}

.cart-items {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-summary {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 80px;
}

.cart-summary h4 {
    margin-bottom: 20px;
    color: var(--dark-color);
}

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

.summary-total {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--dark-color);
    margin-top: 10px;
}

/* ========================================
   ORDER TRACKING
   ======================================== */

.order-timeline {
    padding: 30px 0;
}

.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline-item {
    position: relative;
    padding: 20px 0 20px 60px;
    border-left: 3px solid var(--border-color);
}

.timeline-item.active {
    border-left-color: var(--success-color);
}

.timeline-icon {
    position: absolute;
    left: -15px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.timeline-item.active .timeline-icon {
    background: var(--success-color);
}

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

/* ========================================
   BADGES & ALERTS
   ======================================== */

.badge {
    padding: 5px 10px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.85rem;
}

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

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

.badge-warning {
    background: var(--warning-color);
    color: var(--dark-color);
}

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

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

/* ========================================
   FORMS
   ======================================== */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.25);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.invalid-feedback {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 5px;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    display: inline-block;
    padding: 10px 25px;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: var(--secondary-color);
    color: white;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #218838;
    color: white;
}

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

.btn-danger:hover {
    background: #c82333;
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    color: white;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 5px 15px;
    font-size: 0.875rem;
}

/* ========================================
   FOOTER
   ======================================== */

.main-footer {
    background: var(--dark-color);
    color: white;
    padding: 40px 0 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #ccc;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #555;
    padding-top: 20px;
    text-align: center;
    color: #ccc;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .carousel-inner img {
        height: 250px;
    }
    
    .carousel-caption h2 {
        font-size: 1.5rem;
    }
    
    .search-section {
        padding: 30px 0;
    }
    
    .search-box {
        padding: 20px;
    }
    
    .restaurant-card {
        margin-bottom: 20px;
    }
    
    .menu-item-card {
        flex-direction: column;
    }
    
    .menu-item-image {
        width: 100%;
        height: 150px;
        margin: 15px 0 0 0;
    }
    
    .cart-summary {
        position: static;
    }
}

@media (max-width: 576px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .restaurant-stats {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-inline-block { display: inline-block; }

.flex-column { flex-direction: column; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }

.text-muted { color: #6c757d; }
.text-primary { color: var(--primary-color); }
.text-success { color: var(--success-color); }
.text-danger { color: var(--danger-color); }
.text-warning { color: var(--warning-color); }

.bg-light { background-color: var(--light-color); }
.bg-white { background-color: white; }

.rounded { border-radius: 0.25rem; }
.shadow { box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); }

.w-100 { width: 100%; }
.h-100 { height: 100%; }
