/* =====================================================================
   Стили для главной страницы (Лендинг)
   ===================================================================== */

/* Защита от горизонтального скролла на мобилках */
body {
    overflow-x: hidden;
  }
  
  /* --- HEADER --- */
  .landing-header {
    background-color: var(--side);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  
  .brand-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
  }
  
  .brand-logo { 
    height: 40px; 
    border-radius: 8px; 
  }
  
  .brand-text {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.03em;
    color: #fff;
  }
  
  .brand-text .lime { 
    color: var(--accent); 
  }
  
  .header-actions { 
    display: flex; 
    align-items: center; 
    gap: 1rem; 
  }
  
  .btn-login {
    color: #fff;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    transition: background 0.2s;
    white-space: nowrap;
  }
  
  .btn-login:hover { 
    background: rgba(255, 255, 255, 0.1); 
  }
  
  .theme-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
  }
  
  .theme-btn:hover { 
    background: rgba(255, 255, 255, 0.2); 
  }
  
  /* --- HERO --- */
  .hero {
    text-align: center;
    padding: 5rem 1.5rem 3rem;
    max-width: 800px;
    margin: 0 auto;
  }
  
  .hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--ink);
  }
  
  .hero p {
    font-size: 1.25rem;
    color: var(--ink-2);
    line-height: 1.5;
  }
  
  /* --- FEATURES --- */
  .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto 4rem;
    padding: 0 1.5rem;
  }
  
  .feature-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow-card);
  }
  
  .feature-icon { 
    font-size: 2.5rem; 
    margin-bottom: 1rem; 
  }
  
  .feature-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--ink);
  }
  
  .feature-card p {
    font-size: 0.875rem;
    color: var(--ink-3);
    line-height: 1.5;
    margin: 0;
  }
  
  /* --- ORDER FORM --- */
  .order-section {
    max-width: 540px;
    margin: 0 auto 5rem;
    padding: 0 1.5rem;
    width: 100%;
    box-sizing: border-box;
  }
  
  .order-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: var(--shadow-card);
  }
  
  .order-card h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-top: 0;
    margin-bottom: 2rem;
    color: var(--ink);
  }
  
  .form-group { 
    margin-bottom: 1.25rem; 
  }
  
  .form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--ink-2);
  }
  
  /* ФИКС ЗАГОЛОВКА SERIAL NUMBER */
  label[for="serial"], 
  label[for="ws-serial"] {
    text-transform: uppercase;
  }
  
  .form-control {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--ink);
    background-color: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    box-sizing: border-box;
    transition: all 0.2s ease;
  }
  
  [data-theme="dark"] .form-control {
    background-color: var(--surface-2);
  }
  
  [data-theme="dark"] .form-control option {
    background-color: var(--surface-2);
    color: var(--ink);
  }
  
  .form-control:focus {
    outline: none;
    border-color: var(--ink);
    box-shadow: 0 0 0 3px var(--accent-soft);
  }
  
  .form-control:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  .total-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 12px;
    margin: 2rem 0;
  }
  
  [data-theme="dark"] .total-box,
  [data-theme="dark"] #model-info,
  [data-theme="dark"] #docs-upload-area {
    background-color: var(--surface-2) !important;
  }
  
  .total-box span:first-child {
    font-weight: 600;
    color: var(--ink-2);
  }
  
  .total-box span:last-child {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--ink);
  }
  
  .btn-pay {
    width: 100%;
    padding: 1.1rem;
    font-size: 1.125rem;
    font-weight: 700;
    font-family: inherit;
    background: var(--accent-btn);
    color: #0E0F12;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
  }
  
  .btn-pay:hover:not(:disabled) {
    background: var(--accent-btn-h);
    transform: translateY(-1px);
  }
  
  .btn-pay:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
  
  .error-msg {
    color: var(--danger);
    font-size: 0.875rem;
    text-align: center;
    margin-top: 1rem;
    display: none;
  }
  
  /* --- LANGUAGE MENU (ФЛАГИ) --- */
  .lang-menu { 
    position: relative; 
    flex-shrink: 0; 
  }
  
  .lang-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 38px; 
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: grid; 
    place-items: center;
    flex-shrink: 0;
    padding: 0;
  }
  
  .lang-toggle:hover { 
    background: rgba(255, 255, 255, 0.2); 
  }
  
  /* Идеально круглые флаги в кнопке */
  .lang-menu .lang-toggle .flag {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: none;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .lang-menu .lang-toggle .flag svg {
    width: 140%; 
    height: auto;
    min-height: 140%;
    object-fit: cover;
  }
  
  /* Выпадающее меню */
  .lang-flags {
    position: absolute; 
    top: 48px; 
    right: 0;
    background: var(--surface); 
    border: 1px solid var(--line);
    border-radius: 12px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    padding: 8px; 
    z-index: 50; 
    min-width: 140px;
    display: flex; 
    flex-direction: column; 
    gap: 4px;
  }
  
  .lang-flags button {
    display: flex; 
    align-items: center; 
    gap: 10px;
    padding: 8px 10px; 
    border-radius: 8px; 
    border: none;
    background: transparent; 
    cursor: pointer; 
    font-size: 14px;
    color: var(--ink); 
    font-family: inherit;
    transition: background 0.2s;
  }
  
  .lang-flags button:hover { 
    background: var(--surface-2); 
  }
  
  .lang-flags button.active { 
    background: var(--accent-soft); 
    font-weight: 600; 
  }
  
  .lang-flags .flag {
    width: 22px;
    height: 16px;
    border-radius: 3px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
  }
  
  .lang-flags .flag svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  
  /* --- МОБИЛЬНАЯ АДАПТАЦИЯ --- */
  @media (max-width: 768px) {
    .landing-header { 
      padding: 0.75rem 1rem; 
    }
    
    .brand-logo { 
      height: 32px; 
    }
    
    .brand-text { 
      font-size: 1rem; 
    }
    
    .header-actions { 
      gap: 0.5rem; 
    }
    
    .btn-login { 
      padding: 0.4rem 0.6rem; 
      font-size: 0.75rem; 
    }
    
    .lang-toggle, .theme-btn { 
      width: 32px; 
      height: 32px; 
    }
    
    .hero { 
      padding: 3rem 1rem 2rem; 
    }
    
    .hero h1 { 
      font-size: 2rem; 
    }
    
    .hero p { 
      font-size: 1rem; 
    }
    
    .features-grid { 
      grid-template-columns: 1fr; 
      padding: 0 1rem; 
      margin-bottom: 2rem; 
    }
    
    .feature-card { 
      padding: 1.5rem; 
    }
    
    .order-section { 
      padding: 0 1rem; 
      margin-bottom: 3rem; 
    }
    
    .order-card { 
      padding: 1.5rem; 
    }
    
    .form-control { 
      font-size: 16px; /* Отключает зум на iPhone */
    } 
    
    .total-box span:last-child { 
      font-size: 1.25rem; 
    }
  }