/*
Theme Name:  Apple Check
Theme URI:   https://example.com
Description: Тема для сервиса проверки Apple устройств. Минималистичный дизайн в стиле Apple. Совместима с WooCommerce и плагином Apple Check.
Version:     1.0.0
Author:      Your Name
Text Domain: apple-check-theme
License:     GPL v2 or later
Tags:        e-commerce, minimal, dark, responsive, woocommerce
*/

/* ════════════════════════════════════════════════════════════════════════════
   APPLE CHECK THEME — Главные стили
   Дизайн: Apple-inspired. Тёмный header, белые секции, SF Pro шрифты,
           мягкие тени, скруглённые углы, плавные анимации.
   ════════════════════════════════════════════════════════════════════════════ */

/* ── Переменные ────────────────────────────────────────────────────────────── */
:root {
  /* Цвета */
  --c-blue:        #0071e3;
  --c-blue-dark:   #0057b0;
  --c-blue-light:  #e8f2fd;
  --c-green:       #34c759;
  --c-red:         #ff3b30;

  --c-bg:          #ffffff;
  --c-bg-gray:     #f5f5f7;
  --c-bg-dark:     #0a0a0f;
  --c-text:        #1d1d1f;
  --c-text-muted:  #6e6e73;
  --c-border:      #d2d2d7;

  /* Типографика */
  --font:          -apple-system, BlinkMacSystemFont, 'SF Pro Display',
                   'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:     'SF Mono', 'Fira Mono', 'Consolas', monospace;

  /* Радиусы */
  --r-sm:   8px;
  --r-md:   14px;
  --r-lg:   22px;
  --r-xl:   32px;

  /* Тени */
  --shadow-sm:  0 2px 8px  rgba(0,0,0,.06);
  --shadow-md:  0 8px 32px rgba(0,0,0,.10);
  --shadow-lg:  0 24px 64px rgba(0,0,0,.14);

  /* Анимации */
  --ease: all .22s cubic-bezier(.4,0,.2,1);

  /* Раскладка */
  --max-w:      1160px;
  --header-h:   64px;
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a   { color: var(--c-blue); text-decoration: none; transition: var(--ease); }
a:hover { color: var(--c-blue-dark); }
ul, ol { list-style: none; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }

/* ════════════════════════════════════════════════════════════════════════════
   ШАПКА
   ════════════════════════════════════════════════════════════════════════════ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(10,10,15,.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  transition: var(--ease);
}
.site-header.scrolled {
  background: rgba(10,10,15,.96);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Логотип */
.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo__icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, #0071e3, #5856d6);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.site-logo__name {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.02em;
}
.site-logo__tagline {
  font-size: 11px;
  color: rgba(255,255,255,.45);
  margin-top: -1px;
  display: block;
}

/* Навигация */
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a {
  color: rgba(255,255,255,.75);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--r-sm);
  transition: var(--ease);
}
.site-nav a:hover, .site-nav a.current {
  color: #fff;
  background: rgba(255,255,255,.1);
}

/* Хедер правая часть */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-header {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 18px;
  background: var(--c-blue);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: 100px;
  transition: var(--ease);
  white-space: nowrap;
}
.btn-header:hover { background: var(--c-blue-dark); color: #fff; transform: translateY(-1px); }

/* Бургер (мобиль) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: rgba(255,255,255,.8);
  border-radius: 2px;
  transition: var(--ease);
}

/* Мобильное меню */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--header-h); left: 0; right: 0;
  background: rgba(10,10,15,.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 16px 24px 24px;
  z-index: 999;
  flex-direction: column;
  gap: 4px;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  color: rgba(255,255,255,.8);
  font-size: 16px;
  font-weight: 500;
  padding: 12px 16px;
  border-radius: var(--r-sm);
  transition: var(--ease);
}
.mobile-menu a:hover { background: rgba(255,255,255,.08); color: #fff; }
.mobile-menu .btn-header {
  margin-top: 12px;
  width: 100%;
  justify-content: center;
  height: 48px;
  font-size: 16px;
  border-radius: var(--r-md);
}

@media (max-width: 768px) {
  .site-nav { display: none; }
  .header-actions .btn-header { display: none; }
  .nav-toggle { display: flex; }
}

/* ════════════════════════════════════════════════════════════════════════════
   ОСНОВНОЙ КОНТЕНТ — отступ под фиксированный хедер
   ════════════════════════════════════════════════════════════════════════════ */
.site-content {
  padding-top: 0;
  min-height: calc(100vh - 300px);
}

/* Компенсация панели администратора WordPress (только для залогиненных) */
.admin-bar .site-content { padding-top: 32px; }
@media (max-width: 782px) {
  .admin-bar .site-content { padding-top: 46px; }
}

/* ── Контейнеры ─────────────────────────────────────────────────────────────── */
.container       { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.container--sm   { max-width: 720px; }
.container--xs   { max-width: 520px; }

/* ── Секции ─────────────────────────────────────────────────────────────────── */
.section         { padding: 80px 0; }
.section--gray   { background: var(--c-bg-gray); }
.section--dark   {
  background: linear-gradient(160deg, #0a0a0f 0%, #1a1a2e 100%);
  color: #fff;
}

.section-title {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 700;
  letter-spacing: -.025em;
  line-height: 1.15;
  color: var(--c-text);
  text-align: center;
  margin-bottom: 48px;
}
.section-title--white { color: #fff; }
.section-title--left  { text-align: left; }

/* ════════════════════════════════════════════════════════════════════════════
   СТАНДАРТНЫЕ СТРАНИЦЫ (page.php)
   ════════════════════════════════════════════════════════════════════════════ */
.page-hero {
  background: linear-gradient(160deg, #0a0a0f 0%, #1a1a2e 60%, #0d1117 100%);
  padding: 72px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,113,227,.25) 0%, transparent 70%);
  top: -200px; left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}
.page-hero__title {
  position: relative;
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 800;
  color: #fff;
  letter-spacing: -.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}
.page-hero__sub {
  position: relative;
  font-size: clamp(15px, 2vw, 19px);
  color: rgba(255,255,255,.6);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Хлебные крошки */
.breadcrumb {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,.4);
  margin-bottom: 20px;
  justify-content: center;
}
.breadcrumb a   { color: rgba(255,255,255,.5); }
.breadcrumb a:hover { color: rgba(255,255,255,.9); }
.breadcrumb span { color: rgba(255,255,255,.25); }

/* Контент страницы */
.page-content-wrap {
  padding: 64px 0 80px;
}

.entry-content {
  max-width: 760px;
  margin: 0 auto;
}

/* Типографика контента */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.25;
  margin: 40px 0 16px;
  color: var(--c-text);
}
.entry-content h2 { font-size: clamp(24px,3vw,32px); }
.entry-content h3 { font-size: clamp(20px,2.5vw,26px); }
.entry-content h4 { font-size: 20px; }
.entry-content h1:first-child,
.entry-content h2:first-child { margin-top: 0; }

.entry-content p  { margin-bottom: 20px; color: var(--c-text-muted); line-height: 1.75; }
.entry-content a  { color: var(--c-blue); border-bottom: 1px solid transparent; }
.entry-content a:hover { border-color: var(--c-blue); }

.entry-content ul,
.entry-content ol {
  margin: 0 0 20px 24px;
  color: var(--c-text-muted);
  line-height: 1.75;
}
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: 6px; }

.entry-content blockquote {
  border-left: 4px solid var(--c-blue);
  padding: 16px 20px;
  background: var(--c-blue-light);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin: 24px 0;
  font-size: 17px;
  color: var(--c-text);
}
.entry-content code {
  font-family: var(--font-mono);
  font-size: .88em;
  background: var(--c-bg-gray);
  padding: 2px 6px;
  border-radius: 4px;
  color: #c82333;
}
.entry-content pre {
  background: #1d1d1f;
  color: #e0e0e0;
  padding: 20px 24px;
  border-radius: var(--r-md);
  overflow-x: auto;
  margin: 24px 0;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
}
.entry-content pre code { background: none; color: inherit; padding: 0; border-radius: 0; }

.entry-content hr {
  border: none;
  border-top: 1px solid var(--c-border);
  margin: 40px 0;
}
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 15px;
}
.entry-content th {
  background: var(--c-bg-gray);
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  border-bottom: 2px solid var(--c-border);
}
.entry-content td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text-muted);
}
.entry-content tr:last-child td { border-bottom: none; }
.entry-content img {
  border-radius: var(--r-md);
  box-shadow: var(--shadow-md);
  margin: 24px 0;
}

/* ════════════════════════════════════════════════════════════════════════════
   WOOCOMMERCE
   ════════════════════════════════════════════════════════════════════════════ */

/* Общий сброс WooCommerce */
.woocommerce-page .site-content { background: var(--c-bg-gray); }
.woocommerce-page .woocommerce,
.woocommerce                    { max-width: 900px; margin: 0 auto; padding: 48px 24px 80px; }

/* Уведомления */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  border-radius: var(--r-md) !important;
  border-top: none !important;
  padding: 16px 20px !important;
  font-size: 15px !important;
  margin-bottom: 24px !important;
}
.woocommerce-message { background: #edfbf1 !important; color: #218838 !important; box-shadow: inset 0 0 0 1.5px #34c759; }
.woocommerce-info    { background: var(--c-blue-light) !important; color: var(--c-blue-dark) !important; box-shadow: inset 0 0 0 1.5px var(--c-blue); }
.woocommerce-error   { background: #fff1f0 !important; color: #c82333 !important; box-shadow: inset 0 0 0 1.5px #ff3b30; }
.woocommerce-message::before,
.woocommerce-info::before { display: none !important; }

/* Форма чекаута */
.woocommerce-checkout .woocommerce-checkout-review-order-table,
.woocommerce-checkout form.checkout {
  background: #fff;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 32px;
  border: 1.5px solid var(--c-border);
}

.woocommerce form .form-row label {
  font-size: 14px;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: 6px;
  display: block;
}
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row select,
.woocommerce form .form-row textarea {
  width: 100% !important;
  height: 50px !important;
  padding: 0 16px !important;
  font-size: 15px !important;
  font-family: var(--font) !important;
  background: var(--c-bg-gray) !important;
  border: 1.5px solid var(--c-border) !important;
  border-radius: var(--r-md) !important;
  outline: none !important;
  transition: var(--ease) !important;
  color: var(--c-text) !important;
  box-shadow: none !important;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row select:focus {
  border-color: var(--c-blue) !important;
  background: #fff !important;
  box-shadow: 0 0 0 4px rgba(0,113,227,.12) !important;
}
.woocommerce form .form-row textarea { height: 120px !important; padding: 14px 16px !important; resize: vertical; }

/* Кнопки WooCommerce */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce .button.alt,
.woocommerce button.button.alt {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 52px !important;
  padding: 0 28px !important;
  background: var(--c-blue) !important;
  color: #fff !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  font-family: var(--font) !important;
  border-radius: var(--r-md) !important;
  border: none !important;
  cursor: pointer !important;
  transition: var(--ease) !important;
  text-decoration: none !important;
  box-shadow: none !important;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce .button.alt:hover {
  background: var(--c-blue-dark) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 24px rgba(0,113,227,.4) !important;
  color: #fff !important;
}

/* Таблица заказа */
.woocommerce table.shop_table,
.woocommerce-checkout-review-order-table {
  width: 100%;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  background: #fff;
  border: 1.5px solid var(--c-border) !important;
  border-radius: var(--r-md) !important;
  overflow: hidden;
  font-size: 15px !important;
}
.woocommerce table.shop_table th {
  background: var(--c-bg-gray) !important;
  padding: 14px 18px !important;
  font-weight: 700 !important;
  color: var(--c-text) !important;
  font-size: 13px !important;
  text-transform: uppercase !important;
  letter-spacing: .06em !important;
  border-bottom: 1.5px solid var(--c-border) !important;
}
.woocommerce table.shop_table td {
  padding: 14px 18px !important;
  border-bottom: 1px solid var(--c-border) !important;
  color: var(--c-text-muted) !important;
  vertical-align: middle !important;
}
.woocommerce table.shop_table tr:last-child td { border-bottom: none !important; }
.woocommerce table.shop_table tfoot tr th,
.woocommerce table.shop_table tfoot tr td {
  font-weight: 700 !important;
  color: var(--c-text) !important;
  background: var(--c-bg-gray) !important;
}

/* Страница "Спасибо за заказ" */
.woocommerce-order-received h2 { font-size: 28px; font-weight: 700; margin-bottom: 16px; }
.woocommerce-thankyou-section   { background: #fff; border-radius: var(--r-lg); padding: 32px; border: 1.5px solid var(--c-border); margin-bottom: 24px; }

/* Шаги оформления заказа */
.woocommerce-checkout-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0 auto 40px;
  max-width: 500px;
}
.step-item {
  flex: 1;
  text-align: center;
  font-size: 13px;
  color: var(--c-text-muted);
  position: relative;
}
.step-item.active { color: var(--c-blue); font-weight: 700; }
.step-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--c-border);
  color: var(--c-text-muted);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  margin: 0 auto 8px;
  transition: var(--ease);
}
.step-item.active .step-dot { background: var(--c-blue); color: #fff; }
.step-line {
  position: absolute;
  top: 16px; left: 50%; right: -50%;
  height: 2px;
  background: var(--c-border);
  z-index: -1;
}
.step-item.active .step-line { background: var(--c-blue); }

/* ════════════════════════════════════════════════════════════════════════════
   ПОДВАЛ
   ════════════════════════════════════════════════════════════════════════════ */
.site-footer {
  background: #0a0a0f;
  color: rgba(255,255,255,.6);
  padding: 64px 0 32px;
  border-top: 1px solid rgba(255,255,255,.06);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-brand { grid-column: auto; }
}

.footer-brand__desc {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255,255,255,.65);
  margin-top: 14px;
  max-width: 320px;
}
.footer-brand .site-logo__name { color: #fff; }

/* Реквизиты */
.footer-requisites {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 16px;
}
.footer-requisites span {
  font-size: 12px;
  color: rgba(255,255,255,.5);
  line-height: 1.5;
}

.footer-col__title {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,.7);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 16px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul li a {
  font-size: 13.5px;
  color: rgba(255,255,255,.65);
  transition: var(--ease);
}
.footer-col ul li a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 24px;
  padding-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-bottom p { font-size: 12px; color: rgba(255,255,255,.5); }
.footer-links {
  display: flex;
  gap: 20px;
}
.footer-links a { font-size: 12px; color: rgba(255,255,255,.5); }
.footer-links a:hover { color: rgba(255,255,255,.85); }

/* ════════════════════════════════════════════════════════════════════════════
   УТИЛИТЫ
   ════════════════════════════════════════════════════════════════════════════ */
.text-center { text-align: center; }
.text-muted  { color: var(--c-text-muted); }

/* Глобальные кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 28px;
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font);
  border-radius: var(--r-md);
  transition: var(--ease);
  cursor: pointer;
  text-decoration: none;
  border: none;
}
.btn-primary {
  background: var(--c-blue);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,113,227,.3);
}
.btn-primary:hover { background: var(--c-blue-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,113,227,.45); }
.btn-outline {
  background: transparent;
  color: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.3);
}
.btn-outline:hover { background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.6); }

/* Анимации появления */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-up.visible { opacity: 1; transform: none; }

/* Скроллбар */
::-webkit-scrollbar       { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--c-bg-gray); }
::-webkit-scrollbar-thumb { background: var(--c-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #b0b0b8; }

/* Выделение текста */
::selection { background: rgba(0,113,227,.2); color: var(--c-text); }

/* Адаптив */
@media (max-width: 768px) {
  .section { padding: 56px 0; }
  .section-title { margin-bottom: 32px; }
}

/* ── Совместимость с плагином Apple Check ─────────────────────────────────────
   На странице с [apple_check_form] компенсируем двойной отступ:
   .site-content даёт padding-top:64px, а .ac-hero имеет свой padding-top:80px.
   Убираем верхний padding .site-content на этих страницах.             */
.page-template-default .ac-wrap:first-child ~ *,
body.page .ac-wrap .ac-hero,
.site-content > .ac-wrap .ac-hero {
  /* Hero сам управляет своим отступом — убираем дублирование */
}

/* Если шорткод — единственный контент страницы, убрать padding-top с обёртки */
.site-content:has(> .ac-wrap) {
  padding-top: 0;
}

/* Fallback для браузеров без :has() — JS добавит класс .has-ac-form */
.site-content.has-ac-form {
  padding-top: 0;
}

