* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Smooth transitions for SPA */
#main-content {
    transition: opacity 0.3s ease-in-out;
}

/* Page transition animations */
.page-transition {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.page-transition.loaded {
    opacity: 1;
    transform: translateY(0);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f8f9fa;
    color: #212529;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Header - Two Part Design */
.header-wrapper {
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Top White Section with Logo */
.header-top {
    background: white;
    padding: 1rem 0;
    transition: background-color 0.3s ease;
}

.header-top-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
}

.logo img {
    height: 80px;
    width: auto;
    object-fit: contain;
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    position: absolute;
    right: 0;
    background: none;
    border: 2px solid #FF0000;
    border-radius: 50px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    height: 40px;
}

.dark-mode-toggle:hover {
    background: #FF0000;
    color: white;
    transform: scale(1.05);
}

.toggle-icon {
    font-size: 1.1rem;
    margin-right: 0.5rem;
    transition: transform 0.3s ease;
}

.toggle-text {
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.dark-mode-toggle:hover .toggle-icon {
    transform: rotate(20deg);
}

.dark-mode-toggle:hover .toggle-text {
    transform: scale(1.05);
}

/* Bottom Red Navigation Bar */
.header-nav {
    background: #FF0000;
    padding: 0;
}

.header-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.nav-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    gap: 3rem;
    padding: 1rem 0;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: opacity 0.3s ease;
    white-space: nowrap;
    cursor: pointer;
    padding: 0.5rem 0;
}

.nav-menu a:hover {
    opacity: 0.8;
}

.nav-menu a.active {
    border-bottom: 2px solid white;
}

/* Dropdown indicator */
.nav-menu a.has-dropdown::after {
    content: ' ▼';
    font-size: 0.7rem;
    margin-left: 0.3rem;
}

/* Make sure pages are properly hidden/shown */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(255, 0, 0, 0.9), rgba(180, 0, 0, 0.9));
    color: white;
    padding: 6rem 0;
    text-align: center;
    background-size: cover;
    background-position: center;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: white;
    color: rgba(255, 0, 0, 1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: rgba(255, 0, 0, 1);
}

/* Main content */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 1rem;
}

/* Features section */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.feature-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 1rem;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* Nearest Store Info */
.nearest-store-info {
    background: rgba(255, 0, 0, 0.1);
    border: 2px solid rgba(255, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    text-align: center;
}

.nearest-store-text {
    margin: 0;
    font-size: 1.1rem;
    color: #212529;
    line-height: 1.5;
}

.nearest-store-text strong {
    color: #FF0000;
    font-weight: 700;
}

.btn-link {
    background: none;
    border: none;
    color: #FF0000;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    margin-left: 0.5rem;
    font-size: inherit;
}

.btn-link:hover {
    color: #cc0000;
    text-decoration: none;
}

/* CTA Section */
.cta-section {
    background: rgba(255, 0, 0, 1);
    color: white;
    text-align: center;
    padding: 4rem 2rem;
    border-radius: 12px;
    margin: 4rem 0;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Breadcrumb */
.breadcrumb {
    background: white;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.breadcrumb-nav {
    color: #666;
    font-size: 0.9rem;
}

.breadcrumb-nav a {
    color: rgba(255, 0, 0, 1);
    text-decoration: none;
    cursor: pointer;
}

.breadcrumb-nav a:hover {
    text-decoration: underline;
}

/* Page header */
.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #212529;
    margin-bottom: 1rem;
}

.page-description {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Stock locator section */
.stock-locator-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-bottom: 3rem;
}

.section-header {
    background: rgba(255, 0, 0, 1);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.section-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.section-header p {
    opacity: 0.9;
    font-size: 0.95rem;
}

/* App container */
.app-container {
    position: relative;
    width: 100%;
    height: 800px;
    background: #f8f9fa;
}

.app-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 0, 0, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: white;
    z-index: 10;
    transition: opacity 0.5s ease;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Info cards */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.info-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.info-card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.info-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 1rem;
}

.info-card p {
    color: #666;
    line-height: 1.6;
}

/* Footer */
.footer {
    background: #212529;
    color: white;
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #fff;
}

.footer-section p,
.footer-section a {
    color: #adb5bd;
    text-decoration: none;
    line-height: 1.6;
    cursor: pointer;
}

.footer-section a:hover {
    color: rgba(255, 0, 0, 1);
}

.footer-nav {
    list-style: none;
}

.footer-nav li {
    margin-bottom: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid #495057;
    padding-top: 2rem;
    text-align: center;
    color: #adb5bd;
    font-size: 0.9rem;
}

/* Responsive design */
@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
        font-size: 0.8rem;
        flex-wrap: wrap;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .app-container {
        height: 600px;
    }

    .main-container {
        padding: 2rem 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 0, 0, 1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(220, 0, 0, 1);
}

/* Full Screen Store Locator */

/* Full viewport height minus header */
.fullscreen-store-locator {
    position: relative;
    width: 100%;
    height: calc(100vh - 120px);
    background: #f0f0f0;
    margin: 0;
    overflow: hidden;
}

/* Floating Controls at Top */
.floating-controls {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 1002;
    pointer-events: none;
}

.search-panel {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    pointer-events: all;
    max-width: 500px;
    margin: 0;
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.search-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
    margin: 0;
}

.toggle-panel {
    background: #FF0000;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-panel:hover {
    background: #cc0000;
    transform: translateY(-1px);
}

.search-bar {
    display: flex;
    gap: 0.5rem;
}

.search-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: #FF0000;
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.1);
}

.search-btn {
    padding: 0.75rem 1rem;
    background: #FF0000;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 50px;
}

.search-btn:hover {
    background: #cc0000;
    transform: translateY(-1px);
}

/* Floating Store Panel */
.floating-store-panel {
    position: absolute;
    top: 200px;
    left: 20px;
    width: 400px;
    max-height: calc(100vh - 240px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1001;
    transform: translateX(-100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.floating-store-panel.panel-open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: all;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.panel-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #212529;
    margin: 0;
}

.close-panel {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-panel:hover {
    background: #f8f9fa;
    color: #212529;
}

/* Store List in Floating Panel */
.store-list {
    max-height: calc(100vh - 280px);
    overflow-y: auto;
    padding: 0;
}

.store-item {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
}

.store-item:hover {
    background: rgba(255, 0, 0, 0.05);
}

.store-item.highlighted {
    background: rgba(255, 0, 0, 0.1);
    border-left: 4px solid #FF0000;
}

.store-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #212529;
}

.store-info .address {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.store-info .location {
    color: #495057;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.store-info .distance {
    color: #FF0000;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    background: rgba(255, 0, 0, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    display: inline-block;
}

.store-details {
    margin-bottom: 1rem;
}

/* Phone styling removed - no longer needed */

/* Status classes removed - no longer needed */

.store-features {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.feature-tag {
    background: rgba(233, 236, 239, 0.8);
    color: #495057;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
}

.store-actions {
    display: flex;
    gap: 0.5rem;
}

.store-actions .btn {
    flex: 1;
    text-align: center;
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
}

/* Full Screen Map */
.fullscreen-map-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
}

#map.mapbox-map {
    width: 100%;
    height: 100%;
}

/* Simplified layout for locations page */
body:has(.fullscreen-store-locator) .main-container {
    padding: 0;
    margin: 0;
    max-width: none;
}

/* Alternative approach for browsers that don't support :has() */
.locations-page .main-container {
    padding: 0;
    margin: 0;
    max-width: none;
}

/* Hide footer and sidebar on locations page */
body:has(.fullscreen-store-locator) #footer-placeholder {
    display: none;
}

.locations-page #footer-placeholder {
    display: none;
}

/* Hide floating store panel (sidebar) and toggle button on locations page */
body:has(.fullscreen-store-locator) .floating-store-panel {
    display: none !important;
}

.locations-page .floating-store-panel {
    display: none !important;
}

body:has(.fullscreen-store-locator) .toggle-panel {
    display: none !important;
}

.locations-page .toggle-panel {
    display: none !important;
}

/* Prevent scrolling on locations page */
body:has(.fullscreen-store-locator) {
    overflow: hidden;
}

.locations-page {
    overflow: hidden;
}

/* Mapbox Popup Styles - Enhanced with Better Close Button */
.mapboxgl-popup {
    z-index: 10000 !important;
}

.mapboxgl-popup-content {
    border-radius: 16px !important;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.2) !important;
    border: 2px solid #f0f0f0 !important;
    padding: 0 !important;
    max-width: 340px !important;
    position: relative !important;
    transform: translateX(-8px) !important;
}

.mapboxgl-popup-tip {
    border-top-color: #fff !important;
}

/* Enhanced Close Button */
.mapboxgl-popup-close-button {
    position: absolute !important;
    top: -12px !important;
    right: 50% !important;
    transform: translateX(50%) !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: #FF0000 !important;
    color: white !important;
    border: 3px solid white !important;
    font-size: 18px !important;
    font-weight: bold !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3) !important;
    transition: all 0.3s ease !important;
    z-index: 10001 !important;
    line-height: 1 !important;
    text-decoration: none !important;
}

.mapboxgl-popup-close-button:hover {
    background: #cc0000 !important;
    transform: translateX(50%) scale(1.1) !important;
    box-shadow: 0 6px 16px rgba(255, 0, 0, 0.4) !important;
    color: white !important;
}

.mapboxgl-popup-close-button:focus {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.3) !important;
}

.store-popup {
    max-width: 340px;
    padding: 1.5rem;
    padding-top: 2rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: white;
    border-radius: 16px;
    text-align: center;
    position: relative;
    margin-left: -10px;
}

.store-popup h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #1a1a1a;
    line-height: 1.3;
    text-align: center;
}

.store-popup .address {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    line-height: 1.4;
    text-align: center;
    padding: 0 0.5rem;
}

.store-popup .distance-info {
    color: #FF0000;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
    background: rgba(255, 0, 0, 0.1);
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 0, 0, 0.2);
}

.store-popup .location {
    display: none; /* Hide duplicate location */
}

.contact-info {
    margin-bottom: 1rem;
}

.contact-info p {
    margin: 0.5rem 0;
    font-size: 0.85rem;
    color: #666;
}

.products {
    margin-bottom: 0;
}

.products strong {
    color: #212529;
    font-size: 0.85rem;
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0;
}

.product-tags .tag {
    background: #f5f5f5;
    color: #555;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #e5e5e5;
}

.popup-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.popup-actions .btn {
    flex: 1;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.75rem 0.5rem;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
}

.popup-actions .btn-primary {
    background: #FF0000;
    color: white;
    border: none;
    box-shadow: 0 2px 4px rgba(255, 0, 0, 0.2);
}

.popup-actions .btn-primary:hover {
    background: #e60000;
    text-decoration: none;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 0, 0, 0.3);
}

.popup-actions .btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #e5e5e5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.popup-actions .btn-secondary:hover {
    background: #e9ecef;
    text-decoration: none;
    color: #495057;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Button Styles for Store Locator */
.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-primary {
    background: #FF0000;
    color: white;
    border: 1px solid #FF0000;
}

.btn-primary:hover {
    background: #cc0000;
    border-color: #cc0000;
    color: white;
    text-decoration: none;
}

.btn-secondary {
    background: white;
    color: #666;
    border: 1px solid #e5e5e5;
}

.btn-secondary:hover {
    background: #f8f9fa;
    color: #495057;
    text-decoration: none;
}

/* Mobile Responsive for Full Screen Store Locator */
@media (max-width: 768px) {
    .fullscreen-store-locator {
        height: calc(100vh - 100px); /* Smaller header on mobile */
    }
    
    .floating-controls {
        top: 10px;
        left: 10px;
        right: 10px;
    }
    
    .search-panel {
        padding: 1rem;
    }
    
    .search-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .search-header h2 {
        font-size: 1.3rem;
        text-align: center;
    }
    
    .floating-store-panel {
        top: 200px; /* Adjusted for mobile - lowered to avoid search panel clash */
        left: 10px;
        right: 10px;
        width: auto;
        max-height: calc(100vh - 280px); /* Account for header/footer and higher position on mobile */
    }
    
    .store-item {
        padding: 1rem;
    }
    
    .store-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .popup-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .search-bar {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .search-btn {
        width: 100%;
    }
}

/* Custom Marker Styles */
.custom-marker {
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    z-index: 1000;
}

.custom-marker:hover {
    transform: scale(1.05);
}

.custom-marker * {
    pointer-events: none;
}

.marker-logo {
    width: 60px;
    height: 80px;
    background: white;
    border-radius: 50% 50% 50% 0;
    border: 4px solid #FF0000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    transform: rotate(-45deg);
    padding-top: 8px;
    padding-left: 8px;
}

.marker-logo:hover {
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.4);
    border-color: #cc0000;
    transform: rotate(-45deg) scale(1.1);
}

.marker-logo img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    transform: rotate(45deg);
}

/* Google Maps style traditional map marker - OPTIMIZED SIZE */
.marker-logo-traditional {
    width: 58px;
    height: 58px;
    background: #FF0000;
    border-radius: 50% 50% 50% 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    transform: rotate(-45deg);
    border: 3px solid #fff;
}

.marker-logo-traditional .logo-circle {
    width: 38px;
    height: 38px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(45deg);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.marker-logo-traditional:hover {
    box-shadow: 0 7px 20px rgba(255, 0, 0, 0.4);
    transform: rotate(-45deg) scale(1.1);
    background: #cc0000;
}

.marker-logo-traditional img {
    width: 29px;
    height: 29px;
    border-radius: 50%;
    object-fit: cover;
}

.marker-icon {
    width: 50px;
    height: 60px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.8));
    border-radius: 12px;
    border: 3px solid #FF0000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
    backdrop-filter: blur(10px);
}

.marker-icon:hover {
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
    transform: translateY(-2px) scale(1.05);
    border-color: #cc0000;
}

.marker-icon.vending-machine {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(240, 240, 240, 0.9));
}

.marker-icon::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #FF0000;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.1));
}

/* Custom scrollbar for store list */
.store-list::-webkit-scrollbar {
    width: 6px;
}

.store-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.store-list::-webkit-scrollbar-thumb {
    background: rgba(255, 0, 0, 0.5);
    border-radius: 3px;
}

.store-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 0, 0, 0.7);
}

/* ============================================
   DARK MODE STYLES
   ============================================ */

/* Dark Mode Variables and Transitions */
body.dark-mode {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body.dark-mode .header-top {
    background: #2d2d2d;
}

body.dark-mode .feature-card {
    background: #2d2d2d;
    border: 1px solid #404040;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

body.dark-mode .feature-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.7);
}

body.dark-mode .feature-card h3 {
    color: #ffffff;
}

body.dark-mode .feature-card p {
    color: #e0e0e0;
}

body.dark-mode .feature-icon {
    filter: brightness(1.3) contrast(1.1);
}

/* Dark mode for other content sections */
body.dark-mode .page-title {
    color: #ffffff;
}

body.dark-mode .page-description {
    color: #e0e0e0;
}

body.dark-mode .info-card {
    background: #2d2d2d;
    border: 1px solid #404040;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

body.dark-mode .info-card h3 {
    color: #ffffff;
}

body.dark-mode .info-card p {
    color: #e0e0e0;
}

body.dark-mode .info-card-icon {
    filter: brightness(1.2) contrast(1.1);
}

body.dark-mode .cta-section h2 {
    color: #ffffff;
}

body.dark-mode .cta-section p {
    color: #e0e0e0;
}

body.dark-mode .section-header h2 {
    color: #ffffff;
}

body.dark-mode .section-header p {
    color: #e0e0e0;
}

body.dark-mode .store-popup {
    background: #2d2d2d;
    border: 1px solid #404040;
}

body.dark-mode .store-popup h3 {
    color: #ffffff;
}

body.dark-mode .store-popup .address {
    color: #bbb;
}

body.dark-mode .mapboxgl-popup-content {
    border: 2px solid #404040 !important;
}

body.dark-mode .mapboxgl-popup-tip {
    border-top-color: #2d2d2d !important;
}

body.dark-mode .mapboxgl-popup-close-button {
    background: #FF0000 !important;
    border: 3px solid #2d2d2d !important;
}

body.dark-mode .mapboxgl-popup-close-button:hover {
    background: #cc0000 !important;
    border: 3px solid #2d2d2d !important;
}

body.dark-mode .products strong {
    color: #e0e0e0;
}

body.dark-mode .product-tags .tag {
    background: #404040;
    color: #e0e0e0;
    border: 1px solid #555;
}

body.dark-mode .popup-actions .btn-secondary {
    background: #404040;
    color: #e0e0e0;
    border: 1px solid #555;
}

body.dark-mode .popup-actions .btn-secondary:hover {
    background: #505050;
    color: #e0e0e0;
}

body.dark-mode .floating-controls {
    background: transparent !important;
    border: none !important;
}

body.dark-mode .search-panel {
    background: rgba(45, 45, 45, 0.95) !important;
    border: 1px solid #404040 !important;
    backdrop-filter: blur(10px);
}

body.dark-mode .search-header h2 {
    color: #ffffff;
}

body.dark-mode .toggle-panel {
    background: #404040;
    color: #e0e0e0;
    border: 1px solid #555;
}

body.dark-mode .toggle-panel:hover {
    background: #505050;
}

body.dark-mode .search-input {
    background: #404040 !important;
    color: #e0e0e0 !important;
    border: 1px solid #555 !important;
}

body.dark-mode .search-input::placeholder {
    color: #999 !important;
}

body.dark-mode .search-btn {
    background: #FF0000 !important;
    color: white !important;
    border: 1px solid #FF0000 !important;
}

body.dark-mode .search-btn:hover {
    background: #cc0000 !important;
}

body.dark-mode .floating-store-panel {
    background: rgba(45, 45, 45, 0.95);
    border: 1px solid #404040;
}

body.dark-mode .store-item {
    background: #404040;
    border: 1px solid #555;
}

body.dark-mode .store-item:hover {
    background: #505050;
}

body.dark-mode .dark-mode-toggle {
    border-color: #e0e0e0;
    color: #e0e0e0;
}

body.dark-mode .dark-mode-toggle:hover {
    background: #e0e0e0;
    color: #1a1a1a;
}

/* Dark mode transitions for smooth switching */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ============================================
   INTEGRATED DIRECTIONS PANEL
   ============================================ */

.directions-panel {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 350px;
    max-height: calc(100vh - 40px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 2px solid #f0f0f0;
    z-index: 10000;
    overflow: hidden;
    animation: slideInRight 0.3s ease-out;
}

.directions-header {
    background: #FF0000;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.directions-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.close-directions {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.close-directions:hover {
    background: rgba(255, 255, 255, 0.2);
}

.directions-summary {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.directions-summary p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

.directions-steps {
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.direction-step {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    gap: 0.75rem;
}

.direction-step:last-child {
    border-bottom: none;
}

.step-number {
    background: #FF0000;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.step-instruction {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.3;
}

.step-distance {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
    flex-shrink: 0;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Dark mode support for directions panel */
body.dark-mode .directions-panel {
    background: #2d2d2d;
    border: 2px solid #404040;
}

body.dark-mode .directions-summary {
    background: #3d3d3d;
    border-bottom: 1px solid #404040;
}

body.dark-mode .directions-summary p {
    color: #e0e0e0;
}

body.dark-mode .step-instruction {
    color: #e0e0e0;
}

body.dark-mode .step-distance {
    color: #bbb;
}

body.dark-mode .direction-step {
    border-bottom: 1px solid #404040;
}

/* Dark mode for geography-enhanced elements */
body.dark-mode .store-info .distance {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.2);
}

body.dark-mode .store-popup .distance-info {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.2);
    border: 1px solid rgba(255, 107, 107, 0.3);
}

body.dark-mode .nearest-store-info {
    background: rgba(255, 107, 107, 0.15);
    border: 2px solid rgba(255, 107, 107, 0.3);
}

body.dark-mode .nearest-store-text {
    color: #e0e0e0;
}

body.dark-mode .nearest-store-text strong {
    color: #ff6b6b;
}

body.dark-mode .btn-link {
    color: #ff6b6b;
}

body.dark-mode .btn-link:hover {
    color: #ff8e8e;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .directions-panel {
        right: 10px;
        left: 10px;
        width: auto;
        max-height: calc(100vh - 20px);
    }
}