/* static/css/main.css */
/* ============================================
   EQUAL-HEIGHT PRODUCT CARDS
   ============================================ */

.card-hover {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-hover .card-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.navbar {
    padding: 8px 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}

.navbar-brand i {
    color: #E67E22;
}

.nav-link {
    font-weight: 500;
    padding: 8px 16px !important;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: #E67E22;
    color: white !important;
}

.btn-primary {
    background: #E67E22;
    border: none;
    border-radius: 50px;
    padding: 8px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #D35400;
    transform: translateY(-2px);
}

.btn-primary.text-white {
    color: white !important;
}

/* Cart badge */
.badge.bg-warning {
    background-color: #E67E22 !important;
    color: white !important;
}

/* Navbar */
.navbar-custom {
    background: #ffffff !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 12px 0;
}

.navbar-custom .navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: #212529 !important;
}

.navbar-custom .navbar-brand i {
    color: #27AE60;
}

.navbar-custom .nav-link {
    font-weight: 500;
    color: #212529 !important;
    padding: 8px 16px !important;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.navbar-custom .nav-link:hover {
    color: #E67E22 !important;
}

.navbar-custom .btn-primary {
    background: #E67E22 !important;
    border: none;
    border-radius: 50px;
    padding: 8px 24px;
    font-weight: 600;
    color: white !important;
}

.navbar-custom .btn-primary:hover {
    background: #D35400 !important;
}

.navbar-custom .cart-badge {
    background: #E67E22;
    color: white;
    border-radius: 50%;
    padding: 2px 8px;
    font-size: 10px;
    position: absolute;
    top: -5px;
    right: -10px;
}

body {
    padding-top: 65px;
}


/* ============================================
   MOBILE GLOBAL FIXES
   ============================================ */

html, body {
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

.table-responsive {
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 767px) {

    body {
        padding-top: 70px;
    }

    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* Headings scale down */
    h1, .display-1, .display-2, .display-3, .display-4, .display-5 {
        font-size: 1.75rem !important;
        line-height: 1.2;
    }
    h2, .display-6 {
        font-size: 1.5rem !important;
    }
    h3 {
        font-size: 1.25rem !important;
    }

    /* Sections tighter */
    section {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    /* Touch-friendly buttons */
    .btn {
        min-height: 42px;
        padding: 8px 16px;
    }

    /* Cards */
    .card {
        border-radius: 12px !important;
    }
}


@media (max-width: 767px) {
    /* Stack form buttons nicely */
    .form-control-lg {
        font-size: 1rem;
        padding: 10px 14px;
    }
}


@media (max-width: 767px) {
    /* Product cards in grids */
    .card-hover .card-img-top,
    .card-hover img {
        height: 160px !important;
        object-fit: cover;
    }
    .card-hover .card-body {
        padding: 10px;
    }
    .card-hover .card-title {
        font-size: 0.85rem;
        line-height: 1.2;
        margin-bottom: 4px;
    }
    .card-hover .text-muted {
        font-size: 0.7rem;
    }
    .card-hover .price {
        font-size: 0.9rem;
    }
}

/* Product card title — single line with ellipsis */
.card-hover .card-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}


/* =========================================================
   DayMeal primary action button
   Used across the site for primary CTAs (Add to Cart,
   Proceed to Checkout, Pay and Place Order, etc.)
   ========================================================= */
.btn-primary-custom {
    background-color: #E67E22;
    border: 2px solid #E67E22;
    color: #ffffff;
    font-weight: 700;
    padding: 10px 22px;
    border-radius: 8px;
    transition: background-color 0.15s, border-color 0.15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    line-height: 1.3;
}

.btn-primary-custom:hover,
.btn-primary-custom:focus {
    background-color: #D35400;
    border-color: #D35400;
    color: #ffffff;
    text-decoration: none;
}

.btn-primary-custom:disabled,
.btn-primary-custom.disabled {
    background-color: #B0B0B0;
    border-color: #B0B0B0;
    color: #ffffff;
    cursor: not-allowed;
    opacity: 0.75;
}

/* Small size modifier */
.btn-primary-custom.btn-sm {
    padding: 5px 12px;
    font-size: 0.85rem;
}

/* =========================================================
   Mobile Bottom Navigation
   ========================================================= */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #ffffff;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1030;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.04);
}

.mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 4px;
    text-decoration: none;
    color: #6c757d;
    font-size: 0.65rem;
    font-weight: 500;
    transition: color 0.15s;
    position: relative;
    height: 100%;
}

.mobile-nav-item i {
    width: 22px;
    height: 22px;
    stroke-width: 1.8;
}

.mobile-nav-item span {
    line-height: 1;
}

.mobile-nav-item.active {
    color: #E67E22;
}

.mobile-nav-item.active i {
    stroke-width: 2.4;
}

.mobile-nav-item:active {
    color: #D35400;
}

/* Badge (cart count, unread alerts) */
.mobile-nav-badge {
    position: absolute;
    top: 4px;
    right: calc(50% - 20px);
    background: #DC3545;
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
    line-height: 1.4;
}

/* Prevent content from hiding behind the bottom nav */
@media (max-width: 991.98px) {
    body {
        padding-bottom: 64px;
    }
}
