/* ============================================================
   RESET & TOKENS
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-base: #0d0f14;
  --bg-surface: #161a22;
  --bg-elevated: #1e2430;
  --accent: #2ee6ff;
  --accent-hover: #6aedff;
  --accent-glow: rgba(46, 230, 255, 0.35);
  --text-primary: #f0f4f8;
  --text-secondary: #9aa7b8;
  --text-muted: #5c6779;
  --border: #262d3a;
  --success: #3ddc84;
  --danger: #ff5470;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.45);
  --glow-accent: 0 0 20px var(--accent-glow);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'TikTok Sans', 'Inter', sans-serif;
  font-weight: 300;
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  background-image: radial-gradient(circle at 20% -10%, rgba(46,230,255,0.08), transparent 45%);
  background-attachment: fixed;
}

h1, h2, h3, .section-title, .pc-name, .logo-text, .step-num { 
  font-family: 'Montserrat', sans-serif; 
  font-weight: 900; 
  letter-spacing: -0.02em; 
}

/* ============================================================
   HEADER
   ============================================================ */
header {
  background: rgba(22, 26, 34, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  max-width: 1400px;
  margin: 0 auto;
}
.logo-link { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.logo-img { height: 50px; width: auto; }
.logo-text { font-size: 2.2rem; color: #ffffff; }
.header-nav { display: flex; gap: 24px; }
.header-nav a { color: var(--text-secondary); text-decoration: none; font-weight: 400; transition: color 0.2s; }
.header-nav a:hover { color: var(--accent); }
.header-contacts { display: flex; align-items: center; gap: 20px; }
.phone-link { color: var(--text-primary); text-decoration: none; font-weight: 400; }
.phone-link:hover { color: var(--accent); }
.messenger-link { color: var(--accent); text-decoration: none; font-weight: 400; }

.cart-icon {
  cursor: pointer; background: transparent; color: var(--accent);
  border: 1px solid var(--accent); padding: 10px 18px; border-radius: var(--radius-sm);
  font-weight: 500; transition: all 0.2s ease; user-select: none;
}
.cart-icon:hover { background: var(--accent); color: #000; box-shadow: var(--glow-accent); }

/* ============================================================
   HERO & BANNER
   ============================================================ */
.main-showcase { background: linear-gradient(180deg, rgba(46, 230, 255, 0.05) 0%, transparent 100%); padding-top: 40px; }
.hero-utp { text-align: center; padding: 40px 20px 60px; max-width: 900px; margin: 0 auto; }
.hero-utp h1 { font-size: clamp(2rem, 5vw, 3.5rem); color: #fff; margin-bottom: 20px; line-height: 1.2; }
.hero-utp p { font-size: 1.2rem; color: var(--text-secondary); margin-bottom: 30px; }

.trust-badges { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-bottom: 40px; }
.badge-item { background: var(--bg-surface); border: 1px solid var(--border); padding: 10px 20px; border-radius: 50px; font-weight: 400; font-size: 0.95rem; color: var(--text-primary); display: flex; align-items: center; gap: 8px; }

.custom-build-banner { padding: 0 40px 60px; max-width: 1400px; margin: 0 auto; }
.banner-container { display: flex; align-items: center; gap: 60px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow-card); }
.banner-image { flex: 1; max-width: 500px; }
.banner-image img { width: 100%; height: auto; border-radius: var(--radius-md); object-fit: contain; border: none; }
.banner-content-right { flex: 1; display: flex; flex-direction: column; align-items: flex-start; }
.banner-content-right h2 { font-size: 2.4rem; margin-bottom: 20px; color: #fff; }
.banner-content-right p { color: var(--text-secondary); margin-bottom: 16px; font-size: 1.05rem; }

.banner-btn, .submit-btn, .order-this-btn, .checkout-btn, .contact-form-btn {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  background: var(--accent); color: #000; border: none; padding: 16px 36px;
  font-size: 1rem; border-radius: var(--radius-sm); cursor: pointer; transition: all 0.3s ease;
}
.banner-btn:hover, .submit-btn:hover:not(:disabled), .order-this-btn:hover, .checkout-btn:hover, .contact-form-btn:hover {
  background: var(--accent-hover); box-shadow: var(--glow-accent); transform: translateY(-2px);
}

/* ============================================================
   КАТАЛОГ
   ============================================================ */
main { padding: 40px; max-width: 1400px; margin: 0 auto; }
.hero { padding: 20px 40px 40px; text-align: center; }
.hero h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); color: #fff; margin-bottom: 16px; }
.hero p { font-size: 1.1rem; color: var(--text-secondary); }

.filters { display: flex; gap: 10px; margin-bottom: 40px; flex-wrap: wrap; justify-content: center; }
.filters button {
  padding: 10px 22px; background: var(--bg-surface); color: var(--text-secondary);
  border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer;
  font-weight: 400; font-size: 0.95rem; transition: all 0.2s ease;
}
.filters button:hover { color: var(--text-primary); border-color: var(--text-muted); }
.filters button.active { background: var(--accent); color: #000; border-color: var(--accent); box-shadow: var(--glow-accent); }

.tier-section { margin-bottom: 64px; }
.tier-title { font-size: 1.8rem; margin-bottom: 24px; padding-left: 16px; border-left: 4px solid var(--accent); text-transform: uppercase; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 30px; }

/* Карточки */
.pc-card { background: #000; border-radius: 24px; overflow: hidden; display: flex; flex-direction: column; cursor: pointer; transition: transform 0.3s, box-shadow 0.3s; }
.pc-card:hover { transform: translateY(-8px); box-shadow: 0 12px 30px rgba(46, 230, 255, 0.15); }
.pc-card-top { background: #fff; color: #000; padding: 24px; text-align: center; position: relative; border-radius: 24px; }
.brand-logo { position: absolute; top: 20px; right: 20px; font-weight: 800; font-size: 0.8rem; padding: 4px 8px; border: 2px solid #000; border-radius: 6px; text-transform: uppercase; }
.brand-logo.intel { color: #0071c5; border-color: #0071c5; }
.brand-logo.amd { color: #ed1c24; border-color: #ed1c24; }
.pc-image { width: 100%; max-width: 220px; height: 220px; margin: 0 auto 20px; object-fit: contain; }
.pc-series { font-size: 0.75rem; letter-spacing: 2px; color: #888; text-transform: uppercase; font-weight: 400; margin-bottom: 8px; font-family: 'Inter', sans-serif; }
.pc-name { font-size: 2rem; margin-bottom: 12px; }
.pc-price { font-size: 1.2rem; font-weight: 400; }
.pc-card-bottom { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.buy-btn, .details-btn { font-family: 'Montserrat', sans-serif; font-weight: 800; background: var(--accent); color: #000; border: none; padding: 16px; border-radius: 12px; font-size: 1rem; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 8px; transition: background 0.2s, box-shadow 0.2s; }
.buy-btn:hover, .details-btn:hover { background: var(--accent-hover); box-shadow: var(--glow-accent); }

.fps-block { display: flex; align-items: center; gap: 16px; background: #111; padding: 16px; border-radius: 16px; margin-top: 10px; }
.fps-circle { width: 60px; height: 60px; border-radius: 50%; border: 4px solid var(--accent); display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; font-size: 1.2rem; color: #fff; flex-shrink: 0; }
.fps-circle small { font-size: 0.6rem; color: #888; font-weight: 600; }
.fps-text { display: flex; flex-direction: column; flex: 1; }
.fps-text strong { color: #fff; font-size: 0.95rem; font-weight: 500; }
.fps-text span { color: #888; font-size: 0.8rem; }
.help-icon { width: 24px; height: 24px; border: 1px solid #444; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #888; font-size: 0.8rem; cursor: help; }

.mini-specs { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.mini-spec-row { display: flex; align-items: flex-start; gap: 12px; }
.spec-icon-img { width: 32px; height: 32px; object-fit: contain; flex-shrink: 0; }
.spec-info { display: flex; flex-direction: column; }
.spec-info span { font-size: 0.7rem; color: #888; text-transform: uppercase; letter-spacing: 1px; }
.spec-info strong { font-size: 0.9rem; color: #fff; font-weight: 400; }

/* ============================================================
   СЕКЦИИ
   ============================================================ */
.section-title { text-align: center; font-size: 2.2rem; color: #fff; margin-bottom: 48px; }

.why-us { padding: 80px 40px; max-width: 1200px; margin: 0 auto; }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.why-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 32px; }
.why-card h3 { color: var(--accent); font-size: 1.4rem; margin-bottom: 16px; }
.why-card p { color: var(--text-secondary); }

/* ЭТАПЫ РАБОТЫ */
.how-we-build { padding: 80px 40px; background: rgba(255, 255, 255, 0.02); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.how-container { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 60px; }
.how-text { flex: 1; }
.how-image { flex: 1; }
.how-image img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); object-fit: cover; }
.steps-list { display: flex; flex-direction: column; gap: 24px; }
.step-item { background: var(--bg-surface); border: 1px solid var(--border); padding: 24px; border-radius: var(--radius-md); transition: border-color 0.2s; }
.step-item:hover { border-color: var(--accent); }
.step-item h4 { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 1.2rem; color: #fff; margin-bottom: 8px; }
.step-item h4 span { color: var(--accent); margin-right: 8px; }
.step-item p { color: var(--text-secondary); font-size: 0.95rem; }

/* ГАРАНТИЯ */
.warranty-section { padding: 80px 40px; max-width: 1200px; margin: 0 auto; }
.warranty-container { display: flex; align-items: center; gap: 60px; }
.warranty-image { flex: 1; }
.warranty-image img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); object-fit: cover; }
.warranty-content { flex: 1; background: var(--bg-surface); border: 1px solid var(--border); padding: 40px; border-radius: var(--radius-md); }
.warranty-content p { margin-bottom: 16px; color: var(--text-secondary); font-size: 1.05rem; }
.warranty-content strong { color: var(--accent); font-weight: 600; }

.reviews-section { padding: 80px 40px; max-width: 1200px; margin: 0 auto; }
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.review-card { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 32px; }
.review-card p { color: var(--text-secondary); font-style: italic; margin-bottom: 16px; font-size: 1.05rem; }
.review-card span { color: var(--accent); font-weight: 500; font-size: 0.9rem; }

.faq-section { padding: 80px 40px; max-width: 900px; margin: 0 auto; }
.faq-list details { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; padding: 20px; cursor: pointer; }
.faq-list summary { font-weight: 500; color: #fff; font-size: 1.1rem; list-style: none; display: flex; justify-content: space-between; }
.faq-list summary::after { content: '+'; color: var(--accent); font-size: 1.5rem; }
.faq-list details[open] summary::after { content: '-'; }
.faq-list details p { margin-top: 16px; color: var(--text-secondary); font-size: 1.05rem; }

/* ============================================================
   КОРЗИНА
   ============================================================ */
.cart-sidebar {
  position: fixed; top: 0; right: -420px; width: 380px; max-width: 92vw; height: 100vh;
  background: var(--bg-surface); border-left: 1px solid var(--border); padding: 32px 28px;
  overflow-y: auto; transition: right 0.35s; z-index: 300; box-shadow: -12px 0 40px rgba(0, 0, 0, 0.5);
}
.cart-sidebar.open { right: 0; }
.cart-close { position: absolute; top: 20px; right: 20px; background: none; border: none; color: var(--text-muted); font-size: 2rem; cursor: pointer; transition: color 0.2s; }
.cart-close:hover { color: var(--danger); }
.cart-sidebar h2 { font-size: 1.4rem; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.cart-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
.cart-item .rm { background: var(--danger); color: #fff; border: none; width: 24px; height: 24px; border-radius: 50%; cursor: pointer; margin-left: 8px; font-weight: 700; display: inline-flex; justify-content: center; align-items: center; }
.cart-total { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 1.3rem; font-weight: 500; color: var(--accent); }
.checkout-btn { margin-top: 24px; width: 100%; }

/* ============================================================
   МОДАЛЬНОЕ ОКНО И ПАНЕЛЬ
   ============================================================ */
.product-detail-panel {
  position: fixed; top: 0; right: -500px; width: 450px; max-width: 100vw; height: 100vh;
  background: var(--bg-surface); border-left: 1px solid var(--border); padding: 32px;
  overflow-y: auto; transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1); z-index: 200; box-shadow: -12px 0 40px rgba(0, 0, 0, 0.5);
}
.product-detail-panel.open { right: 0; }
.close-detail { position: absolute; top: 24px; right: 24px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 50%; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; color: var(--text-primary); font-size: 1.5rem; cursor: pointer; z-index: 10; }
.close-detail:hover { color: var(--danger); border-color: var(--danger); }
.detail-image { width: 100%; height: 250px; object-fit: contain; background: #fff; border-radius: var(--radius-md); margin-bottom: 24px; }
.detail-brand { font-size: 0.8rem; letter-spacing: 2px; color: var(--text-secondary); text-transform: uppercase; margin-bottom: 8px; }
.detail-name { font-size: 2.5rem; margin-bottom: 12px; color: #fff; }
.detail-price { font-size: 1.8rem; font-weight: 500; color: var(--accent); margin-bottom: 32px; }
.detail-desc h3, .detail-specs h3 { font-size: 1.2rem; margin-bottom: 16px; color: #fff; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.detail-desc p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; margin-bottom: 24px; }
.detail-spec-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
.detail-spec-row span { color: var(--text-secondary); }
.detail-spec-row strong { color: #fff; text-align: right; font-weight: 500; }
.detail-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 24px; }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: center; z-index: 1000; padding: 20px; }
.modal-overlay[hidden] { display: none !important; }
.modal-content { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto; position: relative; }
.modal-close { position: absolute; top: 16px; right: 16px; background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; }
.modal-close:hover { color: var(--danger); }
.modal-content h3 { font-size: 1.5rem; margin-bottom: 8px; color: #fff; }
.modal-subtitle { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 24px; }
.selected-product-info { background: var(--bg-elevated); border: 1px solid var(--accent); padding: 16px; border-radius: var(--radius-sm); margin-bottom: 24px; display: flex; flex-direction: column; gap: 4px; }
.selected-product-info span { font-size: 0.8rem; color: var(--text-secondary); text-transform: uppercase; }
.selected-product-info strong { font-size: 1.1rem; color: var(--accent); font-weight: 500; }

.order-form .form-group { margin-bottom: 18px; }
.order-form label { display: block; font-size: 0.95rem; color: var(--text-secondary); margin-bottom: 6px; }
.order-form input, .order-form textarea, .order-form select { width: 100%; padding: 12px 14px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-primary); font-family: 'TikTok Sans', 'Inter', sans-serif; font-weight: 300; font-size: 0.95rem; }
.order-form input:focus, .order-form textarea:focus, .order-form select:focus { outline: none; border-color: var(--accent); }
.order-form select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa7b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; }

.form-checkbox-wrapper { margin-top: 24px; display: flex; flex-direction: column; gap: 16px; }
.form-checkbox { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.form-checkbox input[type="checkbox"] { appearance: none; width: 20px; height: 20px; border: 2px solid var(--border); border-radius: 4px; background: var(--bg-elevated); cursor: pointer; position: relative; flex-shrink: 0; margin: 0; }
.form-checkbox input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
.form-checkbox input[type="checkbox"]:checked::after { content: '✔'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #000; font-size: 14px; }
.form-checkbox label { font-size: 0.9rem; color: var(--text-secondary); cursor: pointer; margin: 0; line-height: 1.2; }

.submit-btn:disabled { background: var(--border); color: var(--text-muted); cursor: not-allowed; box-shadow: none; transform: none; }
.form-success { margin-top: 16px; padding: 12px 16px; background: rgba(61, 220, 132, 0.15); border: 1px solid var(--success); border-radius: var(--radius-sm); color: var(--success); font-weight: 500; text-align: center; }

/* ============================================================
   ФУТЕР
   ============================================================ */
footer { background: var(--bg-surface); border-top: 1px solid var(--border); padding: 60px 40px 20px; }
.footer-content { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; margin-bottom: 40px; }
.footer-col h4 { color: #fff; font-size: 1.2rem; margin-bottom: 20px; font-family: 'Montserrat', sans-serif; font-weight: 800; }
.footer-col p, .footer-col a { color: var(--text-secondary); text-decoration: none; display: block; margin-bottom: 10px; font-size: 0.95rem; }
.footer-col a:hover { color: var(--accent); }
.footer-social { display: flex; gap: 16px; margin-top: 16px; }
.footer-social a { color: var(--accent); font-weight: 500; }
.footer-bottom { max-width: 1200px; margin: 0 auto; padding-top: 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; color: var(--text-muted); font-size: 0.9rem; }
.up-btn { color: var(--text-primary); text-decoration: none; font-weight: 500; }
.up-btn:hover { color: var(--accent); }

/* Скроллбар и адаптив */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

@media (max-width: 1000px) {
  .header-nav, .messenger-link { display: none; }
}
@media (max-width: 900px) {
  .header-top { flex-wrap: wrap; gap: 16px; justify-content: center; }
  .banner-container, .how-container, .warranty-container { flex-direction: column; padding: 24px; gap: 32px; }
  .banner-content-right { align-items: center; text-align: center; }
  .custom-build-banner { padding: 0 20px 40px; }
  .how-image, .warranty-image { order: -1; /* Фото всегда сверху на мобильных */ }
  .product-detail-panel { width: 100%; right: -100%; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}
@media (max-width: 768px) {
  .logo-img { height: 40px; }
  .logo-text { font-size: 1.5rem; }
  .hero-utp h1 { font-size: 1.8rem; }
  .trust-badges { flex-direction: column; align-items: center; }
  main { padding: 24px 20px; }
  .tier-title { font-size: 1.4rem; }
  .grid { grid-template-columns: 1fr; gap: 16px; }
  .why-us, .how-we-build, .warranty-section, .reviews-section, .faq-section { padding: 40px 20px; }
  .section-title { font-size: 1.8rem; }
  .cart-sidebar { padding: 24px 20px; }
  .modal-content { padding: 24px 20px; }
}