:root {
  --ink: #1b1a17;
  --muted: #6f6a62;
  --paper: #fbfaf7;
  --panel: #ffffff;
  --line: #e5ded3;
  --green: #20392f;
  --rose: #c8958c;
  --gold: #b18a42;
  --plum: #583b4b;
  --blue: #405c72;
  --shadow: 0 22px 70px rgba(35, 32, 27, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--paper);
  color: var(--ink);
}

body.rtl {
  direction: rtl;
}

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

button {
  cursor: pointer;
}

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

.topline {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 7px 18px;
  background: var(--green);
  color: #f7f1e7;
  font-size: 13px;
}

.link-button {
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: underline;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 220px 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  background: rgba(251, 250, 247, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: var(--green);
  color: #f4eee4;
  border-radius: 50%;
  font-family: Georgia, serif;
  font-size: 24px;
}

.brand strong {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  line-height: 1;
}

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

.main-nav {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 3vw, 34px);
  color: #4f4a42;
  font-size: 15px;
}

.main-nav a {
  padding: 8px 0;
  border-bottom: 1px solid transparent;
}

.main-nav a:hover {
  border-color: var(--gold);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

select, input, textarea {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
}

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

.icon-button, .cart-button, .primary, .secondary, .chip {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.icon-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  font-size: 22px;
}

.cart-button {
  height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
}

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

.primary {
  min-height: 46px;
  background: var(--green);
  color: #fff;
  border-color: var(--green);
  padding: 0 18px;
}

.secondary {
  min-height: 46px;
  padding: 0 18px;
  background: #fff;
}

.wide {
  width: 100%;
}

.hero {
  min-height: calc(100vh - 114px);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  padding: clamp(32px, 7vw, 88px);
}

.eyebrow {
  display: inline-block;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

h1, h2, h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(42px, 6vw, 82px);
  line-height: 0.96;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.02;
}

h3 {
  font-size: 19px;
}

p {
  color: var(--muted);
  line-height: 1.6;
}

.hero-actions, .row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 560px;
}

.metric {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.metric strong {
  display: block;
  font-size: 20px;
}

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

.hero-media {
  position: relative;
  min-height: 520px;
  overflow: hidden;
}

.hero-media img, .campaign img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(251, 250, 247, .34), rgba(251, 250, 247, 0));
  pointer-events: none;
}

.section {
  padding: clamp(36px, 6vw, 76px) clamp(18px, 4vw, 56px);
}

.quick-shop {
  padding-bottom: clamp(22px, 3vw, 42px);
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.product-rail {
  padding-top: clamp(28px, 4vw, 48px);
  padding-bottom: clamp(28px, 4vw, 48px);
  background: #f4efe7;
  border-bottom: 1px solid var(--line);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.section-head p {
  max-width: 560px;
  margin: 8px 0 0;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto auto;
  gap: 12px;
  margin-bottom: 22px;
}

.search-input {
  width: 100%;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  min-height: 38px;
  padding: 0 13px;
}

.chip.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

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

.category-card {
  min-height: 154px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
  color: var(--ink);
  text-align: start;
}

.category-card:hover {
  border-color: var(--gold);
  box-shadow: 0 14px 38px rgba(35, 32, 27, 0.08);
  transform: translateY(-1px);
}

.category-card strong {
  font-size: 20px;
}

.category-card small {
  color: var(--muted);
  line-height: 1.35;
}

.category-card > span:last-child {
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
}

.category-swatch {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--product-color);
  box-shadow: inset -10px -8px 0 rgba(0, 0, 0, .1);
}

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

.mini-product {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 108px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

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

.mini-product h3 {
  margin: 4px 0;
  font-size: 16px;
}

.mini-swatch {
  width: 74px;
  height: 80px;
  border: 0;
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  background: #f7efe4;
}

.mini-swatch img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

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

.product-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.product-image {
  position: relative;
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #efe6da, #f8f6f1);
  overflow: hidden;
}

.product-photo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.product-art {
  width: 74%;
  aspect-ratio: .78;
  border-radius: 48% 48% 16px 16px;
  background: var(--product-color, var(--green));
  box-shadow: inset -24px -20px 0 rgba(0,0,0,.08), 0 18px 42px rgba(28, 26, 22, .16);
  position: relative;
}

.product-art::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 6%;
  width: 34%;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #f7efe4;
  border: 8px solid rgba(255,255,255,.3);
}

.product-art::after {
  content: "";
  position: absolute;
  inset: auto 16% 14% 16%;
  height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.52);
}

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

body.rtl .badge {
  left: auto;
  right: 12px;
}

.product-info {
  padding: 14px;
}

.product-info .meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.price {
  font-weight: 800;
  color: var(--ink);
}

.product-info h3 {
  margin: 8px 0 12px;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 46px;
  gap: 8px;
}

.campaign {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  background: #172720;
  color: #fff;
}

.campaign p {
  color: #ded8ce;
}

.campaign-copy {
  padding: clamp(32px, 6vw, 74px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.campaign .eyebrow {
  color: #d6b26b;
}

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

.service-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.service-card span {
  color: var(--gold);
  font-size: 25px;
}

.footer {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
  padding: 44px clamp(18px, 4vw, 56px);
  background: #171411;
  color: #f7f1e7;
}

.footer p, .footer a {
  color: #cfc7ba;
}

.drawer, .modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 40;
  background: rgba(23, 20, 17, .42);
}

.drawer.open, .modal.open {
  display: block;
}

.drawer-panel {
  margin-left: auto;
  width: min(440px, 100%);
  height: 100%;
  background: #fff;
  padding: 22px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

body.rtl .drawer-panel {
  margin-left: 0;
  margin-right: auto;
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.cart-items {
  flex: 1;
  overflow: auto;
  padding: 16px 0;
}

.cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.cart-swatch {
  width: 64px;
  aspect-ratio: 1;
  border-radius: 8px;
  background: var(--product-color);
}

.cart-summary {
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.cart-summary div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.cart-summary .total {
  font-size: 20px;
}

.modal-card {
  width: min(980px, calc(100% - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  margin: 16px auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.modal-copy {
  padding: clamp(24px, 4vw, 48px);
}

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

.form-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.status {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 10px;
  background: #eef3ef;
  color: #1c5d3b;
  font-size: 12px;
  font-weight: 800;
}

.empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
}

@media (max-width: 1040px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .main-nav {
    grid-column: 1 / -1;
    order: 3;
    justify-content: start;
    overflow-x: auto;
  }

  .hero, .campaign, .modal-body {
    grid-template-columns: 1fr;
  }

  .hero-media {
    min-height: 420px;
    order: -1;
  }

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

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rail-grid {
    grid-template-columns: 1fr;
  }

  .service-grid, .footer {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .topline {
    justify-content: space-between;
  }

  .site-header {
    padding: 14px;
    gap: 14px;
  }

  .brand strong {
    font-size: 21px;
  }

  .header-actions {
    gap: 6px;
  }

  .header-actions select, .icon-button {
    width: 38px;
    min-height: 38px;
    height: 38px;
    padding: 0;
  }

  .cart-button {
    height: 38px;
    padding: 0 9px;
  }

  .hero {
    min-height: 0;
  }

  .hero-copy {
    padding: 28px 18px;
  }

  .hero-metrics, .toolbar, .product-grid, .category-grid, .service-grid, .footer, .form-grid {
    grid-template-columns: 1fr;
  }

  .mini-product {
    grid-template-columns: 64px 1fr;
  }

  .mini-product .secondary {
    grid-column: 1 / -1;
  }

  .section-head {
    display: block;
  }

  .product-grid {
    gap: 12px;
  }
}
