:root {
  --primary-color: #EB1B21;
  --primary-hover: #C3161C;
  --text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
  --transition-ease: all 0.3s ease;
  --max-width: 1280px;
  --color-white: #fff;
  --color-gray-100: #f9fafb;
  --color-gray-800: #333;
  --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 6px 16px rgba(0, 0, 0, 0.15);
}

html {
  overflow-x: hidden;
  overflow-y: scroll;
  box-sizing: border-box;
  font-size: clamp(15px, 1vw + 0.5rem, 18px);
  -webkit-overflow-scrolling: touch;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  font-family: 'Roboto', Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  color: var(--color-gray-800);
  background-color: var(--color-white);
}

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

a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

.map-container {
  position: relative;
  width: 100%;
  max-width: var(--max-width);
  margin: 1.5rem auto;
  padding: 0.5rem;
  border-radius: 0.5rem;
  box-shadow: var(--shadow-light);
  transition: var(--transition-ease);
}

.map-container:hover {
  transform: scale(1.01);
  box-shadow: var(--shadow-medium);
}

section#main-content {
  position: relative;
  width: 100%;
  min-height: 80vh;
}

section#main-content img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 5;
}

section#main-content .container {
  position: relative;
  z-index: 15;
  padding: 3rem 1rem 4rem 1rem;
}

.text-shadow {
  text-shadow: var(--text-shadow);
}

@keyframes zoomIn {
  0% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.animate-zoom-in {
  animation: zoomIn 10s ease-in-out forwards;
  will-change: transform;
}

@keyframes fadeIn {
  0% { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  animation: fadeIn 0.6s ease-out forwards;
}

#store-map {
  width: 100%;
  height: 18rem;
  z-index: 10;
  border-radius: 0.375rem;
  border: 3px solid var(--primary-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#store-info {
  background-color: var(--color-gray-100);
  padding: 1.5rem;
  border-radius: 0.5rem;
  border: 3px solid var(--primary-color);
  box-shadow: var(--shadow-light);
  margin: 1.5rem auto;
  max-width: 896px;
  transition: var(--transition-ease);
}

#store-info:hover {
  box-shadow: var(--shadow-medium);
}

#store-info h3 {
  color: var(--primary-color);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

#store-info p {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

#store-info a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

#store-info a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

#store-info a.google-maps-link {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.5rem 1rem;
  background-color: var(--primary-color);
  color: var(--color-white);
  border-radius: 0.375rem;
  text-align: center;
  transition: var(--transition-ease);
}

#store-info a.google-maps-link:hover {
  background-color: var(--primary-hover);
  text-decoration: none;
  transform: scale(1.05);
}

.leaflet-container {
  background: #e6f0fa;
  border-radius: 0.375rem;
  width: 100%;
}

#map-loading {
  transition: opacity 0.3s ease;
}

#map-loading.hidden {
  opacity: 0;
  pointer-events: none;
}

.selected-marker {
  animation: bounce 0.3s ease-in-out;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.leaflet-control.legend {
  background: var(--color-white);
  padding: 8px 12px;
  border-radius: 6px;
  box-shadow: var(--shadow-light);
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 0.9rem;
}

.leaflet-control.legend span {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  vertical-align: middle;
}

.button {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border-radius: 0.375rem;
  transition: var(--transition-ease);
  cursor: pointer;
}

.button-primary {
  position: relative;
  background-color: var(--primary-color);
  color: var(--color-white);
  overflow: hidden;
  z-index: 0;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.3);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  border-radius: 0.375rem;
  cursor: pointer;
  display: inline-block;
  text-align: center;
  text-decoration: none;
}

.button-primary::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.20);
  z-index: -1;
  transition: background-color 0.3s ease;
  border-radius: 0.375rem;
}

.button-primary:hover {
  background-color: var(--primary-hover);
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.button-primary:hover::before {
  background: rgba(0, 0, 0, 0.10);
}

#store-select {
  font-size: 1rem;
  padding: 0.5rem;
  border: 2px solid var(--primary-color);
  border-radius: 0.375rem;
  transition: var(--transition-ease);
  width: 100%;
  max-width: 500px;
}

#store-select:hover {
  border-color: var(--primary-hover);
}

.fb-embed {
  width: 100%;
  max-width: 600px;
  height: 450px;
  border: 3px solid var(--primary-color);
  border-radius: 0.5rem;
  box-shadow: var(--shadow-light);
  overflow: hidden;
  margin: 1.5rem auto;
  padding: 0.5rem;
  transition: var(--transition-ease);
}

.fb-embed:hover {
  border-color: var(--primary-hover);
  box-shadow: var(--shadow-medium);
  transform: scale(1.01);
}

.iframe-container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 1rem;
  border-radius: 0.75rem;
  background-color: var(--color-white);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  border: 2px solid var(--primary-color);
}

.iframe-container iframe {
  width: 100%;
  height: 500px;
  border-radius: 0.5rem;
  border: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.iframe-container iframe:hover,
.iframe-container iframe:focus {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
  outline: none;
}

@media (min-width: 640px) {
  #store-map { height: 22rem; }
  #store-info { padding: 2rem; }
  #store-info h3 { font-size: 1.5rem; }
  #store-info p { font-size: 1rem; }
  #store-select { font-size: 1.1rem; padding: 0.75rem; }
}

@media (min-width: 768px) {
  section#main-content { min-height: 100vh; }
  section#main-content h2 { font-size: 3.5rem; }
  section#main-content p { font-size: 1.25rem; }
  #stay-connected h2, #heritage h2, #locations h2 { font-size: 2.5rem; }
  .fb-embed { max-width: 600px; height: 450px !important; }
}

@media (min-width: 1024px) {
  #store-map { height: 26rem; }
  #stay-connected .container { padding-left: 1rem; padding-right: 1rem; }
  .fb-embed { padding: 0.75rem; }
}

@media (max-width: 768px) {
  #heritage img { max-width: 80%; margin: 1rem auto; }
  .button { width: 100%; padding: 0.75rem; }
  .map-container { margin: 1rem auto; padding: 0.5rem; }
  #store-map { height: 16rem; }
  #store-info { padding: 1rem; margin: 1rem auto; max-width: 100%; }
  #store-info h3 { font-size: 1.125rem; }
  #store-info p { font-size: 0.875rem; }
  #store-info a.google-maps-link { padding: 0.5rem; font-size: 0.9rem; }
  section#main-content { min-height: 60vh; }
  section#main-content h2 { font-size: 2rem; }
  section#main-content p { font-size: 1rem; }
  #stay-connected h2, #heritage h2, #locations h2 { font-size: 2rem; }
  .fb-embed { width: 100% !important; max-width: 100%; height: 300px !important; padding: 0.25rem; }
  section#main-content .container { padding: 8rem 1rem 3rem 1rem; }
}

@media (max-width: 640px) {
  #store-select { font-size: 0.9rem; padding: 0.4rem; }
  #stay-connected p, #heritage p, #locations p { font-size: 0.95rem; }
}

@media (max-width: 480px) {
  .iframe-container iframe { height: 300px; }
}

@media (min-width: 1280px) {
  #main-content { min-height: 100vh; }
}

@media print {
  #main-content, footer { display: none !important; }
  body { background: #fff; color: #000; }
  #locations, #heritage { page-break-after: always; }
  #store-info { display: block !important; border: none; box-shadow: none; }
  .map-container, .fb-embed { display: none !important; }
}