/* =========================================================
   Royal Enfield Finance Page — style.css
   Full responsive redesign with real bike hero
   ========================================================= */

/* ---------- Reset & Variables ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --re-red:      #DA291C;
  --re-black:    #111111;
  --re-border:   #bbbbbb;
  --re-grey-bg:  #d0d0d0;
  --re-text:     #222222;
  --re-muted:    #444444;
  --font-head:   'Rajdhani', sans-serif;
  --font-body:   'Open Sans', sans-serif;
  --form-width:  660px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--re-text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

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

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  background: var(--re-black);
  height: 54px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 300;
}

.header-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

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

/* =========================================================
   HERO — white bg, full-width bike image
   ========================================================= */
.hero {
  background: #ffffff;
  position: relative;
}

.hero-inner {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  /* keep aspect ratio of the bikes.jpg (roughly 3.5:1) */
  overflow: hidden;
}

.lineup-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: center bottom;
}

/* Black double-rule divider matching reference */
.hero-divider {
  height: 0;
  border-top: 5px solid var(--re-black);
  border-bottom: 2px solid var(--re-black);
  margin-bottom: 0;
}

/* =========================================================
   MAIN — grey background zone
   ========================================================= */
.page-main {
  background: #fff;
  padding: 44px 20px 48px;
  text-align: center;
  position: relative;
}

/* ---- RE helmet badge (top-right) ---- */
.re-badge {
  position: absolute;
  top: 36px;
  right: clamp(16px, 4vw, 60px);
  opacity: 0.92;
}

/* ---- Heading ---- */
.main-heading {
  font-family: var(--font-head);
  font-size: clamp(26px, 4.8vw, 52px);
  font-weight: 700;
  color: var(--re-black);
  letter-spacing: 0.3px;
  line-height: 1.05;
  margin-bottom: 14px;
}

/* ---- Sub-heading ---- */
.sub-heading {
  font-size: clamp(13px, 1.6vw, 15px);
  color: var(--re-muted);
  line-height: 1.65;
  margin-bottom: 12px;
}

/* ---- Test ride link ---- */
.test-ride-link {
  display: inline-block;
  color: var(--re-red);
  font-size: clamp(13px, 1.5vw, 15px);
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 34px;
  transition: opacity .2s;
}
.test-ride-link:hover { opacity: .72; text-decoration: underline; }

/* =========================================================
   FORM — centred, white inputs
   ========================================================= */
.form-section {
  max-width: var(--form-width);
  margin: 0 auto;
  text-align: left;
}

/* Row spacing */
.form-row { margin-bottom: 12px; }

/* Two-column grid */
.form-row.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Pincode — half width */
.pincode-group {
  width: calc(50% - 7px);
}

.form-group { position: relative; }

/* ---- Base input ---- */
.form-input {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: 1.5px solid #656565;
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--re-text);
  background: #ffffff;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  appearance: none;
  -webkit-appearance: none;
}

.form-input::placeholder { color: #999; }

.form-input:focus {
  border-color: #777;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.06);
}

/* ---- Select dropdown ---- */
.select-wrap { position: relative; }

.form-select {
  cursor: pointer;
  padding-right: 40px;
  color: #666;
}
.form-select:valid,
.form-select option:not([disabled]) { color: var(--re-text); }

.select-arrow {
  position: absolute;
  right: 13px;
  top: 31%;
  transform: translateY(-50%);
  font-size: 22px;
  color: #555;
  pointer-events: none;
  line-height: 1;
}

/* ---- Mobile input with Verify ---- */
.phone-wrap { position: relative; }

.phone-wrap .form-input { padding-right: 72px; }

.verify-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--re-red);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .4px;
  cursor: pointer;
  padding: 4px 0;
  transition: opacity .2s;
}
.verify-btn:hover  { opacity: .72; }
.verify-btn:disabled { opacity: .45; cursor: default; }

/* ---- Disclaimer ---- */
.disclaimer-text {
  font-size: 14px;
  color: #212545;
  line-height: 22px;
  margin-top: 24px;
  margin-bottom: 14px;
}

.inline-link { color: inherit; text-decoration: underline; }

/* ---- Checkbox row ---- */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 24px;
}

.custom-checkbox {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 3px;
  cursor: pointer;
  accent-color: var(--re-red);
  border: 1.5px solid #aaa;
  border-radius: 2px;
}

.check-label {
  font-size: 13.5px;
  color: #222;
  line-height: 1.6;
  cursor: pointer;
}

.bold-link {
  font-weight: 700;
  color: var(--re-black);
  text-decoration: none;
}
.bold-link:hover { text-decoration: underline; }

/* ---- Submit button ---- */
.submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 28px;
  background: #fff;
  border: 1.5px solid #656565;
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--re-black);
  cursor: pointer;
  letter-spacing: .4px;
  transition: background .2s, color .2s, transform .15s;
}

.submit-btn:hover {
  background: var(--re-black);
  color: #fff;
  transform: translateX(2px);
}

.submit-btn:disabled { opacity: .6; cursor: default; transform: none; }

.btn-arrow { font-size: 20px; line-height: 1; }

/* ---- Terms footnote ---- */
.terms-footnote {
  font-size: 14px;
  color: #212545;
  text-align: center;
  margin-top: 40px;
  line-height: 1.75;
  /* max-width: 820px; */
  margin-left: auto;
  margin-right: auto;
  padding: 0 8px;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: var(--re-black);
  color: #fff;
  padding: 18px 24px 0px;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: start;
}

.footer-col { font-size: 12px; line-height: 1.75; }
.footer-terms  { text-align: center; }
.footer-contact{ text-align: right; }

.footer-col a { color: #fff; text-decoration: none; transition: color .2s; }
.footer-col a:hover { color: #fff; }

/* =========================================================
   POPUP MODAL
   ========================================================= */
.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  z-index: 999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.popup-overlay.active { display: flex; }

.popup-box {
  background: #fff;
  border-radius: 4px;
  padding: 36px 36px 28px;
  width: 100%;
  max-width: 340px;
  position: relative;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0,0,0,0.22);
  animation: popIn .2s ease;
}

@keyframes popIn {
  from { transform: scale(.86); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.popup-close {
  position: absolute;
  top: 10px;
  right: 13px;
  background: none;
  border: none;
  font-size: 15px;
  color: #999;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color .15s;
}
.popup-close:hover { color: #333; }

.popup-message {
  font-size: 15px;
  color: #222;
  line-height: 1.65;
  margin-bottom: 22px;
}

.popup-ok-btn {
  background: var(--re-black);
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 10px 40px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .5px;
  cursor: pointer;
  transition: background .2s;
}
.popup-ok-btn:hover { background: #333; }

/* =========================================================
   ANIMATIONS
   ========================================================= */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.main-heading   { animation: fadeUp .5s ease both; }
.sub-heading    { animation: fadeUp .55s ease .07s both; }
.test-ride-link { animation: fadeUp .6s  ease .14s both; }
.form-section   { animation: fadeUp .65s ease .2s  both; }

/* =========================================================
   RESPONSIVE — tablets & phones
   ========================================================= */

/* ---- ≤ 768px ---- */
@media (max-width: 768px) {

  .site-header { height: 48px; padding: 0 18px; }
  .logo-img    { height: 22px; }

  .re-badge { top: 14px; right: 14px; }
  .re-badge svg { width: 54px; height: 54px; }

  .main-heading { margin-bottom: 10px; }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }
  .footer-copy    { grid-column: 1 / -1; }
  .footer-terms   { text-align: left; }
  .footer-contact { text-align: right; }
}

/* ---- ≤ 560px ---- */
@media (max-width: 560px) {

  .page-main { padding: 36px 16px 50px; }

  .form-row.two-col {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .pincode-group { width: 100%; }

  .submit-btn { width: 100%; justify-content: center; }

  .footer-inner {
    grid-template-columns: 1fr;
  }
  .footer-terms   { text-align: left; }
  .footer-contact { text-align: left; }
}

/* ---- ≤ 380px ---- */
@media (max-width: 380px) {
  .main-heading { font-size: 22px; }
  .popup-box    { padding: 28px 22px 22px; }
}

/* =========================================================
   CUSTOM MOTORCYCLE DROPDOWN
   ========================================================= */

.moto-dropdown-wrap { position: relative; }

/* Trigger button — looks like the old select input */
.moto-trigger {
  width: 100%;
  height: 50px;
  padding: 0 16px;
  border: 1.5px solid #656565;
  border-radius: 3px;
  background: #fff;
  font-family: var(--font-body);
  font-size: 14px;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  transition: border-color .2s;
}
.moto-trigger:focus,
.moto-trigger.open { border-color: #777; color: var(--re-text); }

.moto-trigger.selected { color: var(--re-text); }

.moto-arrow {
  font-size: 22px;
  color: #555;
  margin-top: -15px;
  transition: transform .25s;
  line-height: 1;
}
/* .moto-arrow { display: inline-block; transition: transform .25s; } */
/* .moto-trigger.open .moto-arrow { transform: rotate(180deg); } */

/* Dropdown panel */
.moto-panel {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: max(100%, 560px);
  background: #1a1a1a;
  border-radius: 4px;
  padding: 20px 16px 16px;
  z-index: 500;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  animation: panelIn .18s ease;
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.moto-panel.open { display: block; }

/* Grid of bikes */
.moto-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px 10px;
}

/* Single bike card */
.moto-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background .18s, border-color .18s;
}

.moto-item:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
}

.moto-item.active {
  border-color: var(--re-red);
  background: rgba(218,41,28,0.1);
}

.moto-item img {
  width: 100%;
  max-width: 110px;
  height: 70px;
  object-fit: contain;
  display: block;
  margin-bottom: 6px;
}

.moto-item span {
  font-size: 11px;
  color: #ccc;
  text-align: center;
  line-height: 1.3;
  transition: color .18s;
}

.moto-item:hover span  { color: #fff; }
.moto-item.active span { color: var(--re-red); font-weight: 700; }

/* Centre last odd item */
.moto-item--center { grid-column: 2 / 4; }

/* =========================================================
   PHONE — static country code
   ========================================================= */

/* =========================================================
   PHONE — country code dropdown
   ========================================================= */

/* =========================================================
   PHONE — country code dropdown
   ========================================================= */

.phone-wrap {
  display: flex;
  align-items: stretch;
  position: relative;
}

/* ---- Shared double-arrow box (used in CC + Moto) ---- */
.cc-arrow-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin-left: 4px;
}

.cc-arr {
  width: 10px;
  height: 6px;
  display: block;
  color: #555;
  transition: color .15s;
}

/* Active arrow highlights */
.cc-trigger.open   .cc-arr-up,
.moto-trigger.open .cc-arr-up   { color: var(--re-red); }

.cc-trigger:not(.open) .cc-arr-down,
.moto-trigger:not(.open) .cc-arr-down { color: var(--re-red); }

/* ---- CC Trigger button ---- */
.cc-wrap { position: relative; flex-shrink: 0; }

.cc-trigger {
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 10px;
  border: 1.5px solid #656565;
  border-right: none;
  border-radius: 3px 0 0 3px;
  background: #f4f4f4;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--re-text);
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
  gap: 0;
}
.cc-trigger:hover { background: #eaeaea; }
.cc-trigger.open  { border-color: #777; background: #fff; }

/* ---- Dropdown panel ---- */
.cc-panel {
  display: none;
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  width: 90px;
  background: #fff;
  border: 1.5px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.13);
  z-index: 600;
  overflow: hidden;
  animation: panelIn .15s ease;
}
.cc-panel.open { display: block; }

/* Up / Down scroll buttons inside panel */
.cc-scroll-btn {
  width: 100%;
  height: 28px;
  background: #f7f7f7;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  transition: background .12s, color .12s;
  flex-shrink: 0;
}
.cc-scroll-btn:hover { background: #ececec; color: var(--re-red); }
.cc-scroll-btn svg   { width: 10px; height: 6px; }

/* Scrollable number list */
.cc-list {
  max-height: 180px;
  overflow-y: auto;
  scrollbar-width: none;       /* Firefox */
  -ms-overflow-style: none;    /* IE/Edge */
}
.cc-list::-webkit-scrollbar { display: none; }  /* Chrome/Safari */

/* Each code row */
.cc-option {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
  font-size: 13.5px;
  font-family: var(--font-body);
  color: #222;
  cursor: pointer;
  transition: background .1s;
  user-select: none;
}
.cc-option:hover  { background: #f5f5f5; }
.cc-option.active { background: #fff0ef; color: var(--re-red); font-weight: 700; }

/* ---- Phone input ---- */
.phone-input {
  border-radius: 0 3px 3px 0 !important;
  padding-right: 72px;
  flex: 1;
  min-width: 0;
}

/* ---- Moto arrow box position fix ---- */
.moto-arrow-box { margin-left: 6px; }

/* =========================================================
   RESPONSIVE — moto dropdown
   ========================================================= */
@media (max-width: 768px) {
  .moto-panel { width: max(100%, 340px); }
  .moto-grid  { grid-template-columns: repeat(3, 1fr); }
  .moto-item--center { grid-column: 2 / 3; }
}

@media (max-width: 480px) {
  .moto-panel { width: 100%; left: 0; right: 0; }
  .moto-grid  { grid-template-columns: repeat(2, 1fr); }
  .moto-item--center { grid-column: 1 / -1; }
  .moto-item img { height: 56px; }
}
