/* ==========================================================================
   PROKLA DESIGN SYSTEM & COMMON STYLES
   Оптимизировано для конверсии (CRO), читабельности и адаптивности
   ========================================================================== */

:root {
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  
  --color-primary: #d90429;
  --color-primary-hover: #ef233c;
  --color-primary-dark: #b8001f;
  --color-accent: #ff9f1c;
  --color-accent-gold: #ffbe0b;
  --color-success: #2ec4b6;
  --color-bg-light: #f8f9fa;
  --color-bg-card: #ffffff;
  --color-text-main: #212529;
  --color-text-muted: #6c757d;
  --color-text-lead: #343a40;
  --color-border: #e9ecef;
  
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 6px 18px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 30px rgba(0, 0, 0, 0.12);
  --shadow-cta: 0 8px 24px rgba(217, 4, 41, 0.35);
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-main);
  background-color: #f4f6f8;
  color: var(--color-text-main);
  line-height: 1.65;
  padding-bottom: 70px; /* Отступ под мобильный бар */
}

/* --- Typography --- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  color: #111827;
  font-weight: 700;
  line-height: 1.25;
}

h1 {
  font-size: 1.85rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.45rem;
  margin: 1.8rem 0 0.8rem;
  border-left: 4px solid var(--color-primary);
  padding-left: 12px;
}

h3 {
  font-size: 1.2rem;
  margin: 1.4rem 0 0.6rem;
}

p {
  margin-bottom: 1.15rem;
  font-size: 1.05rem;
  color: #2b2d42;
}

strong, b {
  font-weight: 700;
  color: #111;
}

a {
  color: #0d6efd;
  text-decoration: underline;
  transition: color 0.2s ease;
}

a:hover {
  color: #0a58ca;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-sm);
}

/* --- Container & Layout --- */
.site-wrapper {
  max-width: 920px;
  margin: 0 auto;
  background: #ffffff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  border-left: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
  min-height: 100vh;
}

.content-body {
  padding: 24px 28px;
}

/* --- Top Header / Bar --- */
.top-nav-bar {
  background: #1e293b;
  color: #f8fafc;
  padding: 10px 20px;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #334155;
}

.top-nav-bar .logo-title {
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-nav-bar .date-tag {
  color: #94a3b8;
  font-size: 0.8rem;
}

/* --- High-Converting CTA Buttons --- */
.cta-button-block {
  text-align: center;
  margin: 32px 0;
  padding: 10px 0;
}

.btn-cta-primary {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #d90429 0%, #ef233c 50%, #d90429 100%);
  color: #ffffff !important;
  text-decoration: none !important;
  font-weight: 800;
  font-size: 1.35rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 18px 36px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-cta);
  border: 2px solid #ffccd5;
  cursor: pointer;
  width: 100%;
  max-width: 480px;
  position: relative;
  overflow: hidden;
  transition: all 0.25s ease;
  animation: pulse-button 2.4s infinite;
}

.btn-cta-primary:hover {
  background: linear-gradient(135deg, #b8001f 0%, #d90429 100%);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(217, 4, 41, 0.45);
}

.btn-cta-primary .cta-sub {
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff0f3;
  text-transform: none;
  letter-spacing: normal;
  margin-top: 4px;
}

@keyframes pulse-button {
  0% {
    box-shadow: 0 0 0 0 rgba(217, 4, 41, 0.6);
  }
  70% {
    box-shadow: 0 0 0 15px rgba(217, 4, 41, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(217, 4, 41, 0);
  }
}

/* --- Offer Banner Box (-50% Скидка) --- */
.offer-box-banner {
  background: linear-gradient(145deg, #fff5f5 0%, #ffe3e3 100%);
  border: 2px dashed #d90429;
  border-radius: var(--radius-lg);
  padding: 24px;
  margin: 32px 0;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-md);
}

.offer-badge {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  background: #d90429;
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 6px 20px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 10px rgba(217,4,41,0.3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.offer-prices {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 16px;
  margin: 18px 0 12px;
}

.price-old {
  font-size: 1.35rem;
  color: #8d99ae;
  text-decoration: line-through;
  font-weight: 600;
}

.price-new {
  font-size: 2.3rem;
  color: #d90429;
  font-weight: 900;
}

.price-currency {
  font-size: 1.15rem;
  font-weight: 700;
  color: #d90429;
}

.discount-pill {
  display: inline-block;
  background: #ffbe0b;
  color: #000;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  margin-left: 8px;
}

/* --- Urgency Timer & Live Stock Strip --- */
.urgency-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 14px 20px;
  margin: 16px auto;
  max-width: 580px;
}

.urgency-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1e293b;
}

.timer-box {
  background: #0f172a;
  color: #ffbe0b;
  font-family: monospace;
  font-size: 1.25rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  letter-spacing: 1px;
}

.stock-box {
  background: #fee2e2;
  color: #991b1b;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid #fca5a5;
  transition: all 0.3s ease;
}

.stock-pulse {
  transform: scale(1.25);
  background: #f87171;
  color: #fff;
}

/* --- Trust Strip (4 Pillars) --- */
.trust-strip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.trust-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  text-align: center;
  font-size: 0.85rem;
  color: #475569;
}

.trust-card .trust-icon {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.trust-card b {
  display: block;
  color: #0f172a;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

/* --- Quote Callout Box --- */
.quote-box {
  background: #f1f5f9;
  border-left: 5px solid #0284c7;
  padding: 18px 22px;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: 22px 0;
  font-style: italic;
  font-size: 1.05rem;
  color: #1e293b;
}

.quote-author {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-weight: 700;
  color: #0369a1;
  font-size: 0.9rem;
}

/* --- Product Visual Showcase --- */
.product-showcase-box {
  text-align: center;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-lg);
  padding: 20px;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
}

.product-showcase-box img {
  max-height: 380px;
  margin: 0 auto 12px;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.product-showcase-box img:hover {
  transform: scale(1.02);
}

.product-caption {
  font-size: 0.92rem;
  color: #64748b;
  font-weight: 500;
}

/* --- Comments Section --- */
.comments-container {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 2px solid #e5e7eb;
}

.comments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.comments-header h3 {
  margin: 0;
  font-size: 1.3rem;
}

.comments-count-badge {
  background: #e2e8f0;
  color: #334155;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.comment-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid #f1f5f9;
}

.comment-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #cbd5e1;
  border: 2px solid #fff;
  box-shadow: var(--shadow-sm);
}

.comment-content {
  flex-grow: 1;
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.comment-author-name {
  font-weight: 700;
  color: #0f172a;
  font-size: 0.98rem;
}

.comment-city {
  color: #64748b;
  font-size: 0.82rem;
}

.comment-time {
  color: #94a3b8;
  font-size: 0.8rem;
  margin-left: auto;
}

.comment-text {
  font-size: 0.98rem;
  color: #334155;
  margin-bottom: 8px;
}

.comment-photo-attach {
  max-width: 220px;
  border-radius: var(--radius-sm);
  margin-top: 8px;
  border: 1px solid #e2e8f0;
}

.comment-actions {
  display: flex;
  gap: 16px;
  font-size: 0.82rem;
  color: #64748b;
}

.comment-action-btn {
  background: none;
  border: none;
  color: #0284c7;
  cursor: pointer;
  font-weight: 600;
}

/* --- Mobile Sticky Bottom Bar --- */
.mobile-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(10px);
  border-top: 2px solid #d90429;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.1);
  z-index: 9999;
}

.sticky-price-info {
  display: flex;
  flex-direction: column;
}

.sticky-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: #64748b;
  font-weight: 700;
}

.sticky-price-val {
  font-size: 1.25rem;
  color: #d90429;
  font-weight: 900;
  line-height: 1;
}

.sticky-old-val {
  font-size: 0.8rem;
  color: #94a3b8;
  text-decoration: line-through;
}

.btn-sticky-cta {
  background: linear-gradient(135deg, #d90429 0%, #ef233c 100%);
  color: #ffffff !important;
  text-decoration: none !important;
  font-weight: 800;
  font-size: 0.98rem;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 12px rgba(217, 4, 41, 0.35);
  animation: pulse-button 2.4s infinite;
  white-space: nowrap;
}

/* --- Social Proof Toast --- */
.social-order-toast {
  position: fixed;
  bottom: 80px;
  left: 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #10b981;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 9990;
  max-width: 320px;
  transform: translateY(150px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.social-order-toast.active {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  font-size: 1.6rem;
}

.toast-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
}

.toast-text {
  font-size: 0.8rem;
  color: #334155;
}

.toast-time {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 2px;
}

/* --- Confetti animation --- */
.confetti-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 10000;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -20px;
  width: 10px;
  height: 14px;
  opacity: 0.9;
  animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(0) rotate(0deg);
  }
  100% {
    transform: translateY(105vh) rotate(720deg);
  }
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
  .content-body {
    padding: 18px 16px;
  }
  h1 {
    font-size: 1.45rem;
  }
  h2 {
    font-size: 1.25rem;
  }
  p {
    font-size: 1rem;
  }
  .btn-cta-primary {
    font-size: 1.15rem;
    padding: 16px 20px;
    width: 100%;
  }
  .urgency-strip {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
  .price-new {
    font-size: 1.95rem;
  }
}
