@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700&family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #0f56a6;
  --primary-soft: #2978ff;
  --primary-dark: #0a3c70;
  --accent: #17a398;
  --accent-soft: #a4f6e3;
  --ink: #0c1c33;
  --ink-muted: #506075;
  --surface: #ffffff;
  --surface-muted: #f5f7fb;
  --border: rgba(12, 27, 51, 0.12);
  --line: rgba(15, 86, 166, 0.18);
  --muted: #8492a6;
  --radius-full: 999px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --space-xxs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 3.5rem;
  --shadow-soft: 0 18px 45px rgba(12, 27, 51, 0.12);
  --shadow-card: 0 18px 40px rgba(12, 27, 51, 0.18);
  --transition-base: 240ms ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Cairo', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  direction: rtl;
  background: radial-gradient(circle at top right, rgba(15, 86, 166, 0.18), transparent 35%), #f0f4fb;
  color: var(--ink);
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-base);
}

body,
button,
input,
select,
textarea {
  font-family: inherit;
}

.site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(240, 244, 251, 0.9));
}

.container {
  width: min(1200px, 100% - 2rem);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  padding: var(--space-md) 0;
  border-bottom: 1px solid rgba(12, 27, 51, 0.08);
}

.header__container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-lg);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--primary-dark);
}

.logo__symbol {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #fff url('../img/logo.png') center/contain no-repeat;
  border: 2px solid rgba(37, 99, 235, 0.4);
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
  position: relative;
}

.logo__symbol::after {
  content: '';
  position: absolute;
  inset: auto;
}

.logo__symbol::after {
  content: '';
  width: 24px;
  height: 24px;
  border: 2px solid rgba(15, 86, 166, 0.25);
  border-radius: 50%;
  position: absolute;
  inset: auto;
  box-shadow: 0 0 20px rgba(15, 86, 166, 0.2);
}

.logo__symbol {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #fff url('../img/logo.png') center/contain no-repeat;
  border: 2px solid rgba(37, 99, 235, 0.4);
  box-shadow: 0 5px 24px rgba(0, 0, 0, 0.15);
  position: relative;
}

.logo__symbol::after {
  content: '';
  position: absolute;
  inset: auto;
}

.logo__name {
  font-weight: 700;
  color: var(--ink);
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav__list {
  list-style: none;
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.nav__link {
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  color: var(--ink-muted);
  transition: all var(--transition-base);
  border: 1px solid transparent;
}

.nav__link:hover {
  color: var(--primary-dark);
  border-color: rgba(15, 86, 166, 0.2);
  background: rgba(23, 163, 152, 0.08);
}

.nav__link.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-soft));
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-soft);
}

.hero {
  padding: 8rem 0 4rem;
  background: linear-gradient(180deg, rgba(15, 86, 166, 0.15), rgba(240, 244, 251, 0));
}

.hero__content {
  text-align: center;
  max-width: 840px;
  margin: 0 auto;
}

.hero__title {
  font-size: clamp(2.6rem, 4vw, 3.6rem);
  font-weight: 700;
  color: var(--primary-dark);
}

.hero__subtitle {
  font-size: 1.1rem;
  color: var(--accent);
  letter-spacing: 0.2rem;
  margin-top: var(--space-xs);
}

.hero__description {
  color: var(--ink-muted);
  font-size: 1.2rem;
  line-height: 1.8;
  margin-top: var(--space-md);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
  padding: var(--space-xl) 0;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(15, 86, 166, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card__visual {
  height: 220px;
  overflow: hidden;
  position: relative;
}

.card__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--transition-base);
}

.card:hover .card__visual img {
  transform: scale(1.05);
}

.card__content {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.card__text {
  color: var(--ink-muted);
  line-height: 1.7;
}

.card__action {
  align-self: flex-start;
  padding: 0.65rem 1.6rem;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--primary-soft));
  color: #fff;
  font-weight: 600;
  transition: all var(--transition-base);
  margin-top: var(--space-sm);
  border: none;
}

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

.card--featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.page-header {
  margin-top: 80px;
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  text-align: center;
}

.page-header h1 {
  font-size: clamp(2rem, 3vw, 3rem);
  color: var(--primary-dark);
}

.page-header p {
  color: var(--ink-muted);
  font-size: 1.1rem;
}

.filters {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(15, 86, 166, 0.08);
  margin: var(--space-xl) 0;
}

.filters__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-md);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.filter-label {
  font-size: 0.9rem;
  color: var(--ink-muted);
  font-weight: 600;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
}

.filter-input,
.filter-select {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 0.75rem 1rem;
  background: #fff;
  font-size: 1rem;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.filter-input:focus,
.filter-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 86, 166, 0.12);
}

.filters__actions {
  margin-top: var(--space-md);
  display: flex;
  justify-content: flex-end;
}

.results-info {
  color: var(--ink-muted);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-2xl);
}

.product-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(15, 86, 166, 0.08);
  overflow: hidden;
}

.product-card__image {
  height: 240px;
  background: linear-gradient(135deg, rgba(15, 86, 166, 0.08), rgba(240, 244, 251, 0.9));
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card__content {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.product-card__title {
  font-size: 1.2rem;
  color: var(--ink);
  font-weight: 700;
}

.product-card__description {
  font-size: 0.95rem;
  color: var(--ink-muted);
  line-height: 1.6;
}

.product-card__footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.product-card__price {
  font-size: 1.4rem;
  color: var(--accent);
  font-weight: 700;
}

.product-card__action {
  width: 100%;
  text-align: center;
  background: rgba(23, 163, 152, 0.08);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(23, 163, 152, 0.5);
  color: var(--accent);
  font-weight: 600;
  padding: 0.75rem 0;
  cursor: pointer;
  transition: all var(--transition-base);
}

.product-card__action:hover {
  background: linear-gradient(135deg, var(--accent), rgba(23, 163, 152, 0.2));
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.p-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  box-shadow: 0 10px 25px rgba(12, 27, 51, 0.08);
}

.p-card__img {
  height: 180px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: linear-gradient(135deg, #e0ecff, #f5f7fb);
}

.p-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-xxs);
}

.p-card__agency {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.2rem;
  color: var(--primary);
}

.p-card__title {
  font-weight: 700;
  color: var(--ink);
}

.p-card__desc {
  color: var(--ink-muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.p-card__price {
  margin-top: auto;
  font-weight: 700;
  color: var(--accent);
  font-size: 1.2rem;
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.pagination__button {
  border: 1px solid var(--border);
  background: #fff;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
}

.pagination__button:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.pagination__button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pagination__info {
  color: var(--ink-muted);
  font-weight: 600;
}

.cart-card {
  padding: var(--space-xl);
  border-radius: var(--radius-xl);
  background: #fff;
  border: 1px solid rgba(15, 86, 166, 0.12);
  box-shadow: var(--shadow-card);
}

.cart-card__list {
  display: grid;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.cart-item {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-lg);
  background: var(--surface-muted);
  border: 1px dashed rgba(15, 86, 166, 0.1);
  align-items: center;
}

.cart-item__image {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item__title {
  font-weight: 700;
  color: var(--ink);
}

.cart-item__meta {
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.cart-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

.cart-item__qty input {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 0.4rem 0.6rem;
  width: 72px;
  text-align: center;
}

.cart-card__summary {
  border-top: 1px solid rgba(12, 27, 51, 0.08);
  padding-top: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.cart-card__summary strong {
  font-size: 1.6rem;
  color: var(--primary);
}

.cart-card__actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.empty-state {
  background: #fff;
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  text-align: center;
  border: 1px dashed rgba(15, 86, 166, 0.3);
}

.empty-state__icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  color: var(--primary);
}

.empty-state__title {
  font-size: 1.3rem;
  color: var(--ink);
  margin-bottom: var(--space-xs);
}

.empty-state__description {
  color: var(--ink-muted);
  max-width: 360px;
  margin: 0 auto;
}

.empty {
  border-radius: var(--radius-md);
  border: 1px solid rgba(15, 86, 166, 0.1);
  padding: var(--space-md);
  background: #fff;
  color: var(--ink-muted);
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  font-size: 0.95rem;
  color: var(--ink);
}

.field span {
  font-weight: 600;
}

.field input,
.field textarea {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 0.9rem 1rem;
  background: #fff;
  font-size: 1rem;
  transition: border-color var(--transition-base);
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 86, 166, 0.18);
}

.btn {
  border: none;
  border-radius: var(--radius-full);
  padding: 0.75rem 1.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
}

.btn--primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-soft));
  color: #fff;
  box-shadow: var(--shadow-soft);
}

.btn--primary:hover {
  transform: translateY(-2px);
}

.btn--secondary {
  background: #fff;
  color: var(--primary-dark);
  border: 1px solid rgba(15, 86, 166, 0.3);
}

.btn--secondary:hover {
  border-color: var(--primary);
}

.btn--ghost {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--ink-muted);
}

.btn--ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.footer {
  background: #0c1628;
  color: #e8ecf5;
  padding: var(--space-xl) 0;
}

.footer__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-lg);
  width: min(1200px, 100% - 2rem);
  margin: 0 auto;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer__logo {
  font-size: 1.5rem;
  color: #fff;
  font-weight: 700;
}

.footer__description {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer__links h3 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: var(--space-xs);
}

.footer__link {
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition-base);
}

.footer__link:hover {
  color: #fff;
}

.footer__bottom {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--space-md);
  margin-top: var(--space-md);
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.footer__admin {
  color: #b7c6e0;
  font-weight: 600;
  transition: color var(--transition-base);
}

.footer__admin:hover {
  color: #fff;
}

.topbar {
  background: #0c1628;
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  padding: var(--space-md) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.topbar__inner {
  width: min(1200px, 100% - 2rem);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 700;
  color: #fff;
}

.brand__logo {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 12px;
  background: #fff;
  padding: 4px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.25);
}

.brand__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(23, 163, 152, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.brand__dot::after {
  content: '';
  width: 24px;
  height: 24px;
  border: 2px solid rgba(15, 86, 166, 0.25);
  border-radius: 50%;
  position: absolute;
  inset: auto;
  box-shadow: 0 0 20px rgba(15, 86, 166, 0.2);
}

.brand__name {
  font-size: 1.2rem;
}

.topbar .nav {
  flex: 1;
}

.pagehead {
  padding: var(--space-xl);
  background: linear-gradient(135deg, rgba(15, 86, 166, 0.15), rgba(255, 255, 255, 0));
  border-radius: var(--radius-lg);
  border: 1px solid rgba(15, 86, 166, 0.2);
  margin-top: 1rem;
  text-align: right;
}

.pagehead h1 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: var(--space-xs);
}

.pagehead p {
  color: var(--ink-muted);
}

.card__body {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  width: 100%;
}

.field-inline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-md);
}

.floating-cart {
  position: fixed;
  bottom: var(--space-lg);
  left: var(--space-lg);
  z-index: 40;
  pointer-events: none;
}

.floating-cart__button {
  pointer-events: all;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--primary-soft));
  color: #fff;
  font-size: 1.4rem;
  box-shadow: 0 10px 30px rgba(23, 163, 152, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-base);
  font-family: 'Segoe UI Symbol', 'Noto Color Emoji', 'Apple Color Emoji', sans-serif;
}

.floating-cart__button::before {
  content: '🛒';
  display: inline-block;
  transform: translateY(-1px);
  font-size: 1.5rem;
}

.floating-cart__button:hover {
  transform: translateY(-4px);
}

.floating-cart__badge {
  position: absolute;
  top: -6px;
  left: -6px;
  min-width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

.floating-cart--pulse .floating-cart__button {
  animation: floatPulse 0.9s ease infinite;
}

@keyframes floatPulse {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
  100% {
    transform: translateY(0);
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 992px) {
  .header__container,
  .topbar__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    width: 100%;
    justify-content: center;
  }

  .product-card__footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 6rem 0 3rem;
  }

  .hero__description {
    font-size: 1rem;
  }

  .nav__list {
    justify-content: center;
  }

  .card--featured {
    grid-template-columns: 1fr;
  }

  .cart-item {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 540px) {
  .container {
    padding: 0 var(--space-sm);
  }

  .btn {
    width: 100%;
    justify-content: center;
  }

  .filters__actions {
    justify-content: center;
  }
}
