/* ManageGames — Ochaka / WEIBOO inspired theme */
:root {
  --primary: #8cc63f;
  --primary-dark: #6fa82e;
  --secondary: #d63384;
  --secondary-dark: #b02a6e;
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --bg: #ffffff;
  --bg-soft: #f8f9fa;
  --bg-section: #f3f4f6;
  --radius: 6px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.container {
  width: min(1320px, 94%);
  margin: 0 auto;
}

/* Top bar */
.top-bar {
  background: var(--primary);
  color: #fff;
  font-size: 0.875rem;
  text-align: center;
  padding: 0.5rem 1rem;
}

.top-bar a {
  color: #fff;
  text-decoration: underline;
  font-weight: 600;
}

/* Header */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.header-main {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 0;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-link img.logo-img {
  height: 90px;
  min-height: 90px;
  width: auto;
  max-width: min(320px, 42vw);
  object-fit: contain;
}

.search-form {
  display: flex;
  max-width: 520px;
  margin: 0 auto;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.search-form input {
  flex: 1;
  border: none;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  outline: none;
}

.search-form button {
  background: var(--primary);
  border: none;
  color: #fff;
  padding: 0 1.25rem;
  cursor: pointer;
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.header-actions a {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  gap: 0.2rem;
}

.header-actions .icon {
  font-size: 1.35rem;
  color: var(--text);
}

.cart-link {
  position: relative;
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -8px;
  background: var(--primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-bar {
  border-top: 1px solid var(--border);
  padding: 0.75rem 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-categories {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.main-nav {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
}

.main-nav a {
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--primary-dark);
}

.btn-flash {
  background: var(--secondary);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9rem;
}

.mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1.25rem;
}

/* Hero */
.hero {
  background: var(--bg-section);
  padding: 3rem 0;
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 2px solid rgba(140, 198, 63, 0.2);
  right: 8%;
  top: 10%;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2rem;
}

.hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin: 0 0 1rem;
  line-height: 1.2;
}

.hero-price {
  color: var(--secondary);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-content p {
  color: var(--text-muted);
  max-width: 480px;
}

.hero-img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.15s;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--secondary);
  color: #fff;
}

.btn-secondary:hover {
  background: var(--secondary-dark);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary-dark);
}

/* Categories */
.section {
  padding: 3.5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 2rem;
}

.section-title h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin: 0 0 0.5rem;
}

.section-title p {
  color: var(--text-muted);
  margin: 0;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1.25rem;
}

.cat-card {
  text-align: center;
  padding: 1.25rem 0.75rem;
  background: var(--bg-soft);
  border-radius: var(--radius);
  transition: box-shadow 0.2s, background 0.2s;
}

.cat-card:hover {
  background: #fff;
  box-shadow: var(--shadow);
}

.cat-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 0.75rem;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.cat-card span {
  font-size: 0.85rem;
  font-weight: 600;
}

/* Products */
.products-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
}

.product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  position: relative;
  transition: box-shadow 0.2s;
}

.product-card:hover {
  box-shadow: var(--shadow);
}

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
}

.badge-sale {
  background: var(--secondary);
}

.badge-new {
  background: var(--primary);
}

.product-card .thumb {
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 0.75rem;
  background: var(--bg-soft);
}

.stars {
  color: #f59e0b;
  font-size: 0.8rem;
  margin-bottom: 0.35rem;
}

.product-card h3 {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  line-height: 1.35;
  min-height: 2.7em;
}

.price-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.price {
  color: var(--secondary);
  font-weight: 700;
  font-size: 1.05rem;
}

.price-old {
  color: var(--text-muted);
  text-decoration: line-through;
  font-size: 0.85rem;
}

.product-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.product-actions .btn {
  flex: 1;
  text-align: center;
  padding: 0.5rem;
  font-size: 0.8rem;
}

/* Banners */
.promo-banner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem 2.5rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  color: #fff;
}

.promo-banner.pink {
  background: var(--secondary);
}

.promo-banner.green {
  background: var(--primary);
}

.promo-banner h3 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
}

.promo-banner p {
  margin: 0;
  opacity: 0.95;
}

.promo-banner .btn {
  background: #fff;
  color: var(--text);
}

/* Hand-picked layout */
.featured-split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.5rem;
}

.feature-large {
  background: var(--bg-section);
  border-radius: var(--radius);
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: center;
}

.feature-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feature-mini {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 1rem;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  background: #fff;
}

/* Blog cards */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.blog-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
}

.blog-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.blog-body {
  padding: 1.25rem;
}

.blog-date {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.blog-card h3 {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0 0 0.75rem;
}

/* Service bar */
.service-bar {
  background: var(--bg-soft);
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.service-item .si-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.service-item h4 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.service-item p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  background: var(--text);
  color: #d1d5db;
  padding-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr) 1.2fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
}

.footer-grid h4 {
  color: #fff;
  margin: 0 0 1rem;
  font-size: 1rem;
}

.footer-grid ul li {
  margin-bottom: 0.5rem;
}

.footer-grid a:hover {
  color: var(--primary);
}

.footer-about img.footer-logo {
  height: 90px;
  min-height: 90px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
  margin-bottom: 1rem;
  filter: brightness(1.1);
}

.footer-about p {
  font-size: 0.9rem;
  line-height: 1.7;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.newsletter-form input {
  padding: 0.65rem 0.85rem;
  border: 1px solid #4b5563;
  border-radius: var(--radius);
  background: #374151;
  color: #fff;
}

.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.social-links a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #374151;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: background 0.2s;
}

.social-links a:hover {
  background: var(--primary);
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding: 1.25rem 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
}

.payment-icons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pay-badge {
  background: #fff;
  color: var(--text);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Page hero */
.page-hero {
  background: var(--bg-section);
  padding: 2.5rem 0;
  text-align: center;
}

.page-hero h1 {
  font-family: var(--font-display);
  margin: 0 0 0.5rem;
  font-size: 2rem;
}

.breadcrumb {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--primary-dark);
}

/* Forms */
.form-section {
  max-width: 640px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: 2px solid rgba(140, 198, 63, 0.35);
  border-color: var(--primary);
}

.form-group.error input,
.form-group.error textarea,
.form-group.error select {
  border-color: #dc2626;
}

.field-error {
  color: #dc2626;
  font-size: 0.8rem;
  margin-top: 0.35rem;
  display: none;
}

.form-group.error .field-error,
.checkbox-row.error .field-error {
  display: block;
}

.checkbox-row.error {
  margin-bottom: 1.5rem;
}

.checkbox-row {
  display: grid;
  grid-template-columns: 20px 1fr;
  column-gap: 0.75rem;
  row-gap: 0.35rem;
  align-items: start;
  margin-bottom: 1.25rem;
}

.checkbox-row input[type="checkbox"] {
  grid-column: 1;
  grid-row: 1;
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  margin: 0.2rem 0 0;
  padding: 0;
  flex-shrink: 0;
  accent-color: var(--primary);
  cursor: pointer;
  justify-self: start;
  align-self: start;
}

.checkbox-row label {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
  font-weight: 400;
  font-size: 0.9rem;
  line-height: 1.55;
  cursor: pointer;
  align-self: start;
  padding-top: 0.05rem;
}

.checkbox-row .field-error {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
  width: 100%;
}

.checkbox-row.error input[type="checkbox"] {
  outline: 2px solid #dc2626;
  outline-offset: 1px;
}

.form-success {
  background: rgba(140, 198, 63, 0.15);
  border: 1px solid var(--primary);
  color: var(--primary-dark);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  display: none;
}

.form-success.visible {
  display: block;
}

/* Cart */
.cart-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
}

.cart-table th,
.cart-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.cart-table img {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 4px;
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.qty-control button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 4px;
  cursor: pointer;
}

.cart-summary {
  max-width: 380px;
  margin-left: auto;
  background: var(--bg-soft);
  padding: 1.5rem;
  border-radius: var(--radius);
}

.cart-summary h3 {
  margin-top: 0;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 1rem;
}

.modal-overlay.visible {
  display: flex;
}

.modal-box {
  background: #fff;
  padding: 2rem;
  border-radius: var(--radius);
  max-width: 480px;
  text-align: center;
  box-shadow: var(--shadow);
}

.modal-box h2 {
  color: var(--primary-dark);
  margin-top: 0;
}

/* Legal / long content */
.prose {
  max-width: 860px;
  margin: 0 auto;
}

.prose h2 {
  font-size: 1.35rem;
  margin: 2rem 0 0.75rem;
  color: var(--text);
}

.prose h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
}

.prose p,
.prose li {
  color: var(--text-muted);
}

.prose ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0.5rem 0 1rem;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.about-grid img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.stat-box {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-soft);
  border-radius: var(--radius);
}

.stat-box strong {
  display: block;
  font-size: 1.75rem;
  color: var(--primary-dark);
}

.shop-sidebar {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2rem;
}

.filter-group h4 {
  margin: 0 0 0.75rem;
}

.filter-group label {
  display: grid;
  grid-template-columns: 20px 1fr;
  column-gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.55rem;
  font-size: 0.9rem;
  line-height: 1.4;
  cursor: pointer;
}

.filter-group input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  margin: 0;
  padding: 0;
  accent-color: var(--primary);
  cursor: pointer;
  justify-self: center;
}

.empty-cart {
  text-align: center;
  padding: 3rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 992px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-grid,
  .featured-split,
  .feature-large,
  .about-grid,
  .shop-sidebar {
    grid-template-columns: 1fr;
  }

  .blog-grid {
    grid-template-columns: 1fr 1fr;
  }

  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .header-main {
    grid-template-columns: auto 1fr;
  }

  .search-form {
    grid-column: 1 / -1;
    order: 3;
    max-width: none;
  }
}

@media (max-width: 768px) {
  .mobile-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 0;
  }

  .main-nav.open {
    display: flex;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .promo-banner {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}