:root {
  /* ============================= */
  /* BACKGROUND */
  /* ============================= */
  --bg: #ffffff;            /* main background */
  --surface: #f9fafb;       /* cards / sections */

  /* ============================= */
  /* PRIMARY (BLACK) */
  /* ============================= */
  --primary: #111111;
  --primary-hover: #000000;

  /* ============================= */
  /* TEXT */
  /* ============================= */
  --text-dark: #111111;     /* for light backgrounds */
  --text-light: #ffffff;   /* for dark backgrounds */

  --text-muted: #a3a3a3;
  --text-subtle: #525252;

  /* ============================= */
  /* UI */
  /* ============================= */
  --border: #e5e5e5;
  --divider: #f0f0f0;

  --shadow: 0 10px 25px rgba(0, 0, 0, 0.05);

  --radius: 14px;
  --max-width: 1120px;

  /* ============================= */
  /* DARK UI TOKENS (for footer/header) */
  /* ============================= */
  --text-light-soft: rgba(255,255,255,0.7);   /* secondary text on dark */
  --divider-dark: rgba(255,255,255,0.08);     /* subtle divider on dark */
}


/* ============================= */
/* GLOBAL */
/* ============================= */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text-dark);
  background: var(--bg);
  line-height: 1.6;
  padding-top: 90px;
}

body.no-scroll {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin: 0 auto;
}

.narrow-container {
  width: min(100% - 2rem, 720px);
  margin: 0 auto;
}


/* ============================= */
/* HEADER */
/* ============================= */

.site-header {
  background: var(--primary);
  color: var(--text-light);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 2000;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.site-logo {
  height: 82px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-light);
}

.brand-name {
  font-weight: 700;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: var(--primary);
}

.site-nav a {
  color: var(--text-light);
  opacity: 0.9;
  font-weight: 600;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
  opacity: 1;
  text-decoration: none;
  color: var(--bg);
  border-bottom: 2px solid var(--text);
  padding-bottom: 2px;
}

.header-actions {
  display: flex;
  gap: 0.75rem;
}



.menu-toggle {
  display: none; /* default: hidden on desktop */

  font-size: 22px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-light);

  transition: transform 0.2s ease;

  z-index: 1200;

  /* layout (only applies when visible) */
  align-items: center;
  justify-content: center;

  width: 40px;
  height: 40px;
}

/* Icon animation (light polish) */
.menu-toggle i {
  transition: transform 0.2s ease;
}

/* Click feedback */
.menu-toggle:active {
  transform: scale(0.9);
}


/* ============================= */
/* NAV BACKDROP */
/* ============================= */

.nav-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.55);

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 1050;
}

.nav-backdrop.active {
  opacity: 1;
  visibility: visible;
}


/* ============================= */
/* HERO */
/* ============================= */

.hero {
  padding: 5rem 0 4rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.hero h1,
.hero h2 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.15;
}

.hero-text {
  max-width: 700px;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}


/* ============================= */
/* SECTIONS */
/* ============================= */

.page-section {
  padding: 3rem 0 4rem;
}

.section-heading {
  margin-bottom: 1.5rem;
}

.section-heading h1,
.section-heading h2 {
  margin: 0 0 0.5rem;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

/* ======================================= */
/* ABOUT PAGE BACKGROUND (LOGO WATERMARK) */
/* ======================================= */
.about-bg {
  position: relative;
  overflow: hidden;
}

/* Background logo layer */
.about-bg::before {
  content: "";
  position: absolute;
  inset: 0;

  background-image: url("../assets/logo/kaycarcutz-logo.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 500px;

  opacity: 0.08;

  z-index: 0;
}

/* Ensure content stays above */
.about-bg .container {
  position: relative;
  pointer-events: none;
  z-index: -1;
}



/* ============================= */
/* FEATURES */
/* ============================= */

.features {
  padding: 1rem 0 4rem;
}

.feature-grid,
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}


/* ============================= */
/* CARDS */
/* ============================= */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(212, 175, 55, 0.2);
}

.feature-card h3,
.card h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.card p {
  margin: 0.35rem 0;
  color: var(--muted);
}

.provider-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 12px;
}


/* ================================
   CARD ACTION BUTTONS // FOR SHOP.HTML
=================================== */
.card-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.card-actions .btn {
  flex: 1;
  text-align: center;
}

/* ======================================== */
/* SERVICES SECTION */
/* ======================================== */
.services {
  padding: 1rem 0 4rem;
}

/* Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  align-items: stretch; /* 🔥 equal height */
}

/* Link wrapper */
.service-link {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

/* service button */
.service-btn {
  margin-top: 12px;
  width: 100%;
}

.service-btn:hover {
  transform: translateY(-2px);
}

/* Card */
.service-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* Image */
.service-img {
  width: 100%;          /* ✅ FIXED */
  height: 180px;        /* ✅ FIXED */
  object-fit: cover;
  display: block;
}

/* Content */
.service-content {
  padding: 20px;
  text-align: center;

  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* Title */
.service-content h3 {
  margin-bottom: 10px;
  min-height: 50px; /* 🔥 keeps titles aligned */
}

/* Text */
.service-content p {
  font-size: 0.95rem;
  opacity: 0.8;
  flex-grow: 1; /* 🔥 equal spacing */
}

/* ======================================== */
/* PRODUCTS SECTION (PRODUCTION LEVEL) */
/* ======================================== */

.products {
  padding: 60px 0;
}

/* Grid Layout */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Make entire card clickable */
.product-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* Product Card */
.product-card {
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* Image wrapper */
.product-img-wrapper {
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.product-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Content */
.product-content {
  padding: 16px;
  text-align: center;
}

.product-content h3 {
  margin-bottom: 8px;
}

.product-content p {
  font-size: 14px;
  color: #777;
}


/* ================================
   CARD FRANCHISE // FOR FRANCHISE.HTML
=================================== */
.card-franchise {
  text-align: center;
  margin-top: 40px;
}

.card-actions-franchise {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1rem;
}


/* ============================= */
/* PASSWORD REDIRECT CARD */
/* ============================= */

.redirect-card {
  text-align: center;
  padding: 2rem;
}

.helper-text {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 1rem;
}

.status-message {
  margin-bottom: 1rem;
  color: var(--muted);
}


/* ============================= */
/* BUTTONS */
/* ============================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 1rem;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

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

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: rgba(212, 175, 55, 0.1);
}


/* ============================= */
/* FOOTER */
/* ============================= */

.site-footer {
  background: var(--primary);
  border-top: 1px solid var(--border);
  margin-top: 4rem;
}

.footer-grid {
  padding: 2.5rem 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 2rem;
}

.footer-brand {
  grid-column: span 2;
}

.footer-logo {
  margin: 0 0 10px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo-img {
  height: 32px;
  width: auto;
}

.footer-description {
  color: var(--muted);
  max-width: 320px;
}

.footer-column h4 {
  margin: 0 0 0.5rem;
}

.footer-column a {
  display: block;
  margin: 0.25rem 0;
  color: var(--text-light);
}

.footer-column a:hover {
  color: var(--text-light);
}

.footer-bottom {
  text-align: center;
  padding: 1rem 0;
  border-top: 1px solid var(--divider-dark);
  color: var(--text-light-soft);
}

.footer-column h4 {
  margin-bottom: 10px;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-light);
}

/* ============================= */
/* FOOTER REFACTOR */
/* ============================= */

.footer-grid {
  padding: 2.5rem 0;

  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 2rem;
}

/* Make brand take more space */
.footer-brand {
  max-width: 320px;
}

/* ============================= */
/* SOCIAL CLEAN LAYOUT */
/* ============================= */

.footer-column:last-child {
  grid-column: span 2;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.social-links a {
  width: 42px;
  height: 42px;

  border-radius: 50%;
  background: rgba(255,255,255,0.06);

  display: flex;
  align-items: center;
  justify-content: center;

  transition: all 0.25s ease;
}

.social-links a:hover {
  background: #e5e7eb; /* light gray */
  color: var(--text);
  transform: translateY(-3px);
}


/* ============================= */
/* FOOTER MOBILE FIX (PRODUCTION SAFE) */
/* ============================= */

@media (max-width: 768px) {

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .footer-brand {
    text-align: center;
    max-width: 100%;
  }

  .footer-description {
    margin: 0 auto;
  }

  .footer-column {
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 12px;
  }

  .footer-column h4 {
    margin-bottom: 8px;
  }

  .footer-column a {
    padding: 2px 0;
  }

  /* SOCIAL CENTERED */
  .social-links {
    justify-content: center;
    margin-top: 15px;
  }

  .footer-bottom {
    font-size: 0.8rem;
    padding: 1.2rem 0;
  }

}


/* ======================================== */
/* SERVICES MOBILE OPTIMIZATION (PRO LEVEL) */
/* ======================================== */
@media (max-width: 640px) {

  .services-grid {
    justify-items: center;    /* 🔥 center cards */
  }

  .service-card {
    width: 90%;             /* 🔥 not full width */
    max-width: 320px;       /* 🔥 control size */
    margin: 0 auto;
  }

  .service-img {
    height: auto;             /* 🔥 allow natural height */
    max-height: 140px;        /* 🔥 control size */
    object-fit: contain;      /* 🔥 show full image */
    background: #f3f4f6;    /* 🔥 clean background if gaps */
  }

  .service-content {
  padding: 12px;             /* smaller padding */
  }

  .service-content h3 {
  font-size: 1rem;
  }

  .service-content p {
    font-size: 0.82rem;
  }

  /* Button tighter */
  .service-btn {
    margin-top: 10px;
    min-height: 38px;
    font-size: 0.85rem;
  }

}


/* ======================================== */
/* PRODUCTS MOBILE OPTIMIZATION (PRO LEVEL) */
/* ======================================== */
@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .product-img-wrapper {
    height: 140px;
  }
}


/* ================================= */
/* ABOUT BACKGROUND */
/* ================================= */
@media (max-width: 640px) {

  .about-bg::before {
    background-size: 500px; /* smaller for mobile */
    opacity: 0.04; /* even lighter */
  }

}


/* ============================= */
/* RESPONSIVE */
/* ============================= */

@media (max-width: 900px) {

  .feature-grid,
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: span 2;
  }

}

/* ============================= */
/* MOBILE HEADER FIX */
/* ============================= */
@media (max-width: 640px) {

  .site-logo {
    height: 64px;
  }

  .header-inner {
    flex-direction: row;
    justify-content: space-between;
    padding: 0.55rem 0;

    position: relative;
  }

  .menu-toggle {
    display: flex;
    z-index: 1200;
    
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);

    z-index: 2001;
  }

  /* Mobile overlay nav */
  .site-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: min(82%, 340px);
    height: 100vh;
    background: var(--primary);

    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;

    padding: 2rem 1.5rem;
    transition: right 0.3s ease;
    z-index: 1060;
    box-shadow: -18px 0 40px rgba(0, 0, 0, 0.15);
  }

  /* OPEN STATE */
  .site-nav.open {
    right: 0;
  }

  /* NAV LINKS */
  .site-nav a {
    font-size: 1.25rem;
    margin: 10px 0;
    padding: 8px 0;
  }

  .site-nav a:hover,
  .site-nav a.active {
    border-bottom: 2px solid var(--text);
  }

  .desktop-only {
    display: none;
  }

  .mobile-only {
    display: inline-flex;
    margin-top: 15px;
  }

  .feature-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-brand {
    grid-column: span 1;
  }

  .hero {
    padding: 3.5rem 0 3rem;
  }

    /* ========================================
    MOBILE ACTION BUTTONS
  ======================================== */

  .hero-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 1.5rem;
  }

  .hero-actions .btn {
    width: auto;
    min-width: 140px;
    min-height: 44px;
    padding: 0 20px;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  /* Other card actions can remain stacked on mobile */
  .card-actions,
  .card-actions-franchise {
    flex-direction: column;
  }

  .card-actions .btn,
  .card-actions-franchise .btn {
    width: 100%;
  }

}