:root {
  --bg-dark: #000000;
  --bg-card-dark: #161617;
  --bg-light: #f5f5f7;
  --bg-white: #ffffff;
  --text-light: #f5f5f7;
  --text-muted: #86868b;
  --text-dark: #1d1d1f;
  --accent-blue: #0071e3;
  --accent-blue-bright: #2997ff;
  --accent-blue-hover: #0077ed;
  --border-light: #d2d2d7;
  --border-dark: rgba(255, 255, 255, 0.12);
}

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

html {
  scroll-behavior: smooth;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-white);
  color: var(--text-dark);
  line-height: 1.47059;
}

body.theme-dark {
  background-color: var(--bg-dark);
  color: var(--text-light);
}

.container {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 22px;
}

/* Global Navigation */
.global-nav {
  position: fixed;
  top: 0;
  width: 100%;
  height: 44px;
  background: rgba(22, 22, 23, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-content {
  max-width: 1024px;
  height: 100%;
  margin: 0 auto;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  color: #f5f5f7;
  display: flex;
  align-items: center;
  text-decoration: none;
  opacity: 0.9;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  color: #f5f5f7;
  text-decoration: none;
  font-size: 12px;
  opacity: 0.78;
  transition: opacity 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.nav-links a:hover,
.nav-links a.active {
  opacity: 1;
  font-weight: 500;
}

.bag-badge {
  background: var(--accent-blue-bright);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: #f5f5f7;
  font-size: 18px;
  cursor: pointer;
}

/* Sub-navigation Ribbon */
.sub-ribbon {
  margin-top: 44px;
  background: rgba(245, 245, 247, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  padding: 12px 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-dark);
}

.sub-ribbon.dark {
  background: #1d1d1f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #f5f5f7;
}

.sub-ribbon a {
  color: var(--accent-blue-bright);
  text-decoration: none;
  margin-left: 6px;
}

/* Buttons */
.btn {
  display: inline-block;
  text-decoration: none;
  font-size: 15px;
  padding: 9px 20px;
  border-radius: 980px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent-blue);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-blue-hover);
}

.btn-outline {
  border-color: var(--accent-blue-bright);
  color: var(--accent-blue-bright);
  background: transparent;
}

.btn-outline:hover {
  background: var(--accent-blue-bright);
  color: #fff;
}

.btn-link {
  color: var(--accent-blue-bright);
  background: none;
  border: none;
  padding: 8px 12px;
}

.btn-link:hover {
  text-decoration: underline;
}

/* Hero Banners */
.hero-banner {
  padding: 76px 20px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-dark {
  background: radial-gradient(circle at 50% 30%, #1d1d26 0%, #000000 72%);
  color: #f5f5f7;
}

.hero-light {
  background: #f5f5f7;
  color: #1d1d1f;
}

.hero-titanium {
  background: linear-gradient(180deg, #161514 0%, #000000 100%);
  color: #f5f5f7;
}

.eyebrow {
  color: #f56300;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.hero-title {
  font-size: clamp(36px, 6vw, 58px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.08;
}

.hero-sub {
  font-size: clamp(19px, 3vw, 26px);
  margin-top: 8px;
  opacity: 0.88;
}

.hero-price {
  font-size: 16px;
  color: var(--text-muted);
  margin-top: 12px;
}

.cta-row {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* CSS Hardware Mockups */
.device-stage {
  max-width: 720px;
  margin: 44px auto 0;
}

.mac-frame {
  width: 84%;
  aspect-ratio: 16 / 10;
  margin: 0 auto;
  background: #0c0c0d;
  border: 3px solid #3a3a3c;
  border-bottom: none;
  border-radius: 16px 16px 0 0;
  padding: 9px 9px 0;
  box-shadow: 0 -8px 50px rgba(41, 151, 255, 0.2);
}

.mac-wallpaper {
  width: 100%;
  height: 100%;
  border-radius: 9px 9px 0 0;
  background: linear-gradient(135deg, #060b19 0%, #102a5c 50%, #260d3d 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: clamp(18px, 3vw, 28px);
  font-weight: 700;
  color: #fff;
}

.mac-base {
  width: 100%;
  height: 14px;
  background: linear-gradient(180deg, #7c7c80, #3a3a3c);
  border-radius: 2px 2px 12px 12px;
}

.iphone-trio {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.iphone-mockup {
  width: 170px;
  height: 330px;
  border-radius: 32px;
  border: 4px solid #6e685f;
  background: linear-gradient(160deg, #2b2620 0%, #0b0b0c 100%);
  padding: 12px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.dynamic-island {
  width: 54px;
  height: 14px;
  background: #000;
  border-radius: 10px;
  margin: 0 auto;
}

.camera-bump {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 8px;
  gap: 6px;
}

.lens {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle, #1d3557 20%, #000 75%);
  border: 2px solid #8a8175;
}

.ipad-mockup {
  width: min(520px, 90%);
  aspect-ratio: 4 / 3;
  margin: 0 auto;
  border-radius: 24px;
  border: 6px solid #2c2c2e;
  background: linear-gradient(125deg, #001d3d 0%, #0077b6 50%, #90e0ef 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  box-shadow: 0 18px 45px rgba(0, 113, 227, 0.25);
}

.watch-mockup {
  width: 190px;
  height: 230px;
  margin: 0 auto;
  border-radius: 46px;
  border: 6px solid #3a3a3c;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 40px rgba(48, 209, 88, 0.25);
}

.watch-ring {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  border: 10px solid #fa114f;
  border-top-color: #a4ff00;
  border-right-color: #00f5ea;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
}

/* Home Dual Promo Grid */
.promo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 14px;
  background: #fff;
}

.promo-tile {
  padding: 54px 24px;
  text-align: center;
  border-radius: 4px;
  min-height: 440px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.promo-tile.dark {
  background: #000;
  color: #f5f5f7;
}

.promo-tile.light {
  background: #f5f5f7;
  color: #1d1d1f;
}

.promo-tile h3 {
  font-size: 32px;
  font-weight: 700;
}

.promo-tile p {
  font-size: 17px;
  margin-top: 6px;
  opacity: 0.85;
}

/* Product Lineup Cards & Filters */
.section-pad {
  padding: 72px 0;
}

.section-heading {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  margin-bottom: 12px;
}

.section-lead {
  font-size: 17px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 18px;
  border-radius: 980px;
  border: 1px solid var(--border-light);
  background: #fff;
  color: var(--text-dark);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.theme-dark .filter-btn {
  background: #1c1c1e;
  border-color: rgba(255, 255, 255, 0.16);
  color: #f5f5f7;
}

.filter-btn.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #fff;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.product-card {
  background: #f5f5f7;
  border-radius: 24px;
  padding: 32px 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.25s ease;
}

.theme-dark .product-card {
  background: #161617;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.product-card:hover {
  transform: translateY(-4px);
}

.swatch-row {
  display: flex;
  gap: 8px;
  margin: 14px 0;
}

.swatch {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(128, 128, 128, 0.4);
}

.spec-list {
  list-style: none;
  margin: 18px 0 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.spec-list li {
  padding: 7px 0;
  border-bottom: 1px solid rgba(134, 134, 139, 0.2);
}

.card-price {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

/* Comparison Table */
.table-wrap {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid rgba(134, 134, 139, 0.25);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.compare-table th,
.compare-table td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(134, 134, 139, 0.2);
}

.compare-table th {
  background: rgba(134, 134, 139, 0.1);
  font-weight: 600;
}

/* Support & FAQ */
.support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.support-card {
  background: #f5f5f7;
  padding: 28px 22px;
  border-radius: 20px;
  text-align: center;
}

.support-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.faq-item {
  border-bottom: 1px solid var(--border-light);
  padding: 18px 0;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-answer {
  display: none;
  margin-top: 12px;
  color: #515154;
  font-size: 15px;
  line-height: 1.6;
}

.faq-item.open .faq-answer {
  display: block;
}

.search-box {
  width: 100%;
  max-width: 540px;
  padding: 14px 20px;
  font-size: 16px;
  border-radius: 14px;
  border: 1px solid var(--border-light);
  margin: 20px auto 0;
  display: block;
}

.contact-form {
  max-width: 560px;
  background: #f5f5f7;
  padding: 32px;
  border-radius: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  font-size: 15px;
  font-family: inherit;
}

/* Bag / Cart Page */
.bag-list {
  border-top: 1px solid var(--border-light);
}

.bag-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--border-light);
  gap: 16px;
  flex-wrap: wrap;
}

.bag-summary {
  max-width: 420px;
  margin-left: auto;
  margin-top: 28px;
  background: #f5f5f7;
  padding: 24px;
  border-radius: 20px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 15px;
}

.summary-total {
  border-top: 1px solid var(--border-light);
  padding-top: 12px;
  font-size: 20px;
  font-weight: 700;
}

/* Footer */
.global-footer {
  background: #f5f5f7;
  color: var(--text-muted);
  font-size: 12px;
  padding: 44px 0 36px;
  border-top: 1px solid var(--border-light);
}

.theme-dark .global-footer {
  background: #111112;
  border-top-color: rgba(255, 255, 255, 0.1);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(134, 134, 139, 0.25);
  margin-bottom: 20px;
}

.footer-col h4 {
  color: var(--text-dark);
  font-size: 12px;
  margin-bottom: 10px;
}

.theme-dark .footer-col h4 {
  color: #f5f5f7;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 7px;
}

.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-col a:hover {
  text-decoration: underline;
}

.disclaimer {
  margin-bottom: 14px;
  line-height: 1.6;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: #1d1d1f;
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all 0.25s ease;
  z-index: 2000;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .promo-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .mobile-menu-btn {
    display: block;
  }
  .nav-links {
    display: none;
    position: absolute;
    top: 44px;
    left: 0;
    width: 100%;
    background: #161617;
    flex-direction: column;
    padding: 18px 22px;
    gap: 16px;
    align-items: flex-start;
  }
  .nav-links.open {
    display: flex;
  }
}
