:root {
  --theorem-navy: #0B1C2E;
  --theorem-navy-light: #1a2942;
  --theorem-cyan: #00CBA9;
  --theorem-cyan-light: #2DD4BF;
  --theorem-blue: #4A90E2;
  --theorem-green: #00D9A5;

  --text-primary: #1F2937;
  --text-secondary: #6B7280;
  --text-tertiary: #9ca3af;
  --text-inverse: #ffffff;

  --bg-primary: #ffffff;
  --bg-light: #F5F7FA;

  --border-color: #E5E7EB;
  --border-grey: #9ca3af;

  --max-width: 1400px;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

html,
body {
  scroll-behavior: smooth;
}

/* Mobile tap/selection polish */
a,
button,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

body {
  overflow-x: hidden;
}

.nav-phone-icon svg,
.nav-menu-icon svg,
.cart-icon svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: currentColor;
}

.nav-divider {
  color: var(--text-tertiary);
  font-size: 0.85rem;
  line-height: 1;
  padding: 0 0.25rem;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

@media (min-width: 601px) {
  .nav-dropdown-link.mobile-only {
    display: none;
  }
}

.nav-dropdown-btn,
.nav-dropdown-link,
.cart-btn,
.nav-btn,
.btn,
.btn-back,
.cookie-btn,
.sticky-cta-btn {
  min-height: 44px;
}

.nav-dropdown-btn,
.cart-btn,
.nav-btn,
.btn,
.btn-back,
.cookie-btn,
.sticky-cta-btn {
  touch-action: manipulation;
}

.site-header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-footer {
  background: var(--bg-light);
  border-top: 1px solid var(--border-color);
  padding: 2.5rem 2rem;
  padding-bottom: 80px;
  text-align: center;
}

.footer-logo img {
  height: 60px;
  opacity: 0.5;
  filter: grayscale(100%) brightness(0.4);
}

.footer-content {
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.8;
}

.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  background: var(--theorem-navy);
  padding: 0.875rem 2rem;
  padding-bottom: calc(0.875rem + env(safe-area-inset-bottom, 0px));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  z-index: 100;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 1rem 1rem 0 0;
}

.sticky-cta-text {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

.sticky-cta-phone {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--theorem-cyan);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.sticky-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #ffffff;
  color: var(--theorem-navy);
  border-radius: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.cookie-banner {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-width);
  background: var(--theorem-navy);
  color: var(--text-inverse);
  padding: 1rem 2rem;
  z-index: 150;
  display: none;
  border-radius: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.cookie-banner.active {
  display: block;
}

.page-wrapper {
  width: 100%;
}

/* Prevent anchor targets hiding under sticky header/tools */
#categories,
#panelNav,
.panel-nav {
  scroll-margin-top: 90px;
}

@media (max-width: 600px) {
  .site-header {
    padding: 0.75rem 1rem;
  }

  .header-title {
    display: none;
  }

  .nav-contact {
    display: none;
  }

  .sticky-cta {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }

  .compare-panel {
    min-width: 0;
    width: calc(100% - 2rem);
    left: 1rem;
    transform: none;
  }

  /* On mobile, avoid header-level price/add actions overflowing; panel cards already include pricing/actions below */
  .panel-card-header .add-to-cart-btn,
  .panel-card-header .panel-header-actions,
  .panel-header-actions,
  .header-price-badge,
  .add-to-cart-btn:not(.btn-book) {
    display: none !important;
  }
}
