/* ==================== CITY GRID STYLES ==================== */
.city-grid-wrapper {
  max-width: 1200px;
  margin: 0 auto 60px;
  padding: 40px 20px;
}

.city-grid-header {
  text-align: center;
  margin-bottom: 48px;
}

.city-grid-title {
  font-size: 36px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 12px 0;
  line-height: 1.2;
}

.city-grid-subtitle {
  font-size: 18px;
  color: #6b7280;
  margin: 0;
}

.city-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.city-card {
  background: #f8f9fa;
  border-radius: 16px;
  padding: 28px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.3s;
  text-decoration: none;
  position: relative;
  border: 2px solid transparent;
}

.city-card:hover {
  background: #fff;
  border-color: #e5e7eb;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.city-card-hidden {
  display: none;
}

.city-card-icon {
  font-size: 44px;
  width: 68px;
  height: 68px;
  background: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.city-card-content {
  flex: 1;
}

.city-card-name {
  font-size: 20px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 4px 0;
}

.city-card-count {
  font-size: 15px;
  color: #9ca3af;
  margin: 0;
  font-weight: 400;
}

.city-card-arrow {
  font-size: 24px;
  color: #d1d5db;
  transition: all 0.3s;
  flex-shrink: 0;
}

.city-card:hover .city-card-arrow {
  color: #2563eb;
  transform: translateX(4px);
}

.city-grid-footer {
  text-align: center;
}

.btn-show-more {
  padding: 14px 28px;
  background: #fff;
  color: #2563eb;
  border: 2px solid #2563eb;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-show-more:hover {
  background: #eff6ff;
  transform: translateY(-1px);
}

.btn-show-more:active {
  transform: translateY(0);
}

/* City Grid Responsive */
@media (max-width: 1024px) {
  .city-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .city-grid-title {
    font-size: 28px;
  }
  
  .city-grid-subtitle {
    font-size: 16px;
  }
  
  .city-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .city-card {
    padding: 24px 20px;
  }
  
  .city-card-icon {
    font-size: 38px;
    width: 60px;
    height: 60px;
  }
  
  .city-card-name {
    font-size: 18px;
  }
  
  .city-card-count {
    font-size: 14px;
  }
}

/* ==================== CITY SEARCH STYLES ==================== */
.csm-wrapper {
  max-width: 900px;
  margin: 0 auto 60px;
  padding: 20px;
}

.csm-title {
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 12px;
}

.csm-subtitle {
  text-align: center;
  font-size: 16px;
  color: #666;
  margin-bottom: 32px;
}

.csm-search-box {
  position: relative;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 8px 8px 8px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 36px;
}

.csm-location-icon {
  color: #2563eb;
  font-size: 22px;
  flex-shrink: 0;
}

.csm-input-wrapper {
  position: relative;
  flex: 1;
}

#csm-search {
  width: 100%;
  height: 50px;
  border: none;
  background: transparent;
  font-size: 16px;
  color: #333;
  outline: none;
}

#csm-search::placeholder {
  color: #999;
}

#csm-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  max-height: 320px;
  overflow-y: auto;
  z-index: 1000;
}

#csm-dropdown div {
  padding: 14px 18px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s;
}

#csm-dropdown div:last-child {
  border-bottom: none;
}

#csm-dropdown div:hover {
  background: #f8f9fa;
}

#csm-btn {
  height: 50px;
  padding: 0 32px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

#csm-btn:hover:not(:disabled) {
  background: #1d4ed8;
}

#csm-btn:disabled {
  background: #93c5fd;
  cursor: not-allowed;
}

.csm-search-icon {
  font-size: 18px;
}

#csm-search.csm-highlight {
  animation: csm-pulse 1s ease;
}

@keyframes csm-pulse {
  0%, 100% { background: transparent; }
  50% { background: #dbeafe; }
}

.csm-popular {
  text-align: center;
}

.csm-popular-label {
  font-size: 14px;
  color: #666;
  margin-bottom: 16px;
  display: inline-block;
  margin-right: 12px;
}

.csm-popular-cities {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

.csm-city-link {
  color: #2563eb;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all 0.2s;
  display: inline-block;
}

.csm-city-link:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

/* ==================== OPTICIEN DIRECTORY STYLES ==================== */
.opticien-directory {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 12px;
}

.filters-section {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.filters-section h3 {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1a1a1a;
    font-family: Helvetica, Arial, sans-serif;
}

.filters-section h3 svg {
    color: #2563eb;
}

.filter-count {
    color: #6b7280;
    font-size: 12px;
    margin-bottom: 24px;
}

.filter-group {
    margin-bottom: 24px;
}

.filter-group:last-child {
    margin-bottom: 0;
}

.filter-label {
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: #374151;
    font-weight: 500;
    font-family: Helvetica, Arial, sans-serif;
}

.filter-btn:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #eff6ff;
}

.filter-btn.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.opticiens-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 24px;
}

.opticien-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s, transform 0.3s;
    position: relative;
}

.opticien-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.premium-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
}

.card-image {
    width: 100%;
    height: 200px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-image {
    color: #9ca3af;
}

.card-content {
    padding: 20px;
}

.opticien-name {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    font-family: Helvetica, Arial, sans-serif;
}

.opticien-location {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 12px;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #d1fae5;
    color: #065f46;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.opticien-description {
    font-size: 12px;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 16px;
}

.promo-box {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px dashed #10b981;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 16px;
}

.promo-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.promo-header svg {
    color: #059669;
}

.promo-title {
    font-size: 12px;
    font-weight: 600;
    color: #065f46;
}

.promo-discount {
    margin-left: auto;
    font-size: 16px;
    font-weight: 700;
    color: #059669;
}

.promo-code {
    background: #fff;
    border: 1px solid #10b981;
    border-radius: 6px;
    padding: 8px 12px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    font-weight: 600;
    color: #065f46;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.copy-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #059669;
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.copy-btn:hover {
    color: #047857;
}

.promo-details {
    font-size: 11px;
    color: #065f46;
    line-height: 1.4;
}

.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.service-tag {
    background: #f3f4f6;
    color: #374151;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.card-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.action-buttons-row {
    display: flex;
    gap: 8px;
}

.btn {
    flex: 1;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-family: Helvetica, Arial, sans-serif;
}

.btn:hover,
.btn:focus,
.btn:active {
    text-decoration: none !important;
}

.btn-primary {
    background: #2563eb;
    color: #fff !important;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    color: #fff !important;
}

.btn-secondary {
    background: #10b981;
    color: #fff !important;
}

.btn-secondary:hover {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    color: #fff !important;
}

.btn-outline {
    background: #fff;
    color: #374151 !important;
    border: 1px solid #e5e7eb;
}

.btn-outline:hover {
    background: #f9fafb;
    border-color: #2563eb;
    color: #2563eb !important;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1400px) {
    .opticiens-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 1024px) {
    .opticiens-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .csm-title {
        font-size: 24px;
    }
    .csm-input-wrapper {
        flex: 1;
        min-width: 0;
    }
    .csm-subtitle {
        font-size: 14px;
    }
    
    .csm-search-box {
        flex-wrap: wrap;
        padding: 12px;
    }
    
    .csm-location-icon {
        font-size: 20px;
    }
    
    #csm-search {
        height: 48px;
        font-size: 15px;
    }
    
    #csm-btn {
        width: 100%;
        margin-top: 8px;
    }
    
    .csm-search-icon {
        font-size: 16px;
    }
    
    #csm-dropdown {
        left: -50px;
        right: 0;
    }
    
    .csm-popular {
        text-align: left;
    }
    
    .csm-popular-cities {
        justify-content: flex-start;
    }
    
    .opticiens-grid {
        grid-template-columns: 1fr !important;
    }
    
    .action-buttons-row {
        flex-direction: column;
    }
}

#csm-dropdown::-webkit-scrollbar {
    width: 8px;
}

#csm-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 12px;
}

#csm-dropdown::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 12px;
}