/* ==========================================================================
   1. БАЗОВЫЕ СТИЛИ И ПЕРЕМЕННЫЕ МАКЕТА
   ========================================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: #FAF8F5; /* Теплый молочно-кремовый фон страницы */
  color: #1F2937;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.hidden { display: none !important; }
.main-content { flex: 1; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }

/* Универсальные кнопки */
.btn-emerald {
  background-color: #10B981;
  color: #FFFFFF;
  font-weight: 600;
  padding: 0.75rem 1.75rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}
.btn-emerald:hover { background-color: #059669; transform: translateY(-1px); }

.btn-white {
  background: #FFFFFF;
  color: #064E3B;
  font-size: 1.1rem;
  font-weight: 700;
  padding: 1rem 2.25rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.btn-white:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18); }

.btn-secondary {
  background-color: #FFF7ED;
  color: #9A3412;
  border: 1px solid #FFEDD5;
  font-weight: 600;
  padding: 0.65rem 1.35rem;
  border-radius: 9999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}
.btn-secondary:hover { background-color: #FFEDD5; }
.btn-full { width: 100%; }

/* Карточки с мягкой тенью */
.card-rounded {
  background: #FFFFFF;
  border-radius: 1.5rem;
  padding: 1.75rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.04), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
  border: 1px solid #F3F4F6;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.card-rounded:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   2. ШАПКА САЙТА (STICKY HEADER) И КНОПКА КОРЗИНЫ
   ========================================================================== */
header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
  padding: 1rem 0;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: #064E3B;
  cursor: pointer;
}
.logo-badge {
  background: #10B981;
  color: white;
  padding: 0.35rem 0.5rem;
  border-radius: 0.75rem;
  font-size: 1rem;
}
.nav-links { display: flex; align-items: center; gap: 1.5rem; }
.nav-links a, .nav-btn {
  color: #4B5563;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.15s;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0.25rem 0.5rem;
}
.nav-links a:hover, .nav-btn:hover { color: #10B981; }

.cart-btn {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  padding: 0.6rem 1.1rem;
  border-radius: 9999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: #1F2937;
  transition: all 0.2s;
}
.cart-btn:hover { border-color: #10B981; color: #10B981; }
.cart-count {
  background: #EF4444;
  color: white;
  font-size: 0.75rem;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  font-weight: 700;
}

/* ==========================================================================
   3. ПЕРВЫЙ ЭКРАН (HERO) И НАЛОЖЕНИЕ ЛАПОК КОТА
   ========================================================================== */
.hero-container {
  padding-top: 2.5rem;
  padding-bottom: 2rem;
  text-align: center;
  position: relative;
}
.peeking-cat-hero {
  width: 240px;
  margin: 0 auto -95px; /* Отрицательный отступ опускает лапки кота на баннер */
  position: relative;
  z-index: 10;
  pointer-events: none;
}
.peeking-cat-hero img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.12));
}
.hero-banner {
  background: linear-gradient(135deg, #064E3B 0%, #047857 50%, #10B981 100%);
  border-radius: 2.5rem;
  padding: 4.5rem 2rem 3.5rem;
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(6, 78, 59, 0.35);
}
.hero-title { font-size: 2.75rem; font-weight: 800; line-height: 1.15; margin-bottom: 1.25rem; }
.hero-subtitle { font-size: 1.15rem; max-width: 650px; margin: 0 auto 2rem; opacity: 0.95; line-height: 1.6; }
.hero-tags { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }
.hero-tag {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 500;
}

/* ==========================================================================
   4. СЕКЦИИ УСЛУГ, ВРАЧЕЙ И ВЕТАПТЕКИ
   ========================================================================== */
.section-title-wrap { text-align: center; margin: 4.5rem 0 2.5rem; }
.section-badge {
  display: inline-block;
  background: #FFF7ED;
  color: #C2410C;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.3rem 0.9rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.section-title { font-size: 2.2rem; font-weight: 800; color: #064E3B; }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }

.service-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.service-icon { background: #ECFDF5; color: #059669; padding: 0.45rem 0.65rem; border-radius: 0.75rem; font-size: 1.2rem; }
.badge-time { font-size: 0.75rem; background: #F3F4F6; color: #4B5563; padding: 0.25rem 0.6rem; border-radius: 6px; font-weight: 600; }
.card-title { font-size: 1.15rem; font-weight: 700; margin-bottom: 0.5rem; color: #111827; }
.card-desc { color: #6B7280; font-size: 0.9rem; line-height: 1.5; margin-bottom: 1.25rem; }
.service-price { font-size: 1.35rem; font-weight: 800; color: #10B981; display: flex; align-items: center; justify-content: space-between; }

/* Врачи */
.doctor-card { text-align: center; }
.doctor-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: #ECFDF5;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
  border: 3px solid #A7F3D0;
  font-size: 2rem;
}
.doctor-role { color: #059669; font-weight: 600; font-size: 0.85rem; margin-bottom: 0.4rem; }
.doctor-meta { font-size: 0.8rem; color: #6B7280; margin-bottom: 0.25rem; }
.doctor-spec { font-size: 0.8rem; color: #9CA3AF; margin-bottom: 1.25rem; }

/* Поиск и фильтры аптеки */
.search-bar { max-width: 450px; margin: 0 auto 1.5rem; }
.search-input {
  width: 100%;
  padding: 0.85rem 1.25rem;
  border-radius: 9999px;
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  font-size: 0.95rem;
  outline: none;
}
.search-input:focus { border-color: #10B981; }

.pharmacy-filters { display: flex; gap: 0.6rem; margin-bottom: 2rem; flex-wrap: wrap; justify-content: center; }
.filter-btn {
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-weight: 600;
  color: #4B5563;
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn.active, .filter-btn:hover { background: #10B981; color: white; border-color: #10B981; }

.product-img {
  height: 130px;
  background: #FFF7ED;
  border-radius: 1rem;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  font-size: 2.5rem;
}
.product-badge { font-size: 0.75rem; font-weight: 700; color: #059669; background: #ECFDF5; padding: 0.2rem 0.55rem; border-radius: 6px; }
.product-price { font-size: 1.25rem; font-weight: 800; color: #111827; margin-bottom: 0.75rem; }

/* ==========================================================================
   5. ТРИО ЩЕНКА, ХОМЯКА И КОТА НАД ФУТЕРОМ И ПОДВАЛ САЙТА
   ========================================================================== */
.footer-peeking-wrap {
  margin-top: 5rem;
  position: relative;
  text-align: center;
  z-index: 10;
  margin-bottom: -58px; /* Отрицательный отступ опускает лапки дуэта поверх футера */
  pointer-events: none;
}
.peeking-duo { display: inline-block; width: 340px; max-width: 90%; }
.peeking-duo img { width: 100%; height: auto; display: block; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.14)); }

footer { background: #064E3B; color: #FFFFFF; padding: 4rem 0 2rem; position: relative; z-index: 5; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2.5rem; margin-bottom: 3rem; }
.footer-logo { display: flex; align-items: center; gap: 0.5rem; font-size: 1.25rem; font-weight: 800; margin-bottom: 1rem; }
.footer-col h4 { font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; color: #A7F3D0; }
.footer-col p, .footer-col a { color: #D1FAE5; text-decoration: none; font-size: 0.9rem; line-height: 1.8; display: block; }
.footer-col a:hover { color: #FFFFFF; text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #A7F3D0;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ==========================================================================
   6. МОДАЛЬНЫЕ ОКНА, КОРЗИНА, ФОРМЫ И ЧЕКБОКСЫ 152-ФЗ
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  padding: 1rem;
}
.modal-box {
  background: #FFFFFF;
  border-radius: 1.75rem;
  max-width: 500px;
  width: 100%;
  padding: 2rem;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 1.25rem; right: 1.25rem;
  background: #F3F4F6;
  border: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  cursor: pointer;
  color: #6B7280;
  font-weight: 700;
}
.modal-close.static { position: static; }
.modal-close:hover { background: #E5E7EB; color: #111827; }

.modal-header { text-align: center; margin-bottom: 1.5rem; }
.modal-icon { font-size: 2rem; display: block; margin-bottom: 0.4rem; }
.modal-header h3 { font-size: 1.4rem; font-weight: 800; }
.modal-header p { font-size: 0.85rem; color: #6B7280; margin-top: 0.25rem; }

.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.form-group { margin-bottom: 0.9rem; text-align: left; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; color: #374151; margin-bottom: 0.35rem; }
.form-input, .form-select {
  width: 100%;
  padding: 0.7rem 0.95rem;
  border-radius: 0.75rem;
  border: 1px solid #D1D5DB;
  font-size: 0.95rem;
  outline: none;
  background: #F9FAFB;
}
.form-input.compact { padding: 0.6rem 0.85rem; font-size: 0.85rem; }
.form-input:focus, .form-select:focus { border-color: #10B981; background: #FFFFFF; }

/* Чекбокс согласия на обработку персональных данных */
.consent-group {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0.75rem 0 1.1rem;
  text-align: left;
}
.consent-group input[type="checkbox"] {
  margin-top: 0.2rem;
  accent-color: #10B981;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
}
.consent-group label {
  font-size: 0.78rem;
  color: #6B7280;
  line-height: 1.35;
  cursor: pointer;
}

/* Выезжающая справа корзина */
.cart-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 100%;
  max-width: 400px;
  background: #FFFFFF;
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
  z-index: 110;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
}
.cart-drawer.open { transform: translateX(0); }
.cart-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #F3F4F6; padding-bottom: 1rem; font-weight: 800; font-size: 1.2rem; }
.cart-items-scroll { flex: 1; overflow-y: auto; margin: 1rem 0; }
.cart-item { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 0; border-bottom: 1px solid #F3F4F6; gap: 0.5rem; }
.cart-qty-controls { display: flex; align-items: center; gap: 0.4rem; }
.qty-btn { border: none; background: #F3F4F6; width: 26px; height: 26px; border-radius: 6px; cursor: pointer; font-weight: 700; }
.remove-btn { border: none; background: transparent; color: #EF4444; cursor: pointer; font-size: 1rem; margin-left: 0.25rem; }
.cart-footer { border-top: 1px solid #F3F4F6; padding-top: 1rem; }
.cart-total-row { display: flex; justify-content: space-between; font-size: 1.15rem; font-weight: 800; margin-bottom: 0.9rem; }
.cart-total-price { color: #10B981; }

/* Таблицы в админ-панели */
.admin-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.9rem; }
.admin-table th { padding: 0.75rem; border-bottom: 2px solid #E5E7EB; color: #4B5563; }
.admin-table td { padding: 0.9rem 0.75rem; border-bottom: 1px solid #F3F4F6; }
/* Выпадающий список статусов и кнопка удаления в админке */
.status-select {
  padding: 0.4rem 0.7rem;
  border-radius: 9999px;
  font-size: 0.82rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  outline: none;
}
.status-new { background: #FEF3C7; color: #92400E; border-color: #FDE68A; }
.status-confirmed { background: #DBEAFE; color: #1E40AF; border-color: #BFDBFE; }
.status-done { background: #D1FAE5; color: #065F46; border-color: #A7F3D0; }
.status-cancelled { background: #FEE2E2; color: #991B1B; border-color: #FECACA; }

.btn-delete-row {
  background: #FEF2F2;
  color: #DC2626;
  border: 1px solid #FECACA;
  padding: 0.4rem 0.75rem;
  border-radius: 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-delete-row:hover {
  background: #DC2626;
  color: #FFFFFF;
}


/* ==========================================================================
   7. МОБИЛЬНАЯ АДАПТАЦИЯ (ЭКРАНЫ ДО 768PX)
   ========================================================================== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero-title { font-size: 1.9rem; }
  .hero-banner { padding: 3.5rem 1.25rem 2.5rem; border-radius: 1.75rem; }
  .peeking-cat-hero { width: 180px; margin-bottom: -60px; }
  .footer-peeking-wrap { margin-bottom: -45px; }
  .peeking-duo { width: 260px; }
  .form-row-2 { grid-template-columns: 1fr; }
}
