/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #1a1a2e;
  background: #f8f9fc;
  line-height: 1.6;
}
a { color: #0057b8; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ===== LAYOUT ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }

/* ===== HEADER ===== */
.site-header {
  background: #0a1628;
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.site-header .container {
  display: flex; align-items: center; gap: 32px; height: 64px;
}
.logo { display: flex; align-items: center; font-size: 1.4rem; font-weight: 800; letter-spacing: 1px; }
.logo-sky { color: #4fc3f7; }
.logo-electro { color: #fff; }

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav-link {
  color: #cdd6e8; padding: 8px 14px; border-radius: 6px;
  font-size: .9rem; font-weight: 500; transition: background .2s, color .2s;
  white-space: nowrap;
}
.nav-link:hover, .nav-link.active { background: #1e3a5f; color: #fff; text-decoration: none; }

/* Dropdown */
.nav-dropdown { position: relative; }
.dropdown-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 260px;
  background: #0d2040; border-radius: 8px; box-shadow: 0 8px 32px rgba(0,0,0,.4);
  padding: 8px 0; z-index: 200;
}
.nav-dropdown:hover .dropdown-menu { display: block; }
.dropdown-item {
  display: block; padding: 10px 20px; color: #cdd6e8; font-size: .88rem;
  transition: background .15s;
}
.dropdown-item:hover { background: #1e3a5f; color: #fff; text-decoration: none; }

/* Burger */
.burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.burger span { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: .3s; }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #0a1628 0%, #0d2040 50%, #0a1a35 100%);
  color: #fff; padding: 100px 0 80px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(79,195,247,.08) 0%, transparent 60%);
}
.hero-content { position: relative; max-width: 640px; }
.hero h1 { font-size: 2.8rem; font-weight: 800; line-height: 1.2; margin-bottom: 20px; }
.hero h1 span { color: #4fc3f7; }
.hero p { font-size: 1.1rem; color: #a8c0d8; margin-bottom: 36px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 28px; border-radius: 8px; font-weight: 600; font-size: .95rem; transition: .2s; cursor: pointer; border: none; }
.btn-primary { background: #0057b8; color: #fff; }
.btn-primary:hover { background: #0068d6; text-decoration: none; color: #fff; }
.btn-outline { background: transparent; color: #4fc3f7; border: 2px solid #4fc3f7; }
.btn-outline:hover { background: #4fc3f7; color: #0a1628; text-decoration: none; }
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }

/* ===== CATEGORY CARDS ===== */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.cat-card {
  background: #fff; border-radius: 12px; padding: 28px 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,.07); transition: transform .2s, box-shadow .2s;
  border-left: 4px solid var(--cat-color, #0057b8);
  display: flex; flex-direction: column; gap: 12px;
}
.cat-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.12); text-decoration: none; }
.cat-card h3 { color: #1a1a2e; font-size: 1.05rem; font-weight: 700; }
.cat-card p { color: #666; font-size: .88rem; }
.cat-count { font-size: .8rem; color: #888; }

/* ===== PRODUCTS GRID ===== */
.page-header { background: #0a1628; color: #fff; padding: 48px 0 40px; }
.page-header h1 { font-size: 2rem; font-weight: 800; }
.page-header p { color: #a8c0d8; margin-top: 8px; }

.filter-bar { background: #fff; border-bottom: 1px solid #e0e7ef; padding: 16px 0; position: sticky; top: 64px; z-index: 50; }
.filter-bar .container { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filter-chip {
  padding: 6px 16px; border-radius: 20px; font-size: .85rem; font-weight: 500;
  background: #f0f4f8; color: #555; border: 2px solid transparent; cursor: pointer; transition: .15s;
}
.filter-chip:hover, .filter-chip.active { background: #0057b8; color: #fff; border-color: #0057b8; text-decoration: none; }

.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; padding: 40px 0; }
.product-card {
  background: #fff; border-radius: 12px; overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,.07); transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,.12); text-decoration: none; }
.product-card-img {
  height: 160px; background: #0d2040;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.5rem; color: #4fc3f7;
}
.product-card-img img { width: 100%; height: 100%; object-fit: cover; }
.product-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.product-card-cat { font-size: .75rem; text-transform: uppercase; letter-spacing: .5px; color: #0057b8; font-weight: 600; margin-bottom: 6px; }
.product-card h3 { font-size: 1.05rem; color: #1a1a2e; margin-bottom: 8px; }
.product-card p { font-size: .88rem; color: #666; flex: 1; }
.product-card-footer { padding: 16px 20px; border-top: 1px solid #f0f4f8; }
.btn-sm { padding: 8px 18px; font-size: .85rem; }

/* ===== PRODUCT DETAIL ===== */
.product-detail { padding: 56px 0; }
.product-detail-grid { display: grid; grid-template-columns: 1fr 380px; gap: 48px; align-items: start; }
.product-detail h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 16px; }
.product-detail .cat-badge {
  display: inline-block; background: #e8f0fe; color: #0057b8;
  padding: 4px 12px; border-radius: 20px; font-size: .8rem; font-weight: 600; margin-bottom: 20px;
}
.product-detail-text { font-size: 1rem; color: #444; line-height: 1.8; }
.product-detail-text img { max-width: 100%; border-radius: 8px; margin: 16px 0; }
.product-detail-text h2, .product-detail-text h3 { color: #1a1a2e; margin: 24px 0 12px; }
.product-detail-text ul, .product-detail-text ol { padding-left: 24px; margin: 12px 0; }
.product-detail-text li { margin-bottom: 6px; }
.product-detail-text table { width: 100%; border-collapse: collapse; margin: 16px 0; }
.product-detail-text td, .product-detail-text th { border: 1px solid #e0e7ef; padding: 8px 12px; }
.product-detail-text th { background: #f0f4f8; }

.product-sidebar { background: #fff; border-radius: 16px; padding: 28px; box-shadow: 0 4px 24px rgba(0,0,0,.1); position: sticky; top: 80px; }
.product-sidebar h3 { font-size: 1rem; margin-bottom: 20px; color: #1a1a2e; }
.contact-form label { display: block; font-size: .85rem; font-weight: 600; color: #555; margin-bottom: 4px; margin-top: 14px; }
.contact-form input, .contact-form textarea, .contact-form select {
  width: 100%; padding: 10px 14px; border: 1.5px solid #d0dbe8; border-radius: 8px;
  font-size: .9rem; transition: border-color .2s; background: #f8f9fc;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: #0057b8; background: #fff; }
.contact-form textarea { resize: vertical; min-height: 80px; }
.contact-form button { margin-top: 20px; width: 100%; }

/* ===== ABOUT / STATIC PAGES ===== */
.static-page { padding: 64px 0; }
.static-page h1 { font-size: 2rem; font-weight: 800; margin-bottom: 32px; }
.static-page h2 { font-size: 1.4rem; margin: 32px 0 12px; }
.static-page p { margin-bottom: 16px; color: #444; line-height: 1.8; }

/* ===== ADMIN ===== */
.admin-layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar { background: #0a1628; color: #fff; padding: 0; }
.admin-sidebar .logo { padding: 24px 20px; border-bottom: 1px solid #1e3a5f; }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 12px 20px; color: #a8c0d8; font-size: .9rem; transition: .15s; }
.admin-nav a:hover, .admin-nav a.active { background: #1e3a5f; color: #fff; text-decoration: none; }
.admin-nav .nav-section { padding: 16px 20px 4px; font-size: .7rem; text-transform: uppercase; letter-spacing: 1px; color: #5577a0; }
.admin-main { padding: 32px; background: #f0f4f8; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.admin-topbar h1 { font-size: 1.5rem; font-weight: 700; }
.admin-card { background: #fff; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,.07); overflow: hidden; }
.admin-card-header { padding: 20px 24px; border-bottom: 1px solid #e0e7ef; display: flex; justify-content: space-between; align-items: center; }
.admin-card-body { padding: 24px; }

/* Tables */
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { text-align: left; padding: 12px 16px; font-size: .8rem; text-transform: uppercase; letter-spacing: .5px; color: #888; background: #f8f9fc; border-bottom: 2px solid #e0e7ef; }
.admin-table td { padding: 12px 16px; border-bottom: 1px solid #f0f4f8; font-size: .9rem; vertical-align: middle; }
.admin-table tr:hover td { background: #f8f9fc; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: .75rem; font-weight: 600; }
.badge-green { background: #d1fae5; color: #065f46; }
.badge-gray { background: #e5e7eb; color: #6b7280; }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: .85rem; font-weight: 600; color: #555; }
.form-group input, .form-group textarea, .form-group select {
  padding: 10px 14px; border: 1.5px solid #d0dbe8; border-radius: 8px;
  font-size: .9rem; background: #f8f9fc; transition: border-color .2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  outline: none; border-color: #0057b8; background: #fff;
}
.form-group textarea { resize: vertical; min-height: 120px; }
.form-actions { display: flex; gap: 12px; margin-top: 24px; }
.alert { padding: 12px 20px; border-radius: 8px; margin-bottom: 20px; font-size: .9rem; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }

/* Stat cards */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 32px; }
.stat-card { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 2px 12px rgba(0,0,0,.07); }
.stat-card .stat-num { font-size: 2.2rem; font-weight: 800; color: #0057b8; }
.stat-card .stat-label { font-size: .85rem; color: #888; margin-top: 4px; }

/* ===== FOOTER ===== */
.site-footer { background: #0a1628; color: #a8c0d8; padding: 64px 0 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-logo { font-size: 1.4rem; font-weight: 800; margin-bottom: 12px; }
.footer-desc { font-size: .88rem; line-height: 1.7; }
.site-footer h4 { color: #fff; font-size: .9rem; margin-bottom: 16px; text-transform: uppercase; letter-spacing: .5px; }
.site-footer ul li { margin-bottom: 8px; }
.site-footer a { color: #a8c0d8; font-size: .88rem; }
.site-footer a:hover { color: #4fc3f7; }
.site-footer p { font-size: .88rem; margin-bottom: 8px; }
.footer-bottom {
  border-top: 1px solid #1e3a5f; padding: 20px 0;
  display: flex; justify-content: space-between; align-items: center; font-size: .82rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .main-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: #0a1628; flex-direction: column; padding: 16px; gap: 4px; }
  .main-nav.open { display: flex; }
  .burger { display: flex; margin-left: auto; }
  .hero h1 { font-size: 1.8rem; }
  .products-grid { grid-template-columns: 1fr; }
  .product-detail-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .form-grid { grid-template-columns: 1fr; }
}

/* ===== CATEGORY ICONS ===== */
.cat-icon {
  width: 56px; height: 56px; margin-bottom: 4px;
}
.cat-icon img { width: 56px; height: 56px; }

.product-card-img img { width: 100%; height: 100%; object-fit: contain; padding: 12px; background: #f0f4f8; }
.product-card-img .cat-icon-fallback {
  width: 64px; height: 64px; opacity: .4;
}
