/* search_suppliers.css */

/* Custom Colors and Variables */
:root {
  --primary-color: #ff385c;
  --primary-hover: #e91e63;
  --dark-color: #333;
  --dark-color-strong: #222;
  --light-color: #fff;
  --background-color: #f7f7f7;
  --card-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  --card-hover-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
  --service-icon-bg: rgba(255, 193, 7, 0.9); /* Bootstrap warning yellow with opacity */
}

/* Global Typography & Colors */
body, 
.container, 
form, 
button, 
input, 
select, 
textarea, 
h1, h2, h3, h4, h5, h6, 
p, span, label, a, li, ul, ol {
  font-family: 'Montserrat', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: var(--dark-color-strong);
  line-height: 1.5;
  font-weight: 400;
  margin: 0;
  padding: 0;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  color: var(--dark-color-strong);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

/* Body */
body {
  background-color: var(--background-color);
  color: var(--dark-color);
}

/* Container */
.container {
 
  margin: 0 auto;
}

/* Section Header */
.section-header {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--dark-color-strong);
}

/* Featured Suppliers Title */
.featured-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
  color: var(--dark-color-strong);
}

/* Supplier Card - NO rounded corners */
.supplier-card {
  position: relative;
  height: 300px;
  overflow: hidden;
  border-radius: 0; /* No rounded corners */
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
  cursor: pointer;
  display: block;
  background-color: var(--light-color);
  color: var(--dark-color-strong);
}

.supplier-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--card-hover-shadow);
}

/* Supplier Image - NO rounded corners */
.supplier-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin: 0;
  padding: 0;
  border-radius: 0; /* No rounded corners */
}

/* Overlay */
.supplier-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--service-icon-bg);
  padding: 20px;
  color: var(--dark-color-strong);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.05s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.05s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
  border-radius: 0;
}

.supplier-card:hover .supplier-overlay {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Overlay heading */
.supplier-overlay h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 8px;
  margin-top: 0;
  color: var(--dark-color-strong);
}

/* Overlay info lines */
.supplier-overlay .info-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 0.9rem;
  color: var(--dark-color-strong);
}

/* Blurring heading on hover */
.supplier-card:hover h3 {
  filter: blur(5px);
  opacity: 0.2;
  transition: all 0.1s ease-in-out;
  pointer-events: none;
}

/* Supplier Description */
.supplier-desc {
  font-size: 0.85rem;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
  max-height: 4.2em; /* ~3 lines */
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}

.view-details-link {
  color: #222; /* Use same color as featured-title */
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.view-details-link:hover {
  color: var(--primary-hover); /* Keep pink on hover */
  border-bottom: 1px solid var(--primary-hover);
  text-decoration: none;
}

#loadMoreBtn {
  color: #222; /* same as featured-title */
  border-color: #222;
  background-color: transparent;
  font-weight: 600;
  transition: all 0.3s ease;
}

#loadMoreBtn:hover,
#loadMoreBtn:focus {
  color: var(--primary-hover);
  border-color: var(--primary-hover);
  background-color: transparent;
  text-decoration: none;
}

/* Airbnb-Style Container */
.airbnb-style-container {
  border-radius: 0; /* Remove rounded corners */
  background: var(--light-color);
  box-shadow: var(--card-shadow);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  cursor: default;
  color: var(--dark-color-strong);
}

.airbnb-style-container:hover {
  box-shadow: var(--card-hover-shadow);
  transform: translateY(-5px);
}

/* Buttons */
button.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--light-color);
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

button.btn-primary:hover,
button.btn-primary:focus {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--light-color);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  .section-header,
  .featured-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }

  .supplier-card {
    height: 250px;
  }

  .supplier-desc,
  .supplier-overlay .info-line,
  .actions button,
  .form-control,
  .form-select {
    font-size: 0.85rem;
  }
}
