* {
  box-sizing: border-box;
}

body {
  margin: 0;
  direction: rtl;
  font-family: Tahoma, Arial, sans-serif;
  background: #f8fafc;
  color: #0f172a;
}

.container {
  width: min(1200px, 94vw);
  margin: 0 auto;
}

.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr 2fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: #b91c1c;
  font-weight: 800;
}

.brand-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.search-form {
  display: flex;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.search-form input {
  width: 100%;
  border: 0;
  outline: none;
  padding: 10px 12px;
}

.search-form button {
  border: 0;
  background: #dc2626;
  color: #fff;
  padding: 0 16px;
  font-weight: 700;
  cursor: pointer;
}

.cart-link {
  text-decoration: none;
  color: #0f172a;
  font-weight: 700;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 8px 12px;
}

.nav-links {
  display: flex;
  gap: 16px;
  padding: 8px 0 12px;
}

.nav-links a {
  color: #475569;
  text-decoration: none;
  font-size: 14px;
}

.hero {
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
}

.hero h1 {
  margin: 0;
  padding: 24px 0;
  font-size: 34px;
}

.page-wrap {
  padding: 24px 0 36px;
}

.stepper {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.step {
  background: #e2e8f0;
  color: #475569;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
}

.step.active {
  background: #dc2626;
  color: #fff;
}

.step-divider {
  flex: 1;
  height: 2px;
  background: #e2e8f0;
  margin: 0 8px;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 18px;
}

.card,
.summary-card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  padding: 16px;
}

.card h2 {
  margin: 0 0 14px;
}

.error-box {
  padding: 12px;
  border-radius: 10px;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  margin-bottom: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

label {
  display: block;
  margin: 0 0 7px;
  font-size: 14px;
}

input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  padding: 10px;
  margin-bottom: 12px;
}

.location-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.muted {
  color: #64748b;
  font-size: 13px;
}

.actions-row {
  margin-top: 14px;
  display: flex;
  gap: 8px;
}

.primary-btn,
.outline-btn,
.outline-link {
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}

.primary-btn {
  background: #dc2626;
  color: #fff;
}

.primary-btn.green {
  background: #16a34a;
}

.outline-btn,
.outline-link {
  background: #fff;
  color: #334155;
  border-color: #cbd5e1;
}

.notice {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 14px;
}

.notice h3 {
  margin: 0 0 8px;
  color: #166534;
}

.check-list {
  color: #334155;
  line-height: 1.9;
}

.summary-card {
  position: sticky;
  top: 94px;
}

.summary-items {
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 10px;
  padding-bottom: 10px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
  font-size: 14px;
}

.total-row {
  display: flex;
  justify-content: space-between;
  font-size: 20px;
  font-weight: 800;
  color: #dc2626;
}

.summary-address {
  margin-top: 10px;
  background: #f8fafc;
  border-radius: 10px;
  padding: 10px;
}

.summary-address p {
  margin: 4px 0;
  color: #64748b;
  font-size: 13px;
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .checkout-grid {
    grid-template-columns: 1fr;
  }

  .summary-card {
    position: static;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 28px;
  }
}
