/* =====================================================
   FOODLOOP — GLOBAL STYLES (Green Theme)
===================================================== */

/* =========================
   THEME VARIABLES
========================= */
:root {
    --primary: #16a34a;
    --primary-600: #15803d;
    --primary-700: #166534;
    --bg: #f6f8fb;
    --surface: #ffffff;
    --text: #111827;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --radius: 14px;
    --shadow-sm: 0 6px 18px rgba(17, 24, 39, 0.06);
    --shadow-md: 0 14px 34px rgba(17, 24, 39, 0.10);
    --focus: 0 0 0 0.12rem #ffffff, 0 0 0 0.25rem rgba(22,163,74,0.35);
}

/* =========================
   BASE
========================= */
html {
    font-size: 14px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    margin-top: 60px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =========================
   FOCUS
========================= */
.btn:focus,
.form-control:focus,
.form-select:focus {
    box-shadow: var(--focus) !important;
    border-color: rgba(22,163,74,0.35) !important;
}

/* =========================
   UTILITIES
========================= */
.text-muted {
    color: var(--text-muted) !important;
}

.card-clean {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

/* =====================================================
   NAVBAR (NEW APP STYLE)
===================================================== */

/* =========================
   RESPONSIVE NAVBAR ADD-ON
========================= */

/* hamburger */
.hamburger-btn {
    border: none;
    background: transparent;
    font-size: 24px;
    padding: 6px;
    border-radius: 10px;
}

    .hamburger-btn:hover {
        background: rgba(22,163,74,0.08);
    }

/* right icons */
.navbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* desktop only */
@media (min-width: 992px) {
    .hamburger-btn {
        display: none;
    }
}

/* mobile only */
@media (max-width: 991px) {

    .navbar-search {
        display: none !important;
    }

    .navbar-collapse {
        display: none !important;
    }
}

.navbar,
.app-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
    background: rgba(255,255,255,0.8) !important;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    padding: 10px 16px;
}

/* LAYOUT */
.navbar-layout {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* HAMBURGER */
.hamburger-btn {
    border: none;
    background: transparent;
    font-size: 24px;
    padding: 6px;
    border-radius: 10px;
    transition: background .15s ease;
}

    .hamburger-btn:hover {
        background: rgba(22,163,74,0.08);
    }

/* BRAND */
.navbar-brand {
    font-weight: 800;
    color: var(--primary) !important;
    text-decoration: none;
}

/* RIGHT SIDE */
.navbar-right {
    margin-left: auto;
    display: flex;
    gap: 10px;
}

/* ICON BUTTON */
.nav-icon-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--text);
    transition: 0.15s;
}

    .nav-icon-btn:hover {
        background: rgba(22,163,74,0.08);
        color: #16a34a;
    }

/* CART BADGE */
.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--primary);
    color: white;
    font-size: 11px;
    border-radius: 999px;
    padding: 2px 5px;
}

/* OFFCANVAS */
.offcanvas {
    width: 280px;
}

/* SEARCH */
.mobile-search {
    position: relative;
}

    .mobile-search input {
        width: 100%;
        padding: 10px 14px 10px 36px;
        border-radius: 999px;
        border: none;
        background: #f3f4f6;
    }

    .mobile-search i {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
    }

/* =========================
   NAV LINKS (RESTORE DESIGN)
========================= */

.navbar .nav-link,
.app-navbar .nav-link {
    color: var(--text) !important;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    transition: background-color .15s ease, color .15s ease, transform .05s ease;
    text-decoration: none;
}

    .navbar .nav-link:hover,
    .app-navbar .nav-link:hover {
        background: rgba(22,163,74,0.08);
        color: var(--primary) !important;
    }

    .navbar .nav-link.active,
    .app-navbar .nav-link.active {
        background: rgba(22,163,74,0.12);
        color: var(--primary) !important;
    }

/* =========================
   NAVBAR SEARCH (RESTORE)
========================= */

.navbar-search {
    position: relative;
    flex: 1;
    max-width: 420px;
}

    /* INPUT */

    .navbar-search input {
        width: 100%;
        border: none;
        outline: none;
        padding: 10px 14px 10px 36px;
        border-radius: 999px;
        background: #f3f4f6;
        font-size: 14px;
        transition: background .15s ease, box-shadow .15s ease;
    }

        /* FOCUS EFFECT */

        .navbar-search input:focus {
            background: #ffffff;
            box-shadow: 0 0 0 2px rgba(22,163,74,0.15);
        }

    /* ICON */

    .navbar-search i {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        opacity: 0.6;
        font-size: 14px;
    }

/* =========================
   MOBILE SEARCH (OFFCANVAS)
========================= */

/* =========================
   OFFCANVAS HEADER
========================= */

.offcanvas-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

/* TITLE */

.offcanvas-title {
    font-weight: 700;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}

    /* optional icon */

    .offcanvas-title::before {
        content: "☰";
        font-size: 18px;
        opacity: 0.7;
    }

.mobile-search {
    position: relative;
}

    .mobile-search input {
        width: 100%;
        border: none;
        outline: none;
        padding: 10px 14px 10px 36px;
        border-radius: 999px;
        background: #f3f4f6;
        font-size: 14px;
    }

        .mobile-search input:focus {
            background: #fff;
            box-shadow: 0 0 0 2px rgba(22,163,74,0.15);
        }

    .mobile-search i {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        opacity: 0.6;
    }

/* =========================
   LOGOUT
========================= */

.logout-btn {
    border: none;
    background: transparent;
    padding: 0;
}

/* navbar hover */
.navbar .logout-btn:hover,
.app-navbar .logout-btn:hover {
    color: #ef4444;
}

/* offcanvas logout да изглежда като link */
.offcanvas .logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-radius: 10px;
    color: var(--text);
    font-weight: 600;
    background: transparent;
}

    .offcanvas .logout-btn:hover {
        background: rgba(239,68,68,0.08);
        color: #ef4444;
    }

    /* ICON */

    .offcanvas .logout-btn i {
        font-size: 16px;
    }

/* =========================
   DROPDOWN (RESTORE)
========================= */

.navbar .dropdown-menu,
.app-navbar .dropdown-menu {
    border-radius: 12px;
    border: none;
    padding: 8px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.navbar .dropdown-item,
.app-navbar .dropdown-item {
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background .15s ease;
}

    .navbar .dropdown-item:hover,
    .app-navbar .dropdown-item:hover {
        background: #f1f5f9;
    }

/* ICON ALIGN */
.dropdown-item i {
    width: 18px;
}

/* LINKS */
.mobile-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

    .mobile-links a {
        padding: 10px;
        border-radius: 10px;
        text-decoration: none;
        color: var(--text);
        font-weight: 600;
    }

        .mobile-links a:hover {
            background: rgba(22,163,74,0.08);
        }

/*
    ========================
    FOOTER (RESTORED)
    ========================
*/

/* FOOTER */

.site-footer {
    background: #f7f7f7;
    padding-top: 70px;
}

/* WRAPPER */

.footer-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px 50px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 60px;
}

    /* RIGHT ALIGN (само десните колони) */

    .footer-wrapper .footer-col:nth-child(2),
    .footer-wrapper .footer-col:nth-child(3),
    .footer-wrapper .footer-col:nth-child(4) {
        text-align: right;
    }
    
        .footer-wrapper .footer-col:nth-child(4) .footer-contact {
            justify-content: flex-end;
        }

/* EXCEPTION ако имаш account колона */
.footer-account {
    text-align: left !important;
}

/* LOGO */

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
}

/* BRAND */

.footer-brand p {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 22px;
    max-width: 260px;
}

/* COLUMNS */

.footer-col {
    display: flex;
    flex-direction: column;
}

    .footer-col h4 {
        font-size: 16px;
        font-weight: 700;
        margin-bottom: 16px;
    }

    .footer-col a {
        display: block;
        color: #6b7280;
        margin-bottom: 10px;
        text-decoration: none;
    }

        .footer-col a:hover {
            color: #3e8e55;
        }

/* CONTACT */

.footer-contact {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6b7280;
    margin-bottom: 10px;
}

    .footer-contact i {
        color: #3e8e55;
    }

/* BOTTOM */

.footer-bottom {
    border-top: 1px solid #e5e7eb;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #6b7280;
}

.footer-legal {
    display: flex;
    gap: 20px;
}

/* =========================
   RESPONSIVE
========================= */

/* TABLET */

@media (max-width: 992px) {
    .footer-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }

        /* махаме десния align */
        .footer-wrapper .footer-col {
            text-align: left;
        }

    .footer-contact {
        justify-content: flex-start;
    }

    .footer-brand p {
        max-width: 100%;
    }
}

/* MOBILE */

@media (max-width: 600px) {
    .footer-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* центрираме */
    .footer-col {
        text-align: center;
        align-items: center;
    }

        .footer-col p {
            text-align: center;
        }

    .footer-contact {
        justify-content: center;
    }
}

/* EXTRA SMALL */

@media (max-width: 360px) {

    .site-footer {
        padding-top: 50px;
    }

    .footer-wrapper {
        padding: 0 16px 40px;
        gap: 25px;
    }

    .footer-logo {
        justify-content: center;
        font-size: 20px;
    }

    .footer-col h4 {
        font-size: 14px;
    }

    .footer-col a {
        font-size: 13px;
    }

    .footer-contact {
        font-size: 13px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .footer-legal {
        flex-direction: column;
        gap: 8px;
    }
}


/* =====================================================
   TOASTS
===================================================== */

#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
}

.toast-custom {
    padding: 14px 18px;
    border-radius: 12px;
    color: #fff;
}

/* =====================================================
   BUTTONS
===================================================== */

.btn-primary-custom {
    background: var(--primary);
    color: white;
    border-radius: 12px;
    padding: 10px 16px;
}

/* FIX: restore bootstrap primary button */
.btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

    .btn-primary:hover {
        background-color: var(--primary-600) !important;
        border-color: var(--primary-600) !important;
    }

.mini-cart {
    position: absolute;
    top: 100%;
    right: 0;
    width: 260px;
    padding: 12px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(0,0,0,.15);
    border: 1px solid #e5e7eb;
    backdrop-filter: blur(8px);
    opacity: 0;
    transform: translateY(-8px);
    transition: .2s;
    z-index: 1000;
}

.mini-cart {
    max-height: 280px;
    overflow-y: auto;
}

    .mini-cart.show {
        opacity: 1;
        transform: translateY(0);
    }

/* HEADER */

.mini-cart-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 12px;
}

/* ITEM */

.mini-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.mini-info {
    flex: 1;
    min-width: 0;
}

/* IMAGE */
.mini-thumb {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

    .mini-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* INFO */

.mini-title {
    font-size: 0.85rem;
}

.mini-meta {
    font-size: 0.75rem;
}

.mini-price {
    font-size: 0.85rem;
}

/* PRICE */

.mini-price {
    font-weight: 700;
    color: #16a34a;
    font-size: .9rem;
}

/* TOTAL */

.mini-total {
    display: flex;
    justify-content: space-between;
    padding-top: 12px;
    margin-top: 10px;
    font-weight: 600;
}

/* BUTTON */

.mini-cart-btn {
    display: block;
    margin-top: 14px;
    text-align: center;
    padding: 12px;
    border-radius: 12px;
    font-weight: 700;
    background: linear-gradient(135deg,#22c55e,#16a34a);
    color: white;
    text-decoration: none;
}

/* EMPTY */

.mini-empty {
    text-align: center;
    padding: 20px 0;
    color: #6b7280;
}

    .mini-empty i {
        font-size: 26px;
        margin-bottom: 6px;
        display: block;
    }

/* =========================
   TOAST
========================= */

#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast-custom {
    padding: 14px 18px;
    border-radius: 12px;
    color: #fff;
    min-width: 240px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 14px 34px rgba(0,0,0,0.15);
    animation: toast-in .3s ease;
}

/* TYPES */

.toast-success {
    background: #16a34a;
}

.toast-error {
    background: #dc2626;
}

.toast-warning {
    background: #f59e0b;
}

.toast-info {
    background: #2563eb;
}

/* PROGRESS BAR */

.toast-progress {
    height: 3px;
    background: rgba(255,255,255,0.6);
    margin-top: 6px;
    border-radius: 2px;
    animation: toast-progress 4s linear forwards;
}

/* ANIMATIONS */

@keyframes toast-progress {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* =========================
   CART BADGE
========================= */

.cart-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ============================
   ACCESS DENIED
============================ */

.access-denied-body {
    background: linear-gradient(135deg, #ECFDF5, #d9f3e8);
}

/* PAGE LAYOUT */
.access-page {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

/* CARD */
.access-card {
    width: 520px;
    padding: 60px 50px;
    border-radius: 32px;
    background: #ffffff;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.08);
    transition: 0.25s ease;
}

    .access-card:hover {
        transform: translateY(-4px);
    }

/* ICON */
.access-icon {
    font-size: 64px;
    margin-bottom: 15px;
}

/* TITLE */
.access-card h1 {
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 10px;
    color: #003B33;
}

/* SUBTEXT */
.access-sub {
    font-size: 16px;
    opacity: 0.7;
    margin-bottom: 25px;
}

/* MESSAGE BOX */
.access-message {
    background: #f1f3f2;
    padding: 18px;
    border-radius: 16px;
    font-size: 14px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ============================
   ACTIONS
============================ */

.access-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

/* PRIMARY BUTTON */
.btn-primary {
    width: 100%;
    height: 56px;
    border-radius: 20px;
    background: #4f8f66;
    color: white;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s ease;
}

    .btn-primary:hover {
        background: #3f7b56;
        transform: translateY(-2px);
    }

/* BACK LINK */
.btn-back {
    font-size: 14px;
    color: #6b7c75;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.85;
    transition: 0.2s ease;
}

    .btn-back:hover {
        opacity: 1;
        transform: translateX(-4px);
    }

@media (max-width: 475px) {
    .access-card {
        padding: 45px 30px;
    }
    .access-icon {
        font-size: 32px;
    }
    .access-card h1 {
        font-size: 24px;
    }
    .access-sub {
        font-size: 12px;
    }
    .access-message {
        font-size: 11px;
    }
}