/* TechNova — Ochaka-inspired electronics theme */
:root {
  --primary: #5b4f96;
  --primary-dark: #463c78;
  --accent: #e91e63;
  --accent-soft: #fce4ec;
  --hero-blue: #81c8f2;
  --hero-peach: #ffe8f0;
  --dark: #2b2b35;
  --footer: #1f1f28;
  --text: #333333;
  --muted: #777777;
  --border: #e8e8ee;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 12px 40px rgba(91, 79, 150, 0.12);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}


body {
  margin: 0;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  padding-bottom: 64px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

.container {
  width: min(1200px, 92%);
  margin: 0 auto;
}

/* Top bar */
.top-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0;
}

.top-links a {
  color: var(--muted);
}

.top-links .sep {
  margin: 0 0.5rem;
  color: var(--border);
}

.top-social a {
  display: inline-flex;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  align-items: center;
  justify-content: center;
  margin-left: 0.35rem;
  font-size: 0.7rem;
  font-weight: 700;
}

/* Header */
.site-header {
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-main {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 0;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
}

.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--primary);
}

.logo img {
  height: 44px;
  width: auto;
}

.header-search {
  display: flex;
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.header-search input {
  flex: 1;
  border: 0;
  padding: 0.65rem 1rem;
  font: inherit;
}

.header-search button {
  border: 0;
  background: var(--primary);
  color: var(--white);
  padding: 0 1.25rem;
  cursor: pointer;
  font-weight: 600;
}

.header-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.action-link {
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  color: var(--text);
  font-weight: 600;
}

.badge {
  display: inline-flex;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--white);
  font-size: 0.75rem;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
}

.main-nav {
  background: linear-gradient(90deg, var(--primary), #6d5fae);
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.main-nav a {
  display: block;
  color: var(--white);
  padding: 0.85rem 1.25rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.main-nav a.active,
.main-nav a:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  font: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-accent {
  background: var(--accent);
  color: var(--white);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.btn-block {
  width: 100%;
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 420px;
  background: linear-gradient(135deg, var(--hero-blue) 0%, #a8daf5 100%);
  overflow: hidden;
}

.hero-sidebar {
  background: var(--white);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0 1.5rem 0;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-sidebar-head {
  background: var(--primary);
  color: var(--white);
  padding: 1rem 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-categories {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
}

.hero-categories li a {
  display: flex;
  justify-content: space-between;
  padding: 0.65rem 1.25rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.hero-categories li a:hover {
  background: var(--accent-soft);
  color: var(--primary);
}

.hero-content {
  display: flex;
  align-items: center;
  padding: 2rem 3rem;
  gap: 2rem;
}

.hero-text {
  flex: 1;
  max-width: 520px;
}

.hero-text h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--primary);
  line-height: 1.15;
  margin: 0 0 1rem;
}

.hero-text p {
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

.hero-image img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-height: 340px;
  object-fit: cover;
}

/* Services */
.services {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 2.5rem auto;
}

.service-box {
  border: 1px solid var(--border);
  padding: 1.25rem;
  text-align: center;
  border-radius: var(--radius);
  transition: box-shadow 0.2s;
}

.service-box:hover {
  box-shadow: var(--shadow);
}

.service-box .icon {
  font-size: 1.75rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.service-box h3 {
  margin: 0;
  font-size: 0.95rem;
  text-transform: uppercase;
}

/* Section titles */
.section-head {
  text-align: center;
  margin: 3rem 0 1.5rem;
}

.section-head h2 {
  margin: 0;
  font-size: 1.75rem;
  text-transform: capitalize;
}

.section-head .underline {
  width: 50px;
  height: 3px;
  background: var(--accent);
  margin: 0.75rem auto 0;
}

/* Categories promo */
.category-promo {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.promo-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 200px;
}

.promo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.promo-card span {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  background: var(--white);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-weight: 700;
  color: var(--accent);
}

/* Products */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.product-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  position: relative;
  text-align: center;
  transition: box-shadow 0.2s;
}

.product-card:hover {
  box-shadow: var(--shadow);
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent);
  color: var(--white);
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  z-index: 1;
}

.product-image img {
  border-radius: 8px;
  margin: 0 auto 0.75rem;
  aspect-ratio: 1;
  object-fit: cover;
}

.product-cat {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0;
}

.product-card h3 {
  font-size: 1rem;
  margin: 0.35rem 0;
}

.product-card h3 a {
  color: var(--text);
}

.price,
.price-sale {
  color: var(--accent);
  font-weight: 700;
  font-size: 1.05rem;
}

.price-old {
  text-decoration: line-through;
  color: var(--muted);
  font-size: 0.9rem;
  margin-left: 0.35rem;
}

.stock {
  font-size: 0.85rem;
  color: #2e7d32;
}

/* Banners */
.split-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--dark);
  color: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 2rem 0;
}

.split-banner .copy {
  padding: 2.5rem;
}

.split-banner h2 {
  color: var(--white);
  margin-top: 0;
}

.split-banner img {
  height: 100%;
  object-fit: cover;
}

.teal-banner {
  background: linear-gradient(90deg, #00838f, #26a69a);
  color: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 2rem 0;
}

.teal-banner img {
  width: 280px;
  border-radius: var(--radius);
}

/* Blog grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.blog-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.blog-card img {
  height: 200px;
  width: 100%;
  object-fit: cover;
}

.blog-card .body {
  padding: 1rem;
}

.blog-date {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
}

/* Page hero */
.page-hero {
  background: linear-gradient(135deg, var(--hero-peach), var(--accent-soft));
  padding: 3rem 0;
  text-align: center;
}

.page-hero h1 {
  margin: 0;
  color: var(--primary);
}

.breadcrumb {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Content pages */
.content-section {
  padding: 2.5rem 0 4rem;
}

.content-section .prose {
  max-width: 820px;
  margin: 0 auto;
}

.content-section .prose-wide {
  max-width: 960px;
  margin: 0 auto;
}

.prose h2 {
  color: var(--primary);
  margin-top: 2rem;
}

.prose ul {
  padding-left: 1.25rem;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

/* Forms */
.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.form-row {
  margin-bottom: 1rem;
}

.form-row label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

.form-row textarea {
  min-height: 140px;
  resize: vertical;
}

.form-row input.invalid,
.form-row textarea.invalid {
  border-color: #c62828;
}

.field-error {
  display: block;
  color: #c62828;
  font-size: 0.85rem;
  min-height: 1.2em;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
  margin: 1rem 0;
  line-height: 1.45;
}

.checkbox-row input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox-ui {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 2px solid var(--primary);
  border-radius: 4px;
  margin-top: 2px;
  position: relative;
  background: var(--white);
}

.checkbox-row input:checked + .checkbox-ui::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 11px;
  border: solid var(--primary);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-row.invalid .checkbox-ui {
  border-color: #c62828;
}

.checkbox-label a {
  text-decoration: underline;
}

.form-success {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  color: #2e7d32;
  padding: 1rem;
  border-radius: 8px;
  margin-top: 1rem;
}

.form-error {
  color: #c62828;
  font-size: 0.9rem;
  min-height: 1.2em;
}

.muted {
  color: var(--muted);
}

/* Footer */
.site-footer {
  background: var(--footer);
  color: #ccc;
  margin-top: 3rem;
}

.footer-widgets {
  padding: 2.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.footer-col h4 {
  color: var(--white);
  margin-top: 0;
}

.footer-products {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-products li {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}

.footer-products img {
  border-radius: 6px;
}

.footer-newsletter {
  padding: 2rem 0;
  background: rgba(255, 255, 255, 0.03);
}

.newsletter-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.newsletter-text h3 {
  color: var(--white);
  margin-top: 0;
}

.newsletter-form .field-wrap {
  display: flex;
  gap: 0;
  border-radius: 999px;
  overflow: hidden;
  background: var(--white);
}

.newsletter-form input[type="email"] {
  flex: 1;
  border: 0;
  padding: 0.85rem 1rem;
  font: inherit;
}

.newsletter-form button {
  border: 0;
  background: var(--accent);
  color: var(--white);
  padding: 0 1.5rem;
  font-weight: 700;
  cursor: pointer;
}

.footer-main {
  padding: 2.5rem 0;
}

.footer-main-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
}

.footer-logo {
  filter: brightness(0) invert(1);
  margin-bottom: 1rem;
}

.about-company p {
  font-size: 0.95rem;
}

.footer-social span {
  display: block;
  font-weight: 600;
  color: var(--white);
  margin: 1rem 0 0.5rem;
}

.social-icons a {
  display: inline-block;
  margin-right: 0.75rem;
  color: #aaa;
  font-size: 0.85rem;
}

.social-icons a:hover {
  color: var(--accent);
}

.quick-links h4 {
  color: var(--white);
}

.quick-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.quick-links li {
  margin-bottom: 0.45rem;
}

.quick-links a {
  color: #aaa;
  font-size: 0.9rem;
}

.quick-links a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1rem 0;
  font-size: 0.85rem;
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-bottom a {
  color: #aaa;
  margin-left: 1rem;
}

.footer-bottom a:hover {
  color: var(--white);
}

/* Cart drawer */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 200;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.cart-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(400px, 100%);
  height: 100%;
  background: var(--white);
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.25s;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.15);
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.cart-close {
  background: none;
  border: 0;
  font-size: 1.75rem;
  cursor: pointer;
}

.cart-items {
  flex: 1;
  overflow: auto;
  padding: 1rem;
}

.cart-line {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.cart-line h3 {
  font-size: 0.95rem;
  margin: 0 0 0.25rem;
}

.cart-line-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.5rem;
}

.cart-line-actions button {
  border: 1px solid var(--border);
  background: var(--white);
  border-radius: 6px;
  width: 28px;
  height: 28px;
  cursor: pointer;
}

.link-danger {
  border: 0 !important;
  width: auto !important;
  color: var(--accent);
  font-size: 0.85rem;
}

.cart-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
}

.cart-total {
  font-size: 1.1rem;
}

.cart-empty {
  color: var(--muted);
  text-align: center;
  padding: 2rem 1rem;
}

/* Checkout modal */
.checkout-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.checkout-dialog {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2rem;
  width: min(480px, 100%);
  position: relative;
  max-height: 90vh;
  overflow: auto;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  border: 0;
  background: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #e8f5e9;
  color: #2e7d32;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1rem;
}

#checkoutSuccess {
  text-align: center;
}

#checkoutSuccess h2 {
  color: var(--primary);
}

/* Mobile bottom nav */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--white);
  border-top: 1px solid var(--border);
  z-index: 90;
  justify-content: space-around;
  padding: 0.35rem 0;
}

.mobile-bottom-nav a,
.mobile-bottom-nav button {
  background: none;
  border: 0;
  font-size: 0.65rem;
  color: var(--text);
  text-align: center;
  cursor: pointer;
  font-family: inherit;
}

.mb-icon {
  display: block;
  font-size: 1.1rem;
}

.mb-cart .badge {
  position: relative;
  top: -8px;
}

/* FAQ accordion */
.faq-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: 3rem 0;
}

.brand-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  opacity: 0.7;
}

.brand-strip span {
  background: var(--border);
  padding: 1.5rem;
  text-align: center;
  border-radius: 8px;
  font-weight: 700;
  color: var(--muted);
}

.faq-list details {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  padding: 0.75rem 1rem;
}

.faq-list summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--accent);
}

.shop-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1.5rem 0;
  flex-wrap: wrap;
  gap: 1rem;
}

.shop-filters select {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

@media (max-width: 992px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-sidebar {
    display: none;
  }

  .hero-content {
    flex-direction: column;
    padding: 2rem 1rem;
    text-align: center;
  }

  .services,
  .product-grid,
  .category-promo,
  .blog-grid,
  .footer-grid,
  .footer-main-grid,
  .newsletter-inner,
  .split-banner,
  .faq-section,
  .two-col {
    grid-template-columns: 1fr 1fr;
  }

  .header-search {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .header-main {
    grid-template-columns: auto 1fr auto;
  }
}

@media (max-width: 640px) {
  body {
    padding-bottom: 72px;
  }

  .services,
  .product-grid,
  .category-promo,
  .blog-grid,
  .footer-grid,
  .footer-main-grid,
  .newsletter-inner,
  .split-banner,
  .faq-section,
  .two-col,
  .teal-banner {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .mobile-bottom-nav {
    display: flex;
  }

  body.nav-open .main-nav ul {
    display: flex;
    flex-direction: column;
  }

  .main-nav ul {
    display: none;
  }

  body.nav-open .main-nav ul {
    display: flex;
  }

  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
  }

  .footer-bottom a {
    margin: 0 0.5rem;
  }
}
