/* ============================================================
   DEALS ARE US — Shared Components
   ============================================================ */

/* ==================== NAVBAR ==================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: all var(--duration-normal) var(--ease-out);
}

.navbar.scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-wide);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  z-index: 1001;
}

.nav-logo img {
  height: 52px;
  width: auto;
  display: block;
}

.footer-logo-img {
  height: 72px !important;
  width: auto;
  display: block;
}

.nav-logo .logo-text {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.02em;
}

.nav-logo .logo-tagline {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.04em;
  margin-top: -2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8);
  transition: color var(--duration-fast) var(--ease-out);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--signal-sky);
  transition: width var(--duration-normal) var(--ease-out);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.nav-cta .btn {
  padding: 0.65rem 1.5rem;
  font-size: 0.875rem;
}

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  cursor: pointer;
  z-index: 1001;
  padding: 4px 0;
}

.nav-hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--duration-normal) var(--ease-out);
  transform-origin: center;
}

.nav-hamburger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-hamburger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu */
.nav-mobile {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--midnight);
  z-index: 999;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.nav-mobile.open {
  display: flex;
  opacity: 1;
  pointer-events: all;
}

.nav-mobile a {
  font-size: var(--text-h2);
  font-weight: 700;
  color: var(--white);
  transition: color var(--duration-fast);
}

.nav-mobile a:hover {
  color: var(--signal-sky);
}

.nav-mobile .btn {
  margin-top: var(--space-3);
}

@media (max-width: 768px) {
  .nav-links,
  .nav-cta {
    display: none;
  }
  .nav-hamburger {
    display: flex;
  }
}

/* ==================== PAGE HERO (Inner Pages) ==================== */
.page-hero {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(135deg, var(--midnight) 0%, var(--deep-navy) 50%, var(--slate-navy) 100%);
  padding: calc(var(--nav-height) + var(--space-6)) var(--space-4) var(--space-6);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(91, 160, 252, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(91, 160, 252, 0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.page-hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.page-hero .eyebrow {
  margin-bottom: var(--space-3);
}

.page-hero .text-h1 {
  color: var(--white);
  margin-bottom: var(--space-3);
}

.page-hero p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.25rem;
  line-height: 1.7;
}

/* ==================== FEATURE CARDS ==================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4);
}

.feature-card {
  background: var(--glass-bg-light);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(91, 160, 252, 0.05), transparent);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(91, 160, 252, 0.3);
  box-shadow: var(--shadow-glow);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card .card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--signal-sky), var(--steel));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
  font-size: 1.5rem;
  color: var(--white);
}

.feature-card h3 {
  font-size: var(--text-h3);
  font-weight: 700;
  margin-bottom: var(--space-2);
  position: relative;
  z-index: 1;
}

.feature-card p {
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

/* Light variant */
.feature-card-light {
  background: var(--white);
  border: 1px solid var(--mist);
}

.feature-card-light:hover {
  border-color: var(--signal-sky);
}

.feature-card-light h3 {
  color: var(--deep-navy);
}

.feature-card-light p {
  color: var(--slate-navy);
}

/* ==================== STATS BAR ==================== */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  padding: var(--space-5) 0;
  text-align: center;
}

.stat-item {
  position: relative;
}

.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 20%;
  height: 60%;
  width: 1px;
  background: rgba(255, 255, 255, 0.12);
}

.stat-number {
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 700;
  color: var(--signal-sky);
  line-height: 1;
  margin-bottom: var(--space-1);
}

.stat-label {
  font-family: var(--font-mono);
  font-size: var(--text-small);
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

@media (max-width: 768px) {
  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }
  .stat-item:nth-child(2)::after {
    display: none;
  }
}

@media (max-width: 480px) {
  .stats-bar {
    grid-template-columns: 1fr 1fr;
  }
}

/* ==================== PARTNER LOGO RIBBON ==================== */
.logo-ribbon-wrapper {
  overflow: hidden;
  padding: var(--space-5) 0;
  position: relative;
}

.logo-ribbon-wrapper::before,
.logo-ribbon-wrapper::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
}

.logo-ribbon-wrapper::before {
  left: 0;
  background: linear-gradient(to right, var(--white), transparent);
}

.logo-ribbon-wrapper::after {
  right: 0;
  background: linear-gradient(to left, var(--white), transparent);
}

.section-dark .logo-ribbon-wrapper::before {
  background: linear-gradient(to right, var(--deep-navy), transparent);
}

.section-dark .logo-ribbon-wrapper::after {
  background: linear-gradient(to left, var(--deep-navy), transparent);
}

.logo-ribbon {
  display: flex;
  gap: var(--space-6);
  animation: scrollRibbon 30s linear infinite;
  width: max-content;
}

.logo-ribbon-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2) var(--space-5);
  opacity: 0.85;
  transition: opacity var(--duration-normal) var(--ease-out);
  white-space: nowrap;
}

.logo-ribbon-item img {
  height: 55px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
}

/* Square or near-square logos: render taller so they look comparable to wide ones */
.logo-ribbon-item img[src*="canadiantire"] {
  height: 95px;
  max-width: 130px;
}

/* Loblaws: now has wide aspect after viewBox fix, just render bigger */
.logo-ribbon-item img[src*="loblaws"] {
  height: 75px;
  max-width: 280px;
}

.logo-ribbon-item span {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--deep-navy);
  letter-spacing: -0.02em;
}

.section-dark .logo-ribbon-item span {
  color: rgba(255, 255, 255, 0.5);
}

.logo-ribbon-item:hover {
  opacity: 1;
}

@keyframes scrollRibbon {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ==================== CTA BANNER ==================== */
.cta-banner {
  background: linear-gradient(135deg, var(--deep-navy) 0%, var(--slate-navy) 50%, var(--deep-navy) 100%);
  background-size: 200% 200%;
  animation: gradientShift 8s ease-in-out infinite;
  text-align: center;
  padding: var(--space-7) var(--space-4);
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(91, 160, 252, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.cta-banner .text-h2 {
  color: var(--white);
  margin-bottom: var(--space-2);
}

.cta-banner p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.125rem;
  margin-bottom: var(--space-4);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ==================== FOOTER ==================== */
.footer {
  background: var(--midnight);
  color: var(--white);
  padding: var(--space-7) 0 var(--space-4);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--space-6);
  margin-bottom: var(--space-6);
}

.footer-brand .nav-logo {
  margin-bottom: var(--space-3);
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.6);
  font-size: var(--text-caption);
  line-height: 1.7;
  max-width: 280px;
}

.footer-col h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: var(--space-3);
  color: var(--white);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.footer-col a {
  font-size: var(--text-caption);
  color: rgba(255, 255, 255, 0.55);
  transition: color var(--duration-fast);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.footer-col a:hover {
  color: var(--signal-sky);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-bottom p {
  font-size: var(--text-small);
  color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .footer-bottom {
    flex-direction: column;
    gap: var(--space-2);
    text-align: center;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== LOADING SCREEN ==================== */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--midnight);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s var(--ease-out), visibility 0.6s;
}

.page-loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-logo {
  animation: loaderPulse 1.5s ease-in-out infinite;
}

.loader-logo img {
  height: 48px;
}

@keyframes loaderPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1); }
}

/* ==================== ALTERNATING CONTENT BLOCK ==================== */
.content-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  align-items: center;
}

.content-block.reverse {
  direction: rtl;
}

.content-block.reverse > * {
  direction: ltr;
}

.content-block-text .eyebrow {
  margin-bottom: var(--space-2);
}

.content-block-text h2 {
  font-size: var(--text-h2);
  font-weight: 700;
  margin-bottom: var(--space-3);
}

.content-block-text p {
  line-height: 1.7;
  margin-bottom: var(--space-2);
}

.content-block-text ul {
  margin-top: var(--space-2);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.content-block-text li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-1);
  font-size: 1rem;
  line-height: 1.6;
}

.content-block-text li::before {
  content: '→';
  color: var(--signal-sky);
  font-weight: 600;
  flex-shrink: 0;
}

.content-block-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.content-block-visual .visual-box {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.visual-gradient {
  background: linear-gradient(135deg, var(--deep-navy), var(--slate-navy));
  display: flex;
  align-items: center;
  justify-content: center;
}

.visual-gradient .visual-icon {
  font-size: 4rem;
  opacity: 0.3;
}

@media (max-width: 768px) {
  .content-block {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
  .content-block.reverse {
    direction: ltr;
  }
}
