/* Carlos Store Locator - v5.3 Final Styles */

/* --- NEW: Apply custom font ONLY to titles --- */
.csl-bootstrap-wrapper .modal-title,
.csl-bootstrap-wrapper .card-title,
.csl-bootstrap-wrapper .section-title,
.csl-bootstrap-wrapper .csl-store-item .h6 {
  font-family: "Cormorant Garamond", serif;
}

.csl-store-item .h6 {
  font-weight: 700; /* Setează grosimea la Bold */
}

/* --- Desktop-Only Height (screens wider than 768px) --- */
@media (min-width: 768px) {
  .csl-bootstrap-wrapper,
  .csl-bootstrap-wrapper .row {
    height: 85vh;
    min-height: 650px;
  }
}

#csl-map-container,
.csl-map-column {
  height: 100%;
  width: 100%;
  padding: 0;
}

#csl-map-container img {
  max-width: none !important;
}

.csl-sidebar {
  background-color: #fff;
  padding: 0;
  height: 100%;
}

.csl-sidebar-header .input-group {
  border-radius: var(--bs-border-radius);
  /* overflow: hidden; */
  border: 1px solid #dee2e6;
  align-items: center; /* Ensures vertical alignment of input and dropdown */
}
.csl-sidebar-header .input-group:focus-within {
  border-color: #e30813;
  box-shadow: 0 0 0 0.25rem rgba(227, 8, 19, 0.25);
}
.csl-sidebar-header .input-group .form-control,
.csl-sidebar-header .input-group .btn {
  /* Target button too */
  border: none;
  box-shadow: none;
  height: 100%;
}
.csl-sidebar-header .input-group .form-control:focus {
  border-color: transparent;
}

.csl-sidebar-list .list-group-item.is-active {
  background-color: #fdeaea !important;
  border-left: 4px solid #e30813;
}
.csl-sidebar-list .list-group-item.is-active .fw-bold {
  color: #212529;
}

/* --- InfoWindow Card Design --- */

.gm-style .gm-style-iw-c {
  padding: 0 !important;
  border-radius: 12px !important;
}
.gm-style-iw-d {
  overflow: hidden !important;
}
.gm-style .gm-style-iw-tc::after {
  background: #fff;
}

.csl-infowindow .card {
  max-width: 360px;
}

.csl-infowindow .card-body {
  padding: 0;
  max-height: 60vh;
  display: flex;
  flex-direction: column;
}
.csl-infowindow-main-content {
  padding: 0 1rem;
  overflow-y: auto;
  flex-grow: 1;
  font-weight: 400;
}
.csl-infowindow-footer {
  padding: 1rem;
  background: #fff;
  border-top: 1px solid #e9ecef;
  flex-shrink: 0;
}

.csl-infowindow .csl-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;

  fill: #6c757d;
  height: auto;
}

.csl-infowindow .csl-description {
  line-height: 1.5;
  font-size: 0.9em;
}

.csl-infowindow .csl-read-more {
  cursor: pointer;
  color: #e30813;
  text-decoration: none;
}
.csl-infowindow .csl-read-more:hover {
  text-decoration: underline;
}

.csl-infowindow-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e9ecef;
}

.csl-infowindow .section-title {
  display: block;
  font-size: 1.4em;
  font-weight: 700;
  color: #212529;
  margin-bottom: 0.7rem;
}

.csl-infowindow .csl-hours-list {
  font-size: 0.9em;
}
.csl-infowindow .csl-hours-list li {
  color: #343a40;
}

.csl-product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.csl-product-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
}
.csl-product-card-link:hover .csl-product-card {
  border-color: #e30813;
  background-color: #fef5f5;
}

.csl-product-card {
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 0.75rem;
  background-color: #f8f9fa;
  font-size: 0.85em;
  width: 100%;
  transition: all 0.2s ease-in-out;
  display: flex;
  flex-direction: column;
}

.csl-product-image {
  width: 100%;
  height: 70px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.csl-product-card span {
  text-align: center;
  margin-top: auto;
}

span.h5.card-title.fw-bold {
  font-size: 1.4em;
  color: #212529;
}

span.text-muted.small {
  font-weight: 600;
}

/* --- Responsive Design (Mobile) --- */
@media (max-width: 767.98px) {
  .csl-bootstrap-wrapper .row {
    height: calc(100vh - 50px);
    min-height: initial;
    display: flex;
    flex-direction: column;
  }
  .csl-sidebar {
    order: 2;
    height: 60%; /* You can adjust this */
    border-top: 1px solid #dee2e6;
  }
  .csl-map-column {
    order: 1;
    height: 40%; /* You can adjust this */
  }
}

/* --- Mobile Modal Styles --- */
#csl-store-modal .modal-header {
  padding: 1rem;
  border-bottom: 1px solid #e9ecef;
}

#csl-store-modal .modal-title {
  font-size: 1.25rem;
  font-weight: 700;
}

#csl-store-modal .csl-infowindow .card {
  border: none;
  max-width: none;
}

#csl-store-modal .csl-infowindow .card-body,
#csl-store-modal .csl-infowindow-main-content {
  max-height: none;
  overflow-y: visible;
  padding-bottom: 1rem;
  padding-top: 0.6rem;
}

#csl-store-modal .modal-header .btn-close {
  background-color: transparent;
  box-shadow: none;
  opacity: 0.7;
}

#csl-store-modal .modal-header .btn-close:hover {
  opacity: 1;
}

#csl-store-modal .modal-header .btn-close:focus {
  box-shadow: none;
}

/* --- Week Headers for Operating Hours --- */
.csl-hours-list .csl-week-header {
  font-weight: 700;
  color: #6c757d;
  margin-top: 0.75rem;
  font-size: 0.85em;
  padding-bottom: 4px;
  border-bottom: 1px solid #e9ecef;
  list-style-type: none;
}
.csl-hours-list .csl-week-header:first-child {
  margin-top: 0;
}

/* --- Product Count Text Style --- */
.csl-product-count {
  font-size: 1em;
  color: #e30813;
  padding-top: 0.5rem;
}

#csl-autocomplete-input {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.375rem 0.75rem;
}

input#csl-autocomplete-input {
  background: none !important;
}
