@font-face {
  font-family: "Cairo";
  src: url("assets/Cairo-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cairo";
  src: url("assets/Cairo-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: #0666cb;
  --primary-700: #004287;
  --primary-50: #eef6ff;
  --secondary: #00b5e8;
  --navy: #0c1740;
  --ink: #162033;
  --muted: #67748a;
  --line: #e2eaf4;
  --surface: #ffffff;
  --canvas: #f6f8fc;
  --success: #119b6a;
  --danger: #ef4d61;
  --gold: #f5aa2a;
  --shadow-sm: 0 7px 22px rgba(22, 55, 96, 0.08);
  --shadow-md: 0 18px 50px rgba(11, 52, 102, 0.13);
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 28px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Cairo", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

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

img,
svg {
  display: block;
}

.skip-link {
  position: fixed;
  z-index: 999;
  inset-inline-start: 12px;
  top: -60px;
  padding: 10px 16px;
  border-radius: 12px;
  color: #fff;
  background: var(--primary);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

.container {
  width: min(calc(100% - 40px), var(--container));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  border-bottom: 1px solid rgba(226, 234, 244, 0.9);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 76px;
  display: grid;
  grid-template-columns: 180px 1fr auto;
  gap: 26px;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
}

.brand img {
  width: 145px;
  height: 49px;
  object-fit: contain;
}

.desktop-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
}

.nav-link {
  position: relative;
  border: 0;
  padding: 10px 0;
  color: #465269;
  background: transparent;
  font-weight: 700;
}

.nav-link::after {
  position: absolute;
  bottom: 2px;
  right: 0;
  left: 0;
  height: 3px;
  border-radius: 20px;
  background: var(--primary);
  content: "";
  opacity: 0;
  transform: scaleX(0.35);
  transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.language-btn {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--primary);
  background: #fff;
  font-size: 13px;
  font-weight: 800;
}

.language-btn:hover {
  background: var(--primary-50);
}

.icon-btn,
.ghost-btn,
.primary-btn,
.soft-btn,
.outline-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 14px;
  border: 0;
  padding: 0 17px;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.icon-btn {
  position: relative;
  width: 44px;
  padding: 0;
  border: 1px solid var(--line);
  color: #3f4b60;
  background: #fff;
}

.icon-btn:hover,
.outline-btn:hover,
.soft-btn:hover {
  background: var(--primary-50);
}

.primary-btn {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 9px 20px rgba(6, 102, 203, 0.22);
}

.primary-btn:hover {
  background: #0558ae;
  transform: translateY(-1px);
  box-shadow: 0 12px 25px rgba(6, 102, 203, 0.27);
}

.outline-btn {
  border: 1px solid #b9cae0;
  color: var(--primary);
  background: #fff;
}

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

.ghost-btn {
  color: #445066;
  background: transparent;
}

.wide-btn {
  width: 100%;
}

.btn-icon,
.icon-btn svg,
.nav-icon svg {
  width: 21px;
  height: 21px;
}

.favorites-count {
  position: absolute;
  top: -6px;
  inset-inline-start: -4px;
  min-width: 18px;
  height: 18px;
  padding-inline: 4px;
  border: 2px solid #fff;
  border-radius: 30px;
  color: #fff;
  background: var(--danger);
  font-size: 10px;
  line-height: 14px;
}

main {
  min-height: calc(100vh - 76px);
}

.page-enter {
  animation: page-in 0.35s ease both;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 76px 0 64px;
  color: #fff;
  background:
    radial-gradient(circle at 16% 20%, rgba(0, 181, 232, 0.32), transparent 28%),
    radial-gradient(circle at 80% 70%, rgba(123, 190, 255, 0.18), transparent 24%),
    linear-gradient(125deg, #003f82 0%, #0666cb 55%, #087ddd 100%);
}

.hero::before,
.hero::after {
  position: absolute;
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.hero::before {
  width: 340px;
  height: 340px;
  left: -110px;
  bottom: -210px;
  border: 60px solid rgba(255, 255, 255, 0.08);
}

.hero::after {
  width: 120px;
  height: 120px;
  top: 45px;
  right: 7%;
  border: 25px solid rgba(255, 255, 255, 0.07);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 56px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 30px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 13px;
  font-weight: 700;
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #62e0ff;
  box-shadow: 0 0 0 5px rgba(98, 224, 255, 0.13);
}

.hero h1 {
  max-width: 650px;
  margin: 0;
  font-size: clamp(38px, 5.2vw, 66px);
  line-height: 1.2;
  letter-spacing: -1.8px;
}

.hero-title span,
.hero-title strong {
  display: block;
}

.hero-title strong {
  position: relative;
  width: fit-content;
  margin-top: 7px;
  color: #9be9ff;
  font-weight: 800;
}

.hero-title strong::after {
  position: absolute;
  right: 0;
  bottom: -5px;
  left: 0;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, #64e3ff, rgba(255, 255, 255, 0.15));
  content: "";
}

[dir="ltr"] .hero-title strong::after {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.15), #64e3ff);
}

.hero-copy > p {
  max-width: 590px;
  margin: 18px 0 30px;
  color: #dfeeff;
  font-size: 18px;
  line-height: 1.9;
}

.hero-card {
  position: relative;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.13);
  box-shadow: 0 22px 80px rgba(0, 40, 90, 0.28);
  backdrop-filter: blur(16px);
}

.hero-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.hero-card-title {
  font-size: 20px;
  font-weight: 700;
}

.hero-card-tag {
  border-radius: 20px;
  padding: 5px 10px;
  color: #053565;
  background: #d8f6ff;
  font-size: 12px;
  font-weight: 700;
}

.search-panel {
  display: grid;
  gap: 12px;
}

.search-input-wrap {
  position: relative;
}

.search-input-wrap svg {
  position: absolute;
  top: 50%;
  right: 16px;
  width: 20px;
  height: 20px;
  color: var(--primary);
  transform: translateY(-50%);
  pointer-events: none;
}

.search-panel input,
.search-panel select,
.form-control {
  width: 100%;
  min-height: 52px;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 0 16px;
  color: var(--ink);
  outline: none;
  background: #fff;
}

.search-panel input {
  padding-right: 48px;
}

.search-panel input:focus,
.search-panel select:focus,
.form-control:focus {
  border-color: #76b6f6;
  box-shadow: 0 0 0 4px rgba(6, 102, 203, 0.12);
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.hero-search-btn {
  min-height: 52px;
  border: 0;
  border-radius: 14px;
  color: var(--primary);
  background: #fff;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(1, 39, 83, 0.16);
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 26px;
  color: #dfeeff;
  font-size: 13px;
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.trust-item svg {
  width: 18px;
  height: 18px;
  color: #75e4ff;
}

.store-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.store-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 158px;
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 14px;
  padding: 7px 14px;
  color: #fff;
  background: rgba(0, 20, 48, 0.5);
  box-shadow: 0 12px 25px rgba(0, 25, 57, 0.18);
  backdrop-filter: blur(8px);
}

.store-button:hover {
  transform: translateY(-2px);
  background: rgba(0, 20, 48, 0.72);
}

.store-button span:last-child {
  display: grid;
}

.store-button small {
  font-size: 9px;
  line-height: 1.1;
  opacity: 0.8;
}

.store-button strong {
  font-size: 16px;
  line-height: 1.25;
}

.store-symbol {
  font-size: 23px;
}

.apple-symbol {
  font-size: 26px;
}

.section {
  padding: 66px 0;
}

.section-white {
  background: #fff;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 28px;
}

.section-kicker {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}

.section h2,
.page-title {
  margin: 0;
  color: var(--navy);
  font-size: clamp(27px, 3vw, 38px);
  line-height: 1.3;
}

.section-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 0;
  color: var(--primary);
  background: transparent;
  font-weight: 700;
}

.text-link svg {
  width: 18px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.category-card {
  position: relative;
  min-height: 205px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.category-card::after {
  position: absolute;
  width: 230px;
  height: 230px;
  top: -70px;
  left: -50px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(6, 102, 203, 0.13), rgba(0, 181, 232, 0.04));
  content: "";
}

.category-content {
  position: relative;
  z-index: 2;
  max-width: 65%;
}

.category-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 17px;
  background: var(--primary-50);
}

.category-icon img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.category-card h3 {
  margin: 0 0 6px;
  color: var(--navy);
  font-size: 23px;
}

.category-card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.category-illustration {
  position: absolute;
  z-index: 1;
  left: 25px;
  bottom: 15px;
  width: 145px;
  opacity: 0.96;
}

.dynamic-category-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.compact-category-card {
  min-height: 210px;
  padding: 24px;
}

.compact-category-card .category-content {
  max-width: 100%;
}

.compact-category-card::after {
  width: 170px;
  height: 170px;
}

.compact-category-card .category-icon {
  width: 64px;
  height: 64px;
}

.compact-category-card .category-icon img {
  width: 42px;
  height: 42px;
}

.compact-category-card h3 {
  font-size: 20px;
}

.compact-category-card p {
  min-height: 42px;
  font-size: 14px;
  line-height: 1.6;
}

.sync-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  color: var(--navy);
  background: #fff;
  font-size: 14px;
}

.sync-note svg {
  flex: 0 0 auto;
  width: 20px;
  color: var(--primary);
}

.sync-note.connected {
  border-color: #b8e3cc;
  background: #f2fbf6;
}

.sync-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #18a957;
  box-shadow: 0 0 0 5px rgba(24, 169, 87, 0.12);
}

.subcategories-strip {
  border-bottom: 1px solid var(--line);
  padding: 24px 0;
  background: #fff;
}

.subcategories-strip h2 {
  margin: 0 0 14px;
  color: var(--navy);
  font-size: 18px;
}

.subcategory-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.subcategory-list a {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 7px 14px;
  color: var(--navy);
  background: #fff;
  font-weight: 700;
}

.subcategory-list a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.subcategory-list img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  object-fit: contain;
}

.loading-state {
  display: grid;
  min-height: 58vh;
  place-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
}

.loading-state h2,
.loading-state p {
  margin: 0;
}

.loading-state h2 {
  color: var(--navy);
  font-size: 22px;
}

.loading-state p {
  color: var(--muted);
}

.loading-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid #dbeaff;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: loading-spin 0.8s linear infinite;
}

@keyframes loading-spin {
  to { transform: rotate(360deg); }
}

.listings-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.listing-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.listing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.listing-media {
  position: relative;
  height: 190px;
  overflow: hidden;
  background: #d8e8fa;
}

.listing-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.listing-card:hover .listing-media img {
  transform: scale(1.035);
}

.vip-badge,
.demo-badge,
.type-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 30px;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 700;
}

.vip-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  color: #fff;
  background: var(--primary);
}

.vip-badge svg {
  width: 13px;
  height: 13px;
}

.favorite-button {
  position: absolute;
  top: 11px;
  left: 11px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  color: #fff;
  background: rgba(11, 27, 49, 0.34);
  backdrop-filter: blur(7px);
}

.favorite-button.active {
  color: #fff;
  background: var(--danger);
}

.favorite-button svg {
  width: 19px;
  height: 19px;
}

.listing-body {
  padding: 17px;
}

.listing-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
}

.listing-location {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.listing-location svg {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  color: var(--primary);
}

.listing-date {
  color: #98a3b6;
  font-size: 11px;
  white-space: nowrap;
}

.listing-title {
  min-height: 52px;
  margin: 0;
  color: var(--navy);
  font-size: 17px;
  line-height: 1.6;
}

.listing-specs {
  display: flex;
  gap: 12px;
  margin: 11px 0 14px;
  color: var(--muted);
  font-size: 12px;
}

.listing-spec {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.listing-spec svg {
  width: 15px;
  height: 15px;
}

.listing-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

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

.price small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--success);
  font-size: 11px;
}

.verified svg {
  width: 16px;
  height: 16px;
}

.prototype-note {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 30px;
  border: 1px solid #cfe2f7;
  border-radius: 16px;
  padding: 14px 16px;
  color: #315575;
  background: #f0f7ff;
  font-size: 13px;
}

.prototype-note svg {
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  margin-top: 2px;
  color: var(--primary);
}

.page-hero {
  padding: 42px 0 36px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 13px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumbs a:hover {
  color: var(--primary);
}

.page-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.result-count {
  margin-top: 6px;
  color: var(--muted);
}

.catalog {
  padding: 34px 0 70px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: 270px 1fr;
  gap: 26px;
  align-items: start;
}

.filter-card {
  position: sticky;
  top: 100px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 21px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.filter-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.filter-head h2 {
  margin: 0;
  font-size: 20px;
}

.reset-btn {
  border: 0;
  padding: 4px;
  color: var(--primary);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
}

.filter-group {
  margin-bottom: 18px;
}

.filter-group label,
.field-label {
  display: block;
  margin-bottom: 8px;
  color: #38455b;
  font-size: 13px;
  font-weight: 700;
}

.filter-control {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  color: var(--ink);
  outline: none;
  background: #fbfcff;
}

.filter-control:focus {
  border-color: #76b6f6;
  box-shadow: 0 0 0 3px rgba(6, 102, 203, 0.1);
}

.range-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 9px 0;
  color: #4a566c;
  font-size: 13px;
}

.check-row input {
  width: 17px;
  height: 17px;
  accent-color: var(--primary);
}

.catalog-main {
  min-width: 0;
}

.catalog-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 10px;
  margin-bottom: 20px;
}

.catalog-search {
  position: relative;
}

.catalog-search svg {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 19px;
  transform: translateY(-50%);
  color: var(--primary);
}

.catalog-search input {
  padding-right: 43px;
}

.sort-select {
  min-width: 185px;
}

.mobile-filter-btn {
  display: none;
}

.catalog-listings {
  grid-template-columns: repeat(3, 1fr);
}

.empty-state {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 330px;
  border: 1px dashed #c9d7e8;
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
  background: #fff;
}

.empty-icon {
  display: grid;
  width: 74px;
  height: 74px;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 50%;
  color: var(--primary);
  background: var(--primary-50);
}

.empty-icon svg {
  width: 35px;
  height: 35px;
}

.empty-state h3 {
  margin: 0 0 6px;
}

.empty-state p {
  max-width: 450px;
  margin: 0 0 18px;
  color: var(--muted);
}

.detail-page {
  padding: 32px 0 74px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 365px;
  gap: 28px;
  align-items: start;
}

.detail-gallery {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 12px;
  margin-bottom: 22px;
}

.detail-main-image {
  height: 460px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: #dceafa;
}

.detail-main-image img,
.thumb-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumbs {
  display: grid;
  gap: 12px;
}

.thumb-button {
  overflow: hidden;
  border: 2px solid transparent;
  border-radius: 16px;
  padding: 0;
  background: #dceafa;
}

.thumb-button.active {
  border-color: var(--primary);
}

.detail-card {
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.detail-card h2,
.detail-card h3 {
  margin: 0 0 15px;
  color: var(--navy);
}

.detail-card p {
  color: #536075;
  line-height: 2;
}

.detail-spec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.detail-spec {
  border-radius: 14px;
  padding: 15px;
  background: #f7f9fc;
}

.detail-spec span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
}

.detail-spec strong {
  color: var(--navy);
}

.detail-side {
  position: sticky;
  top: 100px;
}

.detail-summary {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.detail-type-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.type-badge {
  color: var(--primary);
  background: var(--primary-50);
}

.detail-summary h1 {
  margin: 0 0 12px;
  color: var(--navy);
  font-size: 25px;
  line-height: 1.55;
}

.detail-location {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 20px;
  color: var(--muted);
}

.detail-location svg {
  width: 18px;
  color: var(--primary);
}

.detail-price {
  margin: 18px 0;
  border-block: 1px solid var(--line);
  padding: 18px 0;
  color: var(--primary);
  font-size: 28px;
  font-weight: 700;
}

.seller-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  border-radius: 16px;
  padding: 13px;
  background: #f7f9fc;
}

.seller-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  font-weight: 700;
}

.seller-name {
  font-weight: 700;
}

.seller-note {
  color: var(--muted);
  font-size: 11px;
}

.action-stack {
  display: grid;
  gap: 10px;
}

.safe-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.safe-note svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--success);
}

.form-page {
  padding: 40px 0 80px;
}

.form-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.form-aside,
.form-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.form-aside {
  position: sticky;
  top: 100px;
  padding: 24px;
}

.form-aside h2 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 22px;
}

.form-aside > p {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.8;
}

.steps {
  display: grid;
  gap: 18px;
}

.step {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #7b8799;
}

.step-number {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 50%;
  background: #edf1f6;
  font-size: 12px;
  font-weight: 700;
}

.step.active {
  color: var(--primary);
  font-weight: 700;
}

.step.active .step-number {
  color: #fff;
  background: var(--primary);
}

.form-card {
  padding: 30px;
}

.form-card h1 {
  margin: 0 0 6px;
  color: var(--navy);
  font-size: 29px;
}

.form-intro {
  margin: 0 0 28px;
  color: var(--muted);
}

.form-section {
  margin-bottom: 30px;
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 16px;
  color: var(--navy);
  font-size: 18px;
}

.form-section-title svg {
  width: 20px;
  color: var(--primary);
}

.category-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.choice-card {
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 15px;
  background: #fff;
}

.choice-card:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-50);
  box-shadow: 0 0 0 3px rgba(6, 102, 203, 0.08);
}

.choice-card input {
  accent-color: var(--primary);
}

.choice-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 12px;
  background: #fff;
}

.choice-icon img {
  width: 29px;
  height: 29px;
  object-fit: contain;
}

.fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field-full {
  grid-column: 1 / -1;
}

.field-help {
  margin: 0;
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 18px;
  color: var(--muted);
  background: var(--surface);
}

.filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px;
}

.filter-options legend {
  padding: 0 6px;
}

.inline-loading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  color: var(--muted);
}

.inline-loading .loading-spinner {
  width: 26px;
  height: 26px;
  border-width: 3px;
}

[dir="ltr"] body {
  text-align: left;
}

[dir="ltr"] .search-input-wrap svg {
  right: auto;
  left: 16px;
}

[dir="ltr"] .search-panel input {
  padding-right: 16px;
  padding-left: 48px;
}

[dir="ltr"] .nav-link::after {
  right: 0;
  left: 0;
}

textarea.form-control {
  min-height: 140px;
  padding: 13px 16px;
  resize: vertical;
}

.upload-zone {
  display: grid;
  min-height: 150px;
  place-items: center;
  border: 1.5px dashed #9db9d8;
  border-radius: 18px;
  padding: 22px;
  text-align: center;
  color: var(--muted);
  background: #f8fbff;
}

.upload-zone svg {
  width: 34px;
  height: 34px;
  margin: 0 auto 8px;
  color: var(--primary);
}

.upload-zone strong {
  display: block;
  margin-bottom: 4px;
  color: var(--navy);
}

.form-actions {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 20, 38, 0.58);
  backdrop-filter: blur(7px);
  animation: fade-in 0.2s ease;
}

@keyframes fade-in { from { opacity: 0; } }

.modal {
  width: min(100%, 480px);
  max-height: min(760px, 92vh);
  overflow: auto;
  border-radius: var(--radius-lg);
  padding: 26px;
  background: #fff;
  box-shadow: 0 32px 90px rgba(0, 25, 55, 0.35);
  animation: modal-in 0.24s ease;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 18px;
}

.modal-head h2 {
  margin: 0;
  color: var(--navy);
  font-size: 23px;
}

.modal-close {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #526078;
  background: #eef2f7;
}

.modal-close svg {
  width: 19px;
  height: 19px;
}

.modal p {
  color: var(--muted);
  line-height: 1.85;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.toast-region {
  position: fixed;
  z-index: 200;
  right: 20px;
  bottom: 24px;
  display: grid;
  gap: 10px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  max-width: 380px;
  border-radius: 15px;
  padding: 14px 16px;
  color: #fff;
  background: #14233a;
  box-shadow: var(--shadow-md);
  animation: toast-in 0.25s ease;
}

.toast svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  color: #6ee7bd;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
}

.mobile-nav {
  display: none;
}

@media (max-width: 1050px) {
  .dynamic-category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .listings-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .catalog-listings {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-layout {
    grid-template-columns: minmax(0, 1fr) 330px;
  }
}

@media (max-width: 860px) {
  .dynamic-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body {
    padding-bottom: 74px;
  }

  .container {
    width: min(calc(100% - 28px), var(--container));
  }

  .site-header {
    position: sticky;
  }

  .header-inner {
    min-height: 66px;
    grid-template-columns: 1fr auto;
  }

  .brand img {
    width: 122px;
    height: 42px;
  }

  .desktop-nav,
  .header-actions .icon-btn,
  .header-actions .primary-btn span {
    display: none;
  }

  .header-actions .primary-btn {
    min-height: 42px;
    padding: 0 13px;
  }

  .hero {
    padding: 48px 0 50px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .hero h1 {
    max-width: 620px;
    font-size: clamp(38px, 8vw, 56px);
  }

  .hero-card {
    max-width: 640px;
  }

  .listings-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .desktop-filters {
    display: none;
  }

  .catalog-tools {
    grid-template-columns: 1fr auto auto;
  }

  .mobile-filter-btn {
    display: inline-flex;
  }

  .catalog-listings {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-side {
    position: static;
    grid-row: 1;
  }

  .detail-summary {
    box-shadow: var(--shadow-sm);
  }

  .form-shell {
    grid-template-columns: 1fr;
  }

  .form-aside {
    position: static;
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .step {
    flex-direction: column;
    text-align: center;
    font-size: 12px;
  }

  .mobile-nav {
    position: fixed;
    z-index: 50;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 68px;
    border-top: 1px solid var(--line);
    padding: 5px 8px max(5px, env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -10px 30px rgba(22, 55, 96, 0.1);
    backdrop-filter: blur(15px);
  }

  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;
    border: 0;
    color: #788499;
    background: transparent;
    font-size: 10px;
  }

  .mobile-nav-item.active {
    color: var(--primary);
    font-weight: 700;
  }

  .mobile-nav-item.add-item .nav-icon {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    margin-top: -24px;
    border: 4px solid #fff;
    border-radius: 50%;
    color: #fff;
    background: var(--primary);
    box-shadow: 0 7px 18px rgba(6, 102, 203, 0.28);
  }
}

@media (max-width: 620px) {
  .container {
    width: min(calc(100% - 24px), var(--container));
  }

  .hero {
    padding: 36px 0 42px;
  }

  .hero h1 {
    font-size: 39px;
    letter-spacing: -1px;
  }

  .hero-copy > p {
    margin: 14px 0 24px;
    font-size: 15px;
  }

  .hero-card {
    padding: 18px;
    border-radius: 22px;
  }

  .search-row {
    grid-template-columns: 1fr;
  }

  .trust-row {
    gap: 12px;
  }

  .section {
    padding: 46px 0;
  }

  .section-head {
    align-items: flex-start;
  }

  .section-head .text-link {
    flex: 0 0 auto;
    margin-top: 5px;
  }

  .category-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .dynamic-category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .category-card {
    min-height: 180px;
    padding: 23px;
  }

  .compact-category-card {
    min-height: 185px;
    padding: 18px;
  }

  .compact-category-card .category-icon {
    width: 52px;
    height: 52px;
    margin-bottom: 12px;
  }

  .compact-category-card .category-icon img {
    width: 34px;
    height: 34px;
  }

  .compact-category-card h3 {
    font-size: 17px;
  }

  .compact-category-card p {
    display: none;
  }

  .compact-category-card .text-link {
    margin-top: 10px;
    font-size: 13px;
  }

  .category-illustration {
    width: 115px;
    left: 18px;
  }

  .listings-grid,
  .catalog-listings {
    grid-template-columns: 1fr;
  }

  .listing-card {
    display: grid;
    grid-template-columns: 42% 58%;
    min-height: 170px;
  }

  .listing-media {
    height: 100%;
    min-height: 185px;
  }

  .listing-body {
    display: flex;
    flex-direction: column;
    padding: 13px;
  }

  .listing-date {
    display: none;
  }

  .listing-title {
    min-height: auto;
    font-size: 15px;
  }

  .listing-specs {
    flex-wrap: wrap;
    gap: 7px;
    margin: 8px 0;
  }

  .listing-footer {
    margin-top: auto;
    padding-top: 8px;
  }

  .price {
    font-size: 15px;
  }

  .verified {
    display: none;
  }

  .page-hero {
    padding: 28px 0;
  }

  .page-title-row {
    align-items: flex-start;
  }

  .page-title-row .primary-btn {
    display: none;
  }

  .catalog {
    padding-top: 20px;
  }

  .catalog-tools {
    grid-template-columns: 1fr auto;
  }

  .sort-select {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .detail-page {
    padding-top: 18px;
  }

  .detail-gallery {
    display: block;
  }

  .detail-main-image {
    height: 310px;
    border-radius: 20px;
  }

  .gallery-thumbs {
    grid-template-columns: repeat(3, 1fr);
    margin-top: 10px;
  }

  .thumb-button {
    height: 76px;
  }

  .detail-summary,
  .detail-card,
  .form-card,
  .form-aside {
    border-radius: 20px;
    padding: 19px;
  }

  .detail-spec-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .fields-grid,
  .category-choice {
    grid-template-columns: 1fr;
  }

  .steps {
    gap: 6px;
  }

  .form-actions,
  .modal-actions {
    flex-direction: column;
  }

  .form-actions > *,
  .modal-actions > * {
    width: 100%;
  }

  .toast-region {
    right: 12px;
    bottom: 82px;
    left: 12px;
  }

  .toast {
    min-width: 0;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Compact listing images */
.listing-media {
  display: block;
  height: 180px;
  min-height: 0;
}
.listing-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.listing-card { min-width: 0; }
@media (max-width: 600px) {
  .listing-media { height: 150px; }
}

.listing-title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
