:root {
  --bg: #f6f7f8;
  --surface: #ffffff;
  --ink: #111827;
  --muted: #667085;
  --line: #d9dee5;
  --brand: #0f766e;
  --brand-dark: #115e59;
  --accent: #d97706;
  --soft: #edf7f5;
  --danger: #b42318;
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

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

button,
input,
select,
textarea {
  font: inherit;
}

button,
a.primary-action,
a.secondary-action,
.visit-link {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  font-weight: 800;
}

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

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

.main-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  color: #344054;
  font-size: 14px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  min-height: 30px;
  padding: 0 10px;
  border-radius: calc(var(--radius) - 2px);
  font-size: 12px;
  font-weight: 600;
}

.lang-switch button.active {
  background: var(--soft);
  color: var(--brand-dark);
}

html[dir="rtl"] .site-header,
html[dir="rtl"] .main-nav,
html[dir="rtl"] .hero,
html[dir="rtl"] .section-heading,
html[dir="rtl"] .process-grid,
html[dir="rtl"] .contact-section,
html[dir="rtl"] .cart-row,
html[dir="rtl"] .drawer-header {
  direction: rtl;
}

html[dir="rtl"] .brand,
html[dir="rtl"] .hero-actions,
html[dir="rtl"] .filters,
html[dir="rtl"] .form-actions {
  direction: rtl;
}

html[dir="rtl"] body {
  font-family: Inter, "Segoe UI", Tahoma, "Noto Sans Arabic", sans-serif;
}

@media (max-width: 900px) {
  .main-nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
  }

  .lang-switch {
    order: -1;
  }
}

.icon-button,
.icon-only {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  color: var(--ink);
}

.icon-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
}

.icon-button strong {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
}

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  display: grid;
  min-height: 560px;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(42px, 7vw, 96px) clamp(18px, 5vw, 80px);
  color: #fff;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: scale(1.02);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(105deg, rgba(15, 23, 42, 0.72) 0%, rgba(15, 23, 42, 0.52) 36%, rgba(15, 118, 110, 0.32) 72%, rgba(15, 118, 110, 0.18) 100%),
    linear-gradient(to top, rgba(15, 23, 42, 0.38), transparent 45%);
}

html[dir="rtl"] .hero-overlay {
  background:
    linear-gradient(255deg, rgba(15, 23, 42, 0.72) 0%, rgba(15, 23, 42, 0.52) 36%, rgba(15, 118, 110, 0.32) 72%, rgba(15, 118, 110, 0.18) 100%),
    linear-gradient(to top, rgba(15, 23, 42, 0.38), transparent 45%);
}

.hero-copy,
.hero-panel {
  position: relative;
  z-index: 2;
}

.hero-copy {
  max-width: 720px;
}

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

.hero .eyebrow {
  color: #fbbf24;
}

.hero h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: 0;
  text-shadow: 0 2px 18px rgba(15, 23, 42, 0.45);
}

.hero-text {
  max-width: 620px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 18px;
  line-height: 1.7;
  text-shadow: 0 1px 12px rgba(15, 23, 42, 0.4);
}

.hero-actions,
.form-actions,
.order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.primary-action,
.secondary-action,
.admin-table button,
.order-actions button,
.order-actions a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 0 16px;
  font-weight: 700;
}

.primary-action {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.primary-action:hover {
  background: var(--brand-dark);
}

.secondary-action,
.order-actions a,
.order-actions button,
.admin-table button {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.full {
  width: 100%;
}

.hero-panel {
  display: grid;
  gap: 12px;
}

.hero-panel div {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  padding: 20px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
}

.hero-panel span {
  display: block;
  color: rgba(255, 255, 255, 0.72);
}

.hero-panel strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.section,
.info-band,
.contact-section {
  padding: clamp(36px, 6vw, 72px) clamp(18px, 5vw, 80px);
}

.section-heading,
.contact-section {
  display: flex;
  gap: 20px;
  align-items: end;
  justify-content: space-between;
}

.section h2,
.info-band h2,
.contact-section h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 42px);
  letter-spacing: 0;
}

.filters {
  display: flex;
  gap: 10px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  outline: none;
}

input,
select {
  min-height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 96px;
  padding: 12px;
  resize: vertical;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 18px;
  align-items: stretch;
  margin-top: 28px;
}

.product-card {
  display: flex;
  min-height: 560px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.product-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #e5e7eb;
}

.product-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.product-category {
  margin: 0 0 6px;
  border: 0;
  background: transparent;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  padding: 0;
  text-align: left;
  width: max-content;
  max-width: 100%;
  min-height: auto;
}

.product-category:hover {
  text-decoration: underline;
}

.product-card h3 {
  min-height: 52px;
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.35;
}

.product-card dl {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 7px;
  min-height: 116px;
  margin: 0 0 16px;
  color: #344054;
  font-size: 13px;
}

.product-card dt {
  color: var(--muted);
}

.product-card dd {
  margin: 0;
}

.product-card .inquiry-button {
  width: 100%;
  min-height: 40px;
  margin-top: auto;
  border: 0;
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  font-weight: 800;
}

.info-band {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 28px;
  background: #111827;
  color: #fff;
}

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

.process-grid article {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  padding: 18px;
}

.process-grid strong {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
}

.process-grid h3,
.process-grid p {
  margin: 12px 0 0;
}

.process-grid p {
  color: rgba(255, 255, 255, 0.72);
}

.contact-section {
  background: var(--surface);
}

.contact-list {
  display: grid;
  gap: 8px;
  color: #344054;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 50;
  display: flex;
  width: min(440px, 100vw);
  height: 100vh;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
  background: var(--surface);
  box-shadow: -18px 0 38px rgba(17, 24, 39, 0.18);
  transform: translateX(105%);
  transition: transform 180ms ease;
}

.cart-drawer[aria-hidden="false"] {
  transform: translateX(0);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  background: rgba(17, 24, 39, 0.42);
}

.drawer-backdrop.active {
  display: block;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-header h2 {
  margin: 0;
}

.icon-only {
  width: 38px;
  height: 38px;
  font-size: 24px;
}

.cart-items {
  display: grid;
  max-height: 38vh;
  gap: 10px;
  overflow: auto;
}

.cart-row {
  display: grid;
  grid-template-columns: 1fr 72px 36px;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
}

.cart-row strong,
.cart-row span {
  display: block;
}

.cart-row span {
  color: var(--muted);
  font-size: 12px;
}

.cart-row button {
  height: 36px;
  border: 0;
  border-radius: var(--radius);
  background: #fee4e2;
  color: var(--danger);
  font-size: 20px;
}

.inquiry-form {
  display: grid;
  gap: 10px;
}

.form-note,
.empty-state {
  color: var(--muted);
  line-height: 1.55;
}

.admin-body {
  background: #eef2f5;
}

.admin-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 260px 1fr;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  gap: 24px;
  border-right: 1px solid var(--line);
  background: #0f172a;
  padding: 22px;
  color: #fff;
}

.admin-brand .brand-mark {
  background: var(--accent);
}

.admin-brand small {
  color: rgba(255, 255, 255, 0.62);
}

.admin-tabs {
  display: grid;
  gap: 8px;
}

.admin-tabs button,
.visit-link {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  text-align: left;
  padding: 0 12px;
}

.admin-tabs button.active,
.visit-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.visit-link {
  display: flex;
  align-items: center;
  margin-top: auto;
}

.admin-main {
  padding: 28px;
}

.login-panel,
.admin-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 22px;
}

.login-panel {
  max-width: 420px;
}

.login-panel h1 {
  margin: 0 0 8px;
}

.login-panel form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.hidden {
  display: none !important;
}

.admin-panel {
  display: none;
}

.admin-content,
.admin-panel.active {
  display: block;
}

.admin-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.admin-heading h1 {
  margin: 0;
  font-size: 30px;
}

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

.stats-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--soft);
}

.stats-grid span,
.stats-grid strong {
  display: block;
}

.stats-grid span {
  color: var(--muted);
}

.stats-grid strong {
  margin-top: 6px;
  font-size: 32px;
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(420px, 1.15fr);
  gap: 18px;
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-content: start;
}

.admin-form label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.field-hint {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.admin-form .wide {
  grid-column: 1 / -1;
}

.admin-table-wrap {
  overflow: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.admin-table td span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.admin-table button {
  min-height: 34px;
  margin: 0 4px 4px 0;
  padding: 0 10px;
}

.status {
  display: inline-flex;
  width: max-content;
  border-radius: 999px;
  background: #f2f4f7;
  padding: 4px 9px;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}

.status.ok {
  background: #dcfae6;
  color: #067647;
}

.import-box {
  display: grid;
  max-width: 920px;
  gap: 14px;
}

.import-box p {
  margin: 0;
  color: var(--muted);
}

.import-box textarea {
  min-height: 240px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.import-box pre {
  min-height: 80px;
  overflow: auto;
  border-radius: var(--radius);
  background: #111827;
  color: #d1fae5;
  padding: 14px;
}

.order-list {
  display: grid;
  gap: 16px;
}

.order-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--surface);
}

.order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.order-top strong,
.order-top span {
  display: block;
}

.order-top span {
  color: var(--muted);
  font-size: 13px;
}

.order-top select {
  max-width: 160px;
}

.customer-box {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
  border-radius: var(--radius);
  background: #f8fafc;
  padding: 12px;
  color: #344054;
  font-size: 14px;
}

.order-message {
  color: var(--muted);
  white-space: pre-wrap;
}

@media (max-width: 1100px) {
  .product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .split-layout,
  .hero,
  .info-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .site-header,
  .section-heading,
  .contact-section,
  .order-top {
    align-items: stretch;
    flex-direction: column;
  }

  .main-nav,
  .filters {
    flex-wrap: wrap;
  }

  .hero {
    min-height: auto;
  }

  .hero-media img {
    object-position: center 30%;
    transform: scale(1.12);
  }

  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(15, 23, 42, 0.68) 0%, rgba(15, 23, 42, 0.48) 48%, rgba(15, 118, 110, 0.28) 100%);
  }

  .hero h1 {
    font-size: 38px;
  }

  .product-grid,
  .process-grid,
  .stats-grid,
  .customer-box {
    grid-template-columns: 1fr;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }

  .admin-form {
    grid-template-columns: 1fr;
  }
}
