/*
  Order Page Styles — Crumble & Co.
  Page-specific styles for order.html (hero, forms, sidebar, messaging).
  All values reference design tokens from tokens.css.
*/

/* ========================================
   Hero Section
   ======================================== */

.page-banner--order::before {
  background-image: url('../../images/banners/order-banner.jpg');
}

.order-hero {
  position: relative;
  overflow: hidden;
  padding: var(--space-12) 0 var(--space-10);
  text-align: center;
  background: linear-gradient(135deg, #2C1810, #3D1F2E);
  color: var(--color-bg);
}

.order-hero__heading {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  margin-bottom: var(--space-2);
}

.order-hero__subtext {
  color: rgba(253, 248, 243, 0.8);
  max-width: 520px;
  margin: 0 auto;
}

/* ========================================
   Content Grid
   ======================================== */

.order__content {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  padding: var(--space-10) 0;
}

.order__sidebar {
  order: -1;
}

/* ========================================
   Tab Panel Container
   ======================================== */

.order__tabs {
  margin-bottom: var(--space-6);
}

/* ========================================
   Form Styles
   ======================================== */

.order-form__group {
  border: none;
  padding: 0;
  margin: 0 0 var(--space-6);
}

.order-form__legend {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-4);
  color: var(--color-text);
}

.order-form__field {
  margin-bottom: var(--space-4);
}

.order-form__label {
  display: block;
  font-weight: 600;
  font-size: var(--text-sm);
  margin-bottom: var(--space-1);
  color: var(--color-text);
}

.order-form__input,
.order-form__select,
.order-form__textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-base);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-text);
  transition: border-color var(--transition-fast);
}

.order-form__input:focus,
.order-form__select:focus,
.order-form__textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  border-left-width: 3px;
  padding-left: calc(var(--space-4) - 1px);
  box-shadow: 0 0 0 3px rgba(123, 45, 78, 0.15);
}

.order-form__input:invalid:not(:placeholder-shown),
.order-form__select:invalid:not(:placeholder-shown) {
  border-color: var(--color-destructive);
}

.order-form__submit {
  margin-top: var(--space-4);
  width: 100%;
  padding: 14px 36px;
  font-size: var(--text-lg);
  font-weight: 700;
}

/* ========================================
   Delivery Info Sidebar
   ======================================== */

.delivery-info {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.delivery-info__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.delivery-info__list {
  list-style: none;
  padding: 0;
}

.delivery-info__item {
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.delivery-info__item:last-child {
  border-bottom: none;
}

/* ========================================
   Sidebar Cards
   ======================================== */

.sidebar-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-top: var(--space-4);
}

.sidebar-card__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.sidebar-card__list {
  list-style: none;
  padding: 0;
}

.sidebar-card__item {
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.sidebar-card__item:last-child {
  border-bottom: none;
}

.sidebar-card__note {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: var(--space-3);
  font-style: italic;
}

/* Popular items */
.sidebar-card__popular {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.sidebar-card__popular-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.sidebar-card__thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.sidebar-card__popular-item strong {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.sidebar-card__popular-item span {
  font-size: 0.75rem;
  color: var(--color-accent);
  font-weight: 600;
}

/* Trust card */
.sidebar-card--trust {
  background: var(--color-berry-light);
  border-color: rgba(123, 45, 78, 0.15);
}

.sidebar-card__list--checks {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.sidebar-card__list--checks .sidebar-card__item {
  border-bottom: none;
  padding: var(--space-1) 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
}

.sidebar-card__list--checks .sidebar-card__item i {
  color: var(--color-accent);
  font-size: 1rem;
  flex-shrink: 0;
}

/* ========================================
   Messaging Channels
   ======================================== */

.order__channels {
  margin-top: var(--space-10);
  padding: var(--space-8);
  text-align: center;
  background: var(--color-berry-light);
  border-radius: var(--radius-lg);
}

.order__channels-heading {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  margin-bottom: var(--space-2);
}

.order__channels-subtext {
  color: var(--color-text-muted);
  font-size: var(--text-base);
  margin-bottom: var(--space-6);
}

.order__channels-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  align-items: center;
}

/* WhatsApp CTA */
.btn--cta-wa {
  background: #25D366;
  color: #fff;
  gap: var(--space-2);
  padding: 14px 36px;
  font-size: var(--text-base);
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.3);
}

.btn--cta-wa:hover {
  background: #1EBE57;
  color: #fff;
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* Messenger CTA */
.btn--cta-msg {
  background: #0084FF;
  color: #fff;
  border: none;
  gap: var(--space-2);
  padding: 14px 36px;
  font-size: var(--text-base);
  box-shadow: 0 4px 14px rgba(0, 132, 255, 0.3);
}

.btn--cta-msg:hover {
  background: #006FDB;
  color: #fff;
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(0, 132, 255, 0.4);
}

/* ========================================
   How It Works Steps
   ======================================== */

.order-steps {
  position: relative;
  padding: var(--space-16) 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(212, 165, 116, 0.08), transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(123, 45, 78, 0.05), transparent 50%),
    var(--color-surface);
  overflow: hidden;
}

.order-steps .container {
  position: relative;
  z-index: 1;
}

.order-steps__decor {
  position: absolute;
  border-radius: var(--radius-lg);
  object-fit: cover;
  z-index: 0;
  opacity: 0.35;
  pointer-events: none;
}

.order-steps__decor--1 {
  width: 240px;
  height: 300px;
  top: -20px;
  left: -20px;
  transform: rotate(-8deg);
}

.order-steps__decor--2 {
  width: 260px;
  height: 320px;
  bottom: -30px;
  right: -20px;
  transform: rotate(6deg);
}

.order-steps__badge {
  display: block;
  text-align: center;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.order-steps__heading {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  text-align: center;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.order-steps__subtext {
  text-align: center;
  color: var(--color-text-muted);
  margin-bottom: var(--space-10);
}

.order-steps__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  align-items: start;
}

.order-steps__connector {
  display: none;
}

.order-steps__item {
  text-align: center;
  padding: var(--space-6);
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.order-steps__item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.order-steps__icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-full);
  background: var(--color-berry-light);
  margin-bottom: var(--space-4);
}

.order-steps__icon-wrap i {
  font-size: 1.75rem;
  color: var(--color-accent);
}

.order-steps__number {
  position: absolute;
  top: -4px;
  right: -4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  color: var(--color-bg);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.75rem;
  border: 2px solid var(--color-bg);
}

.order-steps__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.order-steps__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.6;
  max-width: 280px;
  margin: 0 auto;
}

/* ========================================
   FAQ Section
   ======================================== */

.order-faq {
  position: relative;
  padding: var(--space-16) 0;
  background: var(--color-bg);
  overflow: hidden;
}

.order-faq__decor {
  position: absolute;
  border-radius: var(--radius-lg);
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  opacity: 0.3;
}

.order-faq__decor--1 {
  width: 280px;
  height: 350px;
  top: -10px;
  left: -30px;
  transform: rotate(-10deg);
}

.order-faq__decor--2 {
  width: 240px;
  height: 180px;
  top: 30px;
  right: -20px;
  transform: rotate(8deg);
}

.order-faq__decor--3 {
  width: 250px;
  height: 370px;
  bottom: -20px;
  right: -10px;
  transform: rotate(-6deg);
}

.order-faq__decor--4 {
  width: 220px;
  height: 320px;
  bottom: -10px;
  left: -10px;
  transform: rotate(10deg);
}

@media (max-width: 767px) {
  .order-faq__decor { opacity: 0.15; }
  .order-faq__decor--2,
  .order-faq__decor--4 { display: none; }
}

.order-faq .container {
  position: relative;
  z-index: 1;
}

.order-faq__heading {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  text-align: center;
  color: var(--color-text);
  margin-bottom: var(--space-8);
}

.order-faq__grid {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.order-faq__item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.order-faq__item[open] {
  border-color: var(--color-accent);
}

.order-faq__question {
  padding: var(--space-4) var(--space-5);
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--color-text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.order-faq__question::-webkit-details-marker {
  display: none;
}

.order-faq__question::after {
  content: '+';
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-accent);
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.order-faq__item[open] .order-faq__question::after {
  transform: rotate(45deg);
}

.order-faq__answer {
  padding: 0 var(--space-5) var(--space-5);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ========================================
   Responsive Breakpoints
   ======================================== */

@media (min-width: 768px) {
  .order-form__submit {
    width: auto;
  }

  .order__channels-links {
    flex-direction: row;
    justify-content: center;
  }

  .order-steps__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .order-steps__heading {
    font-size: 2rem;
  }

  .order-faq__heading {
    font-size: 2rem;
  }
}

@media (min-width: 1024px) {
  .order__content {
    grid-template-columns: 1fr 320px;
    gap: var(--space-8);
    align-items: start;
  }

  .order__sidebar {
    position: sticky;
    top: calc(80px + var(--space-6));
    order: 0;
  }

  .order__main {
    order: 0;
  }

  .order-steps__grid {
    grid-template-columns: repeat(7, auto);
    justify-content: center;
    gap: 0;
  }

  .order-steps__item {
    flex: 0 0 200px;
    max-width: 200px;
  }

  .order-steps__connector {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: var(--space-8);
  }

  .order-steps__connector::after {
    content: '';
    width: 40px;
    height: 2px;
    background: linear-gradient(to right, var(--color-border), var(--color-accent), var(--color-border));
    border-radius: 1px;
  }
}

/* ========================================
   Thank You Page
   ======================================== */

.thank-you__content {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  padding: var(--space-10) 0;
}

.thank-you__card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}

.thank-you__card h2 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  margin-bottom: var(--space-4);
}

.thank-you__steps {
  list-style: none;
  padding: 0;
  text-align: left;
}

.thank-you__step {
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--color-border);
}

.thank-you__step:last-child {
  border-bottom: none;
}

.thank-you__help {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}

.thank-you__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  align-items: center;
}

@media (min-width: 768px) {
  .thank-you__actions {
    flex-direction: row;
    justify-content: center;
  }
}

/* ========================================
   Reduced Motion
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  .order-form__input,
  .order-form__select,
  .order-form__textarea {
    transition: none;
  }
}
