/* مخبز السنبلة — التنسيق (mobile-first) */

:root {
  --c-dark: #33210f;
  --c-brown: #7a4a21;
  --c-accent: #c97a12;
  --c-cream: #fffaf1;
  --c-beige: #f6ecd9;
  --c-card: #ffffff;
  --c-muted: #7c6a55;
  --radius: 14px;
  --shadow: 0 2px 10px rgb(51 33 15 / 8%);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Cairo", "Segoe UI", Tahoma, sans-serif;
  line-height: 1.9;
  color: var(--c-dark);
  background: var(--c-cream);
}

img {
  display: block;
  max-width: 100%;
}

.container {
  width: min(100% - 2.5rem, 1020px);
  margin-inline: auto;
}

/* الهيرو */
.hero {
  padding: 5.5rem 0;
  text-align: center;
  color: #fff;
  /* الصورة بتتحرك في ::before — الرجوع لون بني لو الصورة مقفولة */
  background: var(--c-brown);
}

.hero__title {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 900;
}

.hero__tagline {
  margin: 0.5rem 0 0;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  font-weight: 700;
  color: #ffe9c4;
}

.hero__about {
  margin: 1rem auto 0;
  max-width: 34rem;
}

/* الأقسام */
.section {
  padding: 3rem 0;
}

.section--tinted {
  background: var(--c-beige);
}

.section__title {
  margin: 0 0 1.5rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 900;
  color: var(--c-brown);
}

/* المنتجات */
.products {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

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

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

.product {
  background: var(--c-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.product__img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--c-beige);
}

.product__body {
  padding: 1rem 1.25rem 1.25rem;
}

.product__name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.product__unit {
  margin: 0;
  color: var(--c-muted);
  font-size: 0.95rem;
}

.product__price {
  margin: 0.35rem 0 0;
  font-weight: 900;
  font-size: 1.25rem;
  color: var(--c-accent);
}

.product__note {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--c-brown);
}

/* المواعيد */
.hours {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: 30rem;
}

.hours__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px dashed #d8c6a8;
  font-weight: 700;
}

.hours__row:last-child {
  border-bottom: 0;
}

/* العنوان والتواصل */
.contact {
  font-size: 1.1rem;
}

.contact__item {
  margin: 0 0 0.5rem;
  font-weight: 700;
}

.contact__link {
  color: var(--c-brown);
  text-decoration: none;
}

.contact__link:hover {
  text-decoration: underline;
}

/* شريط التوصيل والدفع */
.delivery {
  background: var(--c-dark);
  color: #fff;
  text-align: center;
  padding: 1.75rem 0;
}

.delivery__line {
  margin: 0.25rem 0;
  font-weight: 700;
}

/* الحركة والديناميكية */

/* تكبير بطيء لصورة الهيرو (Ken Burns) */
.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -4%;
  z-index: -1;
  background:
    linear-gradient(rgb(30 18 8 / 62%), rgb(30 18 8 / 62%)),
    url("https://images.unsplash.com/photo-1509440159596-0249088772ff?auto=format&fit=crop&w=1600&q=80")
      center / cover no-repeat,
    var(--c-brown);
  animation: hero-zoom 24s ease-in-out infinite alternate;
}

@keyframes hero-zoom {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}

/* دخول نصوص الهيرو بالتتابع */
.hero__title,
.hero__status,
.hero__tagline,
.hero__about {
  animation: rise-in 0.8s ease-out backwards;
}

.hero__title { animation-delay: 0.1s; }
.hero__status { animation-delay: 0.25s; }
.hero__tagline { animation-delay: 0.35s; }
.hero__about { animation-delay: 0.5s; }

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

/* حالة المخبز (مفتوح / مقفول) */
.hero__status {
  display: inline-block;
  margin: 0 0 0.75rem;
  padding: 0.2rem 1rem;
  border-radius: 999px;
  background: rgb(255 255 255 / 14%);
  border: 1px solid rgb(255 255 255 / 35%);
  font-weight: 700;
  font-size: 0.95rem;
}

.hero__status::before {
  content: "";
  display: inline-block;
  width: 0.55rem;
  height: 0.55rem;
  margin-left: 0.45rem;
  border-radius: 50%;
  background: #ffd166;
  animation: pulse 1.8s ease-in-out infinite;
  vertical-align: middle;
}

.hero__status--open::before {
  background: #7dd87d;
}

@keyframes pulse {
  50% { opacity: 0.35; }
}

/* ظهور العناصر مع السكرول */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* تفاعل كروت المنتجات */
.product {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 26px rgb(51 33 15 / 16%);
}

.product__img {
  transition: transform 0.5s ease;
}

.product:hover .product__img {
  transform: scale(1.07);
}

/* احترام تفضيل تقليل الحركة */
@media (prefers-reduced-motion: reduce) {
  .hero::before {
    animation: none;
  }

  .hero__title,
  .hero__status,
  .hero__tagline,
  .hero__about {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .product,
  .product__img {
    transition: none;
  }
}

/* فورم التواصل */
.contact-form {
  max-width: 34rem;
}

.contact-form__field {
  margin-bottom: 1rem;
}

.contact-form__field label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.contact-form__field input,
.contact-form__field textarea {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid #d8c6a8;
  border-radius: var(--radius);
  background: var(--c-card);
  font: inherit;
  color: inherit;
  resize: vertical;
}

.contact-form__field input:focus,
.contact-form__field textarea:focus {
  outline: none;
  border-color: var(--c-accent);
  box-shadow: 0 0 0 3px rgb(201 122 18 / 20%);
}

.contact-form__submit {
  padding: 0.7rem 2.2rem;
  border: 0;
  border-radius: 999px;
  background: var(--c-accent);
  color: #fff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.2s ease;
}

.contact-form__submit:hover {
  background: #a96608;
}

.contact-form__submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.contact-form__success {
  margin: 1rem 0 0;
  font-weight: 700;
  color: #2e7d32;
}

.contact-form__error {
  margin: 1rem 0 0;
  font-weight: 700;
  color: #b3382c;
}
