/* =========================================================
   LUXMI MOTORS - Base Stylesheet
   Phase 1: just resets + color variables + the app-shell frame.
   Real page styling gets added phase by phase.
   ========================================================= */

:root {
  --red: #D81324;
  --red-dark: #A80E1C;
  --black: #0A0A0A;
  --gray-dark: #1E1E1E;
  --gray-mid: #6B6B6B;
  --gray-light: #F2F2F2;
  --white: #FFFFFF;

  --app-max-width: 480px;
  --radius: 14px;
}

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

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--gray-dark);
  color: var(--black);
  -webkit-font-smoothing: antialiased;
}

/* The "phone app" frame.
   On mobile it fills the screen edge to edge.
   On desktop it stays centered and narrow, like an app, not a website. */
.app-shell {
  max-width: var(--app-max-width);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--white);
  position: relative;
  overflow-x: hidden;
}

/* Tablet range only: keep the "phone app" card look. True desktop
   (960px+) switches to a full layout instead - see bottom of this file. */
@media (min-width: 600px) and (max-width: 959px) {
  .app-shell {
    min-height: 100vh;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.35);
  }
  body {
    display: flex;
    justify-content: center;
    padding: 24px 0;
  }
}

.desktop-nav {
  display: none;
}

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

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

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

/* =========================================================
   Phase 2: Top bar, bottom nav, floating buttons, chatbot sheet
   ========================================================= */

/* --- Top bar --- */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 56px;
  padding: 0 16px;
  background: var(--black);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.top-bar__brand {
  display: flex;
  align-items: center;
  height: 100%;
}

.top-bar__logo {
  height: 32px;
  width: auto;
}

.top-bar__call {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--red);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Page content area: leaves room for fixed bottom nav --- */
.page-content {
  padding-bottom: 84px; /* bottom-nav height + spacing */
  min-height: calc(100vh - 56px);
}

/* --- Bottom tab navigation --- */
.bottom-nav {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  background: var(--white);
  border-top: 1px solid var(--gray-light);
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 4px 8px;
  color: var(--gray-mid);
  font-size: 11px;
  font-weight: 600;
  min-height: 56px;
  justify-content: center;
  transition: color 0.15s ease;
}

.bottom-nav__item svg {
  transition: transform 0.15s ease;
}

.bottom-nav__item.is-active {
  color: var(--red);
}

.bottom-nav__item.is-active svg {
  transform: translateY(-2px);
}

/* --- Floating action buttons (chatbot + whatsapp) --- */
.fab-stack {
  position: fixed;
  right: 16px;
  bottom: 84px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: calc(var(--app-max-width) - 32px);
  margin-left: calc((100vw - var(--app-max-width)) / 2 * -1); /* stays anchored to app frame on desktop */
}

@media (min-width: 600px) {
  .fab-stack {
    right: calc((100vw - var(--app-max-width)) / 2 + 16px);
  }
}

.fab {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  position: relative;
}

.fab--chat {
  background: var(--red);
  color: var(--white);
}

.fab--whatsapp {
  background: #25D366;
  color: var(--white);
}

/* Gentle "help available" pulse ring on the chat button, not constant flashing */
.fab__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--red);
  animation: fab-pulse 2.6s ease-out infinite;
}

@keyframes fab-pulse {
  0% { transform: scale(1); opacity: 0.6; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* --- Chatbot bottom sheet --- */
.chatbot-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 39;
}

.chatbot-panel {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: 100%;
  max-width: var(--app-max-width);
  transform: translate(-50%, 100%);
  background: var(--white);
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25);
  z-index: 40;
  transition: transform 0.25s ease;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
}

.chatbot-panel.is-open {
  transform: translate(-50%, 0);
}

.chatbot-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.chatbot-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--black);
  color: var(--white);
  font-weight: 700;
  border-radius: 18px 18px 0 0;
}

.chatbot-panel__header button {
  color: var(--white);
  font-size: 22px;
  line-height: 1;
  padding: 4px 8px;
}

.chatbot-panel__body {
  padding: 18px;
  overflow-y: auto;
}

.chatbot-panel__placeholder {
  font-size: 14px;
  color: var(--gray-mid);
  line-height: 1.5;
}

.chatbot-panel__placeholder a {
  color: var(--red);
  font-weight: 700;
}

/* =========================================================
   Phase 3: Home page
   ========================================================= */

.section-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--black);
  margin-bottom: 4px;
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 260px;
  background: linear-gradient(160deg, var(--black) 0%, var(--red-dark) 130%);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 24px 20px 22px;
  background: linear-gradient(0deg, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.15) 90%);
  color: var(--white);
}

.hero__eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 6px;
}

.hero__title {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 8px;
}

.hero__subtitle {
  font-size: 14px;
  color: rgba(255,255,255,0.85);
  line-height: 1.5;
}

/* --- CTA row (Call / WhatsApp / Chat) --- */
.cta-row {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
}

.cta-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.cta-btn--primary {
  background: var(--red);
  color: var(--white);
}

.cta-btn--whatsapp {
  background: #25D366;
  color: var(--white);
}

.cta-btn--dark {
  background: var(--black);
  color: var(--white);
}

/* --- Business intro --- */
.intro {
  padding: 8px 20px 24px;
}

.intro__icon {
  margin-bottom: 10px;
}

@media (prefers-reduced-motion: no-preference) {
  .intro__icon svg {
    animation: tire-spin 9s linear infinite;
    transform-origin: 50% 50%;
  }
}

@keyframes tire-spin {
  to { transform: rotate(360deg); }
}

.intro__text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray-mid);
}

/* =========================================================
   Phase 6: Contact page
   ========================================================= */

.contact-block {
  padding: 6px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--black);
}

.hours-block {
  padding: 0 20px 20px;
}

.hours-block__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.hours-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
}

.hours-badge--open {
  background: #E4F3E0;
  color: #1F7A34;
}

.hours-badge--closed {
  background: #F5E1E1;
  color: var(--red-dark);
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.hours-table td {
  padding: 7px 0;
  border-bottom: 1px solid var(--gray-light);
  color: var(--gray-mid);
}

.hours-table td:last-child {
  text-align: right;
}

.hours-table tr.is-today td {
  color: var(--black);
  font-weight: 800;
}

.map-block {
  padding: 0 20px 20px;
}

.map-block iframe {
  border-radius: 12px;
  width: 100%;
  display: block;
}

.google-block {
  padding: 0 20px 20px;
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 1.5px solid var(--gray-light);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--black);
}

.social-block {
  padding: 0 20px 32px;
}

.social-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.social-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gray-light);
  color: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-block__notice {
  font-size: 11px;
  color: var(--gray-mid);
  font-style: italic;
  margin-top: 8px;
}

/* =========================================================
   Phase 5: Services page
   ========================================================= */

.page-header__subtitle {
  font-size: 13px;
  color: var(--gray-mid);
  margin-top: 4px;
}

.services-list {
  padding: 14px 20px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.service-card {
  display: flex;
  gap: 12px;
  background: var(--gray-light);
  border-radius: 12px;
  padding: 12px;
  align-items: flex-start;
}

.service-card__media {
  position: relative;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.service-card__icon {
  position: absolute;
}

.service-card__image {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-card__name {
  font-size: 14px;
  font-weight: 800;
  color: var(--black);
  margin-bottom: 3px;
}

.service-card__desc {
  font-size: 12px;
  color: var(--gray-mid);
  line-height: 1.45;
  margin-bottom: 5px;
}

.service-card__price {
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
}

.services-cta {
  padding: 10px 20px 26px;
}

/* =========================================================
   Phase 4: About Us page
   ========================================================= */

.page-header {
  padding: 20px 20px 4px;
}

.page-header__title {
  font-size: 24px;
  font-weight: 800;
  color: var(--black);
}

.about-block {
  padding: 14px 0;
}

.about-block__text {
  padding: 0 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--gray-mid);
  font-style: italic; /* signals placeholder copy until real text is added */
}

.about-block__icon {
  margin-bottom: 8px;
}

@media (prefers-reduced-motion: no-preference) {
  .about-block__icon svg {
    animation: wrench-tighten 2.8s ease-in-out infinite;
    transform-origin: 70% 70%;
  }
}

@keyframes wrench-tighten {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-18deg); }
  50% { transform: rotate(0deg); }
  75% { transform: rotate(18deg); }
}

/* --- Team --- */
.team-section {
  padding: 8px 20px 28px;
}

.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 14px;
}

.team-card {
  background: var(--gray-light);
  border-radius: 12px;
  padding: 14px 12px;
  text-align: center;
}

.team-card__photo {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #E5E4DE;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.team-card__placeholder-icon {
  position: absolute;
}

.team-card__photo img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card__name {
  font-size: 13px;
  font-weight: 800;
  color: var(--black);
}

.team-card__position {
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  margin-bottom: 3px;
}

.team-card__experience {
  font-size: 10px;
  color: var(--gray-mid);
  margin-bottom: 5px;
}

.team-card__bio {
  font-size: 11px;
  color: var(--gray-mid);
  line-height: 1.4;
}

/* --- Photo gallery --- */
.gallery-section {
  padding: 8px 0 24px;
}

.gallery {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px 20px 4px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.gallery__item {
  position: relative;
  flex: 0 0 140px;
  height: 100px;
  border-radius: 10px;
  background: var(--gray-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  scroll-snap-align: start;
}

.gallery__placeholder-icon {
  position: absolute;
}

.gallery__image {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- Notice board --- */
.notices {
  padding: 8px 20px 24px;
}

.notices__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notices__manage-link {
  font-size: 11px;
  font-weight: 700;
  color: var(--gray-mid);
  text-decoration: underline;
}

.notices__empty {
  font-size: 13px;
  color: var(--gray-mid);
  margin-top: 12px;
}

.notices__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.notice-card {
  background: var(--gray-light);
  border-left: 4px solid var(--red);
  border-radius: 0 10px 10px 0;
  padding: 12px 14px;
  overflow: hidden;
}

.notice-card__image {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  border-radius: 6px;
  margin: -12px -14px 10px;
  width: calc(100% + 28px);
}

.notice-card__date {
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}

.notice-card__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--black);
  margin-bottom: 3px;
}

.notice-card__body {
  font-size: 13px;
  color: var(--gray-mid);
  line-height: 1.4;
}

/* --- Customer reviews --- */
.reviews {
  padding: 8px 0 8px;
}

.reviews__notice {
  padding: 0 20px;
  font-size: 11px;
  color: var(--gray-mid);
  font-style: italic;
  margin-bottom: 10px;
}

.reviews__list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 20px 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.review-card {
  flex: 0 0 220px;
  background: var(--gray-light);
  border-radius: 12px;
  padding: 14px;
  scroll-snap-align: start;
}

.review-card__stars {
  color: var(--red);
  font-size: 14px;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.review-card__quote {
  font-size: 13px;
  color: var(--black);
  line-height: 1.5;
  margin-bottom: 8px;
}

.review-card__name {
  font-size: 12px;
  color: var(--gray-mid);
  font-weight: 700;
}

/* --- Services teaser --- */
.services-teaser {
  padding: 4px 20px 28px;
}

.services-teaser__link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px;
  border: 1.5px solid var(--red);
  border-radius: 12px;
  color: var(--red);
  font-weight: 700;
  font-size: 14px;
}

/* =========================================================
   Desktop layout (960px and wider)
   Mobile styles above are untouched - this section only adds
   overrides for larger screens. Below 960px, everything still
   behaves like the mobile/tablet app.
   ========================================================= */
@media (min-width: 960px) {

  .app-shell {
    max-width: 1280px;
  }

  /* --- Top bar becomes a full desktop nav bar --- */
  .top-bar {
    height: 72px;
    padding: 0 40px;
  }

  .top-bar__logo {
    height: 40px;
  }

  .desktop-nav {
    display: flex;
    gap: 32px;
  }

  .desktop-nav__item {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.75);
    padding: 4px 0;
    border-bottom: 2px solid transparent;
  }

  .desktop-nav__item.is-active,
  .desktop-nav__item:hover {
    color: var(--white);
    border-bottom-color: var(--red);
  }

  .top-bar__call {
    width: 42px;
    height: 42px;
  }

  /* Bottom tab bar is a mobile pattern - hide it on desktop, the
     desktop-nav in the top bar replaces it. */
  .bottom-nav {
    display: none;
  }

  .page-content {
    padding-bottom: 0;
    min-height: calc(100vh - 72px);
  }

  /* Floating buttons just anchor to the viewport corner now that
     there's no bottom nav to clear. */
  .fab-stack {
    right: 32px;
    bottom: 32px;
    margin-left: 0;
  }

  .chatbot-panel {
    max-width: 380px;
    left: auto;
    right: 32px;
    bottom: 32px;
    transform: translateY(120%);
    border-radius: 16px;
  }

  .chatbot-panel.is-open {
    transform: translateY(0);
  }

  .chatbot-panel__header {
    border-radius: 16px 16px 0 0;
  }

  /* --- Hero --- */
  .hero {
    min-height: 440px;
  }

  .hero__overlay {
    padding: 50px 60px;
  }

  .hero__title {
    font-size: 42px;
    max-width: 620px;
  }

  .hero__subtitle {
    font-size: 16px;
    max-width: 520px;
  }

  /* --- CTA row: fixed-width buttons instead of stretching edge to edge --- */
  .cta-row {
    padding: 28px 60px;
    gap: 16px;
    justify-content: flex-start;
  }

  .cta-btn {
    flex: 0 0 auto;
    flex-direction: row;
    padding: 13px 26px;
    font-size: 14px;
    gap: 8px;
  }

  /* --- Shared content width for text/grid sections --- */
  .intro,
  .about-block,
  .team-section,
  .page-header {
    padding-left: 60px;
    padding-right: 60px;
  }

  .intro__text,
  .about-block__text {
    max-width: 680px;
    font-size: 15px;
  }

  .page-header__title {
    font-size: 36px;
  }

  /* --- Gallery: grid instead of horizontal scroll --- */
  .gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow-x: visible;
    padding: 12px 60px 4px;
  }

  .gallery__item {
    width: 100%;
    height: 170px;
  }

  /* --- Notice board: grid instead of stacked list --- */
  .notices {
    padding: 8px 60px 32px;
  }

  .notices__list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }

  /* --- Reviews: grid instead of horizontal scroll --- */
  .reviews__list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    overflow-x: visible;
    padding: 0 60px 6px;
  }

  .reviews__notice {
    padding-left: 60px;
  }

  /* --- Services teaser --- */
  .services-teaser {
    padding: 4px 60px 40px;
  }

  .services-teaser__link {
    max-width: 320px;
  }

  /* --- Team grid: all 5 members in a row --- */
  .team-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
  }

  /* --- Services page: multi-column cards --- */
  .services-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    padding: 16px 60px 8px;
  }

  .services-cta {
    padding: 12px 60px 40px;
  }

  .services-cta .cta-btn {
    max-width: 320px;
  }

  /* --- Contact page: centered, comfortable reading width --- */
  .contact-block,
  .hours-block,
  .map-block,
  .google-block,
  .social-block {
    max-width: 640px;
    margin: 0 auto;
    padding-left: 60px;
    padding-right: 60px;
    width: 100%;
    box-sizing: border-box;
  }

  /* --- Admin panel: keep it phone-width even on desktop, it's a
     simple internal tool and wide form fields are hard to use --- */
  .admin-wrap {
    max-width: 480px;
    margin: 0 auto;
  }
}