:root {
  --primary-color: #e67819;
  --banner-blue: #0066cc;
  --light-gray: #f2f2f2;
  --orange-color: #ef8b3a; /* New color variable */
  --blue-color: #83c6d5; /* New color variable */
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background-color: #ffffff; /* Fallback color */
  /* background-image will be applied to .content-wrapper */
  background-size: cover;
  background-position: unset;
  background-repeat: no-repeat;
  min-height: 100vh;
  display: flex; /* Changed to column to stack header and content */
  flex-direction: column;
  justify-content: flex-start; /* Align content to the top */
  align-items: center;
  color: white; /* Ensure text is visible on the background */
}

/* New header styles */
.main-header {
  width: 100%;
  background-color: #f29100; /* Color of the buttons */
  padding: 10px 20px; /* Add padding to the header */
  display: flex;
  justify-content: flex-start; /* Justify all content to the left */
  align-items: center;
  position: relative;
  z-index: 100; /* Ensure header is on top */
  gap: 20px; /* Space between logo, buttons, and filter */
}

.header-left-content {
    display: flex;
    align-items: center;
    gap: 20px; /* Space between logo and buttons */
}

.header-right-content {
    margin-left: auto; /* Push to the right */
    display: flex;
    align-items: center;
}

.header-right-image {
    max-height: 50px; /* Adjust as needed */
    width: auto;
}

.main-header .logo img {
    max-width: 250px; /* Max width for the logo */
    height: auto; /* Maintain aspect ratio */
}

@media (max-width: 768px) {
  body {
    /* No background image on body for mobile, it will be on .content-wrapper */
  }
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid var(--primary-color);
  border-top: 5px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Maintenance Page Styles */
#maintenancePage {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    /* Initially hidden, controlled by JS */
    display: none;
}

.maintenance-container {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Align content to the top */
    align-items: center; /* Center horizontally */
    text-align: center;
    padding: 20px;
    /* This will hold the background image */
    background-image: url('https://www.vigfarma.com.ar/farmacia/sites/default/files/taximagenes-imagenes/solo-alto-fondo-pagina.png');
    background-size: cover; /* Changed to cover */
    background-position: unset;
    background-repeat: no-repeat;
    width: 100%;
    flex-grow: 1; /* Allow container to take remaining height */
    position: relative; /* For social icons positioning */
    z-index: 1; /* Ensure this is below the header */
    overflow-y: auto; /* Allow scrolling within the container */
    padding-top: 0; /* Remove top padding */
    padding-bottom: 0; /* Remove bottom padding */
}

/* Hide graphic-overlay */
.graphic-overlay {
    display: none;
}

@media (max-width: 768px) {
  .maintenance-container {
    background-image: url('https://www.vigfarma.com.ar/farmacia/sites/default/files/taximagenes-imagenes/solo-alto-fondo-pagina.png'); /* Use specific mobile background URL */
  }
  .graphic-overlay {
    display: none; /* Hide for mobile too */
  }
}

.maintenance-logo {
    max-width: 200px;
    margin-bottom: 30px;
}

.maintenance-container h1 {
    font-size: 2em;
    color: white;
    margin-bottom: 10px;
}

.maintenance-container p {
    font-size: 1.1em;
    color: white;
    margin-bottom: 30px;
}

.maintenance-buttons {
    display: none; /* Oculta los botones en pantallas angostas */
    flex-direction: row; /* Horizontal for mobile buttons in header */
    gap: 10px; /* Smaller gap for mobile */
    justify-content: flex-start; /* Justify to the left for mobile */
    max-width: none;
}

.maintenance-button {
    background-color: transparent; /* Transparent background */
    color: white;
    border: none; /* No border */
    padding: 10px 15px; /* Adjust padding for text */
    font-size: 12pt; /* Larger font size */
    font-weight: normal; /* No bold */
    border-radius: 0px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-transform: none; /* Removed uppercase */
    font-family: 'Montserrat', sans-serif; /* Added Montserrat font */
    /* box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); Removed box shadow */
}

.maintenance-button:hover {
    background-color: rgba(255, 255, 255, 0.2); /* Subtle hover effect */
    transform: none; /* No transform on hover */
}

.maintenance-button:active {
    transform: none; /* No transform on active */
    box-shadow: none; /* No box shadow on active */
}

/* Style for selected button */
.maintenance-button.active {
    background-color: rgba(255, 255, 255, 0.3); /* Slightly different background to indicate active */
    font-weight: bold;
}

.social-icons {
    display: none; /* Hide social icons completely */
}

.social-icons a {
    color: white;
    font-size: 2em;
    margin: 0 15px;
    transition: color 0.3s ease;
    text-decoration: none;
}

.social-icons a:hover {
    color: var(--light-gray);
}
/* End Maintenance Page Styles */

.header-container {
  width: 100%;
  background-color: var(--primary-color);
}

header {
  background-color: var(--primary-color);
  padding: 10px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  position: relative;
}

.logo {
  margin-left: 20px;
}

.logo img {
  cursor: pointer;
  height: 40px;
}

.search-box {
  display: flex;
  align-items: center;
  background: white;
  border-radius: 20px;
  padding: 0px 15px;
  cursor: text;
  flex-grow: 1;
  max-width: 600px;
}

.search-box input {
  border: none;
  background: none;
  padding: 8px 0px;
  width: 100%;
  outline: none;
  font-size: 14px;
  cursor: text;
  flex-grow: 1;
}

.search-box i {
  color: #666;
  margin-right: 5px;
}

.search-box button {
  border: none;
  background: none;
  color: var(--primary-color);
  cursor: pointer;
  padding: 0;
  font-size: 14px;
  display: flex;
  align-items: center;
}

.search-box button i {
  margin-right: 5px;
}

.search-box.desktop-header-search button span {
    display: inline;
}

.cart-icon {
  color: white;
  font-size: 24px;
  margin-right: 20px;
  position: relative;
}

.cart-notification {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ff0000;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  display: none;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.cart-notification.visible {
  opacity: 1;
  visibility: visible;
}

.categories-nav {
  position: sticky;
  top: 0;
  background-color: white;
  z-index: 10;
  padding: 10px 0px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.categories-container {
  overflow: visible;
  margin: 0;
  position: relative;
  justify-content: center;
  display: flex;
}

.categories-scroll {
  display: inline-block;
  gap: 10px;
  transition: transform 0.3s;
  position: relative;
}

.category-button {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  cursor: pointer;
  white-space: nowrap;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 5px;
  transition: background-color 0.3s ease;
  font-size: 12px;
  text-transform: uppercase;
}

.category-button.selected {
  background-color: #0066cc !important;
  position: relative;
}

.category-button.selected::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #0066cc;
}

.category-button:hover {
  opacity: 0.9;
}

.category-button img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.submenu-indicator {
  margin-left: 3px;
  font-size: 10px;
  color: white;
}

.category-submenu {
  position: relative;
  display: inline-block;
  padding-left: 5px;
  padding-top: 5px;
}

.category-submenu .submenu-items {
  display: none;
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  background: white;
  min-width: 180px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  z-index: 1000;
  border-radius: 5px;
}

.submenu-button {
  width: 100%;
  padding: 8px 12px;
  background: white;
  color: #333;
  border: none;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  font-size: 12px;
  text-transform: uppercase;
}

.submenu-button:hover {
  background: #f5f5f5;
}

.nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  padding: 10px;
  cursor: pointer;
  z-index: 2;
}

.nav-arrow.left {
  left: 0;
}

.nav-arrow.right {
  right: 0;
}

.breadcrumb {
  background-color: #f8f9fa;
  padding: 10px 20px;
  font-size: 14px;
  margin: 0;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #e9ecef;
}

.breadcrumb-home {
  color: var(--banner-blue);
  cursor: pointer;
  font-weight: 600;
  transition: color 0.3s ease;
}

.breadcrumb-home:hover {
  color: #004a99;
}

.breadcrumb-separator {
  margin: 0 10px;
  color: #6c757d;
  font-size: 12px;
}

.breadcrumb-current {
  color: #495057;
  font-weight: 500;
}

.iframe-container {
  position: relative;
  width: 100%;
  height: calc(100vh - 200px);
  margin: 0;
}

#contentFrame {
  width: 100%;
  height: 100%;
  border: none;
  margin: 0;
  padding: 0;
}

.iframe-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.iframe-loading-overlay .spinner {
  /* Inherits spinner styles */
}

.assistance-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--primary-color);
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  z-index: 1000;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.assistance-button:hover {
  background-color: #c96414;
}

.assistance-button i {
  font-size: 28px;
}

.top-banner {
  background-color: #4e7cba;
  color: white;
  padding: 10px 20px;
  font-size: 14px;
  text-align: left;
}

.banner-content {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}

.banner-icon {
  height: 16px;
  width: auto;
  vertical-align: middle;
}

@keyframes scroll-left {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.cart-added-notification {
  position: fixed;
  bottom: 90px;
  right: 20px;
  background-color: #4CAF50;
  color: white;
  padding: 10px 20px;
  border-radius: 5px;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
  pointer-events: none;
  font-size: 14px;
  max-width: 80%;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.cart-added-notification.visible {
  opacity: 1;
  visibility: visible;
}

/* Loading Spinner Specific Styles */
.loading-spinner {
    display: flex; /* Hidden by default, shown by JS */
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%; /* Take full height of its parent */
    position: absolute; /* Position over the content */
    top: 0;
    left: 0;
    background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent white background */
    z-index: 10; /* Ensure it's on top of other content */
}
/* End Loading Spinner Specific Styles */


/* Sucursales Page Specific Styles */
.split-content-wrapper {
    display: flex;
    width: 100%;
    flex-grow: 1; /* Allow wrapper to take remaining height */
    padding-top: 0;
    padding-bottom: 0;
    min-height: calc(100vh - 70px - 58px); /* Adjust based on header/footer heights */
}

.left-sidebar-filter {
    display: none; /* Hidden by default, shown on desktop */
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    width: 25%; /* 1/4 width for desktop */
    max-height: 100%;
    overflow-y: auto;
    border-radius: 0;
    flex-grow: 1; /* Allow it to grow and fill available height */
}

.filter-container {
    margin-bottom: 0; /* Remove bottom margin */
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0; /* Remove padding */
}

.filter-container label {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.filter-container.header-filter label {
    color: white; /* White text for filter label in header */
    font-size: 12pt;
    font-weight: normal;
}

.filter-container select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    background-color: white;
    cursor: pointer;
    width: 100%; /* Make select full width in sidebar */
}

.filter-container.header-filter select {
    font-size: 12pt; /* Match button font size */
    padding: 6px 10px; /* Adjust padding for header */
}

.filter-container.sidebar-filter {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

#sucursales-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex-grow: 1; /* Allow list to take available space */
    overflow-y: auto; /* Enable scroll for the list */
    padding-right: 10px; /* Add some padding for scrollbar */
    padding-bottom: 20px;
    padding-left: 20px; /* Add left padding to align with filter */
    padding-top: 0; /* Remove top padding */
}

/* Scrollbar styles for sucursales-list */
#sucursales-list::-webkit-scrollbar {
    width: 8px;
}

#sucursales-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

#sucursales-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

#sucursales-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.localidad-section {
    margin-top: 14px;
    margin-bottom: 15px;
}

.localidad-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700; /* Bold */
    font-size: 24pt; /* Large size */
    color: var(--orange-color); /* Orange color */
    margin-bottom: 15px;
    text-align: left;
}

.sucursal-item {
    margin-bottom: 14px;
    padding-left: 10px; /* Indent sucursal items */
}

.sucursal-nombre {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600; /* Semibold */
    font-size: 18pt; /* Medium size */
    color: var(--orange-color); /* Orange color */
    margin-bottom: 5px;
    text-align: left;
}

.sucursal-direccion {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500; /* Medium */
    font-size: 16pt; /* Small size, changed to 16pt */
    color: var(--orange-color); /* Orange color */
    margin-bottom: 5px;
    text-align: left;
}

.sucursal-horario {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500; /* Medium */
    font-size: 14pt; /* Small size */
    color: var(--blue-color); /* Celeste color */
    text-align: left;
}

/* New style for Google Business link */
.sucursal-google-business-link {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500; /* Medium */
    font-size: 14pt; /* Small size */
    color: #6c757d; /* Gray color */
    text-decoration: none; /* Remove underline */
    margin-top: 5px; /* Space from the horario */
    display: block; /* Ensure it takes its own line */
    text-align: left;
}

.sucursal-google-business-link:hover {
    text-decoration: underline; /* Underline on hover for interactivity */
}

.sucursales-content {
    width: 100%; /* Default for mobile, 3/4 for desktop */
    max-width: none; /* Allow full width within its flex container */
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.9); /* Slightly transparent white background for content */
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-top: 0; /* No top margin */
    margin-bottom: 0; /* No bottom margin */
    color: #333; /* Darker text for readability on light background */
    text-align: left; /* Justify text to the left */
    display: flex;
    flex-direction: column;
    height: 100%; /* Take full height of its parent */
    border-radius: 0; /* Remove border-radius to make it stick to edges */
    padding-top: 0; /* Remove top padding */
    padding-bottom: 0; /* Remove bottom padding */
    flex-grow: 1; /* Allow it to grow and fill available height */
    position: relative; /* For the loading spinner */
}
/* End Sucursales Page Specific Styles */

/* Ofertas Page Specific Styles */
.ofertas-content {
    width: 100%;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    position: relative;
    overflow: hidden; /* Hide overflow for gallery items */
}

.gallery-container {
    position: relative;
    width: 100%;
    max-width: 900px; /* Adjust max width for the gallery */
    overflow: hidden;
    margin-bottom: 20px;
}

.gallery-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 20px; /* Space between images */
    padding-bottom: 40px; /* Space for dots */
    align-items: flex-start; /* Align items to the top to prevent stretching */
}

.gallery-item {
    flex: 0 0 calc(33.333% - 13.333px); /* Always 3 items on desktop, accounting for gaps */
    width: calc(33.333% - 13.333px); /* Default to 3 items on desktop */
    min-width: unset; /* Remove min-width constraint */
    height: auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0; /* Prevent items from shrinking */
}

.gallery-item img {
    max-width: 100%;
    height: auto; /* Maintain aspect ratio */
    display: block;
    object-fit: cover; /* Cover the area, cropping if necessary */
    aspect-ratio: 9 / 16; /* Maintain 9:16 aspect ratio */
}

.gallery-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 24px;
    z-index: 5;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
}

.gallery-nav-button:hover {
    background-color: rgba(0, 0, 0, 0.7);
}

.gallery-nav-button.prev {
    left: 10px;
}

.gallery-nav-button.next {
    right: 10px;
}

.gallery-dots {
    position: absolute;
    bottom: 0; /* Adjust position for dots to be just below the gallery */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.gallery-dot {
    width: 12px;
    height: 12px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.gallery-dot.active {
    background-color: var(--primary-color);
}
/* End Ofertas Page Specific Styles */


/* Mobile styles */
@media (max-width: 768px) {
  body.maintenance-body {
      flex-direction: column; /* Stack header, mobile filter block, and maintenance container */
  }

  .main-header {
      padding: 10px 15px; /* Adjust padding for mobile header */
      gap: 10px; /* Smaller gap for mobile */
      justify-content: flex-start; /* Align content to the left */
  }

  .header-left-content {
      gap: 10px;
  }

  .header-right-content {
      display: flex; /* Show 100 años image on mobile */
      margin-left: auto; /* Push to the right */
  }

  .main-header .logo img {
      max-width: 160px; /* Configura el logo a 160px en pantallas angostas */
  }

  .header-right-image {
      max-height: 28px; /* Set height to 28px for mobile */
      width: auto;
  }

  .menu-toggle {
      display: block; /* Show menu icon on mobile */
      font-size: 24px;
      color: white;
      background: none;
      border: none;
      cursor: pointer;
      padding: 0;
  }

  .header-container {
    background-color: var(--primary-color);
  }

  .search-box.desktop-header-search {
      display: none;
  }

  .mobile-search-row {
      display: flex;
      justify-content: center;
      padding: 10px 0;
      background-color: var(--light-gray);
      width: 100%;
  }

  .search-box.mobile-row-search {
      display: flex;
      flex-grow: 1;
      max-width: none;
      margin: 0 10px;
  }

  .search-box.mobile-row-search input {
    padding: 8px;
  }

  .search-box.mobile-row-search button {
    display: flex;
  }

  .search-box.mobile-row-search button i {
    margin-right: 0;
  }

  .search-box.mobile-row-search button span {
    display: none;
  }

  .categories-nav {
    display: none;
  }

  /* Mobile Sidebar Menu */
  .mobile-sidebar {
    position: fixed;
    top: 0;
    left: -100%; /* Initially hidden off-screen */
    width: 80%;
    max-width: 300px;
    height: 100%;
    background: white;
    z-index: 1001; /* Above header */
    transition: left 0.3s ease;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    color: #333; /* Darker text for readability */
  }

  .mobile-sidebar.active {
    left: 0; /* Slide in */
  }

  .sidebar-header {
    background: var(--primary-color);
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    flex-shrink: 0;
  }

  .sidebar-header h2 {
    font-size: 1.2em;
    margin: 0;
  }

  .close-sidebar {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
  }

  .sidebar-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px 0;
  }

  .sidebar-menu-item {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
  }

  .sidebar-menu-item:hover {
    background-color: #f5f5f5;
  }

  .sidebar-menu-item.active {
    background-color: var(--light-gray);
    color: var(--primary-color);
    font-weight: bold;
  }

  .overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000; /* Below sidebar, above page content */
    display: none; /* Initially hidden */
  }

  .overlay.active {
    display: block; /* Show when sidebar is active */
  }

  .assistance-button {
    width: 50px;
    height: 50px;
    bottom: 15px;
    right: 15px;
  }

  .assistance-button i {
    font-size: 24px;
  }

  .cart-added-notification {
    bottom: 75px;
    right: 15px;
    left: 15px;
    max-width: none;
  }

  .maintenance-buttons {
    display: none; /* Oculta los botones en pantallas angostas */
    flex-direction: row; /* Horizontal for mobile buttons in header */
    gap: 10px; /* Smaller gap for mobile */
    justify-content: flex-start; /* Justify to the left for mobile */
    max-width: none;
  }

  .maintenance-button {
    padding: 8px 10px; /* Adjust padding for mobile */
    font-size: 10px; /* Smaller font for mobile */
  }

  .sucursales-content {
      padding: 10px; /* Smaller padding for mobile */
      margin-top: 0; /* No top margin for mobile */
      margin-bottom: 0; /* No bottom margin for mobile */
  }

  /* Hide header filter on mobile */
  .filter-container.header-filter {
      display: none; 
  }

  /* Hide mobile filter block instead of displaying it */
  .mobile-filter-block {
      display: none; 
  }

  .filter-container.mobile-filter {
      flex-direction: row; /* Display label and select in a row */
      align-items: center;
      width: 100%;
      gap: 10px;
  }

  .filter-container.mobile-filter label {
      color: white; /* White text for filter label in mobile block */
      font-size: 12pt;
      font-weight: normal;
      white-space: nowrap; /* Prevent label from wrapping */
  }

  .filter-container.mobile-filter select {
      font-size: 12pt; /* Match button font size */
      padding: 6px 10px;
      flex-grow: 1; /* Allow select to take available space */
  }

  .left-sidebar-filter {
      display: none; /* Hide sidebar filter on mobile */
  }

  #sucursales-list {
      max-height: unset; /* Remove fixed max-height, let flex-grow handle it */
  }

  .localidad-title {
      font-size: 20pt; /* Smaller font for mobile */
  }

  .sucursal-nombre {
      font-size: 16pt; /* Smaller font for mobile */
  }

  .sucursal-direccion {
      font-size: 14pt; /* Smaller font for mobile */
  }

  .sucursal-horario {
      font-size: 12pt; /* Smaller font for mobile */
  }

  .sucursal-google-business-link {
      font-size: 12pt; /* Smaller font for mobile */
  }

  /* Ofertas Page Mobile Styles */
  .ofertas-content {
      padding: 10px;
  }

  .gallery-container {
      margin-bottom: 10px;
  }

  .gallery-track {
      gap: 10px; /* Smaller gap for mobile */
  }

  .gallery-item {
      flex: 0 0 100%; /* 1 item per view for mobile */
      width: 100%;
      min-width: unset; /* Remove min-width constraint */
      /* Added for centering on mobile */
      display: flex;
      justify-content: center;
      align-items: center;
  }

  .gallery-item img {
      max-width: 80%; /* Reduce size if screen is narrower, adjust as needed */
      height: auto; /* Maintain aspect ratio */
      object-fit: contain; /* Ensure the entire image is visible */
      aspect-ratio: 9 / 16; /* Maintain 9:16 aspect ratio */
  }

  .gallery-nav-button {
      font-size: 20px;
      width: 40px;
      height: 40px;
      padding: 0; /* Remove padding */
  }

  .gallery-dots {
      bottom: 0; /* Adjust position for dots to be just below the gallery */
      left: 50%;
      transform: translateX(-50%);
      display: flex;
      gap: 8px;
      margin-top: 10px;
  }
}

/* Desktop styles */
@media (min-width: 769px) {
  body.maintenance-body {
    align-items: center; /* Center content horizontally */
    padding-top: 0; /* Remove top padding as header is now fixed */
  }

  .maintenance-container {
    padding: 0;
    margin: 0; /* Remove auto margin */
    width: 100%;
    max-width: none; /* Allow full width */
    display: flex; /* Use flexbox for maintenance-container */
    flex-direction: column; /* Stack children vertically */
    min-height: calc(100vh - 70px); /* Adjust based on header height, assumes no bottom bar */
  }

  .main-header {
      padding: 15px 20px; /* Larger padding for desktop header */
      justify-content: flex-start; /* Justify all content to the left */
      gap: 30px; /* Space between logo, buttons, and filter */
  }

  .menu-toggle {
      display: none; /* Hide menu icon on desktop */
  }

  .mobile-sidebar, .overlay, .mobile-filter-block {
      display: none !important; /* Hide mobile elements on desktop */
  }

  .maintenance-buttons {
    display: flex; /* Show buttons on desktop */
    flex-direction: row; /* Horizontal layout for desktop buttons */
    justify-content: flex-start; /* Justify buttons to the left */
    max-width: none; /* Remove max-width for buttons */
    width: auto; /* Adjust width based on content */
    gap: 20px; /* Add space between buttons */
  }

  .sidebar {
    display: none !important;
  }

  .categories-nav {
    display: block;
    background-color: var(--primary-color);
    padding: 10px 0;
    position: relative;
    z-index: 50;
  }

  .categories-container {
    margin: 0 auto;
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    justify-content: center;
  }

  .categories-container::-webkit-scrollbar {
      display: none;
  }

  .categories-scroll {
      display: none;
  }

  .category-button {
      text-transform: uppercase;
      background-color: var(--primary-color);
  }

   .submenu-button {
       text-transform: uppercase;
   }

  .menu-toggle,
  .sidebar,
  .overlay {
    display: none !important;
  }

  .search-box.desktop-header-search {
    display: flex;
    flex-grow: 1;
    margin: 0 35px;
  }

  .mobile-search-row {
    display: none;
  }

  header {
      justify-content: space-between;
      padding: 10px 20px;
   }

   .logo {
       margin-left: 0;
   }

   .cart-icon {
       margin-right: 0;
   }

   header > .search-box.desktop-header-search {
       flex-basis: 600px;
       flex-grow: 0;
       margin: 0 35px;
   }

  .categories-nav-desktop {
    display: flex;
    justify-content: center;
    position: relative;
  }

  .categories-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 20px;
    cursor: pointer;
    white-space: nowrap;
    background-color: white;
    color: var(--primary-color);
    border: none;
    border-radius: 5px;
    transition: background-color 0.2s ease, color 0.2s ease;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 0 auto;
  }

  .categories-dropdown-toggle:hover {
      background-color: var(--light-gray);
  }

  .categories-dropdown-toggle i {
      color: var(--primary-color);
  }

  .mega-menu-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 40;
    flex-direction: row;
    border-top: 1px solid var(--light-gray);
    max-height: 500px;
    overflow: hidden;
  }

  .mega-menu-left {
    width: 30%;
    padding: 20px;
    border-right: 1px solid var(--light-gray);
    background-color: #607D8B;
    overflow-y: auto;
    max-height: 500px;
  }

  .mega-menu-right {
    width: 70%;
    padding: 20px;
    background-color: white;
    overflow-y: auto;
    max-height: 500px;
  }

  .mega-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    text-align: left;
    padding: 8px 15px;
    margin-bottom: 4px;
    border: none;
    background: none;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease, color 0.2s ease;
    text-transform: uppercase;
    border-radius: 3px;
  }

  .mega-menu-left .mega-menu-item {
      color: white;
  }

  .mega-menu-left .mega-menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
  }

  .mega-menu-item:hover {
    background-color: #e9ecef;
    color: var(--primary-color);
  }

  .mega-menu-item.active {
    background-color: var(--primary-color);
    color: white;
    font-weight: bold;
  }

  .mega-menu-item img {
      width: 16px;
      height: 16px;
      object-fit: contain;
  }

  .mega-menu-left .mega-menu-item img {
       filter: brightness(0) invert(1);
   }

   .mega-menu-item.active img {
       filter: brightness(0) invert(1);
   }

  .mega-menu-right-placeholder {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
  }

  .subcategories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
  }

  .subcategory-item {
    flex: 1 1 auto;
    padding: 6px 10px;
    font-weight: normal;
    display: block;
    gap: 0;
  }

  .subcategory-item:hover {
    background-color: #e9ecef;
    color: var(--primary-color);
  }

  .subcategory-item.active {
    background-color: #e9ecef;
    color: var(--primary-color);
    font-weight: bold;
  }

  /* Remove graphic overlay on desktop too */
  .graphic-overlay {
      display: none;
  }

  .maintenance-container {
      justify-content: flex-start; /* Align content to the top for desktop */
      padding-top: 0; /* Remove top padding */
  }

  .filter-container.header-filter {
      display: none; /* Hide filter in header on desktop */
  }

  .split-content-wrapper {
      flex-direction: row; /* Desktop layout for split content */
      align-items: stretch; /* Stretch children to fill height */
      height: 100%; /* Ensure it takes full height of parent */
      flex-grow: 1; /* Allow it to grow and fill available height */
  }

  .left-sidebar-filter {
      display: none; /* Hide sidebar filter on desktop for offers page */
  }

  .ofertas-content {
      width: 100%; /* Full width for offers content on desktop */
      box-shadow: none;
      border-radius: 0;
      flex-grow: 1;
      justify-content: flex-start; /* Align gallery to the top */
      padding-top: 50px; /* Add some top padding */
  }

  .gallery-item {
      /* On larger screens, the image width will be driven by flex-basis (33.333% minus gap)
         and the height will be determined by its aspect ratio.
         If the screen is too narrow, the image will also scale down naturally. */
      height: auto; /* Allow height to adjust based on aspect ratio */
  }

  .gallery-item img {
      /* For desktop, if the container is wider, the image will scale up while maintaining aspect ratio */
      width: 100%;
      height: auto; /* Let aspect-ratio define height */
      max-height: 450px; /* Max height to prevent excessively large images on very wide screens */
      object-fit: contain; /* Ensure the entire image is visible, no cropping */
  }
}