/**
 * Modern Theme - Additional Styles
 * Toast notifications, lightbox, loading states
 */

/* ==========================================================================
   1. Toast Notifications
   ========================================================================== */

.mobile-menu {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
}

.mobile-menu:not(.active) {
    display: none !important;
}

.mobile-menu.active {
    display: block;
    pointer-events: auto;
    opacity: 1;
    visibility: visible;
}

.mobile-menu-panel {
    position: absolute;
    top: 0;
    right: -100%;
    height: 100%;
    width: min(88vw, 360px);
    background: linear-gradient(180deg, #0f172a 0%, #111827 35%, #0b1220 100%);
    color: #f8fafc;
    box-shadow: -12px 0 38px rgba(0,0,0,0.35);
    transition: right 0.28s ease;
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(255,255,255,0.04);
    z-index: 2;
}

.mobile-menu.active .mobile-menu-panel { right: 0; }

.mobile-menu-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,0.6);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 1;
    display: none;
}

.mobile-menu-overlay:not(.active) {
    display: none !important;
}

.mobile-menu.active ~ .mobile-menu-overlay,
.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-menu-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 18px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    backdrop-filter: blur(6px);
}

.mobile-brand { display: flex; align-items: center; gap: 10px; }
.mobile-brand-logo { height: 48px; width: auto; object-fit: contain; }
.mobile-brand-text { font-weight: 700; letter-spacing: 0.4px; color: #f8fafc; }

.mobile-close {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    display: grid;
    place-items: center;
}

.mobile-close .close-line {
    display: block;
    width: 18px;
    height: 2px;
    background: #f8fafc;
    transform-origin: center;
}
.mobile-close .close-line:first-child { transform: rotate(45deg); margin-bottom: -2px; }
.mobile-close .close-line:last-child { transform: rotate(-45deg); }

.mobile-menu-body {
    flex: 1 1 auto;
    padding: 12px 18px 22px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mobile-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 6px;
}

.mobile-nav-item { border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; background: rgba(255,255,255,0.02); }
.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

.mobile-nav-item a { color: inherit; text-decoration: none; width: 100%; }
.mobile-nav-item:hover { border-color: rgba(244,197,66,0.45); background: rgba(244,197,66,0.06); }

.mobile-caret {
    width: 18px;
    height: 18px;
    border-right: 2px solid rgba(248,250,252,0.7);
    border-bottom: 2px solid rgba(248,250,252,0.7);
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.mobile-nav-item.open .mobile-caret { transform: rotate(-135deg); }

.mobile-submenu {
    list-style: none;
    margin: 0;
    padding: 0 0 10px 14px;
    display: none;
    gap: 6px;
}

.mobile-nav-item.open .mobile-submenu { display: grid; }
.mobile-subitem { padding: 8px 10px; border-radius: 10px; }
.mobile-subitem a { color: rgba(248,250,252,0.9); font-weight: 500; }

.mobile-actions {
    display: grid;
    gap: 10px;
    margin-top: auto;
    padding-top: 4px;
}

.mobile-actions .btn {
    width: 100%;
    justify-content: center;
    border-radius: 12px;
}

.mobile-actions .btn-outline { border: 1px solid rgba(244,197,66,0.6); color: #f8fafc; }
.mobile-actions .btn-primary { box-shadow: 0 14px 30px rgba(244,197,66,0.28); }

.lightbox-overlay {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    animation: lightboxZoom 0.3s ease;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    display: block;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

@keyframes lightboxZoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ==========================================================================
   3. Location Suggestions
   ========================================================================== */

.location-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f8f9fa;
}

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

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

/* ==========================================================================
   4. Form Error States
   ========================================================================== */

input.error,
textarea.error,
select.error {
    border-color: #dc3545 !important;
    background: #fff5f5;
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

input.error:focus,
textarea.error:focus,
select.error:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* ==========================================================================
   5. Loading States
   ========================================================================== */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ==========================================================================
   6. Header States
   ========================================================================== */

.modern-header.scroll-up {
    transform: translateY(0);
}

.modern-header.scroll-down {
    transform: translateY(-100%);
}

.modern-header {
    transition: transform 0.3s ease;
}

/* ==========================================================================
   6.1 Header Layout
   ========================================================================== */

.modern-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    border-bottom: 1px solid #edf0f7;
}

.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
    flex-wrap: nowrap;
}

.header-logo .logo-img {
    height: 46px;
    width: auto;
}

@media (max-width: 768px) {
    .header-logo .logo-img { height: 52px; }
}

.header-nav {
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
}

.header-nav .nav-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-item {
    position: relative;
}

.nav-item.dropdown::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 12px;
}

.nav-link {
    color: #1f2a44;
    font-weight: 600;
    text-decoration: none;
}

.nav-item.active .nav-link {
    color: #2e3192;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: #fff;
    border: 1px solid #edf0f7;
    box-shadow: 0 8px 16px rgba(0,0,0,.08);
    border-radius: 10px;
    padding: 0.5rem 0;
    display: none;
    min-width: 180px;
    z-index: 10;
}

.nav-item.dropdown:hover .dropdown-menu,
.nav-item.dropdown:focus-within .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: #1f2a44;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    position: relative;
    z-index: 20;
}

.action-item {
    display: inline-flex;
    align-items: center;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #edf0f7;
    background: #fff;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    color: #1f2a44;
    font-weight: 600;
    cursor: pointer;
}

.action-btn svg {
    color: #2e3192;
}

.action-btn .current-lang {
    color: #1f2a44;
    font-weight: 700;
    letter-spacing: .02em;
}

.user-menu .user-btn {
    border-color: #e4e8f2;
}

.user-menu .user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(46,49,146,.15);
}

.language-selector .action-btn,
.user-menu .action-btn {
    background: #f8f9ff;
}

.language-selector {
    position: relative;
}

.language-dropdown {
    position: absolute;
    right: 0;
    top: 120%;
    background: #fff;
    border: 1px solid #edf0f7;
    border-radius: 10px;
    padding: 0.5rem 0;
    min-width: 160px;
    display: none;
    z-index: 1000;
}

.language-selector:hover .language-dropdown {
    display: block;
}

.language-dropdown a {
    display: block;
    padding: 0.4rem 0.9rem;
    color: #1f2a44;
}

.user-menu { position: relative; }
.user-dropdown {
    position: absolute;
    right: 0;
    top: 120%;
    background: #fff;
    border: 1px solid #edf0f7;
    border-radius: 10px;
    padding: 0.5rem 0;
    min-width: 180px;
    display: none;
    z-index: 1000;
}
.user-menu:hover .user-dropdown { display: block; }
.nav-link,
.dropdown-menu a,
.language-dropdown a,
.user-dropdown a,
.radio-label,
.filters-toggle,
.search-button,
.checkbox-label,
.mobile-menu-toggle {
    cursor: pointer;
}

.mobile-menu-toggle {
    display: none;
    width: 54px;
    height: 54px;
    border-radius: 14px;
    border: 1px solid rgba(15,23,42,0.12);
    background: #ffffff;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
}

.mobile-menu-toggle .hamburger-line {
    display: block;
    width: 24px;
    height: 3.5px;
    border-radius: 999px;
    background: #0f172a;
}
.mobile-menu * { list-style: none; margin: 0; padding: 0; }

@media (min-width: 992px) {
    .mobile-menu,
    .mobile-menu.active {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
}

/* ==========================================================================
   6.2 Search Bar Layout
   ========================================================================== */

.search-bar-wrapper { width: 100%; }
.search-form .search-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.pf-hero .search-form .search-bar {
    gap: 0.9rem;
}

.search-field {
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(244,197,66,0.35);
    border-radius: 14px;
    padding: 0.6rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 48px;
    flex: 1 1 180px;
    box-shadow: 0 12px 26px rgba(0,0,0,0.06);
}

.search-field:focus-within {
    border-color: rgba(244,197,66,0.5);
    box-shadow: 0 14px 30px rgba(0,0,0,0.08), 0 0 0 2px rgba(244,197,66,0.3);
}

.transaction-selector { flex: 1 1 100%; justify-content: flex-start; }
.location-field { flex: 2 1 280px; }
.select-field { flex: 1 1 160px; }

.search-input,
.search-select {
    border: none;
    width: 100%;
    outline: none;
    font-size: 0.95rem;
    background: transparent;
}

.radio-group {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.radio-label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
}

.radio-input {
    display: none;
}

.radio-text {
    border: 1px solid var(--accent-color, #1f845a);
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-weight: 600;
    color: #0f172a;
    background: rgba(31,132,90,0.06);
}

.radio-input:checked + .radio-text {
    background: var(--primary-color, #2e5127);
    border-color: var(--primary-color, #2e5127);
    color: #f4c542;
    box-shadow: 0 8px 18px rgba(46,81,39,0.22);
}

.pf-tabs { display: inline-flex; gap: 0.5rem; flex-wrap: wrap; }
.pf-tab { border: 1px solid rgba(31,132,90,0.22); background: #fff; padding: 0.5rem 1rem; border-radius: 999px; font-weight: 600; color: #0f172a; transition: all 0.2s ease; }
.pf-tab:hover { border-color: var(--accent-color, #1f845a); color: var(--accent-color, #1f845a); }
.pf-tab:focus-visible { outline: 2px solid rgba(31,132,90,0.35); outline-offset: 2px; }
.pf-tab.active { background: linear-gradient(135deg, var(--primary-color, #2e5127), var(--accent-color, #1f845a)); color: #fefcf5; border-color: var(--primary-color, #2e5127); box-shadow: 0 10px 24px rgba(46,81,39,0.2), 0 0 0 1px rgba(244,197,66,0.55); }

.filters-toggle,
.search-button {
    height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(244,197,66,0.35);
    padding: 0 1.15rem;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 650;
    letter-spacing: 0.01em;
    backdrop-filter: blur(6px);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.filters-toggle { flex: 0 0 auto; }
.search-button { flex: 0 0 auto; }

.filters-toggle { background: rgba(31,132,90,0.08); color: var(--accent-color, #1f845a); box-shadow: 0 8px 18px rgba(31,132,90,0.14); }
.filters-toggle:hover { background: rgba(31,132,90,0.14); transform: translateY(-1px); box-shadow: 0 12px 24px rgba(31,132,90,0.18); border-color: rgba(244,197,66,0.45); }
.search-button { background: linear-gradient(145deg, var(--primary-color, #2e5127), var(--accent-color, #1f845a)); color: #fefcf5; box-shadow: 0 18px 36px rgba(46,81,39,0.26); }
.search-button:hover { transform: translateY(-1px); box-shadow: 0 22px 42px rgba(46,81,39,0.3); opacity: 0.98; border-color: rgba(244,197,66,0.5); }
.filters-toggle:focus-visible,
.search-button:focus-visible { outline: 2px solid rgba(31,132,90,0.35); outline-offset: 2px; }

.advanced-filters {
    margin-top: 1rem;
    background: #fff;
    border: 1px solid rgba(31,132,90,0.18);
    border-radius: 14px;
}

.filters-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.filter-group.full-width { grid-column: 1 / -1; }

/* ==========================================================================
   6.3 Footer Layout
   ========================================================================== */

.modern-footer { background:
    radial-gradient(circle at 20% 20%, rgba(244,197,66,0.08), transparent 32%),
    radial-gradient(circle at 80% 0%, rgba(31,132,90,0.08), transparent 28%),
    var(--secondary-color, #0f172a) !important;
    color: #e6efe6 !important;
    padding: 3.75rem 0 2.25rem;
}
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 2.25rem; }
.footer-title { color: var(--gold-color, #f4c542) !important; margin-bottom: 0.95rem; font-size: 1.1rem; letter-spacing: 0.02em; font-weight: 700; }
.footer-links, .footer-contact { list-style: none; padding: 0; margin: 0; }
.footer-links li, .footer-contact li { margin-bottom: 0.6rem; }
.footer-links a, .footer-contact a { color: #e6efe6 !important; font-weight: 600; letter-spacing: 0.01em; text-decoration: none; text-underline-offset: 3px; }
.footer-links a:hover, .footer-contact a:hover { color: var(--accent-color, #1f845a) !important; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.footer-bottom { margin-top: 2.6rem; border-top: 2px solid rgba(244,197,66,0.3) !important; padding-top: 1.35rem; }
.footer-bottom-content { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.footer-legal { display: flex; gap: 1rem; list-style: none; margin: 0; padding: 0; }

@media (max-width: 1024px) {
    .header-nav { display: none; }
    .mobile-menu-toggle { display: inline-flex; }
    .search-form .search-bar { flex-direction: column; align-items: stretch; }
    .search-button, .filters-toggle { width: 100%; justify-content: center; }
}

@media (max-width: 640px) {
    .search-form .search-bar { gap: 0.5rem; }
    .search-field { padding: 0.35rem 0.65rem; min-height: 38px; gap: 0.4rem; }
    .location-field { flex: 1 1 100%; }
    .search-input, .search-select { font-size: 0.88rem; }
    .filters-toggle, .search-button { height: 40px; padding: 0 0.9rem; font-size: 0.9rem; }
}

@media (max-width: 480px) {
    .search-form .search-bar { gap: 0.4rem; }
    .search-field { padding: 0.3rem 0.55rem; min-height: 36px; gap: 0.35rem; border-radius: 10px; }
    .search-input, .search-select { font-size: 0.85rem; }
    .filters-toggle, .search-button { height: 38px; padding: 0 0.75rem; font-size: 0.85rem; border-radius: 10px; }
}

@media (max-width: 768px) {
    .header-actions { gap: 0.5rem; }
}

/* ==========================================================================
   7. Back to Top Button
   ========================================================================== */

#back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 52px;
    height: 52px;
    background: rgba(15,23,42,0.55);
    color: #f4c542;
    border: 1px solid rgba(244,197,66,0.5);
    border-radius: 14px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.32);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.25s ease;
    z-index: 1000;
    backdrop-filter: blur(6px);
}

#back-to-top svg {
    width: 22px;
    height: 22px;
    color: inherit;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    background: rgba(31,132,90,0.75);
    color: #fefcf5;
    border-color: rgba(244,197,66,0.6);
    transform: translateY(-5px);
    box-shadow: 0 16px 32px rgba(31, 132, 90, 0.3);
}

/* ==========================================================================
   8. Advanced Filters Panel
   ========================================================================== */

.advanced-filters {
    margin-top: 1rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
        padding: 0 1.5rem;
    }
    to {
        opacity: 1;
        max-height: 1000px;
        padding: 1.5rem;
    }
}

.filters-toggle.active {
    background: #667eea;
    color: white;
}

.filter-count {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    background: #dc3545;
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0 0.25rem;
}

/* ==========================================================================
   9. View Mode Toggle
   ========================================================================== */

.properties-grid.list-view {
    grid-template-columns: 1fr !important;
}

.properties-grid.list-view .property-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 1.5rem;
}

.properties-grid.list-view .property-card .card-image {
    height: 100%;
    min-height: 200px;
}

.properties-grid.list-view .property-card .card-content {
    padding: 1rem 1rem 1rem 0;
}

@media (max-width: 768px) {
    .properties-grid.list-view .property-card {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   10. Image Lazy Loading
   ========================================================================== */

img[data-src],
img[data-srcset] {
    filter: blur(5px);
    transition: filter 0.3s;
}

img.loaded {
    filter: blur(0);
}

/* ==========================================================================
   11. Gallery Fullscreen
   ========================================================================== */

.gallery-wrapper:fullscreen,
.gallery-wrapper:-webkit-full-screen,
.gallery-wrapper:-moz-full-screen {
    background: black;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.gallery-wrapper:fullscreen .gallery-main,
.gallery-wrapper:-webkit-full-screen .gallery-main,
.gallery-wrapper:-moz-full-screen .gallery-main {
    height: calc(100vh - 120px) !important;
}

/* ==========================================================================
   12. Mobile Filters
   ========================================================================== */

@media (max-width: 1024px) {
    .filters-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: white;
        z-index: 1001;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .filters-sidebar.active {
        transform: translateX(0);
    }
    
    .filters-sidebar::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: white;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        z-index: 1;
    }
    
    .sidebar-header {
        position: sticky;
        top: 0;
        background: white;
        z-index: 2;
        padding: 1rem 1.5rem;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }
}

/* ==========================================================================
   13. Responsive Utilities
   ========================================================================== */

@media (max-width: 768px) {
    .toast {
        left: 1rem;
        right: 1rem;
        min-width: auto;
    }
    
    #back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
    }
    
    .lightbox-content {
        max-width: 95vw;
    }
}

/* ==========================================================================
   14. Print Optimization
   ========================================================================== */

@media print {
    .toast,
    #back-to-top,
    .lightbox-overlay,
    .mobile-filters-toggle,
    .filters-toggle,
    .favorite-btn {
        display: none !important;
    }
}

/* Palette overrides to ensure back-to-top always uses brand colors */
#back-to-top,
.back-to-top {
    background: var(--primary-color, #2e5127) !important;
    color: #fefcf5 !important;
    border: 1px solid rgba(46, 81, 39, 0.22) !important;
    box-shadow: 0 10px 26px rgba(46, 81, 39, 0.28) !important;
}

#back-to-top:hover,
.back-to-top:hover {
    background: var(--accent-color, #1f845a) !important;
    color: #ffffff !important;
    border-color: rgba(31, 132, 90, 0.9) !important;
    box-shadow: 0 14px 28px rgba(31, 132, 90, 0.32) !important;
}
