:root {
  --bg: #f3f6f4;
  --bg-muted: #e7eee9;
  --ink: #14241c;
  --ink-soft: #3d4f45;
  --line: #c5d4cb;
  --brand: #0f5c4c;
  --brand-deep: #0a3d34;
  --accent: #c4a35a;
  --whatsapp: #128c7e;
  --rx: #8b3a3a;
  --radius: 14px;
  --font: "IBM Plex Sans Arabic", system-ui, sans-serif;
  --display: "Libre Baskerville", "IBM Plex Sans Arabic", serif;
  --shadow-soft: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 4.5rem;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  background: #f3f6f4;
  border-bottom: 1px solid var(--line);
}

.brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--brand-deep);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav {
  display: none;
  gap: 1.1rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.nav a:hover {
  color: var(--brand);
}

.topbar .btn-sm {
  flex-shrink: 0;
}

@media (min-width: 760px) {
  .nav {
    display: flex;
    margin-inline: auto;
  }
}

.hero {
  position: relative;
  min-height: min(68vh, 580px);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #f7faf8;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-color: #0a3d34;
  background-image: url("assets/hero.jpg");
  /* Slightly zoomed out vs cover so storefront signage stays fully readable */
  background-size: 100% auto;
  background-position: center 28%;
  background-repeat: no-repeat;
  transform: scale(1.01);
  animation: heroDrift 22s ease-in-out infinite alternate;
}

.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      100deg,
      rgba(8, 40, 34, 0.88) 0%,
      rgba(10, 61, 52, 0.72) 42%,
      rgba(10, 61, 52, 0.35) 100%
    ),
    linear-gradient(to top, rgba(8, 40, 34, 0.55) 0%, transparent 45%);
}

.hero-bg::after {
  content: none;
}

@keyframes heroDrift {
  from {
    transform: scale(1.02) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.05) translate3d(-1%, 0.6%, 0);
  }
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 4.5rem 1.4rem 3.2rem;
  max-width: 720px;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.hero-content.is-in {
  opacity: 1;
  transform: translateY(0);
}

.eyebrow {
  margin: 0 0 0.6rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  font-weight: 600;
}

.hero h1 {
  margin: 0 0 0.85rem;
  font-family: var(--display);
  font-size: clamp(2.4rem, 7vw, 3.8rem);
  line-height: 1.15;
  font-weight: 700;
}

.lede {
  margin: 0 0 1.6rem;
  font-size: 1.08rem;
  max-width: 34rem;
  color: rgba(247, 250, 248, 0.88);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.5rem 0.9rem;
  font-size: 0.9rem;
}

.btn-primary {
  background: #f7faf8;
  color: var(--brand-deep);
}

.btn-primary:hover {
  background: #fff;
}

.btn-whatsapp {
  background: var(--whatsapp);
  color: #fff;
}

.btn-whatsapp:hover {
  background: #0e7a6e;
}

.section {
  padding: 3.2rem 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-muted {
  max-width: none;
  padding-inline: 1.25rem;
  background: var(--bg-muted);
  border-block: 1px solid var(--line);
}

.section-muted .section-head,
.section-muted .steps,
.section-muted > .btn {
  max-width: 720px;
  margin-inline: auto;
}

.section-muted .section-head {
  text-align: center;
}

.section-head {
  margin-bottom: 1.5rem;
}

.section-head h2 {
  margin: 0 0 0.4rem;
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2rem);
  color: var(--brand-deep);
}

.section-head p {
  margin: 0;
  color: var(--ink-soft);
}

.section-head .notice {
  margin-top: 0.85rem;
  padding: 0.75rem 0.95rem;
  max-width: 42rem;
  background: #fff8e8;
  border: 1px solid #e2d2a8;
  border-radius: 10px;
  color: #5c4a1f;
  font-size: 0.92rem;
  line-height: 1.55;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.filter {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font: inherit;
  cursor: pointer;
}

.filter.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.search-wrap {
  margin-bottom: 1.4rem;
}

.product-count {
  margin: 0.55rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: 1.4rem;
}

.section-head .notice a {
  color: var(--brand-deep);
  font-weight: 600;
  text-decoration: underline;
}

.catalog-main {
  padding-top: 0.5rem;
}

.eyebrow-inline {
  margin: 0 0 0.35rem;
  color: var(--brand);
  font-weight: 600;
  font-size: 0.9rem;
}

.catalog-main h1 {
  margin: 0 0 0.5rem;
  font-family: var(--display);
  color: var(--brand-deep);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.catalog-back {
  margin: 2rem 0 0;
  text-align: center;
}

.catalog-back a {
  color: var(--brand);
  font-weight: 600;
}

#search {
  width: 100%;
  max-width: 420px;
  padding: 0.75rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  color: var(--ink);
}

#search:focus {
  outline: 2px solid rgba(15, 92, 76, 0.35);
  outline-offset: 1px;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

@media (min-width: 640px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.product {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.15rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  animation: fadeUp 0.45s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product h3 {
  margin: 0.45rem 0 0.15rem;
  font-size: 1.08rem;
  line-height: 1.35;
}

.product-en {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--brand-deep);
}

.badge-rx {
  background: #f3e4e4;
  color: var(--rx);
}

.badge-cos {
  background: #efe8d8;
  color: #6d5420;
}

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.price {
  margin: 0;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--brand-deep);
}

.price span {
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.empty {
  color: var(--ink-soft);
}

.steps {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.9rem;
  counter-reset: step;
}

.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 0.9rem;
  row-gap: 0.2rem;
  align-items: start;
  padding: 1.1rem 1.15rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  grid-row: 1 / span 2;
  width: 1.75rem;
  height: 1.75rem;
  margin-top: 0.15rem;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.steps strong {
  grid-column: 2;
  display: block;
  margin: 0;
}

.steps span {
  grid-column: 2;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.about-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 800px) {
  .about-grid {
    grid-template-columns: 1.4fr 1fr;
    align-items: start;
  }
}

.about-grid h2 {
  margin: 0 0 0.6rem;
  font-family: var(--display);
  color: var(--brand-deep);
}

.meta {
  margin: 1.4rem 0 0;
}

.meta div {
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
}

.meta dt {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-bottom: 0.15rem;
}

.meta dd {
  margin: 0;
  font-weight: 600;
}

.note {
  padding: 1.2rem 1.25rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  border-inline-start: 4px solid var(--accent);
}

.note h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

.note p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.footer {
  padding: 1.5rem 1.25rem 2.2rem;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.88rem;
  border-top: 1px solid var(--line);
}

.btn-cart {
  background: var(--brand);
  color: #fff;
  border: none;
}

.btn-cart:hover {
  background: var(--brand-deep);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

.cart-icon-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  color: var(--brand-deep);
  flex-shrink: 0;
}

.cart-icon-link:hover {
  background: var(--bg-muted);
}

.cart-badge {
  position: absolute;
  top: 0;
  left: 0;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: var(--whatsapp);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-grid;
  place-items: center;
  line-height: 1;
}

.cart-empty {
  color: var(--ink-soft);
  margin: 1rem 0;
}

.cart-page {
  max-width: 720px;
}

.cart-page h1 {
  margin: 0 0 0.4rem;
  font-family: var(--display);
  color: var(--brand-deep);
}

.cart-page-items {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.25rem 1.1rem;
}

.cart-line {
  display: grid;
  gap: 0.65rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--line);
}

.cart-line:last-child {
  border-bottom: none;
}

.cart-line-info {
  display: grid;
  gap: 0.15rem;
}

.cart-line-info strong {
  color: var(--brand-deep);
}

.cart-line-info span {
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.cart-line-price {
  font-weight: 600;
  color: var(--ink) !important;
}

.cart-line-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.qty {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.2rem 0.35rem;
}

.qty button {
  width: 1.7rem;
  height: 1.7rem;
  border: none;
  border-radius: 50%;
  background: var(--bg-muted);
  cursor: pointer;
  font-size: 1rem;
}

.cart-remove {
  border: none;
  background: transparent;
  color: var(--rx);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
}

.checkout-form {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.9rem;
  padding: 1.15rem 1.2rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.checkout-form h2 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--brand-deep);
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field span {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.field input,
.field textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid rgba(15, 92, 76, 0.3);
  outline-offset: 1px;
}

.location-box {
  display: grid;
  gap: 0.45rem;
}

.location-status {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.location-status.ok {
  color: var(--brand);
  font-weight: 600;
}

.location-map-link {
  font-size: 0.9rem;
  color: var(--brand);
  font-weight: 600;
  text-decoration: underline;
}

.cart-total {
  margin: 0.35rem 0 0;
  font-size: 1.1rem;
}
