/* ============================================
   3aychek.com — Service Pages CSS (v2)
   Used by: services/7ammas.html, services/livraison.html
   ============================================ */

/* ---- Page Layout ---- */
.service-page { min-height: 100vh; background: var(--light); }

.service-hero {
  background: linear-gradient(135deg, var(--dark-2) 0%, var(--dark) 100%);
  color: white;
  padding: 80px 24px 60px;
  text-align: center;
}
.service-hero .badge {
  display: inline-block;
  background: rgba(200,16,46,0.2);
  border: 1px solid rgba(200,16,46,0.4);
  color: #ff6b8a;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 20px;
}
.service-hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  margin: 0 0 16px;
  line-height: 1.15;
}
.service-hero h1 span { color: var(--red-light); }
.service-hero p {
  font-size: 1.05rem;
  opacity: 0.8;
  max-width: 540px;
  margin: 0 auto 32px;
  line-height: 1.6;
}

/* ---- Search Bar ---- */
.search-section {
  background: white;
  padding: 28px 24px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}
.search-bar {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.search-bar input {
  flex: 1;
  min-width: 200px;
  padding: 12px 18px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}
.search-bar input:focus { border-color: var(--red); }
.search-bar select {
  padding: 12px 14px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  background: white;
  cursor: pointer;
}
.btn-locate {
  padding: 12px 18px;
  background: var(--blue);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-locate:hover { background: var(--blue-dark); }
.btn-search {
  padding: 12px 24px;
  background: var(--red);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}
.btn-search:hover { background: var(--red-dark); }

/* ---- View Toggle ---- */
.view-toggle {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.view-btn {
  padding: 7px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: white;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--gray);
  transition: var(--transition);
}
.view-btn.active {
  border-color: var(--red);
  color: var(--red);
  background: rgba(200,16,46,0.05);
}

/* ---- Main Content Layout ---- */
.content-area {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 28px;
}
@media (max-width: 900px) {
  .content-area { grid-template-columns: 1fr; }
}

/* ---- Map Container ---- */
.map-wrapper {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--light-2);
}
#map {
  width: 100%;
  height: 520px;
}
@media (max-width: 900px) {
  #map { height: 340px; }
}
.map-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 520px;
  color: var(--gray);
  font-size: 0.95rem;
  gap: 12px;
}
.map-placeholder .icon { font-size: 3rem; }

/* ---- Seller Cards Panel ---- */
.sellers-panel { display: flex; flex-direction: column; gap: 0; }
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.panel-header h3 { font-size: 1rem; font-weight: 700; color: var(--dark); }
.result-count {
  font-size: 0.82rem;
  color: var(--gray);
  background: var(--light-2);
  padding: 4px 10px;
  border-radius: 20px;
}

/* ---- Seller Card ---- */
.seller-card {
  background: white;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.seller-card:hover {
  border-color: var(--red);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.seller-avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--light-2);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}
.seller-avatar img {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-sm);
  object-fit: cover;
}
.seller-info { flex: 1; min-width: 0; }
.seller-info h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.seller-info .address {
  font-size: 0.8rem;
  color: var(--gray);
  margin: 0 0 6px;
}
.seller-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.badge-open {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--green);
  background: rgba(46,125,94,0.1);
  padding: 2px 8px;
  border-radius: 10px;
}
.badge-closed {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--red);
  background: rgba(200,16,46,0.08);
  padding: 2px 8px;
  border-radius: 10px;
}
.badge-distance {
  font-size: 0.75rem;
  color: var(--gray);
  background: var(--light-2);
  padding: 2px 8px;
  border-radius: 10px;
}
.seller-hours {
  font-size: 0.78rem;
  color: var(--gray);
  margin-top: 4px;
}
.btn-shop {
  display: inline-block;
  margin-top: 8px;
  padding: 7px 14px;
  background: var(--red);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
}
.btn-shop:hover { background: var(--red-dark); }

/* ---- Empty state ---- */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--gray);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h4 { font-size: 1rem; font-weight: 700; color: var(--dark); margin-bottom: 8px; }
.empty-state p { font-size: 0.9rem; }

/* ---- Delivery Method Selector ---- */
.delivery-methods {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 16px 0;
}
.method-card {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 12px;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  background: white;
}
.method-card:hover { border-color: var(--blue); }
.method-card.selected {
  border-color: var(--red);
  background: rgba(200,16,46,0.04);
}
.method-card.unavailable {
  opacity: 0.45;
  cursor: pointer;
  background: #FAFBFC;
}
.method-card.unavailable:hover {
  opacity: 0.6;
  border-color: var(--gray);
}
.method-card .method-icon { font-size: 1.8rem; margin-bottom: 6px; }
.method-card .method-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 4px;
}
.method-card .method-fee {
  font-size: 0.88rem;
  color: var(--red);
  font-weight: 700;
}
.method-card .method-eta {
  font-size: 0.75rem;
  color: var(--gray);
  margin-top: 2px;
}
.method-card .unavail-label {
  font-size: 0.72rem;
  color: var(--gray);
  font-style: italic;
  margin-top: 2px;
}

/* ---- Livraison page specific ---- */
.livraison-hero { background: linear-gradient(135deg, #0D47A1, #1565C0); }
.party-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 48px 24px;
}
.party-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow);
  text-align: center;
}
.party-card .party-icon { font-size: 3rem; margin-bottom: 16px; }
.party-card h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 12px;
}
.party-card ul {
  list-style: none;
  padding: 0;
  text-align: left;
  font-size: 0.88rem;
  color: var(--gray);
  line-height: 1.8;
}
.party-card ul li::before { content: '✓ '; color: var(--green); font-weight: 700; }
.cta-section {
  background: var(--dark-2);
  color: white;
  text-align: center;
  padding: 64px 24px;
}
.cta-section h2 { font-size: 2rem; font-weight: 900; margin-bottom: 16px; }
.cta-section p { opacity: 0.75; max-width: 480px; margin: 0 auto 32px; line-height: 1.6; }
.btn-cta-white {
  display: inline-block;
  padding: 16px 36px;
  background: white;
  color: var(--dark);
  border-radius: var(--radius);
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  transition: var(--transition);
  margin: 8px;
}
.btn-cta-white:hover { background: var(--light-2); transform: translateY(-2px); }
.btn-cta-red {
  display: inline-block;
  padding: 16px 36px;
  background: var(--red);
  color: white;
  border-radius: var(--radius);
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  transition: var(--transition);
  margin: 8px;
}
.btn-cta-red:hover { background: var(--red-dark); transform: translateY(-2px); }

/* ---- Radius slider ---- */
.radius-control {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--gray);
}
.radius-control input[type="range"] {
  flex: 1;
  accent-color: var(--red);
}
.radius-control span { font-weight: 700; color: var(--dark); min-width: 40px; }

/* ---- Saved address cards (checkout modal) ---- */
.address-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: white;
  cursor: pointer;
  transition: var(--transition);
}
.address-card:hover { border-color: var(--blue); }
.address-card.selected {
  border-color: var(--red);
  background: rgba(200,16,46,0.04);
}
.address-card input[type="radio"] {
  margin-top: 3px;
  flex-shrink: 0;
  accent-color: var(--red);
}
.address-card .ac-body { flex: 1; min-width: 0; }
.address-card .ac-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 2px;
}
.address-card .ac-text {
  font-size: 0.78rem;
  color: var(--gray);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.address-card.default-badge::after {
  content: "Défaut";
  font-size: 0.65rem;
  background: #198754;
  color: white;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 700;
}

/* ---- Pickup time chips ---- */
.pickup-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.pickup-chip {
  padding: 8px 14px;
  border: 2px solid var(--border);
  border-radius: 20px;
  background: white;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}
.pickup-chip:hover { border-color: var(--blue); }
.pickup-chip.selected {
  border-color: var(--red);
  background: rgba(200,16,46,0.06);
  color: var(--red);
}

/* ---- Seller delivery-method toggle (profile page) ---- */
.seller-method-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: white;
  cursor: pointer;
  font-family: inherit;
  position: relative;
  transition: var(--transition);
}
.seller-method-toggle:hover { border-color: var(--blue); }
.seller-method-toggle.on {
  border-color: #198754;
  background: #F0FFF4;
}
.seller-method-toggle .seller-method-check {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 0.85rem;
  color: #ADB5BD;
}
.seller-method-toggle.on .seller-method-check { color: #198754; }

/* ---- Loading spinner ---- */
.spinner {
  display: inline-block;
  width: 20px; height: 20px;
  border: 3px solid var(--border);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
