/* ======================================================
   Products Page — Baby Haven Minimal Clean (V3)
   نسخة نظيفة، بلا لمعان، بلا شغل زائد — منسجمة مع خيار C
====================================================== */

@import url("./baby-haven.theme.logo.css");

/* RESET / BASE */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html[dir="rtl"] body { direction: rtl; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 500 15.5px/1.65 "Inter", system-ui, -apple-system, "Noto Naskh Arabic UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--primary); text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 10px;
}

/* Container */
.container {
  width: min(1180px, 92vw);
  margin-inline: auto;
  padding: 16px 0;
}

/* ======================================================
   HEADER — نظيف + ثابت + بلا لمعان
====================================================== */
header.page-header {
  position: sticky;
  top: 0;
  z-index: 15;
  background: #FFFFFFEE; /* شفاف خفيف */
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: grid;
  gap: 12px;
  padding: 10px 0;
  grid-template-columns: 1fr;
}

.title {
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: 800;
  letter-spacing: 0.2px;
}

.controls {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .header-inner { grid-template-columns: 1fr 2fr; }
  .controls { grid-template-columns: repeat(4, 1fr); }
}

.control {
  display: flex;
  gap: 8px;
  align-items: center;
}

.control label {
  min-width: max-content;
  font-size: 14px;
  color: var(--text-muted);
}

/* INPUTS */
.control input[type="text"],
.control input[type="number"],
.control select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  transition: border-color 140ms ease;
}

.control input:focus,
.control select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47,163,160,.15);
}

/* ======================================================
   PRODUCTS GRID
====================================================== */
.products {
  display: grid;
  gap: 16px;
  margin-top: 18px;
  grid-template-columns: repeat(2, 1fr);
}

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

/* ======================================================
   PAGINATION — Clean + Minimal
====================================================== */
.pagination {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin: 24px 0;
}

.pagination button {
  padding: 8px 12px;
  background: #FFFFFF;
  border-radius: 10px;
  border: 1px solid var(--border);
  cursor: pointer;
  font-weight: 600;
  transition: background 140ms ease;
}

.pagination button:hover {
  background: var(--bg-elev-2);
}

.pagination .active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ======================================================
   TOAST — ثابت + غير لامع
====================================================== */
.toast {
  position: fixed;
  inset-inline: 16px;
  bottom: 16px;
  max-width: 420px;
  margin-inline: auto;
  background: #FFFFFF;
  color: var(--text);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);

  opacity: 0;
  transform: translateY(10px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ======================================================
   MOTION REDUCTION
====================================================== */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
