/* Base styling */
html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin-bottom: 60px;
  overflow-x: hidden; /* Prevent horizontal scroll */
}

.footer {
  margin-top: auto;
  width: 100%;
}

main {
  flex: 1;
}

/* Responsive containers */
.container, .container-fluid {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

/* Responsive images */
img {
  max-width: 100%;
  height: auto;
}

/* Responsive tables */
@media (max-width: 767.98px) {
  .table-responsive-sm {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Navbar responsive adjustments */
@media (max-width: 576px) {
  .navbar-brand {
    font-size: 1.1rem;
    margin-right: 0;
  }
  
  .navbar .container-fluid {
    padding-left: 5px;
    padding-right: 5px;
  }
  
  .search-input {
    max-width: 150px;
  }
}

/* Adjustments for extra small devices */
@media (max-width: 320px) {
  .navbar-brand {
    font-size: 1rem;
    margin-right: 0;
  }
  
  .search-input {
    max-width: 120px;
  }
}

/* Стили для карты в футере */
.map-container {
  width: 100%;
  height: 250px;
  overflow: hidden;
}

@media (min-width: 768px) {
  .map-container {
    height: 300px;
  }
}

/* Стили для секции ссылок в футере */
.footer-links {
  min-height: auto;
}

@media (min-width: 768px) {
  .footer-links {
    min-height: 300px;
  }
}

/* Responsive form elements */
.form-control, .input-group {
  max-width: 100%;
}

/* Product cards responsive design */
.product-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-card .card-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.product-card .card-text {
  flex-grow: 1;
}

/* Make buttons stack on small screens */
@media (max-width: 576px) {
  .btn-group {
    display: flex;
    flex-direction: column;
  }
  
  .btn-group .btn {
    margin-bottom: 0.25rem;
    border-radius: 0.25rem !important;
  }
}

/* Responsive spacing utilities */
@media (max-width: 576px) {
  .mobile-mt-2 {
    margin-top: 0.5rem !important;
  }
  
  .mobile-mb-2 {
    margin-bottom: 0.5rem !important;
  }
  
  .mobile-mx-1 {
    margin-left: 0.25rem !important;
    margin-right: 0.25rem !important;
  }
  
  .mobile-p-2 {
    padding: 0.5rem !important;
  }
}