/* Layout: hero, trust bar, page hero, empty states */
html {
  overflow-x: clip;
}

body {
  overflow-x: clip;
  min-width: 0;
}

body:not(.admin-body) {
  padding-top: var(--site-header-height, 168px);
}

main {
  min-height: 40vh;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--light-color);
  margin-bottom: 0;
  background: linear-gradient(135deg, var(--secondary-color) 0%, #030306 50%, #000000 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('../img/lion.svg');
  background-size: auto 100%;
  background-position: right center;
  background-repeat: no-repeat;
  opacity: 0.72;
  z-index: 0;
  pointer-events: none;
}

.hero.hero--home {
  min-height: 720px;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  margin-bottom: 0;
}

.hero.hero--home::before {
  bottom: 84px;
  background-size: auto 108%;
  background-position: right bottom;
}

.hero.hero--home::after {
  background: linear-gradient(
    90deg,
    rgba(26, 26, 46, 0.97) 0%,
    rgba(26, 26, 46, 0.9) 22%,
    rgba(26, 26, 46, 0.78) 38%,
    rgba(26, 26, 46, 0.52) 52%,
    rgba(26, 26, 46, 0.28) 62%,
    rgba(26, 26, 46, 0.1) 72%,
    transparent 82%
  );
}

.hero.hero--home .hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(26, 26, 46, 0.92) 0%,
    rgba(26, 26, 46, 0.72) 40%,
    rgba(26, 26, 46, 0.18) 65%,
    transparent 82%
  );
  z-index: 1;
  pointer-events: none;
}

.hero-content {
  max-width: var(--container-max);
  width: calc(100% - 40px);
  margin: 0 auto;
  padding: var(--space-10) var(--space-6);
  position: relative;
  z-index: 2;
  text-align: left;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  flex: 0 0 auto;
  gap: var(--space-2);
  background: rgba(var(--primary-rgb), 0.2);
  border: 1px solid rgba(var(--primary-rgb), 0.4);
  color: var(--primary-light);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-4);
}

.hero h1,
.hero h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: var(--space-4);
  font-weight: 700;
  line-height: 1.2;
  max-width: 640px;
}

.hero-security,
.hero-subtitle {
  font-size: var(--text-lg);
  opacity: 0.9;
  margin-bottom: var(--space-6);
  max-width: 560px;
  line-height: 1.6;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

.hero-stat {
  display: flex;
  flex-direction: column;
}

.hero-stat strong {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  color: var(--primary-color);
}

.hero-stat span {
  font-size: var(--text-sm);
  opacity: 0.8;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  min-height: 52px;
}

.hero .btn-primary {
  box-shadow: var(--shadow-primary);
}

.hero .btn-outline-light {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.6);
  color: white;
}

.hero .btn-outline-light:hover {
  background: white;
  color: var(--secondary-color);
}

/* Trust bar */
.trust-bar {
  background: var(--light-color);
  border-bottom: 1px solid var(--gray-medium);
  padding: var(--space-4) 0;
}

.trust-bar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}

.trust-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2);
}

.trust-item-icon {
  width: 44px;
  height: 44px;
  background: var(--primary-subtle);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.trust-item-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--secondary-color);
}

.trust-item-text span {
  font-size: var(--text-xs);
  color: var(--gray-dark);
}

/* Hero trust overlay (home) */
.hero-trust {
  position: relative;
  z-index: 2;
  width: 100%;
  background: linear-gradient(
    180deg,
    rgba(15, 15, 28, 0.5) 0%,
    rgba(15, 15, 28, 0.86) 40%,
    rgba(15, 15, 28, 0.92) 100%
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--space-5) 0;
}

.hero-trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

.hero-trust .trust-item {
  padding: var(--space-2) var(--space-3);
}

.hero-trust .trust-item-icon {
  width: 46px;
  height: 46px;
  background: rgba(var(--primary-rgb), 0.18);
  border: 1px solid rgba(var(--primary-rgb), 0.35);
  color: var(--primary-color);
  font-size: 1.15rem;
}

.hero-trust .trust-item-text strong {
  color: #fff;
}

.hero-trust .trust-item-text span {
  color: rgba(255, 255, 255, 0.72);
}

/* Page hero (internal pages) */
.page-hero {
  background: linear-gradient(135deg, var(--secondary-color), #2d2d44);
  color: white;
  padding: var(--space-10) 0;
  margin-bottom: var(--space-8);
  text-align: center;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.page-hero p {
  opacity: 0.85;
  max-width: 600px;
  margin: 0 auto;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-6);
  background: var(--light-color);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--gray-medium);
}

.empty-state > i {
  font-size: 3rem;
  color: var(--primary-color);
  opacity: 0.5;
  margin-bottom: var(--space-4);
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--secondary-color);
  margin-bottom: var(--space-2);
}

.empty-state p {
  color: var(--gray-dark);
  margin-bottom: var(--space-5);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.no-products-message {
  padding: var(--space-8);
  text-align: center;
  background: var(--gray-light);
  border-radius: var(--radius-lg);
  color: var(--gray-dark);
  border: 1px solid var(--gray-medium);
}

@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-4);
  }

  .hero {
    min-height: 360px;
  }

  .hero::before {
    background-size: auto 85%;
    background-position: right center;
  }

  .hero-content {
    text-align: center;
    padding: var(--space-8) var(--space-4);
  }

  .hero h1,
  .hero h2,
  .hero-security,
  .hero-subtitle {
    max-width: none;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero.hero--home {
    min-height: 600px;
  }

  .hero.hero--home::before {
    bottom: 0;
    background-size: auto 104%;
    background-position: center 88%;
    opacity: 0.84;
  }

  .hero.hero--home::after {
    background: linear-gradient(
      180deg,
      rgba(26, 26, 46, 0.92) 0%,
      rgba(26, 26, 46, 0.82) 38%,
      rgba(26, 26, 46, 0.5) 58%,
      rgba(26, 26, 46, 0.2) 75%,
      transparent 92%
    );
  }

  .hero.hero--home .hero-content {
    align-items: center;
  }

  .hero-trust {
    padding: var(--space-4) 0;
  }

  .hero-trust-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
  }

  .page-hero {
    padding: var(--space-8) 0;
  }

  .page-hero h1 {
    font-size: clamp(var(--text-xl), 5vw, var(--text-3xl));
  }

  .trust-bar {
    padding: var(--space-3) 0;
  }

  .trust-bar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
  }

  .trust-item {
    flex-direction: column;
    text-align: center;
    padding: var(--space-2);
  }

  .trust-item-text strong,
  .trust-item-text span {
    font-size: var(--text-xs);
  }
}

@media (max-width: 992px) {
  .hero.hero--home {
    min-height: 660px;
  }

  .hero.hero--home::before {
    bottom: 96px;
    background-size: auto 106%;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-3);
  }

  .hero.hero--home {
    min-height: 480px;
  }

  .hero-trust-grid {
    grid-template-columns: 1fr;
  }

  .trust-bar-grid {
    grid-template-columns: 1fr;
  }

  .empty-state {
    padding: var(--space-8) var(--space-4);
  }
}
