
:root {
  --bg: #06111b;
  --panel: #0b1c2a;
  --panel2: #102637;
  --line: #20394b;
  --text: #f2f6f8;
  --muted: #9bb0bd;
  --orange: #ff7a16;
  --green: #31d39a;
  --danger: #ff5c64;
  --radius: 18px;
  --shadow: 0 18px 55px #0005;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  background: radial-gradient(ellipse at 75% 0%, #0b2538 0, transparent 35%), var(--bg);
  color: var(--text);
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  line-height: 1.7;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
.hidden { display: none !important; }

/* Header */
.topbar {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 max(5vw, 20px);
  border-bottom: 1px solid #ffffff0d;
  background: #06111bef;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 7px;
  direction: ltr;
  white-space: nowrap;
}

.brand-mark {
  font-size: 29px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -2px;
}

.brand-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--orange);
  line-height: 1.2;
}

.brand-name small {
  display: block;
  color: #9aadb9;
  font-size: 8px;
  letter-spacing: 1px;
  font-weight: 500;
}

.desktop-nav {
  display: flex;
  gap: 26px;
  color: #bfd0da;
}

.desktop-nav a:hover,
.footer a:hover,
.text-link:hover {
  color: var(--orange);
}

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

.whatsapp-link {
  color: #b5f5d7;
  font-weight: 700;
}

.icon-button {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: white;
  border-radius: 10px;
  padding: 8px 12px;
}

/* Hero */
.hero {
  max-width: 1280px;
  margin: auto;
  padding: 64px 28px 54px;
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  gap: 50px;
  align-items: center;
  min-height: 430px;
}

.eyebrow {
  color: var(--orange);
  font-size: 11px;
  letter-spacing: 1.5px;
  font-weight: 800;
  margin: 0 0 9px;
}

.hero h1 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.4;
  margin: 0 0 15px;
  font-weight: 800;
}

.hero h1 span { color: var(--orange); }
.hero-description, .muted { color: var(--muted); }

.hero-description {
  font-size: 16px;
  max-width: 560px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 28px 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 10px;
  padding: 11px 18px;
  border: 1px solid transparent;
  font-weight: 800;
  transition: .18s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--orange), #ff9b27);
  color: #17100a;
  box-shadow: 0 8px 25px #ff7a1626;
}

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

.btn-ghost {
  border-color: #355064;
  background: #102333;
  color: #e9f2f7;
}

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

.hero-stats {
  display: flex;
  gap: 38px;
  margin-top: 28px;
}

.hero-stats strong, .hero-stats small { display: block; }
.hero-stats strong { font-size: 13px; }
.hero-stats small { font-size: 11px; color: var(--muted); }

/* Hero artwork */
.hero-art {
  height: 310px;
  position: relative;
  overflow: hidden;
  border: 1px solid #29485d;
  border-radius: 24px;
  background: linear-gradient(140deg, #0d2a3c, #06121e 65%);
  box-shadow: var(--shadow);
}

.hero-art:before, .hero-art:after {
  content: "";
  position: absolute;
  border: 1px solid #ff7a1640;
  transform: rotate(35deg);
  width: 300px;
  height: 200px;
  border-radius: 35px;
  left: -35px;
  top: -80px;
}

.hero-art:after {
  left: auto;
  right: -60px;
  top: 150px;
  border-color: #1e8cb744;
  transform: rotate(-35deg);
}

.circuit {
  position: absolute;
  border: 2px solid #1c526b;
  border-left: 0;
  border-bottom: 0;
  width: 180px;
  height: 90px;
  border-radius: 0 30px 0 0;
  opacity: .7;
}

.circuit-one { top: 40px; right: 45px; }
.circuit-two { bottom: 42px; left: 55px; transform: rotate(180deg); }

.chip {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-6deg);
  width: 180px;
  height: 160px;
  border: 2px solid #3a6277;
  border-radius: 17px;
  background: linear-gradient(135deg, #19394d, #071520);
  box-shadow: 0 15px 55px #0008, inset 0 0 0 7px #0c2230;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.chip:before, .chip:after {
  content: "";
  position: absolute;
  inset: -13px 25px;
  border-top: 5px dotted #ff7a16;
  border-bottom: 5px dotted #ff7a16;
  opacity: .75;
}

.chip:after {
  inset: 25px -13px;
  border: 0;
  border-left: 5px dotted #ff7a16;
  border-right: 5px dotted #ff7a16;
}

.chip span {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -4px;
}

.chip small {
  letter-spacing: 3px;
  color: var(--orange);
  font-weight: 800;
}

.chip i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  position: absolute;
  top: 15px;
  right: 15px;
  box-shadow: 0 0 14px var(--green);
}

.floating-tag {
  position: absolute;
  background: #102b3ce8;
  border: 1px solid #345569;
  padding: 8px 13px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.tag-top { top: 28px; left: 24px; }
.tag-bottom { bottom: 28px; right: 24px; color: #b7cbd7; }

/* Sections and categories */
.section {
  max-width: 1280px;
  margin: auto;
  padding: 35px 28px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.section-heading h2, .contact-banner h2 {
  margin: 0;
  font-size: 25px;
  line-height: 1.4;
}

.text-link {
  color: var(--orange);
  font-weight: 800;
  font-size: 13px;
  background: none;
  border: 0;
  padding: 0;
}

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

.category-card {
  min-height: 116px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(145deg, #0c2030, #081722);
  color: #dce8ef;
  transition: .2s;
}

.category-card:hover, .category-card.active {
  border-color: #e9751b;
  background: linear-gradient(145deg, #1c2e38, #112332);
  transform: translateY(-2px);
}

.category-card.active { box-shadow: inset 0 -3px var(--orange); }
.category-icon { font-size: 28px; color: var(--orange); line-height: 1; }
.category-card span:last-child { font-size: 12px; font-weight: 700; }

/* Product controls and cards */
.products-section { padding-top: 46px; }

.catalog-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0a1b29;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  min-width: 250px;
}

.search-box span { font-size: 23px; color: var(--orange); }

.search-box input {
  background: none;
  border: 0;
  outline: 0;
  color: white;
  width: 100%;
  padding: 10px 0;
}


.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.product-card {
  border: 1px solid #203849;
  border-radius: 15px;
  overflow: hidden;
  background: linear-gradient(160deg, #102637, #091722);
  transition: transform .2s, border-color .2s;
  min-width: 0;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: #a9561d;
}

.product-image {
  height: 175px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #e8edf0, #cfd8dd);
  position: relative;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}

.placeholder-art { font-size: 56px; color: #0c3144; }

.product-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #0b2b24;
  color: #6ef0bb;
  border: 1px solid #20634e;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 10px;
}

.product-info { padding: 14px; }

.product-category {
  font-size: 10px;
  color: var(--orange);
  margin: 0 0 3px;
}

.product-name {
  font-size: 14px;
  font-weight: 800;
  margin: 0 0 5px;
  min-height: 48px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.product-sku {
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 10px;
  overflow-wrap: anywhere;
}

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.price {
  color: var(--orange);
  font-size: 18px;
  font-weight: 800;
  white-space: nowrap;
}

.availability { font-size: 10px; color: var(--green); }
.availability.out { color: #ff8388; }

.product-detail-btn {
  width: 100%;
  border: 1px solid #5c3c26;
  background: #241c17;
  color: #ffc28b;
  border-radius: 8px;
  padding: 8px;
  font-weight: 800;
  font-size: 12px;
}

.product-detail-btn:hover {
  background: var(--orange);
  color: #1b120a;
}

.empty-state {
  text-align: center;
  padding: 45px;
  color: var(--muted);
}

.empty-state span { font-size: 40px; color: var(--orange); }

/* Contact banner and footer */
.contact-banner {
  max-width: 1224px;
  margin: 55px auto 70px;
  padding: 30px 34px;
  border: 1px solid #32495a;
  border-radius: 20px;
  background: radial-gradient(ellipse at 90% 50%, #163449, transparent 55%), #0b1b28;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}

.contact-banner p:not(.eyebrow) { color: var(--muted); margin-bottom: 0; }

.footer {
  border-top: 1px solid #1b3040;
  padding: 28px max(5vw, 20px);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 15px;
  align-items: center;
  color: var(--muted);
}

.footer p { text-align: center; }
.footer>div { display: flex; gap: 20px; justify-content: flex-end; }
.footer>small { grid-column: 1 / -1; text-align: center; font-size: 11px; }

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #02070ccc;
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.product-modal {
  width: min(800px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #0a1c29;
  border: 1px solid #345164;
  border-radius: 20px;
  padding: 25px;
  position: relative;
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  left: 15px;
  top: 12px;
  z-index: 2;
  border: 1px solid var(--line);
  background: #102838;
  color: white;
  border-radius: 50%;
  font-size: 22px;
  width: 37px;
  height: 37px;
}

.modal-product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  padding-top: 15px;
}

.modal-product-image {
  min-height: 280px;
  background: #e5ecef;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.modal-product-image img {
  width: 100%;
  height: 100%;
  max-height: 350px;
  object-fit: contain;
  padding: 15px;
}

.modal-product h2 {
  font-size: 25px;
  line-height: 1.4;
  margin: 4px 0 8px;
  overflow-wrap: anywhere;
}

.modal-price { font-size: 26px; color: var(--orange); font-weight: 800; }

.modal-description {
  color: #bfd0da;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.modal-meta {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

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

/* Add product form */
.add-product-modal { width: min(720px, 100%); }
.add-product-heading { padding: 4px 0 18px; }
.add-product-heading h2 { font-size: 25px; margin: 0 0 5px; }
.add-product-heading p:last-child { margin-bottom: 0; }

.add-product-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #dce8ef;
  font-weight: 700;
  font-size: 12px;
  min-width: 0;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #071722;
  color: var(--text);
  outline: none;
  font-family: inherit;
  font-size: 13px;
  transition: border-color .2s, box-shadow .2s;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px #ff7a1618;
}

.form-field textarea { resize: vertical; }
.form-field input::placeholder,
.form-field textarea::placeholder { color: #718896; }

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

.featured-option {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 9px;
  color: #ffc28b;
  font-weight: 700;
}

.featured-option input {
  width: 17px;
  height: 17px;
  accent-color: var(--orange);
}

.add-product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 23px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.add-product-actions button { min-width: 120px; }

/* Notifications */
.toast {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 100;
  max-width: min(420px, calc(100vw - 40px));
  background: #12382d;
  border: 1px solid #2c785d;
  color: #caffeb;
  padding: 12px 18px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}

/* Responsive */
@media (max-width: 1000px) {
  .hero { gap: 25px; }
  .category-grid { grid-template-columns: repeat(3, 1fr); }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .search-box { min-width: 220px; }
  .catalog-controls { flex-wrap: wrap; }
}

@media (max-width: 720px) {
  .topbar { height: 66px; padding: 0 17px; }

  .desktop-nav {
    display: none;
    position: absolute;
    top: 66px;
    right: 0;
    left: 0;
    background: #081a28;
    padding: 20px;
    flex-direction: column;
    border-bottom: 1px solid var(--line);
  }

  .desktop-nav.open { display: flex; }
  .icon-button { display: block; }
  .whatsapp-link span { display: none; }

  .hero {
    grid-template-columns: 1fr;
    padding: 38px 18px 25px;
    gap: 25px;
  }

  .hero-art { height: 245px; grid-row: 1; }
  .hero-copy { grid-row: 2; }
  .hero h1 { font-size: 32px; }
  .hero-stats { gap: 22px; }

  .section { padding: 28px 17px; }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading h2, .contact-banner h2 { font-size: 22px; }

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

  .category-card { min-height: 95px; }

  .catalog-controls {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .catalog-controls .btn { width: 100%; }
  .search-box { min-width: 0; }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .product-image { height: 130px; }
  .product-info { padding: 10px; }
  .product-name { font-size: 12px; min-height: 43px; }
  .price { font-size: 15px; }

  .product-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }

  .contact-banner {
    margin: 30px 17px 45px;
    padding: 23px;
    align-items: flex-start;
    flex-direction: column;
  }

  .footer { grid-template-columns: 1fr; text-align: center; }
  .footer .brand { justify-content: center; }
  .footer p { margin: 0; }
  .footer>div { justify-content: center; }
  .footer>small { grid-column: auto; }

  .modal-product { grid-template-columns: 1fr; gap: 16px; }

  .modal-product-image {
    min-height: 220px;
    max-height: 260px;
  }

  .product-modal { padding: 20px; }
}

@media (max-width: 520px) {
  .add-product-fields { grid-template-columns: 1fr; }
  .full-field { grid-column: auto; }
  .add-product-heading h2 { font-size: 21px; }
  .add-product-actions button { flex: 1; }
  .product-modal { padding: 18px; }
}

@media (max-width: 380px) {
  .product-grid { grid-template-columns: 1fr; }
  .product-image { height: 190px; }
  .hero-actions .btn { width: 100%; }
}

/* Delete product button */
.btn-delete-product {
  border: 1px solid #8b343a;
  background: #351a20;
  color: #ff9aa0;
}

.btn-delete-product:hover {
  background: #b92f3b;
  border-color: #e64c58;
  color: #ffffff;
  transform: translateY(-2px);
}
\n
/* Admin panel styles */
.admin-page { min-height: 100vh; }
.admin-main { max-width: 1120px; margin: 0 auto; padding: 35px 24px 70px; }
.admin-login { max-width: 500px; margin: 45px auto; }
.admin-login h1, .admin-heading h1 { margin: 0 0 8px; font-size: 29px; }
.admin-login-form { display: grid; gap: 16px; margin-top: 24px; }
.admin-login-form .btn { width: 100%; }
.login-error { margin: 0; color: #ff8b91; }
.local-warning { margin: 22px 0 0; padding: 12px 14px; border: 1px solid #8b5b2a; background: #2b2115; color: #ffd7a8; border-radius: 10px; font-size: 12px; }
.admin-nav { margin-inline-start: auto; }
.admin-heading, .admin-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.admin-heading { margin-bottom: 24px; }
.admin-heading .muted, .admin-panel-heading .muted { margin: 4px 0 0; }
.admin-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-bottom: 22px; }
.admin-stat { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: linear-gradient(145deg,#102637,#091722); }
.admin-stat span, .admin-stat strong { display: block; }
.admin-stat span { color: var(--muted); font-size: 12px; }
.admin-stat strong { color: var(--orange); font-size: 28px; margin-top: 5px; }
.admin-form-panel, .admin-products-panel { padding: 22px; margin-bottom: 22px; border: 1px solid var(--line); border-radius: 17px; background: #0a1b29; }
.admin-panel-heading { margin-bottom: 20px; }
.admin-panel-heading h2 { margin: 0; font-size: 20px; }
.admin-product-list { display: grid; gap: 10px; }
.admin-product-row { display: grid; grid-template-columns: 74px minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 12px; border: 1px solid #203849; border-radius: 12px; background: #0b202e; }
.admin-product-thumb { width: 74px; height: 68px; border-radius: 9px; background: #e5ecef; color: #0c3144; display: flex; align-items: center; justify-content: center; font-size: 28px; overflow: hidden; }
.admin-product-thumb img { width: 100%; height: 100%; object-fit: contain; }
.admin-product-details { display: grid; gap: 3px; min-width: 0; }
.admin-product-details strong { overflow-wrap: anywhere; }
.admin-product-details span { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.admin-row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-row-actions .btn { padding: 8px 11px; font-size: 11px; }
.admin-search { min-width: 220px; }
@media(max-width:720px) {
 .admin-main { padding: 25px 15px 50px; }
 .admin-heading, .admin-panel-heading { align-items: stretch; flex-direction: column; }
 .admin-heading .btn { width: 100%; }
 .admin-summary { gap: 8px; }
 .admin-stat { padding: 12px; }
 .admin-stat span { font-size: 10px; }
 .admin-stat strong { font-size: 23px; }
 .admin-form-panel, .admin-products-panel { padding: 15px; }
 .admin-search { min-width: 0; width: 100%; }
 .admin-product-row { grid-template-columns: 56px minmax(0,1fr); gap: 10px; }
 .admin-product-thumb { width: 56px; height: 56px; }
 .admin-row-actions { grid-column: 1 / -1; }
 .admin-row-actions .btn { flex: 1; }
 .admin-login h1, .admin-heading h1 { font-size: 24px; }
}
