/* MS Auto Tools - Neumorphic style */
:root {
  --bg: #e0e5ec;
  --text: #333;
  --primary: #e63946;
  --accent: #ff6b35;
  --shadow-dark: #a3b1c6;
  --shadow-light: #ffffff;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }

.neu {
  background: var(--bg);
  border-radius: 12px;
  box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
}
.neu-inset {
  background: var(--bg);
  border-radius: 12px;
  box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
}

/* Header */
.topbar {
  background: var(--primary);
  color: #fff;
  padding: 8px 16px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}
.topbar a { color: #fff; margin: 0 4px; }
.header-main {
  padding: 20px 16px;
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}
.logo { font-size: 24px; font-weight: 900; color: var(--accent); }
.logo span { color: #111; }
.search-form {
  flex: 1;
  min-width: 200px;
  display: flex;
  gap: 8px;
}
.search-form input {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 30px;
  background: var(--bg);
  box-shadow: inset 4px 4px 8px var(--shadow-dark), inset -4px -4px 8px var(--shadow-light);
  outline: none;
}
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 30px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
  transition: all .15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn:hover { box-shadow: inset 2px 2px 4px var(--shadow-dark), inset -2px -2px 4px var(--shadow-light); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-whatsapp { background: #25D366; color: #fff; }

.nav {
  background: #fff;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 4px;
  padding: 0 16px;
  overflow-x: auto;
}
.nav a {
  padding: 14px 20px;
  font-weight: 600;
  color: #222;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
}
.nav a:hover, .nav a.active { border-bottom-color: var(--primary); color: var(--primary); }

/* Slider */
.hero {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 16px;
}
.hero-slide {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  height: 400px;
  background: #000;
}
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }

/* Product grid */
.section { max-width: 1200px; margin: 40px auto; padding: 0 16px; }
.section h2 { text-align: center; margin-bottom: 24px; font-size: 28px; }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}
.card {
  background: var(--bg);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 6px 6px 12px var(--shadow-dark), -6px -6px 12px var(--shadow-light);
  transition: transform .2s;
}
.card:hover { transform: translateY(-4px); }
.card-img {
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.card-img img { width: 100%; height: 100%; object-fit: contain; }
.card-badge {
  position: absolute;
  top: 20px; left: 20px;
  background: var(--primary);
  color: #fff;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
}
.card h3 {
  font-size: 15px;
  margin: 8px 0;
  min-height: 42px;
  line-height: 1.3;
}
.card .price { color: var(--primary); font-weight: 800; font-size: 18px; }
.card .old { color: #999; text-decoration: line-through; font-size: 14px; margin-left: 6px; }
.card .actions { display: flex; gap: 8px; margin-top: 12px; }
.card .actions .btn { flex: 1; justify-content: center; font-size: 13px; padding: 8px 12px; }

/* Product detail */
.product-page { max-width: 1200px; margin: 30px auto; padding: 0 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.product-page .images .main { border-radius: 16px; overflow: hidden; background: #fff; aspect-ratio: 1; }
.product-page .images .main img { width: 100%; height: 100%; object-fit: contain; }
.product-page .thumbs { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.product-page .thumbs img { width: 72px; height: 72px; object-fit: contain; border-radius: 8px; background: #fff; cursor: pointer; border: 2px solid transparent; }
.product-page .thumbs img.active { border-color: var(--primary); }
.product-page h1 { margin: 0 0 12px; font-size: 24px; }
.product-page .price-lg { color: var(--primary); font-weight: 900; font-size: 32px; margin: 12px 0; }
.product-page .features { margin: 16px 0; padding-left: 20px; }
.product-page .features li { margin: 6px 0; }
@media (max-width: 768px) { .product-page { grid-template-columns: 1fr; } }

/* Footer */
footer {
  background: #222;
  color: #ccc;
  padding: 40px 16px 20px;
  margin-top: 60px;
}
footer .cols { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 30px; }
footer h4 { color: #fff; margin-top: 0; }
footer a { color: #ccc; display: block; margin: 4px 0; }
footer a:hover { color: var(--accent); }
footer .bottom { text-align: center; padding-top: 20px; margin-top: 30px; border-top: 1px solid #444; font-size: 13px; }

/* WhatsApp floating */
.wa-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
  z-index: 100;
}

/* Currency switcher */
.currency-switch {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  z-index: 90;
  background: var(--bg);
  border-radius: 30px;
  padding: 4px;
  box-shadow: 4px 4px 8px var(--shadow-dark), -4px -4px 8px var(--shadow-light);
}
.currency-switch button {
  border: none;
  background: transparent;
  padding: 8px 12px;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
}
.currency-switch button.active { background: var(--primary); color: #fff; }

/* Flash */
.flash { padding: 12px 16px; border-radius: 8px; margin: 16px 0; }
.flash-success { background: #d4edda; color: #155724; }
.flash-error { background: #f8d7da; color: #721c24; }
.flash-info { background: #d1ecf1; color: #0c5460; }

/* Forms */
label { display: block; font-weight: 600; margin-top: 12px; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], select, textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}
textarea { min-height: 100px; resize: vertical; }

/* Admin */
.admin-wrap { display: flex; min-height: 100vh; }
.admin-side { width: 220px; background: #1f2937; color: #fff; padding: 20px 0; }
.admin-side h2 { padding: 0 20px; font-size: 18px; margin: 0 0 20px; color: var(--accent); }
.admin-side a { display: block; padding: 12px 20px; color: #d1d5db; }
.admin-side a:hover, .admin-side a.active { background: #374151; color: #fff; border-left: 4px solid var(--primary); }
.admin-main { flex: 1; padding: 30px; background: #f9fafb; }
.admin-main h1 { margin-top: 0; }
.admin-topbar { background: #fff; padding: 12px 20px; margin: -30px -30px 30px; border-bottom: 1px solid #e5e7eb; display: flex; justify-content: space-between; align-items: center; }
table.data { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; }
table.data th, table.data td { padding: 12px; text-align: left; border-bottom: 1px solid #eee; }
table.data th { background: #f3f4f6; font-weight: 700; }
table.data img { max-width: 60px; max-height: 60px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 700; }
.tag-ok { background: #d1fae5; color: #065f46; }
.tag-warn { background: #fef3c7; color: #92400e; }
.tag-off { background: #fee2e2; color: #991b1b; }
@media (max-width: 768px) {
  .admin-wrap { flex-direction: column; }
  .admin-side { width: 100%; }
  .admin-main { padding: 15px; }
}

/* Partners marquee */
.marquee { overflow: hidden; }
.marquee-track { display: flex; gap: 40px; animation: scroll 30s linear infinite; }
.marquee-track img { height: 60px; }
@keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* AI chat */
.chat-bubble {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 100;
}
.chat-toggle {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
}
.chat-window {
  position: absolute;
  bottom: 70px;
  left: 0;
  width: 340px;
  max-width: 90vw;
  height: 460px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.chat-window.open { display: flex; }
.chat-header { background: var(--primary); color: #fff; padding: 12px; font-weight: 700; }
.chat-messages { flex: 1; overflow-y: auto; padding: 12px; background: #f3f4f6; }
.chat-msg { margin: 8px 0; padding: 10px 12px; border-radius: 12px; max-width: 85%; word-break: break-word; overflow-wrap: anywhere; }
.chat-msg.user { background: var(--primary); color: #fff; margin-left: auto; }
.chat-msg.bot { background: #fff; border: 1px solid #ddd; }
.chat-input { display: flex; padding: 8px; border-top: 1px solid #eee; }
.chat-input input { flex: 1; padding: 8px; border: 1px solid #ccc; border-radius: 20px; }
.chat-input button { margin-left: 6px; padding: 8px 14px; background: var(--primary); color: #fff; border: none; border-radius: 20px; cursor: pointer; }
