* {
  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;
}

.text-area,
.datetime-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
  background: linear-gradient(180deg, #fff, #fbfdff);
  color: #0f172a;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.text-area {
  min-height: 184px;
  resize: none;
  line-height: 1.8;
}

.text-area:focus,
.datetime-input:focus {
  border-color: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.08);
}

.extras-panel {
  margin-top: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: linear-gradient(180deg, #fff, #fff8f2);
  padding: 18px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.04);
}

.extras-panel__head h3 {
  margin: 0 0 6px;
  font-size: 18px;
}

.extras-panel__head p {
  margin: 0 0 14px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.7;
}

.extras-panel__head {
  position: relative;
  padding-right: 56px;
}

.extras-panel__head::before {
  content: '✎';
  position: absolute;
  right: 0;
  top: 0;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #dc2626, #f59e0b);
  color: #fff;
  font-size: 20px;
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.18);
}

.extras-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 14px;
}

.field-card {
  border: 1px solid #f1f5f9;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.85);
  padding: 14px;
}

.field-card--note {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(255, 248, 242, 0.98));
  border-color: rgba(245, 158, 11, 0.22);
  box-shadow: 0 14px 30px rgba(245, 158, 11, 0.09);
  padding: 18px;
}

.field-card--note .text-area {
  min-height: 210px;
}

.field-card--wide {
  min-width: 0;
}

.field-card label {
  font-weight: 700;
  color: #0f172a;
}

.field-card small {
  display: block;
  margin-top: 8px;
  color: #64748b;
  line-height: 1.7;
}

.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-extras {
  margin-top: 10px;
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, #fffaf4, #fff);
  border: 1px dashed #f1c27d;
}

.summary-extras div {
  display: grid;
  gap: 4px;
}

.summary-extras span {
  color: #64748b;
  font-size: 12px;
}

.summary-extras strong {
  color: #0f172a;
  font-size: 14px;
  line-height: 1.8;
}

.summary-address p {
  margin: 4px 0;
  color: #64748b;
  font-size: 13px;
}

.permission-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
   place-items: center center;
   padding: 18px;
   overflow: auto;
 }
 
 .permission-modal__backdrop {
   position: absolute;
   inset: 0;
   background: rgba(15, 23, 42, 0.30);
   -webkit-backdrop-filter: blur(3px);
   backdrop-filter: blur(3px);
 }
 
 .permission-modal__panel {
   position: relative;
   width: min(420px, calc(100vw - 32px));
   background: #fff;
   border-radius: 16px;
   padding: 18px;
   box-shadow: 0 22px 50px rgba(15, 23, 42, 0.22);
   max-height: calc(100vh - 40px);
   overflow: auto;
}

.permission-modal__panel p {
  margin: 0 0 10px;
  color: #334155;
  line-height: 1.8;
}

.permission-modal__actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  justify-content: flex-start;
}

@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;
  }

  .permission-modal__actions {
    flex-direction: column;
  }

  .permission-modal {
    place-items: start center;
    padding: 14px;
  }

  .permission-modal__panel {
    width: min(520px, calc(100vw - 28px));
    margin-top: 10px;
    margin-right: 0;
  }

  .extras-grid {
    grid-template-columns: 1fr;
  }
}
