/* Fone doctors style – aligned with fone-doctors-known (dark hero, red + green accents, light sections) */
:root {
  --primary_color: #fff;
  --secondary_color: #0C0C0B;
  --dark_bg: #0C0C0B;
  --green_color: #00B67A;
  --red_color: #b4232f;
  --gray: #6B6B6B;
  --light-gray: #E1E1E1;
  --typo_round_family: 'typo_round_light_demoregular', 'Montserrat', ui-sans-serif, sans-serif;
  --bg-gray: linear-gradient(180deg, rgba(107, 107, 107, 0.24) -18.97%, #FFF 49%);
  --linear-pink: linear-gradient(to bottom, #eec1c1, #eec4c4, #eec7c7, #edc9c9, #edcccc, #eed1d4, #efd7db, #f0dce1, #f2e5eb, #f5eef4, #f9f7fa, #ffffff);

  --font-sans: 'Montserrat', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --shadow-card: 0 1px 3px 0 rgb(0 0 0 / 0.06), 0 1px 2px -1px rgb(0 0 0 / 0.06);
  --shadow-card-hover: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  --radius-card: 1rem;
  --radius-button: 0.75rem;
}

@font-face {
  font-family: 'typo_round_light_demoregular';
  src: url('/fonts/typo_round_light_demo-webfont.woff2') format('woff2'),
    url('/fonts/typo_round_light_demo-webfont.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-sans);
}

body, html {
  background: var(--bg-gray) !important;
  background-color: var(--primary_color) !important;
  color: var(--secondary_color) !important;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Dark hero/header sections (fone doctors style) – modernized with subtle gradient */
.bg-theme-dark {
  background-color: var(--dark_bg) !important;
  color: #fff !important;
  position: relative;
}
.bg-theme-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(220, 53, 69, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 100% 60%, rgba(0, 182, 122, 0.05) 0%, transparent 50%);
  pointer-events: none;
  border-radius: inherit;
}
.bg-theme-dark > * {
  position: relative;
  z-index: 1;
}
.bg-theme-dark .text-theme-primary { color: #fff; }
.bg-theme-dark .text-theme-secondary { color: rgba(255,255,255,0.85); }
.bg-theme-dark .text-theme-accent { color: var(--red_color) !important; }
.bg-theme-dark .border-theme { border-color: rgba(255,255,255,0.2) !important; }
.bg-theme-dark input:not(.bg-theme-card *),
.bg-theme-dark select:not(.bg-theme-card *),
.bg-theme-dark textarea:not(.bg-theme-card *) {
  background-color: rgba(255,255,255,0.1) !important;
  border-color: rgba(255,255,255,0.25) !important;
  color: #fff !important;
}
.bg-theme-dark input:not(.bg-theme-card *)::placeholder,
.bg-theme-dark select:not(.bg-theme-card *) { color: #fff !important; }
.text-theme-teal { color: var(--green_color) !important; }
.bg-theme-teal { background-color: var(--green_color) !important; }
.border-theme-teal { border-color: var(--green_color) !important; }

/* Cross-browser native select popup readability (Chrome/Edge/Firefox/Safari). */
select option,
select optgroup {
  color: #111827 !important;
  background-color: #ffffff !important;
}

[data-theme="dark"] body,
[data-theme="dark"] html {
  background: #1a1a1d !important;
  background-color: #1a1a1d !important;
  color: #f9fafb !important;
}

/* Theme utility classes – mapped to your palette */
.bg-theme-primary { background-color: #fff !important; }
.bg-theme-secondary { background: var(--bg-gray) !important; background-color: var(--primary_color) !important; }
.bg-theme-card { background-color: #fff !important; }
.text-theme-primary { color: var(--secondary_color) !important; }
.text-theme-secondary { color: var(--gray) !important; }
.text-theme-accent { color: var(--red_color) !important; }
.text-theme-accent-hover { color: #c62828 !important; }

[data-theme="dark"] .bg-theme-primary { background-color: #1a1a1d !important; }
[data-theme="dark"] .bg-theme-secondary { background-color: #0C0C0B !important; }
[data-theme="dark"] .bg-theme-card { background-color: #2d2d30 !important; }
[data-theme="dark"] .text-theme-primary { color: #f9fafb !important; }
[data-theme="dark"] .text-theme-secondary { color: #d1d5db !important; }
[data-theme="dark"] .text-theme-accent { color: #dc3545 !important; }
[data-theme="dark"] .text-theme-accent-hover { color: #ff4444 !important; }

.dark-bg { background-color: #fff !important; }
[data-theme="dark"] .dark-bg { background-color: #2d2d30 !important; }
.dark-border { border-color: var(--light-gray) !important; }
[data-theme="dark"] .dark-border { border-color: #404040 !important; }

.nav-dropdown,
.mobile-drawer-bg { background-color: #fff !important; }
[data-theme="dark"] .nav-dropdown,
[data-theme="dark"] .mobile-drawer-bg { background-color: #2d2d30 !important; }

.dropdown-item-theme,
.mobile-menu-item-theme { color: var(--secondary_color) !important; }
[data-theme="dark"] .dropdown-item-theme,
[data-theme="dark"] .mobile-menu-item-theme { color: #f9fafb !important; }

.search-input {
  background-color: #fff !important;
  border: 1px solid var(--light-gray) !important;
  color: var(--secondary_color) !important;
}
[data-theme="dark"] .search-input {
  background-color: #404040 !important;
  border-color: #404040 !important;
  color: #f9fafb !important;
}

.badge-theme { background-color: var(--red_color) !important; color: #fff !important; }
[data-theme="dark"] .badge-theme { background-color: #dc3545 !important; color: #fff !important; }

/* Navbar phone CTA: red rounded button, white icon + number */
.nav-phone-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 36px;
  padding: 0 1.35rem;
  background: #be1622;
  color: #fff !important;
  font-weight: 600;
  font-size: 0.8125rem;
  border: none;
  border-radius: 9999px;
  text-decoration: none;
  white-space: nowrap;
  transition: filter 0.2s, transform 0.1s;
  flex-shrink: 0;
  min-width: max-content;
  overflow: visible;
}
.nav-phone-btn:hover,
.nav-phone-btn:hover .nav-phone-number { color: #fff !important; filter: brightness(1.1); }
.nav-phone-btn:focus { outline: 2px solid var(--red_color); outline-offset: 2px; }
.nav-phone-btn i {
  font-size: 0.875rem;
  color: #fff !important;
  flex-shrink: 0;
}
/* Hide inline number (can be clipped in flex nav), show via ::after so it always displays */
.nav-phone-btn .nav-phone-number {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.nav-phone-btn[data-phone]::after {
  content: attr(data-phone);
  color: #fff !important;
  font-weight: 600;
  font-size: 0.8125rem;
}

.hover-theme-accent:hover,
.hover-theme-accent-hover:hover { color: #c62828 !important; }
[data-theme="dark"] .hover-theme-accent:hover,
[data-theme="dark"] .hover-theme-accent-hover:hover { color: #ff4444 !important; }

.border-theme { border-color: var(--light-gray) !important; }
[data-theme="dark"] .border-theme { border-color: #404040 !important; }

/* Prose (about, FAQ, warranty, privacy, terms) – theme accent for links/headings */
.prose-theme a { color: var(--red_color) !important; }
.prose-theme a:hover { color: #c62828 !important; text-decoration: underline; }
.prose-theme h1, .prose-theme h2, .prose-theme h3 { color: var(--secondary_color) !important; }
[data-theme="dark"] .prose-theme h1, [data-theme="dark"] .prose-theme h2, [data-theme="dark"] .prose-theme h3 { color: #f9fafb !important; }

/* Error/destructive */
.text-theme-red { color: var(--red_color) !important; }
.bg-theme-red { background-color: var(--red_color) !important; }
.text-theme-error { color: var(--red_color) !important; }
[data-theme="dark"] .text-theme-error { color: #fca5a5 !important; }
.bg-theme-error-box { background-color: #fef2f2 !important; color: #b91c1c !important; }
[data-theme="dark"] .bg-theme-error-box { background-color: rgba(127, 29, 29, 0.35) !important; color: #fca5a5 !important; }

.bg-theme-success-box { background-color: #f0fdf4 !important; color: #166534 !important; border-color: #bbf7d0 !important; }
[data-theme="dark"] .bg-theme-success-box { background-color: rgba(21, 128, 61, 0.25) !important; color: #86efac !important; border-color: rgba(34, 197, 94, 0.3) !important; }

/* Placeholder */
.placeholder-theme::placeholder { color: var(--gray) !important; }
[data-theme="dark"] .placeholder-theme::placeholder { color: #9ca3af !important; }

/* Mobile drawer */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  height: 100dvh;
  min-height: 100vh;
  width: 80vw;
  max-width: 22rem;
  z-index: 60;
  font-size: clamp(1rem, 2vw, 1.15rem);
  box-shadow: 2px 0 24px 0 rgba(0, 0, 0, 0.12);
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  padding-left: env(safe-area-inset-left, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.mobile-drawer.open {
  transform: translateX(0);
  display: flex !important;
  pointer-events: auto;
}
[data-theme="dark"] .mobile-drawer {
  background: #2d2d30;
}

.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(12, 12, 11, 0.5);
  z-index: 55;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.mobile-overlay.active {
  display: block;
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer-content {
  padding-left: max(1.5rem, env(safe-area-inset-left, 0));
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom, 0));
}

/* Dark logo in side nav (light drawer background) */
.mobile-drawer-logo {
  filter: brightness(0);
}
[data-theme="dark"] .mobile-drawer-logo {
  filter: brightness(0) invert(1);
}

.mobile-menu-item-theme,
.mobile-drawer button {
  min-height: 48px;
  font-size: 1rem;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  transition: background 0.15s;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.mobile-drawer a.mobile-menu-item-theme {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.cart-count {
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.cart-count.animated {
  transform: scale(1.25) rotate(-10deg);
}

.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

@keyframes stepper-tick {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  75% { transform: translateX(2px); }
}
.stepper-current {
  animation: stepper-tick 2s ease-in-out infinite;
}

html {
  scroll-behavior: smooth;
}

/* Form Input Theme Classes */
.input-theme {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--theme-border);
  background-color: var(--theme-card-bg);
  color: var(--theme-text-primary);
  border-radius: 0.75rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.input-theme:focus {
  outline: none;
  border-color: var(--theme-accent);
  box-shadow: 0 0 0 3px rgba(var(--theme-accent-rgb), 0.1);
}

.input-theme::placeholder {
  color: var(--theme-text-secondary);
}

.textarea-theme {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--theme-border);
  background-color: var(--theme-card-bg);
  color: var(--theme-text-primary);
  border-radius: 0.75rem;
  font-weight: 500;
  transition: all 0.15s ease;
  resize: vertical;
  min-height: 80px;
}

.textarea-theme:focus {
  outline: none;
  border-color: var(--theme-accent);
  box-shadow: 0 0 0 3px rgba(var(--theme-accent-rgb), 0.1);
}

.textarea-theme::placeholder {
  color: var(--theme-text-secondary);
}

.select-theme {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--theme-border);
  background-color: var(--theme-card-bg);
  color: var(--theme-text-primary);
  border-radius: 0.75rem;
  font-weight: 500;
  transition: all 0.15s ease;
  cursor: pointer;
}

.select-theme:focus {
  outline: none;
  border-color: var(--theme-accent);
  box-shadow: 0 0 0 3px rgba(var(--theme-accent-rgb), 0.1);
}

/* Dark mode specific adjustments for form inputs */
[data-theme="dark"] .input-theme,
[data-theme="dark"] .textarea-theme,
[data-theme="dark"] .select-theme {
  background-color: var(--theme-card-bg);
  border-color: var(--theme-border);
  color: var(--theme-text-primary);
}

[data-theme="dark"] .input-theme::placeholder,
[data-theme="dark"] .textarea-theme::placeholder {
  color: var(--theme-text-secondary);
}

/* Respect reduced motion: disable scroll-reveal and similar animations */
@media (prefers-reduced-motion: reduce) {
  .reduce-motion *,
  .reduce-motion {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Hero image gradient overlay for text contrast */
.hero-image-wrap {
  position: relative;
}
.hero-image-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(to right, var(--dark_bg) 0%, transparent 55%);
  pointer-events: none;
}

/* Modern card – soft border and shadow */
.card-modern {
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 8px -2px rgb(0 0 0 / 0.06), 0 4px 16px -4px rgb(0 0 0 / 0.04);
}
[data-theme="dark"] .card-modern {
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 2px 8px -2px rgb(0 0 0 / 0.2);
}

/* Rounded interactive surfaces that animate shadow + border: stabilize corner paint (Safari/Chrome flicker) */
a[class*='bg-theme-card'],
button[class*='bg-theme-card'],
button[class*='rounded-card'] {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.safe-area-inset-top {
  padding-top: env(safe-area-inset-top, 0);
}
.safe-area-inset-bottom {
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* ========== Footer redesign ========== */
.footer-redesign {
  margin-top: auto;
}

.footer-top {
  display: none;
}
.footer-top-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}
.footer-brand {
  max-width: 22rem;
}
.footer-logo {
  height: 3.375rem;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  margin-bottom: 0.75rem;
  display: block;
}
.footer-tagline {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9375rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}
.footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--red_color);
  color: #fff;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.75rem;
  transition: opacity 0.2s, transform 0.15s;
}
.footer-cta:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.footer-main {
  background: var(--primary_color);
  padding: 2rem 1rem 1.5rem;
  border-top: 1px solid var(--light-gray);
}
[data-theme="dark"] .footer-main {
  background: #0C0C0B;
  border-top-color: #404040;
}

.footer-grid {
  max-width: 1110px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.75rem 2rem;
}
@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem 3rem;
  }
}

.footer-heading {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray);
  margin-bottom: 0.85rem;
}
[data-theme="dark"] .footer-heading {
  color: #9ca3af;
}

.footer-links,
.footer-contact {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li,
.footer-contact li {
  margin-bottom: 0.42rem;
}
.footer-links a,
.footer-contact a {
  color: var(--secondary_color);
  font-size: 0.8125rem;
  text-decoration: none;
  transition: color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.footer-links a:hover,
.footer-contact a:hover {
  color: var(--red_color);
}
[data-theme="dark"] .footer-links a,
[data-theme="dark"] .footer-contact a {
  color: #f9fafb;
}
[data-theme="dark"] .footer-links a:hover,
[data-theme="dark"] .footer-contact a:hover {
  color: var(--red_color);
}

.footer-contact li i {
  width: 1.125rem;
  text-align: center;
  color: var(--red_color);
}
[data-theme="dark"] .footer-contact li i {
  color: var(--red_color);
}
.footer-address {
  color: var(--gray);
  font-size: 0.8125rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.footer-address i {
  margin-top: 0.2rem;
}
[data-theme="dark"] .footer-address {
  color: #d1d5db;
}

.footer-bottom {
  background: var(--primary_color);
  border-top: 1px solid var(--light-gray);
  padding: 0.8rem 1rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}
[data-theme="dark"] .footer-bottom {
  background: #0C0C0B;
  border-top-color: #404040;
}

.footer-bottom-inner {
  max-width: 1110px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: #374151;
}
[data-theme="dark"] .footer-bottom-inner {
  color: #9ca3af;
}

.footer-legal a {
  color: var(--secondary_color);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-legal a:hover {
  color: var(--red_color);
}
[data-theme="dark"] .footer-legal a {
  color: #f9fafb;
}
[data-theme="dark"] .footer-legal a:hover {
  color: var(--red_color);
}
.footer-sep {
  margin: 0 0.25rem;
  opacity: 0.6;
}
.footer-copy {
  margin: 0;
}
.footer-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: #047857;
  font-weight: 600;
  text-decoration: none;
}
.footer-trust-badge:hover {
  text-decoration: underline;
}
.footer-trust-reviews {
  font-weight: 500;
  opacity: 1;
  color: #14532d;
}
[data-theme="dark"] .footer-trust-badge {
  color: #86efac;
}
[data-theme="dark"] .footer-trust-reviews {
  color: #bbf7d0;
}
