
:root {
  --green: #176b45;
  --green-dark: #104b32;
  --green-light: #e9f5ed;
  --orange: #f39b36;
  --ink: #1b2b22;
  --muted: #718078;
  --surface: #ffffff;
  --background: #f5f8f5;
  --border: #e1e9e2;
  --danger: #b42318;
  --radius: 18px;

  font-family: "DM Sans", Arial, sans-serif;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, #e4f3e7 0, transparent 32rem),
    var(--background);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgb(243 155 54 / 65%);
  outline-offset: 3px;
}

/* Header */

.site-header {
  width: min(100%, 1168px);
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand__icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--green-light);
  border-radius: 15px;
  font-size: 25px;
}

.brand__text {
  min-width: 0;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 15px;
  letter-spacing: -0.3px;
}

.brand small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.header-link {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
}

.header-link:hover,
.text-button:hover {
  text-decoration: underline;
}

/* Main layout */

.page {
  width: min(calc(100% - 32px), 720px);
  margin: 36px auto 70px;
  flex: 1;
}

.hero {
  text-align: center;
  margin: 0 auto 32px;
  max-width: 570px;
}

.eyebrow {
  color: var(--green);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.8px;
}

.hero h1 {
  margin: 12px 0;
  font-size: clamp(34px, 7vw, 51px);
  line-height: 1.08;
  letter-spacing: -2px;
}

.hero h1 span {
  color: var(--green);
}

.hero > p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  margin: 0 auto;
  max-width: 450px;
}

/* Cards */

.tracking-card,
.result-card,
.help-note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 36px rgb(25 61 37 / 5%);
}

.tracking-card {
  padding: clamp(20px, 5vw, 32px);
}

.card-heading {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 27px;
}

.heading-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: var(--green-light);
  border-radius: 14px;
  font-size: 22px;
}

.card-heading h2,
.result-header h2 {
  font-size: 20px;
  margin: 0 0 6px;
  letter-spacing: -0.5px;
}

.card-heading p,
.result-header p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

/* Tracking form */

.field {
  display: grid;
  gap: 9px;
  margin-bottom: 20px;
}

.field label {
  font-size: 13px;
  font-weight: 700;
}

.field input {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 15px 14px;
  border: 1px solid #d7e2d8;
  border-radius: 11px;
  outline: none;
  color: var(--ink);
  background: #fcfdfc;
  transition: border-color 160ms, box-shadow 160ms;
}

.field input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgb(23 107 69 / 10%);
}

.field input::placeholder {
  color: #9aa69d;
  font-size: 13px;
}

.form-message {
  margin: 12px 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--danger);
}

.form-message:empty {
  display: none;
}

/* Submit button */

.primary-button {
  width: 100%;
  min-height: 51px;
  padding: 14px 18px;
  border: 0;
  border-radius: 11px;
  color: #ffffff;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 800;
  cursor: pointer;
  transition: background 160ms, transform 160ms, box-shadow 160ms;
}

.primary-button:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 15px rgb(16 75 50 / 12%);
}

.primary-button:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.spinner {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  border: 2px solid rgb(255 255 255 / 45%);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

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

/* Order result */

.result-card {
  margin-top: 24px;
  padding: clamp(20px, 5vw, 30px);
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 23px;
  border-bottom: 1px solid var(--border);
}

.result-header h2 {
  margin-top: 7px;
  overflow-wrap: anywhere;
}

.muted {
  color: var(--muted);
}

.status-badge {
  flex-shrink: 0;
  padding: 8px 11px;
  border-radius: 999px;
  background: #fff4df;
  color: #8a5b12;
  font-size: 11px;
  font-weight: 800;
}

.status-badge.is-complete {
  background: var(--green-light);
  color: var(--green);
}

.status-badge.is-cancelled {
  background: #fdebea;
  color: var(--danger);
}

/* Progress timeline */

.timeline {
  padding: 27px 0 10px;
}

.timeline-step {
  display: flex;
  gap: 15px;
  min-height: 90px;
  position: relative;
  opacity: 0.45;
}

.timeline-step::after {
  content: "";
  position: absolute;
  top: 36px;
  bottom: 0;
  left: 16px;
  width: 2px;
  background: #dfe7e0;
}

.timeline-step:last-child {
  min-height: 58px;
}

.timeline-step:last-child::after {
  display: none;
}

.timeline-marker {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 2px solid #d8e1d9;
  border-radius: 50%;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.timeline-step h3 {
  margin: 3px 0 5px;
  font-size: 14px;
}

.timeline-step p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.timeline-step.is-complete,
.timeline-step.is-current {
  opacity: 1;
}

.timeline-step.is-complete .timeline-marker {
  background: var(--green);
  color: #ffffff;
  border-color: var(--green);
}

.timeline-step.is-complete::after {
  background: var(--green);
}

.timeline-step.is-current .timeline-marker {
  background: var(--orange);
  color: #35210b;
  border-color: var(--orange);
  box-shadow: 0 0 0 5px rgb(243 155 54 / 13%);
}

/* Delivery details and totals */

.details-section {
  padding: 22px 0;
  border-top: 1px solid var(--border);
}

.details-section h3 {
  font-size: 15px;
  margin: 0 0 17px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 8px 0;
  font-size: 13px;
}

.detail-row > span {
  color: var(--muted);
}

.detail-row strong {
  text-align: right;
  overflow-wrap: anywhere;
  max-width: 65%;
}

.order-items {
  display: grid;
  gap: 13px;
}

.order-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  font-size: 13px;
}

.order-item__name {
  font-weight: 700;
  line-height: 1.5;
}

.order-item__meta {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  margin-top: 4px;
}

.order-item__price {
  font-weight: 800;
  white-space: nowrap;
}

.totals {
  border-top: 1px dashed var(--border);
  padding-top: 14px;
}

.total-row {
  margin-top: 6px;
  padding-top: 15px;
  border-top: 1px solid var(--border);
  font-size: 16px;
}

.total-row strong {
  color: var(--green);
  font-size: 20px;
}

.refresh-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.text-button {
  margin-left: 5px;
  padding: 0;
  border: 0;
  color: var(--green);
  background: transparent;
  font-size: inherit;
  font-weight: 800;
  cursor: pointer;
}

.cancelled-notice {
  padding: 14px;
  margin: 8px 0 20px;
  border-radius: 10px;
  background: #fdebea;
  color: var(--danger);
  font-size: 13px;
  line-height: 1.6;
}

/* Help section */

.help-note {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 19px;
  margin-top: 22px;
}

.help-note > span {
  font-size: 22px;
}

.help-note strong {
  font-size: 13px;
}

.help-note p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

/* Footer */

.site-footer {
  text-align: center;
  padding: 10px 20px 30px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.site-footer p {
  margin: 4px 0;
}

/* Keep hidden sections hidden */

[hidden] {
  display: none !important;
}

/* Mobile screens */

@media (max-width: 520px) {
  .site-header {
    padding: 17px 16px;
  }

  .brand {
    gap: 9px;
  }

  .brand__icon {
    width: 41px;
    height: 41px;
    font-size: 22px;
  }

  .brand strong {
    font-size: 12px;
  }

  .brand small {
    font-size: 11px;
  }

  .header-link {
    font-size: 11px;
  }

  .page {
    margin-top: 24px;
    margin-bottom: 42px;
  }

  .hero {
    margin-bottom: 25px;
  }

  .hero h1 {
    letter-spacing: -1.5px;
  }

  .hero > p {
    font-size: 14px;
  }

  .card-heading {
    align-items: flex-start;
    gap: 11px;
  }

  .heading-icon {
    width: 42px;
    height: 42px;
  }

  .card-heading h2 {
    font-size: 18px;
  }

  .result-header {
    flex-direction: column;
  }

  .detail-row {
    gap: 12px;
  }

  .detail-row strong {
    max-width: 60%;
  }

  .help-note {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}



.tracking-live-note {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eef8f0;
  color: #236b3b;
  font-size: 0.875rem;
  line-height: 1.5;
}

#statusBadge {
  transition: background-color 180ms ease, color 180ms ease;
}

#refreshTracking:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}



/* Estimated preparation and delivery panel */

.order-time-estimate {
  margin: 18px 0;
  padding: 18px;
  border: 1px solid var(--border, #dce5dc);
  border-radius: 16px;
  background: var(--surface, #ffffff);
  color: var(--text, #203126);
}

.order-time-estimate h3 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  font-weight: 700;
}

.order-time-estimate p {
  margin: 9px 0;
  line-height: 1.6;
  font-size: 0.94rem;
}

.order-time-estimate .estimate-progress {
  font-weight: 600;
}

.order-time-estimate .estimate-note {
  color: var(--muted, #647368);
  font-size: 0.83rem;
}

@media (max-width: 600px) {
  .order-time-estimate {
    padding: 14px;
    border-radius: 12px;
  }
}


/* Contact buttons */
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
}

.contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgb(0 0 0 / 12%);
}

.contact-button--call {
  background: #1769aa;
}

.contact-button--whatsapp {
  background: #168b50;
}

.contact-button:focus-visible {
  outline: 3px solid #f4a340;
  outline-offset: 4px;
}

@media (max-width: 480px) {
  .contact-actions {
    flex-direction: column;
  }

  .contact-button {
    width: 100%;
  }
}



/* =========================================
   REFINED ORDER TRACKING ANIMATIONS
========================================= */

.timeline-step {
  transition: opacity 350ms ease;
}

.timeline-step .timeline-marker {
  transition:
    background-color 300ms ease,
    color 300ms ease,
    border-color 300ms ease,
    box-shadow 300ms ease,
    transform 300ms ease;
}

.timeline-step::after {
  transition: background-color 400ms ease;
}

/* Completed stages remain steady */
.timeline-step.is-complete .timeline-marker {
  transform: scale(1);
}

.timeline-step.is-complete::after {
  background: var(--green);
}

/* Current stage: steady highlight, no continuous pulsing */
.timeline-step.is-current .timeline-marker {
  box-shadow: 0 0 0 4px rgb(243 155 54 / 12%);
  animation: none;
}

/* Brief, one-time highlight when the order advances */
.timeline-step.is-status-updated {
  animation: tracking-step-arrival 500ms ease-out both;
}

.timeline-step.is-status-updated .timeline-marker {
  animation: tracking-marker-arrival 500ms ease-out both;
}

.status-badge.is-newly-delivered {
  animation: tracking-success-badge 500ms ease-out both;
}

@keyframes tracking-step-arrival {
  0% {
    transform: translateX(0);
  }

  45% {
    transform: translateX(4px);
  }

  100% {
    transform: translateX(0);
  }
}

@keyframes tracking-marker-arrival {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.12);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes tracking-success-badge {
  0% {
    transform: scale(0.97);
  }

  55% {
    transform: scale(1.04);
  }

  100% {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .timeline-step,
  .timeline-step .timeline-marker,
  .timeline-step::after,
  .status-badge {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}


.brand__icon img{
  height: 35px;
  border-radius: 50px;
}

.heading-icon img{
  height: 40px;
  border-radius: 50px;
}

.help-note img{
  height: 40px;
  border-radius: 50px;
}