:root {
  --fer-rose: #e86f7f;
  --fer-rose-dark: #c94f64;
  --fer-ink: #211a2d;
  --fer-muted: #6f6878;
  --fer-line: #eadfe2;
  --fer-soft: #fff6f4;
  --fer-mint: #1f9d8a;
  --fer-shadow: 0 18px 46px rgba(43, 31, 45, .13);
}

html { scroll-behavior: smooth; }
body {
  color: var(--fer-ink);
  background:
    radial-gradient(circle at top left, rgba(232,111,127,.12), transparent 34rem),
    linear-gradient(180deg, #fffafa 0%, #fbf7f4 48%, #ffffff 100%);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

header, .navbar, .container > header:first-child {
  letter-spacing: 0;
}

h1, h2, h3, .product-title, .section-title {
  color: var(--fer-ink);
  letter-spacing: 0;
}

p, label, .subtitle, .product-description, .text-muted {
  color: var(--fer-muted);
}

a { color: var(--fer-rose-dark); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--fer-mint); }

button, .btn, .pay-btn, input[type="submit"] {
  border-radius: 8px !important;
  font-weight: 750 !important;
  letter-spacing: 0 !important;
  box-shadow: 0 10px 24px rgba(201, 79, 100, .18);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
}
button:hover, .btn:hover, .pay-btn:hover, input[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(201, 79, 100, .22);
}

input, select, textarea, .form-control, .form-select {
  border-radius: 8px !important;
  border: 1px solid var(--fer-line) !important;
  background-color: #fff !important;
  color: var(--fer-ink) !important;
  box-shadow: none !important;
}
input:focus, select:focus, textarea:focus, .form-control:focus, .form-select:focus {
  border-color: var(--fer-rose) !important;
  box-shadow: 0 0 0 .2rem rgba(232, 111, 127, .16) !important;
}

.card, .checkout-content, .order-summary, .payment-form, .form-container, .login-card,
.container > .checkout-content, form {
  border-radius: 8px !important;
}

/* Homepage */
body.bg-body-tertiary {
  background: #fffaf8 !important;
}
body.bg-body-tertiary > .container,
body.bg-body-tertiary main,
body.bg-body-tertiary .container-fluid {
  max-width: 1180px;
}
body.bg-body-tertiary img[src*="ferliny-logo-hd"] {
  width: 190px !important;
  max-height: 58px !important;
  object-fit: contain;
}
body.bg-body-tertiary .btn,
body.bg-body-tertiary a.btn {
  padding: .78rem 1.25rem !important;
}
body.bg-body-tertiary h1 {
  max-width: 800px;
  font-weight: 850;
  line-height: 1.05;
}
body.bg-body-tertiary .lead,
body.bg-body-tertiary .subtitle {
  font-size: clamp(1rem, 2.4vw, 1.3rem);
}

/* Login */
body:has(form) img[src*="ferliny-logo-hd"] {
  width: 172px !important;
  max-height: 56px !important;
  object-fit: contain;
}
body:has(form) .container {
  max-width: 1120px;
}
body:has(form) form .btn,
body:has(form) button[type="submit"] {
  background: linear-gradient(135deg, var(--fer-rose), var(--fer-rose-dark)) !important;
  border: 0 !important;
  color: #fff !important;
}

/* Registration */
.progress-step, .step, .step-number {
  border-radius: 999px !important;
}
.active .step-number, .step.active, .progress-step.active {
  background: var(--fer-rose) !important;
  color: #fff !important;
}

/* Kloxe payment */
.checkout-content {
  overflow: hidden;
  box-shadow: var(--fer-shadow) !important;
  border: 1px solid rgba(232,111,127,.18) !important;
}
.checkout-content header, .container > header:first-child {
  background: linear-gradient(135deg, #ef7f8e 0%, #d45d71 100%) !important;
  color: #fff !important;
  border-radius: 8px 8px 0 0 !important;
}
.container > header:first-child h1,
.container > header:first-child p,
.checkout-content header h1,
.checkout-content header p {
  color: #fff !important;
}
.order-summary, .payment-form {
  background: #fff !important;
}
.product {
  border: 1px solid #f1e7e8 !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, #fff, #fffaf9) !important;
}
.product-img {
  border-radius: 8px !important;
  background: #fff3f1 !important;
}
.total-row, .order-total {
  border-color: #efe3e4 !important;
}
.instruction-box {
  background: #fff8ef !important;
  border: 1px solid #f1dfc1 !important;
  border-radius: 8px !important;
  word-break: break-word;
  overflow-wrap: anywhere;
}
#mm_instruction a {
  display: inline-flex;
  max-width: 100%;
  overflow-wrap: anywhere;
  font-weight: 750;
}
.pay-btn, #submit-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--fer-rose), var(--fer-rose-dark)) !important;
  border: 0 !important;
  color: #fff !important;
  min-height: 52px;
}
.operator-logo {
  border-radius: 8px !important;
  border: 1px solid #efe3e4 !important;
  background: #fff !important;
}

@media (max-width: 768px) {
  body { font-size: 15px; }
  h1 { font-size: clamp(2rem, 9vw, 3rem) !important; line-height: 1.08 !important; }
  h2 { font-size: clamp(1.35rem, 6vw, 2rem) !important; }
  .container { width: min(100% - 24px, 1120px) !important; padding-left: 0 !important; padding-right: 0 !important; }
  .checkout-content { display: block !important; }
  .order-summary, .payment-form { width: 100% !important; padding: 24px !important; }
  .product { gap: 14px !important; align-items: flex-start !important; }
  .product-info { min-width: 0; }
  .product-description, .instruction-box, #mm_instruction { white-space: normal !important; }
  .total-row { gap: 12px; }
}
@media (max-width: 768px) {
  body.bg-body-tertiary h1 {
    margin-top: 28px !important;
  }
}
/* Second design pass: homepage depth and rhythm */
body.bg-body-tertiary .navbar-fixed {
  position: sticky !important;
  top: 0;
  z-index: 40;
  background: rgba(255, 250, 248, .92) !important;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(232, 111, 127, .18);
  box-shadow: 0 10px 28px rgba(35, 25, 42, .08);
}
body.bg-body-tertiary .navbar-fixed .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 12px !important;
  padding-bottom: 12px !important;
}
body.bg-body-tertiary .navbar-fixed .btn:first-of-type {
  background: #fff !important;
  color: var(--fer-rose-dark) !important;
  border: 1px solid rgba(201, 79, 100, .35) !important;
  box-shadow: none;
}
body.bg-body-tertiary .navbar-fixed .btn:last-of-type {
  background: linear-gradient(135deg, var(--fer-rose), var(--fer-rose-dark)) !important;
  color: #fff !important;
  border: 0 !important;
}
body.bg-body-tertiary .navbar-fixed + .container {
  width: min(100%, 1180px) !important;
  min-height: clamp(620px, 82vh, 780px);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 24px 58px rgba(23, 16, 28, .22);
}
body.bg-body-tertiary .navbar-fixed + .container::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(20, 12, 20, .72), rgba(20, 12, 20, .38) 46%, rgba(20, 12, 20, .56)),
    radial-gradient(circle at 35% 32%, rgba(232, 111, 127, .3), transparent 28rem);
  pointer-events: none;
}
body.bg-body-tertiary .navbar-fixed + .container > .row {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: clamp(42px, 7vw, 82px) clamp(18px, 4vw, 54px);
}
body.bg-body-tertiary .navbar-fixed + .container h1,
body.bg-body-tertiary .navbar-fixed + .container .lead,
body.bg-body-tertiary .navbar-fixed + .container p {
  text-shadow: 0 2px 18px rgba(0, 0, 0, .32);
}
body.bg-body-tertiary .navbar-fixed + .container form {
  background: rgba(255, 255, 255, .92) !important;
  color: var(--fer-ink);
  border: 1px solid rgba(255, 255, 255, .65);
  box-shadow: 0 22px 50px rgba(0, 0, 0, .25);
  backdrop-filter: blur(10px);
  padding: clamp(20px, 4vw, 30px) !important;
}
body.bg-body-tertiary .navbar-fixed + .container form h2,
body.bg-body-tertiary .navbar-fixed + .container form label,
body.bg-body-tertiary .navbar-fixed + .container form p {
  color: var(--fer-ink) !important;
  text-shadow: none !important;
}
body.bg-body-tertiary .navbar-fixed + .container form h2 {
  font-weight: 850;
}
body.bg-body-tertiary .navbar-fixed + .container form .btn,
body.bg-body-tertiary .navbar-fixed + .container form button {
  background: linear-gradient(135deg, var(--fer-rose), var(--fer-rose-dark)) !important;
  color: #fff !important;
  border: 0 !important;
  min-height: 50px;
}

body.bg-body-tertiary #features {
  padding-top: 72px !important;
  padding-bottom: 72px !important;
}
body.bg-body-tertiary #features .row > [class*="col"],
body.bg-body-tertiary .city-card,
body.bg-body-tertiary .card.border-0,
body.bg-body-tertiary .card.shadow,
body.bg-body-tertiary .card.shadow-sm {
  border: 1px solid rgba(232, 111, 127, .14) !important;
  border-radius: 8px !important;
  box-shadow: 0 18px 42px rgba(38, 24, 44, .09) !important;
  background: #fff !important;
}
body.bg-body-tertiary #features .row > [class*="col"] {
  padding: 28px 22px;
}
body.bg-body-tertiary section.bg-light {
  background: linear-gradient(180deg, #fff8f7 0%, #fff 100%) !important;
}
body.bg-body-tertiary .stats-section {
  background: linear-gradient(135deg, #2b2035 0%, #50334d 52%, #c95a6c 100%) !important;
  color: #fff;
  padding: clamp(58px, 9vw, 92px) 0 !important;
}
body.bg-body-tertiary .stats-section h2,
body.bg-body-tertiary .stats-section h3,
body.bg-body-tertiary .stats-section p {
  color: #fff !important;
}
body.bg-body-tertiary .stats-section .row.mt-5 > [class*="col"] {
  padding: 18px;
}
body.bg-body-tertiary .app-download {
  background: linear-gradient(135deg, #fff4f1, #f6fbf8) !important;
  border-top: 1px solid rgba(232, 111, 127, .14);
  border-bottom: 1px solid rgba(232, 111, 127, .14);
}
body.bg-body-tertiary footer,
body.bg-body-tertiary .bg-dark {
  background: #211a2d !important;
}

@media (min-width: 769px) {
  body.bg-body-tertiary .navbar-fixed + .container form {
    max-width: 430px;
    margin-left: auto;
  }
}

@media (max-width: 768px) {
  body.bg-body-tertiary .navbar-fixed {
    position: sticky !important;
  }
  body.bg-body-tertiary .navbar-fixed .container {
    flex-wrap: wrap;
    justify-content: center;
  }
  body.bg-body-tertiary .navbar-fixed + .container {
    width: 100% !important;
    min-height: auto;
    border-radius: 0;
  }
  body.bg-body-tertiary .navbar-fixed + .container > .row {
    padding: 30px 12px 42px;
  }
  body.bg-body-tertiary .navbar-fixed + .container h1 {
    font-size: clamp(2.18rem, 10vw, 3.05rem) !important;
    margin-top: 0 !important;
  }
  body.bg-body-tertiary .navbar-fixed + .container form {
    margin-top: 28px !important;
  }
  body.bg-body-tertiary #features .row > [class*="col"] {
    margin-bottom: 14px;
  }
}
/* Hero-section targeted polish */
body.bg-body-tertiary .hero-section{width:min(100%,1180px)!important;min-height:clamp(620px,82vh,780px);margin:0 auto;display:flex;align-items:center;position:relative;overflow:hidden;border-radius:0 0 8px 8px;box-shadow:0 24px 58px rgba(23,16,28,.22)}
body.bg-body-tertiary .hero-section::before{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(20,12,20,.74),rgba(20,12,20,.38) 46%,rgba(20,12,20,.58)),radial-gradient(circle at 34% 30%,rgba(232,111,127,.32),transparent 28rem);pointer-events:none}
body.bg-body-tertiary .hero-section>.container,body.bg-body-tertiary .hero-section>.row,body.bg-body-tertiary .hero-section .row.align-items-center{position:relative;z-index:1;width:100%}
body.bg-body-tertiary .hero-section .row.align-items-center{padding:clamp(42px,7vw,82px) clamp(18px,4vw,54px)}
body.bg-body-tertiary .hero-section h1{max-width:760px;margin-top:0!important;text-wrap:balance}
body.bg-body-tertiary .hero-section .lead{max-width:650px}
body.bg-body-tertiary .hero-section h1,body.bg-body-tertiary .hero-section .lead,body.bg-body-tertiary .hero-section p{text-shadow:0 2px 18px rgba(0,0,0,.36)}
body.bg-body-tertiary .hero-section form{background:rgba(255,255,255,.93)!important;color:var(--fer-ink);border:1px solid rgba(255,255,255,.65);box-shadow:0 22px 50px rgba(0,0,0,.25);backdrop-filter:blur(10px);padding:clamp(20px,4vw,30px)!important}
body.bg-body-tertiary .hero-section form h2,body.bg-body-tertiary .hero-section form label,body.bg-body-tertiary .hero-section form p{color:var(--fer-ink)!important;text-shadow:none!important}
body.bg-body-tertiary .hero-section form h2{font-weight:850}
body.bg-body-tertiary .hero-section form .btn,body.bg-body-tertiary .hero-section form button{background:linear-gradient(135deg,var(--fer-rose),var(--fer-rose-dark))!important;color:#fff!important;border:0!important;min-height:50px}
@media (min-width:769px){body.bg-body-tertiary .hero-section form{max-width:430px;margin-left:auto}}
@media (max-width:768px){body.bg-body-tertiary .hero-section{width:100%!important;min-height:auto;border-radius:0}body.bg-body-tertiary .hero-section .row.align-items-center{padding:34px 12px 44px}body.bg-body-tertiary .hero-section h1{font-size:clamp(2.22rem,10vw,3.05rem)!important;line-height:1.07!important}body.bg-body-tertiary .hero-section form{margin-top:28px!important}}
/* Hero top alignment: nav buttons over the welcome image */
body.bg-body-tertiary {
  padding-top: 0 !important;
}
body.bg-body-tertiary .navbar-fixed {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  background: transparent !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}
body.bg-body-tertiary .navbar-fixed .container-fluid.bg-custom {
  background: rgba(18, 12, 24, .28) !important;
  border-bottom: 1px solid rgba(255, 255, 255, .18);
  box-shadow: none !important;
  backdrop-filter: blur(14px);
}
body.bg-body-tertiary .navbar-fixed .container {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}
body.bg-body-tertiary .navbar-fixed .btn:first-of-type {
  background: rgba(255, 255, 255, .92) !important;
  color: var(--fer-rose-dark) !important;
  border-color: rgba(255, 255, 255, .78) !important;
}
body.bg-body-tertiary .navbar-fixed .btn:last-of-type {
  background: linear-gradient(135deg, var(--fer-rose), var(--fer-rose-dark)) !important;
  border: 0 !important;
}
body.bg-body-tertiary .hero-section {
  margin-top: 0 !important;
  padding-top: 118px !important;
  min-height: clamp(680px, 94vh, 840px) !important;
  background-position: center top !important;
}
body.bg-body-tertiary .hero-section .row.align-items-center {
  padding-top: clamp(22px, 4vw, 42px) !important;
}
@media (max-width: 768px) {
  body.bg-body-tertiary .navbar-fixed .container-fluid.bg-custom {
    background: rgba(18, 12, 24, .42) !important;
  }
  body.bg-body-tertiary .navbar-fixed .container {
    gap: 10px !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }
  body.bg-body-tertiary img[src*="ferliny-logo-hd"] {
    width: 158px !important;
    max-height: 50px !important;
  }
  body.bg-body-tertiary .navbar-fixed .btn,
  body.bg-body-tertiary .navbar-fixed a.btn {
    padding: .62rem .9rem !important;
    font-size: .92rem !important;
  }
  body.bg-body-tertiary .hero-section {
    padding-top: 146px !important;
    min-height: auto !important;
    background-position: center top !important;
  }
}
/* Header buttons alignment fix */
body.bg-body-tertiary .navbar-fixed .d-flex.flex-wrap {
  flex-wrap: nowrap !important;
  gap: 16px !important;
}
body.bg-body-tertiary .navbar-fixed .col-md-3 {
  width: auto !important;
  flex: 1 1 auto !important;
  min-width: 0 !important;
  margin-bottom: 0 !important;
}
body.bg-body-tertiary .navbar-fixed .col-md-4.text-end {
  width: auto !important;
  flex: 0 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  white-space: nowrap !important;
}
body.bg-body-tertiary .navbar-fixed .col-md-4.text-end .btn {
  margin: 0 !important;
  white-space: nowrap !important;
  flex: 0 0 auto !important;
}
@media (max-width: 520px) {
  body.bg-body-tertiary .navbar-fixed .d-flex.flex-wrap {
    flex-wrap: wrap !important;
    justify-content: center !important;
  }
  body.bg-body-tertiary .navbar-fixed .col-md-3 {
    flex: 0 0 100% !important;
    display: flex !important;
    justify-content: center !important;
  }
  body.bg-body-tertiary .navbar-fixed .col-md-4.text-end {
    justify-content: center !important;
    width: 100% !important;
  }
}