@font-face {
  font-family: 'Cairo';
  src: url('../assets/fonts/Cairo.woff2') format('woff2');
  font-display: swap;
}

:root {
  --primary: #D23557;
  --secondary : #27A44F;
  --dark: #111827;
  --muted: #6b7280;
  --bg: #f8fafc;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  direction: rtl;
  scroll-behavior: smooth;
}

body {
  font-family: 'Cairo', Arial, sans-serif;
  color: #111;
  line-height: 1.8;
  text-align: right;
  background: #fff;
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
}

/* CONTAINER */
.container {
  width: min(1200px, 92%);
  margin: auto;
}

/* HEADER */
header {
  position: sticky;
  top: 0;
  background: #fff;
  border-bottom: 1px solid #eee;
  z-index: 10;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  flex-direction: row;
}

/* NAV LINKS BASE */
nav a {
  position: relative;
  margin: 0 12px;
  color: #111;
  font-weight: 600;
  padding: 6px 0;
  transition: color 0.3s ease;
}

/* underline (hidden by default) */
nav a::after {
  content: "";
  position: absolute;
  bottom: -6px;
  right: 0;
  width: 0%;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

/* hover animation */
nav a:hover {
  color: var(--primary);
}

nav a:hover::after {
  width: 100%;
}

/* ACTIVE LINK */
nav a.active {
  color: var(--primary);
}

nav a.active::after {
  width: 100%;
}
.logo {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}

/* NAV LINKS RTL FIX */
nav a {
  margin: 0 10px;
  color: #111;
  font-weight: 500;
}

/* BUTTON */
.btn {
  background: var(--primary);
  color: #fff;
  padding: 12px 20px;
  border-radius: 999px;
  display: inline-block;
}

/* HERO */
.hero {
  padding: 60px 0;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
  text-align: start;
position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 56px;
  line-height: 1.2;
}

.hero p {
  margin: 20px 0;
  color: var(--muted);
  font-size: 18px;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* OUTLINE BUTTON */
.outline {
  border: 1px solid #ddd;
  color: #111;
  background: #fff;
}

/* GALLERY */
.gallery {
  overscroll-behavior: contain;

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 120px;
  gap: 14px;
}

/* Base image style */
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
  display: block;
}

/* Different tile sizes (random feel) */
.gallery img:nth-child(1) {
  grid-column: span 2;
  grid-row: span 2;
}

.gallery img:nth-child(2) {
  grid-column: span 1;
  grid-row: span 2;
}

.gallery img:nth-child(3) {
  grid-column: span 1;
  grid-row: span 1;
}

.gallery img:nth-child(4) {
  grid-column: span 2;
  grid-row: span 1;
}


/* SECTIONS */
section {
  padding: 70px 0;
}

.section-title {
  font-size: 38px;
  margin-bottom: 10px;
}

.muted {
  color: var(--muted);
}

/* PRODUCTS */
.products {
  background: var(--bg);
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 30px;
}

.card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 24px;
  overflow: hidden;
}

.card img {
  height: 220px;
  width: 100%;
  object-fit: cover;
}

.card-content {
  padding: 18px;
  text-align: start;
}

.price {
  color: var(--primary);
  font-weight: 700;
}

/* CARD HEADER */
.card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* TWO COLUMN */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: center;
}

/* MAP */
.map {
  min-height: 280px;
  background: #eef2f7;
  border-radius: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

footer {
  background: var(--dark);
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 30px;
}

.footer-grid h4 {
  margin-bottom: 12px;
  transition: color 0.3s ease;
}

.footer-grid a,
.footer-grid p {
  color: #d1d5db;
  margin: 8px 0;
  display: block;
}

/* hover links without moving layout */
.footer-grid a {
  transition: color 0.3s ease, opacity 0.3s ease;
}

.footer-grid a:hover {
  color: var(--primary);
  opacity: 1;
}

.footer-grid a:active {
  opacity: 0.75;
}

/* heading hover */
.footer-grid h4:hover {
  color: var(--primary);
}

/* CATEGORY GRID (CLEAN RTL) */
.categories {
  background: #fff;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 30px;
}

.category-card {
  background: var(--bg);
  border: 1px solid #eee;
  border-radius: 20px;
  padding: 25px;
  text-align: center;
  transition: 0.3s;
}

.category-card:hover {
  transform: translateY(-5px);
  background: #fff;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.category-card i {
  font-size: 30px;
  margin-bottom: 12px;
  color: var(--primary);
}

.category-card h3 {
  margin-top: 10px;
  font-size: 18px;
}

.footer-grid h2{
    font-size: 20px;
}

.fade {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.fade.show {
  opacity: 1;
  transform: none;
}
.gallery-btn{
    display: none;
}
/* RESPONSIVE */
@media (max-width: 900px) {
  .hero,
  .two-col,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .cards {
    grid-template-columns: 1fr 1fr;
  }

  .hero h1 {
    font-size: 42px;
  }

  .category-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  nav {
    display: none;
  }

  .cards {
    grid-template-columns: 1fr;
  }
.hero {
  display: flex;
  flex-direction: column;
}

.hero > div:first-child {
  order: 2; /* text */
}

.hero .gallery-wrapper {
  order: 1; /* carousel on top */
}
  .hero h1 {
    font-size: 34px;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
    .gallery-wrapper {
    width: 100vw;
    overflow: hidden;
  }


  .gallery {
      position: relative;

    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 0;
  }

  .gallery img {
    flex: 0 0 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 0;
    scroll-snap-align: start;
  }

  .gallery::-webkit-scrollbar {
    display: none;
  }
.hero.container {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding-inline: 0;
}

  .hero.container {
    padding: 0;
    width: 100%;
    margin: 0;
  }

  .gallery-wrapper {
    width: 100%;
  }
  .gallery-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  z-index: 0;
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.25); /* adjust darkness */
  z-index: 2;
  pointer-events: none;
}
.gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.466);
  cursor: pointer;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-btn.prev {
  right: 10px; /* RTL */
}

.gallery-btn.next {
  left: 10px;
}
.hero-content
{
    padding: 20px;
}
}

