:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #1b1b1f;
  --muted: #6b6f76;
  --accent: #ff7a1a;
  --accent-dark: #e1680e;
  --border: #e3e4e8;
  --shadow: 0 10px 24px rgba(20, 20, 43, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Tajawal", "Segoe UI", system-ui, sans-serif;
}

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  direction: rtl;
}

.site-header {
  background: linear-gradient(135deg, #fff2e8 0%, #fff 100%);
  padding: 24px 20px 20px;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  text-align: right;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
  font-weight: 600;
}

.site-header h1 {
  font-size: 26px;
  margin-bottom: 6px;
}

.subtext {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.status-pill {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.page {
  padding: 0 20px 120px;
}

.section-heading {
  margin: 28px 0 16px;
  text-align: right;
}

.section-heading h2 {
  font-size: 20px;
  margin-bottom: 4px;
}

.section-heading p {
  color: var(--muted);
  font-size: 13px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.product-card {
  background: var(--card);
  padding: 12px;
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: right;
}

.product-image {
  background: #f2f2f2;
  border-radius: 14px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
}

.product-title {
  font-weight: 600;
  font-size: 15px;
}

.option-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.option-chip {
  border: 1px solid var(--border);
  background: #f9f9fb;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--muted);
}

.option-chip.active {
  background: #fff1e8;
  border-color: #ffd1b0;
  color: var(--accent-dark);
  font-weight: 600;
}

.actions {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-direction: row-reverse;
}

.add-btn,
.qty-btn {
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.add-btn {
  background: var(--accent);
  color: #fff;
  width: 100%;
}

.add-btn:active,
.qty-btn:active,
.primary-btn:active,
.floating-btn:active {
  transform: scale(0.98);
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-direction: row-reverse;
}

.qty-btn {
  background: #fff1e8;
  color: var(--accent-dark);
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
}

.qty-value {
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.checkout-section {
  margin-top: 32px;
}

.checkout-card {
  background: var(--card);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.summary h3,
.car-type h3 {
  font-size: 16px;
  margin-bottom: 8px;
  text-align: right;
}

.summary-list {
  display: grid;
  gap: 6px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--muted);
  text-align: right;
}

.summary-empty {
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.car-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.car-card {
  border: unset;
  background:unset;
  border-radius: 14px;
  padding: 12px;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: border 0.2s ease, background 0.2s ease;
  justify-content: center;
  text-align: center;
}

.car-logo {
  width: 127px;
  height: 60px;
  object-fit: contain;
  display: block;
}

.car-card.active {
  border-color: var(--accent);
  background: #fff1e8;
  font-weight: 600;
}

.car-icon {
  font-size: 24px;
}

.helper.muted {
  color: var(--muted);
  text-align: right;
  margin-top: 6px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  text-align: right;
}

.field input {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  text-align: right;
}

.color-picker {
  display: grid;
  gap: 10px;
  text-align: right;
}

.color-options {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(36px, 1fr);
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  direction: rtl;
}

.color-swatch {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  border: 2px solid transparent;
  background: var(--swatch);
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
  max-width: 44px;
  justify-self: center;
}

.color-swatch.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 122, 26, 0.25);
}

.primary-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.helper {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.floating-btn {
  position: fixed;
  bottom: 18px;
  left: 20px;
  right: 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 18px;
  padding: 14px 18px;
  font-size: 16px;
  font-weight: 600;
  box-shadow: 0 12px 26px rgba(255, 122, 26, 0.35);
  cursor: pointer;
}

@media (min-width: 768px) {
  body {
    display: flex;
    justify-content: center;
    background: #eef0f6;
  }

  .page {
    max-width: 420px;
  }

  .site-header {
    max-width: 420px;
    margin: 0 auto;
  }

  .floating-btn {
    max-width: 420px;
    margin: 0 auto;
    left: 50%;
    transform: translateX(-50%);
  }
}
