/* =============================================================================
   GASTRO MEE – Custom Stylesheet
   ============================================================================= */

/* -----------------------------------------------------------------------------
   0. CSS Custom Properties (Dark Mode Preparation)
   ----------------------------------------------------------------------------- */

:root {
    --gm-primary: #dc3545;
    --gm-primary-dark: #b02a37;
    --gm-primary-light: #f8d7da;
    --gm-bg: #ffffff;
    --gm-bg-alt: #f8f9fa;
    --gm-bg-card: #ffffff;
    --gm-text: #212529;
    --gm-text-muted: #6c757d;
    --gm-text-light: #adb5bd;
    --gm-border: #dee2e6;
    --gm-shadow: rgba(0,0,0,.08);
    --gm-shadow-hover: rgba(0,0,0,.15);
    --gm-success: #198754;
    --gm-warning: #ffc107;
    --gm-info: #0dcaf0;
    --gm-danger: #dc3545;
    --gm-radius: 12px;
    --gm-radius-sm: 6px;
    --gm-transition: 0.2s ease;
}

@media (prefers-color-scheme: dark) {
    :root {
        --gm-bg: #1a1a2e;
        --gm-bg-alt: #16213e;
        --gm-bg-card: #0f3460;
        --gm-text: #e4e4e4;
        --gm-text-muted: #a0a0a0;
        --gm-text-light: #707070;
        --gm-border: #2a2a4a;
        --gm-shadow: rgba(0,0,0,.3);
        --gm-shadow-hover: rgba(0,0,0,.5);
    }
}

/* -----------------------------------------------------------------------------
   0b. Skip Navigation Link
   ----------------------------------------------------------------------------- */

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #dc3545;
    color: white;
    padding: 8px 16px;
    z-index: 9999;
    transition: top 0.2s;
    text-decoration: none;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
    color: white;
}

/* -----------------------------------------------------------------------------
   1. Base / Layout
   ----------------------------------------------------------------------------- */

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--gm-bg-alt);
    color: var(--gm-text);
}

main {
    flex: 1 0 auto;
}

/* -----------------------------------------------------------------------------
   2. Card hover border effect
   ----------------------------------------------------------------------------- */

.border-hover {
    transition: border-color var(--gm-transition), box-shadow var(--gm-transition), transform 0.15s ease;
    border: 2px solid transparent !important;
}

.border-hover:hover {
    border-color: var(--gm-primary) !important;
    box-shadow: 0 0.5rem 1.5rem rgba(220, 53, 69, 0.15) !important;
    transform: translateY(-2px);
}

/* -----------------------------------------------------------------------------
   3. Notification badge (bell icon)
   ----------------------------------------------------------------------------- */

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 0.65rem;
    min-width: 1.1rem;
    height: 1.1rem;
    line-height: 1.1rem;
    padding: 0 0.3rem;
    pointer-events: none;
}

/* Notification dropdown panel */
.notification-dropdown {
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .15);
    border: 1px solid rgba(0, 0, 0, .08);
}

.notification-item {
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    gap: 10px;
    cursor: pointer;
    transition: background 0.15s;
}

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

.notification-item:hover {
    background: #f8f9fa;
}

.notification-item.unread {
    background: #fff5f5;
}

.notification-item.unread:hover {
    background: #ffe8e8;
}

.notification-item .notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.notification-item .notif-content {
    flex: 1;
    min-width: 0;
}

.notification-item .notif-title {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-item .notif-body {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-item .notif-time {
    font-size: 0.75rem;
    color: #6c757d;
}

/* -----------------------------------------------------------------------------
   4. Avatar sizes
   ----------------------------------------------------------------------------- */

.avatar-sm {
    width: 2rem;
    height: 2rem;
    font-size: 0.8rem;
}

.avatar-md {
    width: 3rem;
    height: 3rem;
    font-size: 1.1rem;
}

/* -----------------------------------------------------------------------------
   5. Star ratings
   ----------------------------------------------------------------------------- */

.star-rating {
    color: #ffc107;
    font-size: 1rem;
}

.star-rating .bi-star {
    color: #dee2e6;
}

.star-rating .bi-star-fill,
.star-rating .bi-star-half {
    color: #ffc107;
}

/* -----------------------------------------------------------------------------
   6. Sidebar navigation
   ----------------------------------------------------------------------------- */

.sidebar-nav {
    position: sticky;
    top: 1.5rem;
}

.sidebar-nav .nav-link {
    color: #495057;
    padding: 0.6rem 1rem;
    border-radius: 0.375rem;
    transition: background-color 0.15s ease, color 0.15s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-nav .nav-link:hover {
    background-color: #f8f9fa;
    color: #dc3545;
}

.sidebar-nav .nav-link.active {
    background-color: #dc3545;
    color: #fff !important;
    font-weight: 600;
}

.sidebar-nav .nav-link.active i {
    color: #fff;
}

/* -----------------------------------------------------------------------------
   7. Message bubbles
   ----------------------------------------------------------------------------- */

.message-bubble {
    max-width: 70%;
    padding: 0.6rem 1rem;
    border-radius: 1rem;
    word-break: break-word;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.message-bubble.sent {
    background-color: #dc3545;
    color: #fff;
    margin-left: auto;
    border-bottom-right-radius: 0.25rem;
}

.message-bubble.received {
    background-color: #e9ecef;
    color: #212529;
    margin-right: auto;
    border-bottom-left-radius: 0.25rem;
}

.message-bubble.sent .message-time {
    color: rgba(255, 255, 255, 0.75);
}

.message-bubble.received .message-time {
    color: #6c757d;
}

/* -----------------------------------------------------------------------------
   8. Miscellaneous utilities
   ----------------------------------------------------------------------------- */

/* Smooth transition for alerts */
.alert {
    animation: fadeInDown 0.3s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-0.5rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero section opacity helper */
.opacity-90 {
    opacity: 0.9;
}

/* Input group focus glow for danger variant */
.input-group:focus-within .input-group-text {
    border-color: #dc3545;
}

/* Listings card hover — see section 10 for full listing-card styles */

/* =============================================================================
   9. Image Gallery / Carousel
   ============================================================================= */

.listing-gallery {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    background-color: #f8f9fa;
}

.listing-gallery img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
}

.listing-thumbnail {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.25rem;
    border: 2px solid transparent;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease, border-color 0.2s ease;
}

.listing-thumbnail:hover,
.listing-thumbnail.active {
    opacity: 1;
    border-color: #dc3545;
}

/* =============================================================================
   10. Listing Card enhancements (unified card system)
   ============================================================================= */

.listing-card {
    border: 1px solid var(--gm-border);
    border-radius: var(--gm-radius);
    overflow: hidden;
    position: relative;
    transition: transform var(--gm-transition), box-shadow var(--gm-transition);
    height: 100%;  /* equal heights in grid */
    background-color: var(--gm-bg-card);
}

.listing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px var(--gm-shadow-hover);
}

.listing-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.listing-card:hover .card-img-top {
    transform: scale(1.03);
}

/* Placeholder for missing images */
.listing-card .img-placeholder {
    height: 200px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 3rem;
}

.listing-card .card-img-wrapper {
    position: relative;
    overflow: hidden;
}

.listing-card .price-badge {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    background-color: #dc3545;
    color: #fff;
    padding: 0.3rem 0.75rem;
    border-radius: 0.375rem;
    font-weight: 700;
    font-size: 0.95rem;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

/* =============================================================================
   11. Search Hero & Filter
   ============================================================================= */

.search-hero {
    background: linear-gradient(135deg, #dc3545 0%, #a71d2a 100%);
    color: #fff;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.search-hero h1 {
    color: #fff;
    font-weight: 700;
}

.search-hero .form-control {
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 1.05rem;
}

.search-hero .btn {
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

.filter-sidebar {
    position: sticky;
    top: 1.5rem;
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
}

.filter-sidebar .form-label {
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #495057;
}

.filter-sidebar .form-check {
    padding-top: 0.15rem;
    padding-bottom: 0.15rem;
}

.filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background-color: #f8d7da;
    color: #842029;
    padding: 0.3rem 0.6rem;
    border-radius: 50rem;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: default;
    transition: background-color 0.15s ease;
}

.filter-tag .btn-close {
    font-size: 0.55rem;
    padding: 0;
    margin: 0;
    opacity: 0.6;
}

.filter-tag .btn-close:hover {
    opacity: 1;
}

.filter-tag:hover {
    background-color: #f1aeb5;
}

/* =============================================================================
   12. Blog styles
   ============================================================================= */

.blog-card {
    border: none;
    border-radius: var(--gm-radius-sm);
    overflow: hidden;
    background-color: var(--gm-bg-card);
    transition: box-shadow var(--gm-transition), transform 0.15s ease;
}

.blog-card:hover {
    box-shadow: 0 0.5rem 1.5rem var(--gm-shadow-hover) !important;
    transform: translateY(-2px);
}

.blog-card .card-img-top {
    height: 200px;
    object-fit: cover;
}

.blog-card .card-body {
    padding: 1.25rem;
}

.blog-card .card-title a {
    color: var(--gm-text);
    text-decoration: none;
    transition: color 0.15s ease;
}

.blog-card .card-title a:hover {
    color: var(--gm-primary);
}

.blog-hero {
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: flex-end;
    background-size: cover;
    background-position: center;
}

.blog-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 60%);
    z-index: 1;
}

.blog-hero .blog-hero-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
    color: #fff;
    width: 100%;
}

.blog-hero .blog-hero-content h2 a {
    color: #fff;
    text-decoration: none;
}

.blog-hero .blog-hero-content h2 a:hover {
    text-decoration: underline;
}

/* Blog post body */
.blog-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
}

.blog-content h2 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    font-size: 1.5rem;
}

.blog-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 1.25rem;
}

.blog-content p {
    margin-bottom: 1.25rem;
}

.blog-content ul,
.blog-content ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.blog-content li {
    margin-bottom: 0.35rem;
}

.blog-content blockquote {
    border-left: 4px solid #dc3545;
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    background-color: #fff5f5;
    border-radius: 0 0.375rem 0.375rem 0;
    font-style: italic;
    color: #555;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

.blog-content code {
    background-color: #f8f9fa;
    padding: 0.15rem 0.4rem;
    border-radius: 0.25rem;
    font-size: 0.9em;
    color: #d63384;
}

.blog-content pre {
    background-color: #212529;
    color: #f8f9fa;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.25rem 0;
}

.blog-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* Blog sidebar */
.blog-sidebar .card {
    border: none;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.06);
}

.blog-sidebar .card-header {
    background-color: transparent;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-bottom: 2px solid #dc3545;
    padding-bottom: 0.5rem;
}

.blog-sidebar .list-group-item {
    border: none;
    padding: 0.5rem 0;
}

.blog-sidebar .list-group-item a {
    color: #495057;
    text-decoration: none;
    transition: color 0.15s ease;
}

.blog-sidebar .list-group-item a:hover {
    color: #dc3545;
}

/* Tag cloud */
.tag-cloud-item {
    display: inline-block;
    margin: 3px;
    padding: 4px 10px;
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s ease;
}
.tag-cloud-item:hover {
    background: var(--gm-primary);
    color: white;
    border-color: var(--gm-primary);
    transform: translateY(-2px);
}
.tag-cloud-item.active {
    background: var(--gm-primary);
    color: white;
    border-color: var(--gm-primary);
}
.tag-sm { font-size: 0.75rem; }
.tag-md { font-size: 0.85rem; }
.tag-lg { font-size: 0.95rem; font-weight: 500; }
.tag-xl { font-size: 1.05rem; font-weight: 600; }
.tag-count { opacity: 0.7; font-size: 0.8em; }

/* =============================================================================
   13. Dashboard stat cards
   ============================================================================= */

.stat-card {
    border: none;
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    transition: box-shadow var(--gm-transition), transform 0.15s ease;
    background-color: var(--gm-bg-card);
    box-shadow: 0 0.125rem 0.5rem var(--gm-shadow);
}

.stat-card:hover {
    box-shadow: 0 0.5rem 1.25rem var(--gm-shadow-hover);
    transform: translateY(-2px);
}

.stat-card .stat-icon {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
    color: var(--gm-primary);
    line-height: 1;
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--gm-text);
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--gm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.25rem;
}

/* =============================================================================
   14. Drag & Drop Image Upload
   ============================================================================= */

.upload-zone {
    border: 2px dashed #ced4da;
    border-radius: 0.75rem;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background-color 0.2s ease;
    background-color: #fafafa;
    color: #6c757d;
}

.upload-zone:hover {
    border-color: #adb5bd;
    background-color: #f8f9fa;
}

.upload-zone.dragover {
    border-color: #dc3545;
    background-color: #fff5f5;
    color: #dc3545;
}

.upload-zone i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
}

.upload-zone p {
    margin: 0;
    font-size: 0.95rem;
}

.upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.upload-preview .preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 0.375rem;
    overflow: hidden;
    border: 1px solid #dee2e6;
}

.upload-preview .preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.upload-preview .remove-btn {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 1.35rem;
    height: 1.35rem;
    border: none;
    border-radius: 50%;
    background-color: rgba(220, 53, 69, 0.9);
    color: #fff;
    font-size: 0.7rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease;
    padding: 0;
}

.upload-preview .preview-item:hover .remove-btn {
    opacity: 1;
}

/* =============================================================================
   15. Status badges (consistent across all areas)
   ============================================================================= */

.badge-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.65rem;
    border-radius: 50rem;
    letter-spacing: 0.02em;
}

.badge-status-active,
.badge-status-published,
.badge-status-approved {
    background-color: #d1e7dd;
    color: #0f5132;
}

.badge-status-pending,
.badge-status-draft,
.badge-status-review {
    background-color: #fff3cd;
    color: #664d03;
}

.badge-status-inactive,
.badge-status-rejected,
.badge-status-archived {
    background-color: #f8d7da;
    color: #842029;
}

.badge-status-featured {
    background-color: #cff4fc;
    color: #055160;
}

.badge-status-sold {
    background-color: #e2e3e5;
    color: #41464b;
}

/* =============================================================================
   16. Responsive adjustments
   ============================================================================= */

@media (max-width: 991.98px) {
    .filter-sidebar {
        position: static;
        max-height: none;
        margin-bottom: 1.5rem;
    }

    .listing-gallery img {
        height: 250px;
    }

    .blog-hero {
        min-height: 280px;
    }

    .search-hero {
        padding: 2rem 0;
    }
}

@media (max-width: 767.98px) {
    .listing-gallery img {
        height: 200px;
    }

    .blog-hero {
        min-height: 220px;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-card .stat-value {
        font-size: 1.5rem;
    }

    .stat-card .stat-icon {
        font-size: 1.75rem;
    }

    .upload-preview .preview-item {
        width: 75px;
        height: 75px;
    }

    .listing-thumbnail {
        width: 60px;
        height: 45px;
    }

    .blog-content {
        font-size: 1rem;
    }
}

/* Card grid responsive helper */
.card-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

@media (max-width: 575.98px) {
    .card-grid {
        grid-template-columns: 1fr;
    }
}

/* =============================================================================
   17. General polish
   ============================================================================= */

/* Smooth page transitions */
main {
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Better focus states for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.btn:focus-visible {
    outline: 2px solid #dc3545;
    outline-offset: 2px;
    box-shadow: none;
}

/* Loading skeleton animation */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-card {
    height: 300px;
    border-radius: 12px;
}

.skeleton-text {
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    width: 70%;
    margin-bottom: 12px;
}

.skeleton-img {
    height: 200px;
    width: 100%;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* =============================================================================
   18. Toast Notification System
   ============================================================================= */

.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1080;
}

.toast-gastro {
    border-left: 4px solid;
    border-radius: 8px;
    box-shadow: 0 8px 16px var(--gm-shadow-hover);
    animation: slideInRight 0.3s ease;
    min-width: 280px;
    background: var(--gm-bg-card);
    color: var(--gm-text);
    padding: 1rem 1.25rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.toast-gastro.success { border-left-color: #198754; }
.toast-gastro.error   { border-left-color: #dc3545; }
.toast-gastro.info    { border-left-color: #0dcaf0; }
.toast-gastro.warning { border-left-color: #ffc107; }

.toast-gastro .toast-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    line-height: 1;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    opacity: 0.5;
    transition: opacity 0.15s ease;
}

.toast-gastro .toast-close:hover {
    opacity: 1;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* =============================================================================
   19. Empty States
   ============================================================================= */

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.empty-state .empty-icon {
    font-size: 4rem;
    color: var(--gm-border);
    margin-bottom: 1rem;
}

.empty-state h3 {
    color: var(--gm-text-muted);
    font-weight: 600;
}

.empty-state p {
    color: var(--gm-text-light);
    max-width: 400px;
    margin: 0 auto;
}

/* =============================================================================
   20. Breadcrumb Styling
   ============================================================================= */

.breadcrumb-gastro {
    background: transparent;
    padding: 0.75rem 0;
    font-size: 0.875rem;
}

.breadcrumb-gastro .breadcrumb-item a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.15s ease;
}

.breadcrumb-gastro .breadcrumb-item a:hover {
    color: #dc3545;
}

.breadcrumb-gastro .breadcrumb-item.active {
    color: #212529;
    font-weight: 500;
}

/* =============================================================================
   21. Improved Form Styling
   ============================================================================= */

.form-floating > .form-control:focus ~ label {
    color: #dc3545;
}

.form-control:focus,
.form-select:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

.input-group-icon {
    background: #f8f9fa;
    border-right: none;
    color: #6c757d;
}

/* =============================================================================
   22. Lazy Loading for Images
   ============================================================================= */

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded,
img[loading="lazy"][complete] {
    opacity: 1;
}

/* =============================================================================
   23. Scroll-to-Top Button
   ============================================================================= */

.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.2);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(220, 53, 69, 0.35);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 1060;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    animation: scrollTopPulse 2s ease-in-out infinite;
}

.scroll-to-top:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 24px rgba(220, 53, 69, 0.5);
    animation: none;
}

@keyframes scrollTopPulse {
    0%, 100% { box-shadow: 0 4px 16px rgba(220, 53, 69, 0.35); }
    50% { box-shadow: 0 4px 24px rgba(220, 53, 69, 0.6); }
}

/* =============================================================================
   24. Mobile Bottom Navigation Bar
   ============================================================================= */

.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    background-color: var(--gm-bg);
    box-shadow: 0 -2px 10px var(--gm-shadow);
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0);
    height: 60px;
}

.mobile-bottom-nav .mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--gm-text-muted);
    font-size: 0.65rem;
    font-weight: 500;
    gap: 2px;
    padding: 6px 0;
    transition: color var(--gm-transition);
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.mobile-bottom-nav .mobile-nav-item i {
    font-size: 1.25rem;
    line-height: 1;
}

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

.mobile-bottom-nav .mobile-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 25%;
    right: 25%;
    height: 2px;
    background-color: var(--gm-primary);
    border-radius: 0 0 2px 2px;
}

/* Center create button — raised and red */
.mobile-bottom-nav .mobile-nav-item.mobile-nav-create {
    position: relative;
}

.mobile-bottom-nav .mobile-nav-item.mobile-nav-create i {
    font-size: 1.75rem;
    color: #fff;
    background-color: var(--gm-primary);
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-top: -18px;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.35);
    transition: transform var(--gm-transition), box-shadow var(--gm-transition);
}

.mobile-bottom-nav .mobile-nav-item.mobile-nav-create:hover i,
.mobile-bottom-nav .mobile-nav-item.mobile-nav-create:active i {
    transform: scale(1.08);
    box-shadow: 0 6px 16px rgba(220, 53, 69, 0.45);
}

.mobile-bottom-nav .mobile-nav-item.mobile-nav-create span {
    margin-top: -2px;
    color: var(--gm-text-muted);
}

/* Unread messages badge in bottom nav */
.mobile-bottom-nav .mobile-nav-badge {
    position: absolute;
    top: 4px;
    right: 50%;
    transform: translateX(14px);
    min-width: 16px;
    height: 16px;
    line-height: 16px;
    text-align: center;
    font-size: 0.6rem;
    font-weight: 700;
    color: #fff;
    background-color: var(--gm-primary);
    border-radius: 50rem;
    padding: 0 4px;
    pointer-events: none;
}

/* Add body padding on mobile so content is not hidden behind bottom nav */
@media (max-width: 767.98px) {
    body {
        padding-bottom: 68px;
    }

    .scroll-to-top {
        bottom: 5.5rem;
        z-index: 1060;
    }
}

/* Touch-friendly dropdown items on mobile */
@media (max-width: 767.98px) {
    .dropdown-menu .dropdown-item {
        padding: 0.65rem 1.25rem;
        font-size: 1rem;
    }

    .dropdown-menu .dropdown-header {
        padding: 0.65rem 1.25rem;
    }

    .dropdown-menu .dropdown-divider {
        margin: 0.35rem 0;
    }
}

/* =============================================================================
   Admin Table Styling
   ============================================================================= */

.admin-table {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.admin-table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6c757d;
    white-space: nowrap;
}
.admin-table tbody tr {
    transition: background 0.15s ease;
}
.admin-table tbody tr:hover {
    background: rgba(220, 53, 69, 0.03);
}
.admin-table .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

/* =============================================================================
   Footer Styles
   ============================================================================= */

.footer-link {
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #dc3545 !important;
}

.footer-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #adb5bd;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.footer-social-link:hover {
    background: #dc3545;
    color: #fff;
    transform: translateY(-2px);
}

/* =============================================================================
   Stats Bar Styles
   ============================================================================= */

.stats-bar {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #1a1a2e 100%);
    color: #fff;
    border-top: 3px solid #dc3545;
    border-bottom: 1px solid rgba(220, 53, 69, 0.2);
}

.stats-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem;
}

.stats-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(220, 53, 69, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #dc3545;
    margin-bottom: 0.25rem;
}

.stats-number {
    color: #fff;
    line-height: 1;
}

.stats-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Print styles for listing detail pages */
@media print {
    /* Hide non-essential elements */
    .navbar, .mobile-bottom-nav, footer, .breadcrumb-gastro,
    .btn, .toast-container, .scroll-to-top,
    .share-buttons, .favorite-btn, .sidebar-actions,
    .search-hero, .filter-sidebar, .pagination,
    .alert-dismissible .btn-close,
    .sidebar-nav, .upload-zone, .notification-badge {
        display: none !important;
    }

    /* Reset layout */
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
        padding-bottom: 0 !important;
    }

    main {
        margin: 0;
        padding: 0;
        animation: none;
    }

    .container {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    .col-md-8, .col-lg-8 {
        width: 100%;
        max-width: 100%;
    }

    .col-md-4, .col-lg-4 {
        width: 100%;
        max-width: 100%;
    }

    /* Show URLs after links */
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }

    a[href^="#"]::after,
    a[href^="javascript"]::after {
        content: "";
    }

    /* Cards and listings */
    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        break-inside: avoid;
    }

    .listing-card {
        page-break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }

    /* Images */
    img {
        max-width: 100% !important;
    }

    .listing-gallery img {
        height: auto;
        max-height: 400px;
    }

    .carousel {
        display: block;
    }

    .carousel-item {
        display: block !important;
    }

    .carousel-item:not(:first-child) {
        display: none !important;
    }

    .carousel-control-prev,
    .carousel-control-next,
    .carousel-indicators {
        display: none;
    }

    /* Blog content */
    .blog-content {
        font-size: 11pt;
        line-height: 1.6;
    }

    .blog-content img {
        max-width: 80%;
        margin: 1em auto;
        display: block;
    }

    /* Print header — hidden on screen, visible on print */
    .print-header {
        display: block !important;
        text-align: center;
        margin-bottom: 1em;
        border-bottom: 2px solid #dc3545;
        padding-bottom: 0.5em;
    }

    /* Page breaks */
    h1, h2, h3 {
        page-break-after: avoid;
    }

    .similar-items, .related-posts {
        page-break-before: always;
    }
}

/* =============================================================================
   25. Smooth Transitions & Animations
   ============================================================================= */

/* Smooth filter accordion */
.filter-collapse {
    transition: max-height 0.3s ease, opacity 0.2s ease;
    overflow: hidden;
}
.filter-collapse.collapsed {
    max-height: 0;
    opacity: 0;
}

/* Card entrance animation */
.listing-card.animate-entrance {
    opacity: 0;
    transform: translateY(20px);
    animation: cardEntrance 0.4s ease forwards;
}

@keyframes cardEntrance {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger cards */
.listing-card.animate-entrance:nth-child(1)  { animation-delay: 0s; }
.listing-card.animate-entrance:nth-child(2)  { animation-delay: 0.05s; }
.listing-card.animate-entrance:nth-child(3)  { animation-delay: 0.1s; }
.listing-card.animate-entrance:nth-child(4)  { animation-delay: 0.15s; }
.listing-card.animate-entrance:nth-child(5)  { animation-delay: 0.2s; }
.listing-card.animate-entrance:nth-child(6)  { animation-delay: 0.25s; }
.listing-card.animate-entrance:nth-child(7)  { animation-delay: 0.3s; }
.listing-card.animate-entrance:nth-child(8)  { animation-delay: 0.35s; }
.listing-card.animate-entrance:nth-child(9)  { animation-delay: 0.4s; }
.listing-card.animate-entrance:nth-child(10) { animation-delay: 0.45s; }
.listing-card.animate-entrance:nth-child(11) { animation-delay: 0.5s; }
.listing-card.animate-entrance:nth-child(12) { animation-delay: 0.55s; }

/* Smooth badge hover */
.badge {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.badge:hover {
    transform: scale(1.05);
}

/* Favorite heart animation */
.favorite-btn .bi-heart-fill {
    animation: heartPop 0.3s ease;
}

@keyframes heartPop {
    0%   { transform: scale(0.5); }
    50%  { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Favorite tooltip */
.favorite-tooltip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    animation: tooltipFade 2s ease forwards;
    z-index: 10;
}

@keyframes tooltipFade {
    0%   { opacity: 0; transform: translateX(-50%) translateY(4px); }
    15%  { opacity: 1; transform: translateX(-50%) translateY(0); }
    75%  { opacity: 1; }
    100% { opacity: 0; }
}

/* =============================================================================
   Accessibility: Reduced Motion
   ============================================================================= */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =============================================================================
   Accessibility: Enhanced Focus Indicators
   ============================================================================= */

/* Ensure warning badges have sufficient contrast */
.badge.bg-warning {
    color: #000 !important;
}

/* Ensure all interactive elements in the mobile nav have visible focus */
.mobile-bottom-nav .mobile-nav-item:focus-visible {
    outline: 2px solid #dc3545;
    outline-offset: -2px;
}

/* Ensure dropdown items have visible focus */
.dropdown-item:focus-visible {
    outline: 2px solid #dc3545;
    outline-offset: -2px;
}

/* Ensure card links have visible focus */
.listing-card a:focus-visible,
.blog-card a:focus-visible {
    outline: 2px solid #dc3545;
    outline-offset: 2px;
}

/* =============================================================================
   Card Preview Tooltip (hover micro-interaction)
   ============================================================================= */

.card-preview-tooltip {
    position: absolute;
    z-index: 1070;
    background: #333;
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.card-preview-tooltip.visible {
    opacity: 1;
}

/* -----------------------------------------------------------------------------
   Cookie Consent Banner
   ----------------------------------------------------------------------------- */

.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #212529;
    color: #f8f9fa;
    z-index: 1090;
    box-shadow: 0 -4px 12px rgba(0,0,0,.3);
}
