@import url("https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800&display=swap");

:root {
  color-scheme: dark;
  --bg: #060910;
  --panel: #0c1424;
  --panel-2: #0f1a2e;
  --text: #f4f6fb;
  --muted: #c7d0df;
  --accent: #57b3ff;
  --accent-2: #7dffcf;
  --stroke: rgba(255, 255, 255, 0.12);
  --glow: rgba(87, 179, 255, 0.35);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Tajawal", system-ui, sans-serif;
}

body {
  background: radial-gradient(circle at top, #101c36 0%, #060910 55%, #05070c 100%);
  color: var(--text);
  min-height: 100vh;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 40px 24px 56px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.hero {
  text-align: center;
  padding: 24px 20px 12px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--stroke);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.logo {
  display: inline-flex;
  padding: 18px 32px;
  border-radius: 999px;
  background: linear-gradient(145deg, #2a3246, #101828);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 2px 8px rgba(255, 255, 255, 0.15), 0 0 24px var(--glow);
}

.logo span {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 2px;
  background: linear-gradient(90deg, #f7f8fb 0%, #b6c0d2 45%, #f7f8fb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.subtitle {
  margin-top: 18px;
  font-size: 18px;
  color: var(--muted);
}

.features {
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 20px;
  padding: 24px;
}

.features ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  font-size: 17px;
}

.features li {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--stroke);
  padding: 14px 16px;
  border-radius: 14px;
  color: var(--text);
}

.products {
  background: var(--panel-2);
  border-radius: 22px;
  border: 1px solid var(--stroke);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-title h2 {
  font-size: 22px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.video-card {
  margin-top: 8px;
  padding: 0;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: rgba(8, 14, 26, 0.9);
  overflow: hidden;
  display: block;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.video-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(87, 179, 255, 0.3);
  border-color: var(--accent);
}

.video-thumbnail {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
}

.inline-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #000;
  border-bottom: 1px solid var(--stroke);
}

.inline-video video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.hidden {
  display: none;
}

/* Loading Spinner */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 40px 20px;
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 16px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(87, 179, 255, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Pagination */
.pagination-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 18px;
}

.pagination-info {
  font-size: 15px;
  color: var(--muted);
  font-weight: 500;
  min-width: 100px;
  text-align: center;
}

.pagination-btn {
  padding: 8px 20px !important;
  font-size: 14px !important;
  transition: all 0.2s ease;
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Error & Empty States */
.error-msg,
.no-products {
  grid-column: 1 / -1;
  text-align: center;
  padding: 30px 20px;
  font-size: 16px;
  color: var(--muted);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--stroke);
}

.error-msg {
  color: #ff7b7b;
  border-color: rgba(255, 100, 100, 0.3);
  background: rgba(255, 100, 100, 0.06);
}

.show-more-container {
  margin-top: 16px;
  text-align: center;
}

.video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.video-card:hover .video-thumbnail img {
  transform: scale(1.05);
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.3);
  transition: background 0.3s ease;
}

.video-card:hover .play-overlay {
  background: rgba(0, 0, 0, 0.2);
}

.play-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #071018;
  font-size: 28px;
  font-weight: 800;
  box-shadow: 0 12px 32px rgba(87, 179, 255, 0.5);
  transition: transform 0.3s ease;
}

.video-card:hover .play-icon {
  transform: scale(1.15);
}

.video-info {
  padding: 18px;
  text-align: center;
}

.video-info h3 {
  font-size: 18px;
  color: var(--text);
  margin-bottom: 6px;
}

.video-info p {
  font-size: 14px;
  color: var(--muted);
}

.product-card {
  background: rgba(6, 12, 24, 0.9);
  border-radius: 18px;
  border: 1px solid var(--stroke);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.product-media {
  border-radius: 16px;
  overflow: hidden;
  background: #0a0f1e;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.product-media svg {
  width: 100%;
  height: auto;
  display: block;
}

.product-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 3 / 2;
}

.trust {
  display: flex;
  justify-content: center;
}

.trust-card {
  padding: 20px 24px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(87, 179, 255, 0.15), rgba(125, 255, 207, 0.1));
  border: 1px solid rgba(87, 179, 255, 0.4);
  text-align: center;
  font-size: 18px;
}

.trust-card p + p {
  margin-top: 6px;
  color: var(--muted);
}

.contact {
  display: flex;
  justify-content: center;
}

.contact-card {
  width: 100%;
  max-width: 600px;
  padding: 24px;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid var(--stroke);
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.contact-card h2 {
  font-size: 22px;
  margin-bottom: 16px;
  color: var(--text);
}

.location-link {
  display: block;
  text-decoration: none;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(87, 179, 255, 0.1), rgba(125, 255, 207, 0.08));
  border: 1px solid rgba(87, 179, 255, 0.3);
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.location-link:hover {
  background: linear-gradient(135deg, rgba(87, 179, 255, 0.15), rgba(125, 255, 207, 0.12));
  border-color: rgba(87, 179, 255, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(87, 179, 255, 0.2);
}

.address {
  font-size: 17px;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.6;
}

.map-hint {
  font-size: 14px;
  color: var(--accent);
  font-weight: 600;
}

.contact-numbers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--stroke);
}

.contact-label {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

.contact-number {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-2);
  text-decoration: none;
  direction: ltr;
  transition: color 0.2s ease;
}

.contact-number:hover {
  color: var(--accent);
}

.catalog-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.catalog-modal.active {
  opacity: 1;
  visibility: visible;
}

.catalog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
}

.catalog-content {
  position: relative;
  z-index: 10;
  max-width: 95vw;
  max-height: 90vh;
  width: 900px;
  background: var(--panel);
  border-radius: 24px;
  border: 1px solid var(--stroke);
  padding: 0;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
  animation: catalogSlideIn 0.5s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@keyframes catalogSlideIn {
  from {
    transform: translateY(-50px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.catalog-close {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--stroke);
  background: rgba(0, 0, 0, 0.8);
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
  z-index: 20;
}

.catalog-close:hover {
  background: var(--accent);
  color: #000;
  transform: rotate(90deg);
}

.catalog-body {
  padding: 32px;
  overflow-y: auto;
  max-height: 90vh;
}

.catalog-body::-webkit-scrollbar {
  width: 8px;
}

.catalog-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.catalog-body::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 10px;
}

.catalog-body h1 {
  font-size: 32px;
  margin-bottom: 12px;
  color: var(--text);
  text-align: center;
}

.catalog-subtitle {
  font-size: 20px;
  color: var(--accent-2);
  text-align: center;
  margin-bottom: 16px;
  font-weight: 500;
}

.catalog-intro {
  font-size: 17px;
  line-height: 1.7;
  color: var(--muted);
  text-align: center;
  margin-bottom: 24px;
}

.catalog-divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--stroke), transparent);
  margin: 28px 0;
}

.catalog-body h2 {
  font-size: 24px;
  color: var(--text);
  margin: 24px 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.catalog-body h3 {
  font-size: 20px;
  color: var(--accent);
  margin: 20px 0 12px;
}

.catalog-body p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 12px;
}

.catalog-body ul {
  list-style: none;
  padding: 0;
  margin: 12px 0;
}

.catalog-body ul li {
  font-size: 16px;
  color: var(--text);
  padding: 8px 0 8px 24px;
  position: relative;
  line-height: 1.6;
}

.catalog-body ul li::before {
  content: '•';
  position: absolute;
  left: 8px;
  color: var(--accent);
  font-weight: 800;
  font-size: 20px;
}

.catalog-features li {
  background: linear-gradient(135deg, rgba(87, 179, 255, 0.08), rgba(125, 255, 207, 0.05));
  border: 1px solid rgba(87, 179, 255, 0.2);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 8px;
}

.catalog-features li::before {
  display: none;
}

.catalog-product-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 20px;
  margin: 20px 0;
}

.catalog-product-section h3 {
  margin-top: 0;
}

.catalog-footer {
  text-align: center;
  margin-top: 32px;
  padding: 24px;
  background: linear-gradient(135deg, rgba(87, 179, 255, 0.1), rgba(125, 255, 207, 0.08));
  border-radius: 20px;
  border: 1px solid rgba(87, 179, 255, 0.3);
}

.catalog-slogan {
  font-size: 20px;
  color: var(--accent-2);
  margin: 16px 0;
}

.cta {
  display: flex;
  justify-content: center;
}

.btn {
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #071018;
  padding: 14px 32px;
  border-radius: 999px;
  font-size: 17px;
  box-shadow: 0 12px 28px rgba(87, 179, 255, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 14px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

@media (max-width: 640px) {
  .page {
    padding: 24px 16px 40px;
    gap: 24px;
  }

  .hero {
    padding: 20px 16px 10px;
  }

  .logo {
    padding: 14px 24px;
  }

  .logo span {
    font-size: 24px;
    letter-spacing: 1.5px;
  }

  .subtitle {
    font-size: 15px;
    margin-top: 14px;
  }

  .features {
    padding: 18px;
  }

  .features ul {
    grid-template-columns: 1fr;
    gap: 12px;
    font-size: 15px;
  }

  .features li {
    padding: 12px 14px;
  }

  .products {
    padding: 18px;
    gap: 16px;
  }

  .section-title {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
  }

  .section-title h2 {
    font-size: 19px;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .product-card h3 {
    font-size: 16px;
  }

  .video-card {
    border-radius: 16px;
  }

  .video-info h3 {
    font-size: 16px;
  }

  .video-info p {
    font-size: 13px;
  }

  .trust-card {
    padding: 16px 18px;
    font-size: 16px;
  }

  .btn-primary {
    padding: 12px 28px;
    font-size: 16px;
    width: 100%;
  }

  .btn-ghost {
    padding: 7px 14px;
    font-size: 13px;
  }

  .show-more-container {
    margin-top: 12px;
  }

  .inline-video {
    border-radius: 12px;
  }

  .contact-card {
    padding: 18px;
  }

  .contact-card h2 {
    font-size: 19px;
  }

  .address {
    font-size: 15px;
  }

  .contact-numbers {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .contact-number {
    font-size: 17px;
  }

  .catalog-content {
    max-width: 98vw;
    max-height: 95vh;
    border-radius: 16px;
  }

  .catalog-close {
    top: 12px;
    left: 12px;
    width: 38px;
    height: 38px;
    font-size: 20px;
  }

  .catalog-body {
    padding: 20px 16px;
  }

  .catalog-body h1 {
    font-size: 24px;
    margin-top: 32px;
  }

  .catalog-subtitle {
    font-size: 17px;
  }

  .catalog-intro {
    font-size: 15px;
  }

  .catalog-body h2 {
    font-size: 20px;
  }

  .catalog-body h3 {
    font-size: 18px;
  }

  .catalog-body p,
  .catalog-body ul li {
    font-size: 15px;
  }

  .catalog-product-section {
    padding: 16px;
  }

  .catalog-slogan {
    font-size: 17px;
  }
}

.video-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.video-modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  z-index: 10;
  max-width: 90vw;
  width: 900px;
  background: var(--panel);
  border-radius: 24px;
  border: 1px solid var(--stroke);
  padding: 24px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
  animation: modalSlideIn 0.5s ease;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--stroke);
  background: rgba(0, 0, 0, 0.6);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
  z-index: 20;
}

.modal-close:hover {
  background: var(--accent);
  color: #000;
  transform: rotate(90deg);
}

.modal-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  margin-bottom: 16px;
}

.modal-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.modal-hint {
  text-align: center;
  color: var(--muted);
  font-size: 16px;
}

@media (max-width: 768px) {
  .modal-content {
    max-width: 95vw;
    padding: 16px;
  }
  
  .modal-close {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
}
