/* ============================================================
   style.css — חזית החנות, RTL
   ============================================================ */

:root {
  --ink:        #12263F;
  --text:       #1D2A3A;
  --muted:      #6B7C93;
  --line:       #E4E8EE;
  --bg:         #FFFFFF;
  --bg-soft:    #F7F8FA;
  --accent:     #17796B;
  --accent-dim: #E6F2F0;
  --sale:       #B3261E;
  --radius:     10px;
  --wrap:       1180px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Assistant", "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Heebo", "Segoe UI", Arial, sans-serif;
  font-weight: 700;
  letter-spacing: -.015em;
  margin: 0 0 .5rem;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 1.25rem; }
.page { padding-block: 2rem 3rem; min-height: 55vh; }

/* ---------- ראש האתר ---------- */
.site-head { border-bottom: 1px solid var(--line); background: #fff; }

.site-head__inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding-block: 1rem;
}

.logo {
  font-family: "Heebo", sans-serif;
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--ink);
  white-space: nowrap;
}

.search { display: flex; flex: 1; max-width: 480px; }
.search__input {
  flex: 1;
  border: 1px solid var(--line);
  border-inline-end: none;
  border-radius: var(--radius) 0 0 var(--radius);
  padding: .55rem .8rem;
  font-family: inherit;
  font-size: .95rem;
}
.search__input:focus { outline: none; border-color: var(--accent); }
.search__btn {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 0 1.1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
}

.head-actions {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  white-space: nowrap;
}
.head-link { color: var(--muted); font-size: .93rem; }
.head-link:hover { color: var(--text); }

.cart-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 600;
  padding: .4rem .85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.cart-link__count {
  background: var(--accent);
  color: #fff;
  font-size: .75rem;
  min-width: 20px;
  text-align: center;
  border-radius: 999px;
  padding: 0 .3rem;
}

.site-nav { background: var(--bg-soft); border-top: 1px solid var(--line); }
.site-nav__inner { display: flex; gap: 1.25rem; overflow-x: auto; padding-block: .6rem; }
.site-nav a { font-size: .95rem; color: var(--muted); white-space: nowrap; }
.site-nav a:hover { color: var(--accent); }

/* ---------- רשת מוצרים ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.product-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .18s, transform .18s;
}
.product-card:hover {
  box-shadow: 0 10px 28px rgba(18, 38, 63, .1);
  transform: translateY(-2px);
}

.product-card__media {
  aspect-ratio: 1 / 1;
  background: var(--bg-soft);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.product-card__media img { width: 100%; height: 100%; object-fit: cover; }

.product-card__body { padding: .85rem 1rem 1rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.product-card__name { font-weight: 600; line-height: 1.35; }
.product-card__price { font-family: "Heebo", sans-serif; font-weight: 700; margin-top: auto; }
.product-card__was { color: var(--muted); text-decoration: line-through; font-size: .85rem; font-weight: 400; margin-inline-start: .4rem; }

.tag-sale {
  align-self: flex-start;
  background: var(--sale);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  padding: .1rem .5rem;
  border-radius: 4px;
}

/* ---------- רכיבים כלליים ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  background: var(--accent);
  color: #fff;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: .65rem 1.3rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn--ghost { background: #fff; color: var(--text); border-color: var(--line); }
.btn--block { width: 100%; }

.notice {
  padding: .75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  border: 1px solid transparent;
}
.notice--success { background: var(--accent-dim); color: var(--accent); border-color: #BFE0DA; }
.notice--error   { background: #FBE9E7; color: var(--sale); border-color: #F2C4C0; }
.notice--info    { background: #EDF3FA; color: #1B4C7E; border-color: #CADDF0; }

.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

/* ---------- כותרת תחתונה ---------- */
.site-foot {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  margin-top: 3rem;
}
.site-foot__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  padding-block: 2rem;
  font-size: .92rem;
  color: var(--muted);
}
.site-foot p { margin: .15rem 0; }

/* ---------- רספונסיביות ---------- */
@media (max-width: 760px) {
  .site-head__inner { flex-wrap: wrap; gap: .75rem; }
  .search { order: 3; max-width: none; flex-basis: 100%; }
  .head-actions { gap: .6rem; }
  .page { padding-block: 1.25rem 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
