:root {
  --paper: #f4f5f7;      /* soft bright gray page background */
  --card: #ffffff;       /* white surfaces */
  --soft: #e9ecf0;       /* image placeholders, subtle fills */
  --ink: #1e2329;        /* main text */
  --muted: #6b7280;      /* secondary text */
  --line: #e2e5ea;       /* hairlines */
  --accent: #0f766e;     /* fresh teal: sales bar, highlights */
  --accent-dark: #0b5c56;
  --sale: #e0475b;       /* sale price and badge */
  --ease: cubic-bezier(.22, .61, .36, 1);
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Tajawal", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { opacity: .65; }

/* ---------- Offer banner (right under the logo) ---------- */
.promo {
  position: relative;
  overflow: hidden;
  max-width: 640px;
  margin: 30px auto 0;
  padding: 22px 22px 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent) 0%, #17958a 100%);
  color: #fff;
  text-align: center;
  box-shadow: 0 12px 30px rgba(15, 118, 110, .28);
}
.promo::after {                       /* soft light sweep to catch the eye */
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 40%;
  left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .22), transparent);
  transform: skewX(-18deg);
  animation: sweep 5s ease-in-out 1.2s infinite;
  pointer-events: none;
}
@keyframes sweep {
  0%, 55% { left: -60%; }
  100%    { left: 130%; }
}
.promo-tag {
  display: inline-block;
  margin-bottom: 8px;
  padding: 1px 14px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 999px;
  background: rgba(255, 255, 255, .16);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.promo p {
  position: relative;
  margin: 0;
  font-weight: 700;
  font-size: clamp(1.25rem, 5vw, 1.85rem);
  line-height: 1.45;
}
@media (prefers-reduced-motion: reduce) {
  .promo::after { animation: none; display: none; }
}

/* ---------- Header ---------- */
.hero {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  text-align: center;
  padding: 26px 24px 34px;
}
.hero-inner { max-width: 720px; margin: 0 auto; }
.brand { margin: 0; font-weight: 400; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.logo { display: block; height: clamp(64px, 11vw, 84px); width: auto; }
.brand-name {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: .95rem;
  letter-spacing: .5em;
  padding-inline-start: .5em;      /* balances the trailing letter-space so it stays centred */
  color: var(--ink);
  direction: ltr;
  line-height: 1;
}
.brand-name i { font-style: normal; color: var(--muted); }
.divider {
  width: 56px;
  border: 0;
  border-top: 2px solid var(--accent);
  margin: 24px auto;
}
.intro {
  margin: 0 auto;
  max-width: 540px;
  color: var(--muted);
  font-weight: 300;
  font-size: 1.05rem;
}

/* ---------- Filters ---------- */
.catalog {
  max-width: 1480px;
  margin: 0 auto;
  padding: 48px 20px 96px;
}
.filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 48px;
}
.filter {
  font: inherit;
  font-weight: 500;
  font-size: .95rem;
  min-width: 96px;
  padding: 9px 22px;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.filter:hover { border-color: var(--ink); }
.filter.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.filter:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px 16px;
}
@media (min-width: 640px)  { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 20px; } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 44px 22px; } }

.card {
  display: flex;
  flex-direction: column;
  animation: rise .5s var(--ease) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.media {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--soft);
  border-radius: 6px;
}
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .7s var(--ease);
}
.card:hover .media img { transform: scale(1.06); }
.media .noimg {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  letter-spacing: .3em;
  color: var(--muted);
  font-size: .8rem;
}

.badge {
  position: absolute;
  top: 10px;
  left: 10px;            /* top-left of the image, also in RTL */
  right: auto;
  background: var(--sale);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  padding: 2px 10px;
  line-height: 1.6;
  border-radius: 999px;
}

.info { padding-top: 14px; text-align: center; }
.name {
  margin: 0;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.4;
}
.desc {
  margin: 4px 0 0;
  color: var(--muted);
  font-weight: 300;
  font-size: .85rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.prices {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.price { font-weight: 500; font-size: 1rem; }
.price.old {
  color: var(--muted);
  font-weight: 300;
  font-size: .85rem;
  text-decoration: line-through;
}
.price.now { font-weight: 700; font-size: 1.15rem; color: var(--sale); }

/* ---------- States ---------- */
.status {
  text-align: center;
  color: var(--muted);
  font-weight: 300;
  padding: 40px 0;
  margin: 0;
}
.status:empty { display: none; }
.status.error { color: var(--sale); }

/* ---------- Footer ---------- */
.footer {
  background: var(--card);
  border-top: 1px solid var(--line);
  text-align: center;
  padding: 44px 20px 40px;
}
.footer-brand {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: .4em;
  padding-inline-start: .4em;
}
.footer-contact {
  margin-top: 16px;
  display: flex;
  justify-content: center;
  gap: 14px;
  font-size: .95rem;
  color: var(--ink);
}
.footer-contact .sep { color: var(--line); }
.copyright {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 300;
}

@media (prefers-reduced-motion: reduce) {
  .card { animation: none; }
  .media img { transition: none; }
  .card:hover .media img { transform: none; }
}

/* ---------- Cart button, add to cart, sold out, toast ---------- */
.cart-fab {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 40;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(30, 35, 41, .12);
}
.cart-fab:hover { opacity: 1; border-color: var(--ink); }
.cart-fab.bump { animation: bump .4s var(--ease); }
@keyframes bump { 40% { transform: scale(1.18); } }
.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
}

.add {
  margin-top: 12px;
  width: 100%;
  padding: 9px 10px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 500;
  font-size: .9rem;
  cursor: pointer;
  transition: background .2s var(--ease), border-color .2s var(--ease);
}
.add:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); }
.add:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.add:disabled {
  background: transparent;
  color: var(--muted);
  border-color: var(--line);
  cursor: default;
}
.card.is-out .media img,
.card.is-out .media .noimg { filter: grayscale(1); opacity: .45; }
.card.is-out .name,
.card.is-out .prices { opacity: .6; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 60;
  transform: translate(-50%, 20px);
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: .92rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  .cart-fab.bump { animation: none; }
  .toast { transition: none; }
}
