@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=El+Messiri:wght@600;700&display=swap");

:root {
  --ink: #0f2533;
  --muted: #506170;
  --accent: #d4a11f;
  --accent-dark: #9c6a0f;
  --accent-cool: #0f6b6d;
  --surface: #ffffff;
  --surface-alt: #f6f1e8;
  --line: rgba(15, 37, 51, 0.12);
  --shadow: 0 24px 60px rgba(15, 37, 51, 0.15);
  font-family: "IBM Plex Sans Arabic", "Segoe UI", sans-serif;
  color: var(--ink);
  background-color: #f1ede3;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: radial-gradient(circle at top, #fbf7ee 10%, #f1ede3 50%, #e7e1d2 100%);
  color: var(--ink);
  line-height: 1.85;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 15%, rgba(212, 161, 31, 0.18), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(15, 107, 109, 0.12), transparent 40%);
  pointer-events: none;
  z-index: -1;
}

.page {
  min-height: 100vh;
}

a {
  color: inherit;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding: 1rem clamp(1.5rem, 5vw, 4rem);
  background: #ffffff;
  border-bottom: 1px solid rgba(15, 37, 51, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: "El Messiri", "IBM Plex Sans Arabic", sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(15, 37, 51, 0.2));
}

.nav__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-start;
}

.nav__links a {
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.35rem 0.95rem;
  border-radius: 999px;
  color: #1f64ff;
  background: rgba(15, 37, 51, 0.06);
  border: 1px solid rgba(15, 37, 51, 0.1);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.nav__links a:hover {
  transform: translateY(-1px);
  background: rgba(212, 161, 31, 0.2);
  border-color: rgba(212, 161, 31, 0.45);
}

.hero {
  background: linear-gradient(135deg, rgba(8, 26, 34, 0.95), rgba(15, 49, 56, 0.9)),
    url("https://images.unsplash.com/photo-1576091160550-2173dba999ef?auto=format&fit=crop&w=1600&q=80") center/cover;
  color: #fff7e1;
  border-bottom: 4px solid rgba(212, 161, 31, 0.6);
}

.hero__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2.5rem;
  align-items: center;
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 4rem) 4.5rem;
}

.hero__text h1 {
  font-family: "El Messiri", "IBM Plex Sans Arabic", sans-serif;
  font-size: clamp(2.4rem, 4.2vw, 3.8rem);
  margin: 0 0 1rem;
}

.hero__text p {
  margin: 0;
  color: rgba(255, 247, 225, 0.92);
  font-size: 1.08rem;
}

.hero__tag {
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: 999px;
  background: rgba(212, 161, 31, 0.25);
  color: #ffe6a6;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.hero__media img {
  width: 100%;
  border-radius: 1.75rem;
  border: 2px solid rgba(212, 161, 31, 0.4);
  box-shadow: 0 24px 50px rgba(7, 16, 28, 0.45);
  display: block;
  transform: translateY(6px);
  animation: floatIn 1.1s ease both;
}

main {
  padding-bottom: 4rem;
}

.content-section {
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  margin-top: 2.5rem;
}

.content-block {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  grid-template-areas: "media body";
  gap: 1.5rem;
  align-items: center;
  background: var(--surface);
  border-radius: 1.5rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  animation: fadeUp 0.8s ease both;
}

.content-section:nth-of-type(even) .content-block {
  grid-template-areas: "body media";
  background: linear-gradient(135deg, #ffffff 0%, #f7f2e8 100%);
}

.content-block__media {
  grid-area: media;
}

.content-block__body {
  grid-area: body;
}

.content-block__media img {
  width: 100%;
  border-radius: 1.35rem;
  object-fit: cover;
  height: 280px;
  display: block;
}

.content-block__body h2 {
  font-family: "El Messiri", "IBM Plex Sans Arabic", sans-serif;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin: 0 0 1rem;
  color: var(--ink);
}

.content-block__body p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.content-block__body ul {
  margin: 0 0 1rem;
  padding: 0 1.2rem 0 0;
  color: var(--muted);
}

.section-title {
  font-family: "El Messiri", "IBM Plex Sans Arabic", sans-serif;
  font-size: clamp(1.9rem, 3.2vw, 2.5rem);
  margin: 0 0 1.5rem;
  color: var(--ink);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.products-filter {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 1.25rem;
  background: linear-gradient(135deg, #ffffff 0%, #f7f2e8 100%);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filter-button {
  border: 1px solid rgba(15, 37, 51, 0.2);
  background: #ffffff;
  color: var(--ink);
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.filter-button.is-active,
.filter-button:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 100, 255, 0.5);
  background: rgba(31, 100, 255, 0.08);
  color: #1f64ff;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(200px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: #ffffff;
  border-radius: 1.25rem;
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: 0 18px 36px rgba(11, 28, 46, 0.1);
  display: flex;
  flex-direction: column;
}

.product-card__media {
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card__media > img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.product-card__thumbs {
  display: flex;
  gap: 0.35rem;
  padding: 0.6rem 0.75rem 0.65rem;
  overflow-x: auto;
  background: #ffffff;
  border-top: 1px solid rgba(15, 37, 51, 0.08);
}

.product-card__thumb {
  border: 1px solid rgba(15, 37, 51, 0.2);
  background: #ffffff;
  padding: 0.15rem;
  border-radius: 0.6rem;
  cursor: pointer;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.product-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.4rem;
}

.product-card__thumb.is-active {
  border-color: rgba(31, 100, 255, 0.6);
  box-shadow: 0 6px 16px rgba(31, 100, 255, 0.25);
}

.product-card__body {
  padding: 1rem 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.product-card__body h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--ink);
}

.product-card__body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.product-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.4rem;
}

.product-card__footer span {
  font-weight: 700;
  color: var(--accent-dark);
}

.product-card__footer button {
  border: none;
  background: #1f64ff;
  color: #ffffff;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}

.products-empty {
  margin-top: 1rem;
  color: var(--muted);
}

.products-search {
  margin: 1rem 0;
}

.products-search input {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(15, 37, 51, 0.2);
  background: #ffffff;
  font-family: inherit;
}

.products-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.pagination-button {
  border: 1px solid rgba(15, 37, 51, 0.2);
  background: #ffffff;
  color: var(--ink);
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}

.pagination-count {
  color: var(--muted);
  font-weight: 600;
}

.cart-section {
  display: flex;
}

.cart-card {
  width: 100%;
  background: #ffffff;
  border-radius: 1.5rem;
  border: 1px solid var(--line);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.cart-items {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 0.9rem;
  background: rgba(15, 37, 51, 0.05);
}

.cart-item span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.cart-item button {
  border: none;
  background: rgba(188, 56, 41, 0.12);
  color: #8c2e24;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}

.cart-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.05rem;
  margin-top: 0.5rem;
}

.cart-order {
  width: 100%;
  margin-top: 1rem;
  border: none;
  background: linear-gradient(120deg, #1f64ff, #0f6b6d);
  color: #ffffff;
  padding: 0.85rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  cursor: pointer;
}

.cart-note {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.cart-empty {
  color: var(--muted);
  margin: 0;
}

.admin-section {
  padding-bottom: 4rem;
}

.admin-card {
  background: #ffffff;
  border-radius: 1.5rem;
  border: 1px solid var(--line);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.admin-note {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.admin-form {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}

.admin-form label {
  display: block;
  font-size: 0.95rem;
  color: var(--ink);
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.75rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(15, 37, 51, 0.2);
  background: #f9f6ef;
  color: var(--ink);
  font-family: inherit;
}

.admin-form button {
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: #1f64ff;
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.admin-list h3 {
  margin: 0 0 0.75rem;
}

.admin-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.9rem;
  border-radius: 0.8rem;
  background: rgba(15, 37, 51, 0.05);
  margin-bottom: 0.5rem;
}

.admin-item button {
  border: none;
  background: rgba(188, 56, 41, 0.12);
  color: #8c2e24;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}

.value-card {
  background: linear-gradient(180deg, #ffffff 0%, #f9f4ea 100%);
  border-radius: 1.25rem;
  border: 1px solid var(--line);
  padding: 1rem 1rem 1.5rem;
  box-shadow: 0 18px 38px rgba(11, 28, 46, 0.12);
  text-align: right;
  animation: fadeUp 0.9s ease both;
}

.value-card img {
  width: 100%;
  height: 170px;
  border-radius: 1rem;
  object-fit: cover;
  margin-bottom: 0.75rem;
}

.value-card h3 {
  font-family: "El Messiri", "IBM Plex Sans Arabic", sans-serif;
  margin: 0 0 0.5rem;
  color: var(--accent-dark);
}

.value-card p {
  margin: 0;
  color: var(--muted);
}

.contact-link {
  display: inline-flex;
  padding: 0.65rem 1.6rem;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--accent), #f2c055);
  color: #2a1b02;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(212, 161, 31, 0.35);
}

.contact-info {
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(212, 161, 31, 0.12), rgba(15, 107, 109, 0.08));
  border: 1px solid rgba(15, 37, 51, 0.12);
  margin-bottom: 1.25rem;
  color: var(--muted);
}

.contact-info a {
  font-weight: 600;
}

.sql-code {
  background: #0f2533;
  color: #f6f1e8;
  padding: 1.5rem;
  border-radius: 1rem;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.7;
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.contact-form label {
  display: block;
  font-size: 0.95rem;
  color: var(--ink);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.85rem 1rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(15, 37, 51, 0.2);
  background: #f9f6ef;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.95rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: rgba(212, 161, 31, 0.7);
  box-shadow: 0 0 0 3px rgba(212, 161, 31, 0.2);
}

.contact-form button {
  border: none;
  padding: 0.85rem 1rem;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--accent), #f0bf55);
  color: #2a1b02;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 20px rgba(212, 161, 31, 0.35);
}

.alert {
  padding: 0.85rem 1rem;
  border-radius: 0.9rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  font-size: 0.95rem;
}

.alert--success {
  background: rgba(15, 107, 109, 0.12);
  border-color: rgba(15, 107, 109, 0.35);
  color: #0f5a5b;
}

.alert--error {
  background: rgba(188, 56, 41, 0.12);
  border-color: rgba(188, 56, 41, 0.35);
  color: #8c2e24;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(6px);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

@media (max-width: 800px) {
  .nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav__links {
    width: 100%;
  }

  .hero__grid {
    padding-bottom: 3rem;
  }

  .content-block {
    grid-template-columns: 1fr;
    grid-template-areas:
      "media"
      "body";
  }

  .content-section:nth-of-type(even) .content-block {
    grid-template-areas:
      "media"
      "body";
  }
}

@media (max-width: 600px) {
  .nav__links {
    gap: 0.5rem;
  }

  .nav__links a {
    font-size: 0.85rem;
  }

  .content-block__media img {
    height: 220px;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(3, minmax(200px, 1fr));
  }
}

@media (max-width: 900px) {
  .products-grid {
    grid-template-columns: repeat(2, minmax(200px, 1fr));
  }
}
