/* ================= COMPONENTS ================= */

/* Floating scrollbar */
.floating-scrollbar {
  position: fixed;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: min(58vh, 420px);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
  border: 1px solid rgba(255, 77, 109, 0.10);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.18),
    0 10px 24px rgba(18, 18, 30, 0.08);
  backdrop-filter: blur(10px);
  z-index: 50;
  pointer-events: auto;
  cursor: pointer;
  opacity: 0;
  transition:
    opacity 0.22s ease,
    width 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.floating-scrollbar.visible {
  opacity: 1;
}

.floating-scrollbar:hover {
  width: 14px;
  background: rgba(255, 255, 255, 0.46);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.24),
    0 14px 28px rgba(18, 18, 30, 0.11);
}

.floating-scrollbar-thumb {
  position: absolute;
  top: 0;
  left: 1px;
  width: calc(100% - 2px);
  min-height: 48px;
  border-radius: 999px;
  background: linear-gradient(
    180deg,
    rgba(255, 122, 145, 0.92) 0%,
    rgba(255, 77, 109, 0.98) 52%,
    rgba(255, 122, 145, 0.92) 100%
  );
  box-shadow:
    0 8px 18px rgba(255, 77, 109, 0.24),
    inset 0 1px 1px rgba(255, 255, 255, 0.34);
  cursor: grab;
  will-change: transform;
  transition:
    transform 0.08s linear,
    box-shadow 0.16s ease,
    filter 0.16s ease;
}

.floating-scrollbar:hover .floating-scrollbar-thumb {
  filter: saturate(1.05) brightness(1.02);
  box-shadow:
    0 10px 20px rgba(255, 77, 109, 0.28),
    inset 0 1px 1px rgba(255, 255, 255, 0.38);
}

.floating-scrollbar-thumb:active {
  cursor: grabbing;
}

body.scrollbar-dragging,
body.scrollbar-dragging * {
  user-select: none;
  cursor: grabbing !important;
}

/* Buttons */
button {
  font: inherit;
}

.btn,
button {
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 1px 0 rgba(18, 18, 30, 0.06);
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease, border-color 120ms ease, opacity 120ms ease;
}

.btn:focus-visible,
button:focus-visible,
.navbar nav a:focus-visible,
input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(255, 77, 109, 0.14);
  border-color: rgba(255, 77, 109, 0.45);
}

.btn:hover,
button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}

.btn:active,
button:active {
  transform: translateY(0);
}

.primary {
  background: linear-gradient(135deg, var(--accent), #ff6b88);
  color: white;
  border-color: rgba(255, 77, 109, 0.35);
  box-shadow: 0 10px 24px rgba(255, 77, 109, 0.25);
}

.primary:hover {
  box-shadow: 0 14px 30px rgba(255, 77, 109, 0.22);
}

.secondary {
  background: #ffffff;
  border: 1px solid var(--border);
}

button:disabled,
.btn:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
  box-shadow: none;
}

.btn-loading {
  position: relative;
}

/* Generic sections */
section {
  scroll-margin-top: 90px;
}

.section {
  padding: 28px 0 54px;
  border-top: 1px solid rgba(18, 18, 30, 0.04);
}

.section-head {
  text-align: center;
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0 0 6px;
  font-size: clamp(22px, 2.5vw, 30px);
  letter-spacing: -0.2px;
}

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

/* Badge */
.badge {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.65);
  padding: 8px 12px;
  border-radius: 999px;
  transition: transform 0.2s ease;
}

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

/* Card grids */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  justify-content: center;
}

.cards-upgraded {
  align-items: stretch;
}

/* Generic card */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  padding: 18px;
  border-radius: var(--radius-md);
  text-align: left;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  letter-spacing: -0.1px;
}

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

/* Feature card */
.feature-card {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(18, 18, 30, 0.10);
}

.feature-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  margin-bottom: 12px;
  font-size: 24px;
  background: rgba(255, 77, 109, 0.10);
}

.feature-card h3 {
  margin: 0 0 8px;
}

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

/* Step cards */
.step-card {
  position: relative;
  padding-top: 22px;
}

.step-circle {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  margin-bottom: 12px;
  font-weight: 800;
  color: white;
  background: linear-gradient(135deg, var(--accent), #ff6b88);
  box-shadow: 0 10px 24px rgba(255, 77, 109, 0.18);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 40px;
}

/* Responsive helpers */
@media (max-width: 768px) {
  .floating-scrollbar {
    display: none !important;
  }
}

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

.address-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.address-modal-box {
  width: min(680px, 94vw);
  max-height: 85vh;
  background: white;
  border-radius: 24px;
  padding: 26px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.24);
  display: flex;
  flex-direction: column;
}

#addressOptions {
  max-height: 48vh;
  overflow-y: auto;
  padding-right: 6px;
  margin-top: 12px;
}

.address-option {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 12px;
  cursor: pointer;
  background: #fff;
  transition: 0.18s ease;
}

.address-option:hover {
  border-color: #ff4f7b;
  box-shadow: 0 10px 24px rgba(255, 79, 123, 0.12);
}

.address-option input {
  margin-top: 5px;
  flex-shrink: 0;
}

.address-option strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.address-option small {
  display: inline-block;
  margin-top: 6px;
  color: #1b8a42;
  font-weight: 700;
}

.address-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.inline-address-form {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff8fb;
}

.inline-address-form input {
  width: 100%;
  margin-bottom: 10px;
}