:root {
  --primary: #b08d57;
  --primary-contrast: #fff;
  --accent: #222;
  --bg: #fdfaf6;
  --card-bg: #fff;
  --muted: #8a8a8a;

  --radius: 14px;
  --gap: 12px;
  --container-max: 1200px;

  --font-base: "Tajawal", sans-serif;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
  --shadow-md: 0 6px 16px rgba(0,0,0,0.08);
  --transition-fast: 180ms cubic-bezier(.25,.75,.25,.9);

  --badge-bg: var(--primary);
  --badge-color: #fff;
}


* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-base);
  background: var(--bg);
  color: var(--accent);
  line-height: 1.5;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 15px;
}


.header-logo {
  display: block;
  margin: 0 auto 10px;
  max-width: 180px;
  height: auto;
}


.products {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  margin: 15px 0;
}

.page-all .products {
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}


.product {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform var(--transition-fast),
              box-shadow var(--transition-fast);
}

.product:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* IMAGE */
.product .media {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.product .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-fast);
}

.product:hover .media img {
  transform: scale(1.05);
}

/* INFO */
.product .info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.product .title {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  margin: 0;

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.price {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
}

.compare {
  font-size: 12px;
  color: var(--muted);
  text-decoration: line-through;
}

/* BADGE */
.badge {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--badge-bg);
  color: var(--badge-color);
  padding: 3px 8px;
  border-radius: 50px;
  font-size: 10px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}


.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-contrast);
}

.btn-primary:hover {
  filter: brightness(0.92);
}


@media (max-width: 1024px) {
  .products {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

@media (max-width: 768px) {
  .products {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }
}

@media (max-width: 480px) {
  :root { --gap: 8px; }
  .products {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}