@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Rajdhani:wght@400;500;600;700&display=swap');

:root {
  --bg: #0a0406;
  --bg2: #120609;
  --card: #130a0d;
  --card-hover: #1a0c10;
  --muted: #9a7a82;
  --red: #ff1744;
  --red-glow: #ff0a3a;
  --red-dark: #cc0033;
  --red-soft: #ff4d6d;
  --accent: #ff6b81;
  --neon: #ff073a;
  --border: #2a0f16;
  --border-hover: #ff1744;
  --danger: #ff3d3d;
  --success: #00ff88;
  --text: #f0e0e4;
  --text-bright: #ffffff;
}

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

body {
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at top, rgba(255, 23, 68, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(255, 7, 58, 0.05) 0%, transparent 50%);
  font-family: 'Rajdhani', 'Segoe UI', Arial, sans-serif;
  color: var(--text);
  min-height: 100vh;
}

/* ═══ HEADER / NAV ═══ */
.top {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 5%;
  background: rgba(10, 4, 6, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.brand {
  font-family: 'Orbitron', monospace;
  font-weight: 900;
  font-size: 22px;
  color: var(--text-bright);
  text-decoration: none;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.brand span {
  color: var(--red);
  text-shadow: 0 0 12px var(--red), 0 0 30px rgba(255, 23, 68, 0.4);
}

nav { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.25s ease;
}
nav a:hover, .link:hover {
  color: var(--red);
  text-shadow: 0 0 8px rgba(255, 23, 68, 0.5);
}

/* ═══ LAYOUT ═══ */
.container { width: min(1180px, 92%); margin: 34px auto; }

/* ═══ HERO ═══ */
.hero {
  padding: 60px 50px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 23, 68, 0.1), rgba(255, 7, 58, 0.04) 50%, rgba(10, 4, 6, 0.9));
  box-shadow:
    0 0 60px rgba(255, 23, 68, 0.08),
    inset 0 1px 0 rgba(255, 23, 68, 0.15);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(255, 23, 68, 0.03), transparent 30%);
  animation: heroSpin 15s linear infinite;
}
@keyframes heroSpin { to { transform: rotate(360deg); } }

h1 {
  font-family: 'Orbitron', monospace;
  font-size: clamp(30px, 5vw, 56px);
  margin: 0 0 14px;
  position: relative;
  letter-spacing: 1px;
}
h2 { margin-top: 0; font-family: 'Orbitron', monospace; font-size: 20px; letter-spacing: 1px; }

.neon {
  color: var(--red);
  text-shadow: 0 0 10px var(--red), 0 0 40px rgba(255, 23, 68, 0.5), 0 0 80px rgba(255, 23, 68, 0.2);
  animation: neonPulse 3s ease-in-out infinite alternate;
}
@keyframes neonPulse {
  from { text-shadow: 0 0 10px var(--red), 0 0 40px rgba(255, 23, 68, 0.5); }
  to   { text-shadow: 0 0 15px var(--red), 0 0 50px rgba(255, 23, 68, 0.6), 0 0 100px rgba(255, 23, 68, 0.3); }
}

/* ═══ GRID & CARDS ═══ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  background: linear-gradient(145deg, var(--card), var(--bg2));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}
.card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--red), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.card:hover {
  border-color: rgba(255, 23, 68, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(255, 23, 68, 0.1), 0 0 20px rgba(255, 23, 68, 0.05);
}
.card:hover::after { opacity: 1; }

.card h3 {
  font-family: 'Orbitron', monospace;
  font-size: 16px;
  color: var(--text-bright);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

/* ═══ BUTTONS ═══ */
.btn, button {
  display: inline-block;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: none;
  border-radius: 10px;
  padding: 12px 22px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  box-shadow: 0 4px 15px rgba(255, 23, 68, 0.25);
}
.btn:hover, button:hover {
  background: linear-gradient(135deg, var(--red-soft), var(--red));
  box-shadow: 0 6px 25px rgba(255, 23, 68, 0.4), 0 0 15px rgba(255, 23, 68, 0.2);
  transform: translateY(-1px);
  color: #fff;
}
.small { padding: 8px 14px; font-size: 13px; }
.danger { background: #cc0000; }

/* ═══ MUTED ═══ */
.muted { color: var(--muted); }

/* ═══ FORMS ═══ */
input, textarea, select {
  width: 100%;
  padding: 12px 14px;
  margin: 6px 0 16px;
  background: rgba(255, 23, 68, 0.04);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 16px;
  transition: border-color 0.3s, box-shadow 0.3s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 23, 68, 0.15), 0 0 15px rgba(255, 23, 68, 0.1);
}
input[type="checkbox"] { width: auto; margin-right: 6px; accent-color: var(--red); }
input[type="file"] { padding: 10px; }
label { font-weight: 600; color: var(--accent); font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; }

/* ═══ TABLE ═══ */
table {
  width: 100%;
  border-collapse: collapse;
  background: linear-gradient(145deg, var(--card), var(--bg2));
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
}
th {
  padding: 14px 16px;
  text-align: left;
  background: rgba(255, 23, 68, 0.08);
  color: var(--red);
  font-family: 'Orbitron', monospace;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(42, 15, 22, 0.5);
}
tr:hover td { background: rgba(255, 23, 68, 0.03); }
td a { color: var(--red-soft); }
td a:hover { color: var(--red); text-shadow: 0 0 8px rgba(255, 23, 68, 0.4); }

/* ═══ BADGE ═══ */
.badge {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid var(--red);
  border-radius: 999px;
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
  text-shadow: 0 0 6px rgba(255, 23, 68, 0.3);
}

/* ═══ ADMIN NAV ═══ */
.adminnav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

/* ═══ ALERT / MSG ═══ */
.alert {
  padding: 14px 18px;
  border: 1px solid var(--red);
  border-radius: 12px;
  background: rgba(255, 23, 68, 0.06);
  margin: 12px 0;
  box-shadow: 0 0 15px rgba(255, 23, 68, 0.05);
}
.msg {
  border-left: 3px solid var(--red);
  padding: 12px 16px;
  margin: 10px 0;
  background: rgba(255, 23, 68, 0.04);
  border-radius: 0 8px 8px 0;
}

/* ═══ PRODUCT IMG ═══ */
.product-img {
  height: 180px;
  border-radius: 12px;
  background: linear-gradient(135deg, #1a0a10, #0d0406);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
  font-family: 'Orbitron', monospace;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 23, 68, 0.1);
  overflow: hidden;
  position: relative;
}
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.card:hover .product-img img {
  transform: scale(1.06);
}

/* ═══ FOOTER ═══ */
.foot {
  text-align: center;
  color: var(--muted);
  padding: 40px 20px;
  font-size: 14px;
  border-top: 1px solid var(--border);
  margin-top: 50px;
}

/* ═══ SCROLLBAR ═══ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--red-dark); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

/* ═══ SELECTION ═══ */
::selection { background: rgba(255, 23, 68, 0.3); color: #fff; }

/* ═══ ANIMATIONS ═══ */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.card { animation: fadeIn 0.4s ease-out backwards; }
.card:nth-child(2) { animation-delay: 0.05s; }
.card:nth-child(3) { animation-delay: 0.1s; }
.card:nth-child(4) { animation-delay: 0.15s; }
.card:nth-child(5) { animation-delay: 0.2s; }
.card:nth-child(6) { animation-delay: 0.25s; }
.card:nth-child(7) { animation-delay: 0.3s; }
.card:nth-child(8) { animation-delay: 0.35s; }
.card:nth-child(9) { animation-delay: 0.4s; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 760px) {
  .top { align-items: flex-start; flex-direction: column; gap: 12px; }
  .hero { padding: 30px 22px; }
  table { font-size: 13px; }
  h1 { font-size: 28px; }
}

/* ═══ MODAL POPUP ═══ */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(10, 4, 6, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transition: opacity 0.3s ease;
  align-items: center;
  justify-content: center;
}

.modal.show {
  display: flex;
  opacity: 1;
}

.modal-content {
  background: linear-gradient(145deg, var(--card), var(--bg2));
  border: 1px solid var(--border);
  box-shadow: 0 0 50px rgba(255, 23, 68, 0.25), 0 20px 40px rgba(0, 0, 0, 0.6);
  border-radius: 20px;
  width: min(850px, 90%);
  position: relative;
  animation: modalZoom 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

@keyframes modalZoom {
  from { transform: scale(0.9) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  color: var(--muted);
  font-size: 32px;
  font-weight: 700;
  cursor: pointer;
  transition: color 0.2s;
  z-index: 10;
}
.close-btn:hover {
  color: var(--red);
}

.modal-body {
  display: flex;
  flex-direction: row;
  min-height: 380px;
}

@media (max-width: 768px) {
  .modal-body {
    flex-direction: column;
  }
}

.modal-image-container {
  flex: 1.1;
  background: #090305;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--border);
  overflow: hidden;
  max-height: 450px;
}

@media (max-width: 768px) {
  .modal-image-container {
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: 250px;
  }
}

.modal-image-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #090305;
}

.modal-info {
  flex: 1.2;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  overflow-y: auto;
  max-height: 450px;
}

@media (max-width: 768px) {
  .modal-info {
    max-height: none;
    padding: 20px;
  }
}

.modal-info h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 24px;
  color: var(--text-bright);
  margin: 0;
  letter-spacing: 0.5px;
}

.price-stock-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.modal-price {
  font-family: 'Orbitron', sans-serif;
  font-size: 24px;
  color: var(--red);
  font-weight: 700;
  text-shadow: 0 0 10px rgba(255, 23, 68, 0.3);
}

.modal-description {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  max-height: 160px;
  overflow-y: auto;
  padding-right: 5px;
}

/* Scrollbar para descrição no modal */
.modal-description::-webkit-scrollbar { width: 4px; }
.modal-description::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.modal-description::-webkit-scrollbar-thumb:hover { background: var(--red-dark); }

.modal-buy-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: auto;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-control label {
  margin: 0;
  font-size: 12px;
  color: var(--accent);
}

.qty-control input {
  width: 65px;
  margin: 0;
  padding: 8px;
  background: rgba(255, 23, 68, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  text-align: center;
}

