@font-face {
  font-family: "Tajawal";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("public/fonts/tajawal-500.ttf") format("truetype");
}

@font-face {
  font-family: "Tajawal";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("public/fonts/tajawal-700.ttf") format("truetype");
}

@font-face {
  font-family: "Tajawal";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("public/fonts/tajawal-800.ttf") format("truetype");
}

@font-face {
  font-family: "Tajawal";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("public/fonts/tajawal-900.ttf") format("truetype");
}

:root {
  --bg: #242121;
  --panel: #211f1f;
  --brand: #a62625;
  --green: #00e676;
  --search: #373333;
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.7);
  --line: rgba(255, 255, 255, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  overflow-x: hidden;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: Tajawal, Tahoma, Arial, sans-serif;
  font-weight: 700;
}

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

button,
input {
  font: inherit;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.site-shell {
  min-height: 100vh;
  background: var(--bg);
}

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  height: 64px;
  background: var(--brand);
}

.brand-logo {
  position: absolute;
  top: -16px;
  left: 20px;
  width: 121px;
  height: 95px;
  overflow: hidden;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.top-actions {
  position: absolute;
  top: 50%;
  right: 20px;
  z-index: 2;
  display: flex;
  gap: 16px;
  align-items: center;
  transform: translateY(-50%);
}

.icon-link {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.icon-link:hover {
  opacity: 0.8;
}

.icon-link svg {
  width: 24px;
  height: 24px;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  border: 0;
  background: rgba(0, 0, 0, 0.62);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.sidebar {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 50;
  width: 280px;
  border-left: 1px solid var(--line);
  background: var(--bg);
  color: #fff;
  box-shadow: none;
}

.login-card {
  margin: 20px 10px 0;
  padding: 20px 20px 13px;
  text-align: center;
  border-radius: 24px;
  background: var(--brand);
}

.login-card h2 {
  margin: 0;
  font-size: 25px;
  font-weight: 900;
  line-height: 32px;
}

.login-card p {
  max-width: 220px;
  margin: 16px auto 14px;
  font-size: 14px;
  font-weight: 800;
  line-height: 24px;
}

.login-primary,
.login-google {
  position: relative;
  display: flex;
  width: 100%;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.login-primary {
  margin-bottom: 10px;
  background: #00d46f;
  color: #fff;
}

.login-google {
  background: #fff;
  color: #000;
}

.login-google img {
  position: absolute;
  right: 42px;
  width: 22px;
  height: 22px;
}

.side-nav {
  margin-top: 8px;
  padding: 36px 20px 0;
  border-top: 1px solid var(--line);
}

.side-nav a {
  display: flex;
  height: 42px;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  margin-bottom: 8px;
  border-radius: 7px;
  background: var(--panel);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
  transition: background 0.2s ease, transform 0.2s ease;
}

.side-nav a:hover {
  transform: translateY(-1px);
  background: #2a2727;
}

.side-nav a.active {
  background: #155a36;
  color: var(--green);
}

.side-nav svg {
  width: 20px;
  height: 20px;
  color: var(--green);
}

.theme-socials {
  margin-top: 16px;
  padding: 17px 20px 13px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 16px;
  font-weight: 900;
}

.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: var(--brand);
}

.switch span {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #df3937;
}

.social-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px 14px;
  justify-items: center;
  margin-top: 28px;
}

.social-grid a {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: var(--green);
  font-family: Arial, sans-serif;
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  transition: transform 0.2s ease;
}

.social-grid a:nth-child(2),
.social-grid a:nth-child(5) {
  color: #2196f3;
}

.social-grid a:nth-child(3),
.social-grid a:nth-child(4) {
  color: #ff5252;
}

.social-grid a:hover {
  transform: scale(1.1);
}

.page-content {
  min-height: 100vh;
  margin-right: 280px;
  padding-top: 84px;
}

.hero-section,
.category-grid,
.footer {
  width: min(952px, calc(100vw - 296px));
  margin-right: auto;
  margin-left: auto;
}

.hero-carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 8 / 3;
  overflow: hidden;
  border-radius: 44px;
  background: #1f1d1d;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.hero-slide.active {
  opacity: 1;
}

.tagline {
  margin: 18px 0 0;
  overflow: hidden;
  text-align: center;
  white-space: nowrap;
  color: #fff;
  font-size: 15px;
  font-weight: 900;
  line-height: 39px;
}

.search-box {
  display: flex;
  height: 52px;
  align-items: center;
  margin-top: 20px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--search);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.search-box input {
  width: 100%;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #fff;
  text-align: right;
  font-size: 16px;
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.82);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px 8px;
  margin-top: 33px;
}

.category-card {
  display: block;
  min-width: 0;
  text-align: center;
}

.category-card img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  background: #1a1818;
  transition: transform 0.2s ease;
}

.category-card:hover img {
  transform: translateY(-4px);
}

.category-card span {
  display: block;
  margin-top: 10px;
  color: #fff;
  text-align: center;
  font-size: 15px;
  font-weight: 900;
  line-height: 20px;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.75);
}

.footer {
  margin-top: 95px;
  padding-bottom: 30px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.footer nav {
  display: flex;
  justify-content: center;
  gap: 36px;
}

.footer a {
  color: #fff;
  transition: opacity 0.2s ease;
}

.footer a:hover {
  opacity: 0.75;
}

.footer p {
  margin: 23px 0 0;
  color: #6d9bb5;
}

.floating-chat {
  position: fixed;
  right: 16px;
  bottom: 40px;
  z-index: 20;
  display: none;
  width: 56px;
  height: 56px;
  place-items: center;
  border-radius: 50%;
  background: #00d46f;
  color: #fff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.32);
}

.floating-chat svg {
  width: 26px;
  height: 26px;
}

@media (max-width: 1023px) {
  .topbar {
    height: 56px;
  }

  .top-actions {
    right: 15px;
  }

  .sidebar {
    transform: translateX(100%);
    transition: transform 0.24s ease;
    box-shadow: -12px 0 30px rgba(0, 0, 0, 0.38);
  }

  body.drawer-open .sidebar {
    transform: translateX(0);
  }

  body.drawer-open .drawer-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .page-content {
    margin-right: 0;
    padding-top: 76px;
  }

  .hero-section,
  .category-grid,
  .footer {
    width: calc(100vw - 16px);
  }

  .hero-carousel {
    border-radius: 16px;
  }

  .tagline {
    margin-top: 25px;
    font-size: 15px;
    text-align: right;
  }

  .search-box {
    margin-top: 26px;
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 27px 8px;
    margin-top: 36px;
  }

  .category-card span {
    margin-top: 8px;
    font-size: 13px;
  }

  .footer {
    margin-top: 105px;
  }

  .floating-chat {
    display: grid;
  }
}

@media (min-width: 1024px) {
  .topbar {
    right: 280px;
  }
}
