/* DigitMX HD — Electronics store theme (POSH / Ochaka inspired) */
:root {
  --black: #0a0a0a;
  --black-soft: #141414;
  --white: #ffffff;
  --off-white: #f7f6f3;
  --gray-100: #f0efec;
  --gray-200: #e2e1dd;
  --gray-400: #9a9892;
  --gray-600: #5c5a56;
  --gold-light: #e8d5a3;
  --gold: #c9a962;
  --gold-dark: #9a7b3a;
  --blue-soft: #dce8f5;
  --blue-mid: #a8c4e0;
  --accent: #1a6fd4;
  --error: #c62828;
  --success: #2e7d32;
  --font-sans: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-serif: Georgia, "Times New Roman", serif;
  --container: min(1200px, 92vw);
  --nav-h: 52px;
  --shadow: 0 8px 32px rgba(10, 10, 10, 0.08);
  --radius: 4px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--black);
  background: var(--off-white);
  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: var(--container);
  margin-inline: auto;
}

/* Top bar */
.top-bar {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  font-size: 0.8rem;
  color: var(--gray-600);
}

.top-bar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  gap: 1rem;
}

.top-bar select {
  border: none;
  background: transparent;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* Header */
.site-header {
  background: var(--white);
  padding: 1rem 0 0;
  position: sticky;
  top: 0;
  z-index: 200;
  box-shadow: 0 1px 0 var(--gray-200);
}

.header-brand {
  display: flex;
  justify-content: center;
  padding-bottom: 0.75rem;
}

.header-brand img,
.header-brand .logo-svg {
  height: 44px;
  width: auto;
}

.header-actions {
  position: absolute;
  right: max(4vw, (100vw - 1200px) / 2);
  top: 1.25rem;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.site-header .container {
  position: relative;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.35rem;
  position: relative;
  color: var(--black);
}

.icon-btn svg {
  width: 22px;
  height: 22px;
}

.cart-count {
  position: absolute;
  top: -2px;
  right: -4px;
  background: var(--gold);
  color: var(--black);
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-nav {
  background: var(--black);
}

.main-nav__list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.25rem 2rem;
  padding: 0.85rem 1rem;
}

.main-nav a {
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.main-nav a:hover,
.main-nav a.is-active {
  border-bottom-color: var(--gold);
  color: var(--gold-light);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  padding: 0.75rem;
  cursor: pointer;
}

/* Hero */
.hero {
  background: linear-gradient(105deg, #efe6d4 0%, #e8e4dc 45%, #c5c5c5 100%);
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 2rem;
  min-height: 420px;
  padding: 3rem 0;
}

.hero__content h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.15;
  margin: 0 0 1rem;
  font-weight: 700;
}

.hero__content p {
  color: var(--gray-600);
  max-width: 28rem;
  margin-bottom: 1.5rem;
}

.hero__visual {
  display: flex;
  justify-content: center;
}

.hero__visual img {
  max-height: 380px;
  object-fit: contain;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.15));
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: 2px solid var(--black);
  background: var(--black);
  color: var(--white);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.btn:hover {
  background: transparent;
  color: var(--black);
}

.btn--outline {
  background: transparent;
  color: var(--black);
}

.btn--outline:hover {
  background: var(--black);
  color: var(--white);
}

.btn--gold {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--black);
}

.btn--gold:hover {
  background: transparent;
  color: var(--gold-dark);
  border-color: var(--gold-dark);
}

.btn--sm {
  padding: 0.55rem 1.1rem;
  font-size: 0.85rem;
}

/* Sections */
.section {
  padding: 4rem 0;
}

.section--gray {
  background: var(--gray-100);
}

.section--dark {
  background: var(--black);
  color: var(--white);
}

.section__head {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section__head h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  margin: 0 0 0.5rem;
}

.section__head p {
  color: var(--gray-600);
  margin: 0;
}

.section--dark .section__head p {
  color: var(--gray-400);
}

/* Category circles */
.cat-row {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
}

.cat-item {
  text-align: center;
  width: 110px;
}

.cat-item__img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 0.75rem;
  border: 3px solid var(--white);
  box-shadow: var(--shadow);
  background: var(--gray-200);
}

.cat-item__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cat-item span {
  font-size: 0.85rem;
  font-weight: 600;
}

/* Promo banners */
.promo-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.promo-card {
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 220px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  color: var(--black);
}

.promo-card--large {
  background: linear-gradient(135deg, var(--blue-soft), var(--blue-mid));
  grid-row: span 2;
  min-height: 460px;
}

.promo-card--stack {
  display: grid;
  gap: 1.25rem;
}

.promo-card--small {
  background: var(--white);
  border: 1px solid var(--gray-200);
  min-height: 200px;
}

.promo-card--deal {
  background: linear-gradient(160deg, #f5efe3, #e0d4c0);
}

.promo-card img.product-float {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  max-width: 45%;
  max-height: 70%;
  object-fit: contain;
}

.badge-save {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--black);
  color: var(--gold-light);
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
}

/* Product cards */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.product-card {
  background: var(--white);
  padding: 1.25rem;
  border: 1px solid var(--gray-200);
  transition: box-shadow 0.2s, transform 0.2s;
}

.product-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.product-card__img {
  background: var(--gray-100);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  overflow: hidden;
}

.product-card__img img {
  width: 85%;
  height: 85%;
  object-fit: contain;
}

.product-card h3 {
  font-size: 1rem;
  margin: 0 0 0.35rem;
  line-height: 1.35;
}

.stars {
  color: var(--gold);
  font-size: 0.85rem;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
}

.price {
  font-weight: 700;
  font-size: 1.1rem;
}

.price del {
  color: var(--gray-400);
  font-weight: 400;
  font-size: 0.9rem;
  margin-left: 0.35rem;
}

.product-card .btn {
  width: 100%;
  margin-top: 1rem;
}

/* Testimonials */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.testimonial {
  padding: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.testimonial__quote {
  font-size: 2rem;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.testimonial p {
  font-size: 0.9rem;
  color: #d0d0d0;
  margin-bottom: 1rem;
}

.testimonial__user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.testimonial__user img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

/* Countdown */
.split-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--white);
}

.split-banner__media img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
}

.split-banner__content {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.countdown {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.countdown__unit {
  text-align: center;
}

.countdown__unit strong {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  border-bottom: 2px solid var(--black);
  padding-bottom: 0.25rem;
  min-width: 4rem;
}

.countdown__unit span {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--gray-600);
  margin-top: 0.35rem;
  display: block;
}

/* Trust row */
.trust-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.trust-item svg {
  width: 40px;
  height: 40px;
  margin: 0 auto 0.75rem;
  color: var(--gold-dark);
}

.trust-item h4 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.trust-item p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--gray-600);
}

/* Gallery */
.gallery-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}

.gallery-row img {
  aspect-ratio: 1;
  object-fit: cover;
  width: 100%;
}

/* Footer */
.site-footer {
  background: var(--black);
  color: #ccc;
  padding-top: 3.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
  gap: 2rem;
  padding-bottom: 2.5rem;
}

.footer-brand img {
  height: 40px;
  margin-bottom: 1rem;
  filter: brightness(0) invert(1);
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border: 1px solid #444;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s;
}

.footer-social a:hover {
  border-color: var(--gold);
  color: var(--gold-light);
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.95rem;
  margin: 0 0 1rem;
}

.footer-col ul li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  font-size: 0.88rem;
  color: #aaa;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: var(--gold-light);
}

.footer-mini-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.footer-mini-form input {
  flex: 1;
  padding: 0.55rem 0.75rem;
  border: 1px solid #444;
  background: #1a1a1a;
  color: var(--white);
  font: inherit;
}

.footer-bottom {
  border-top: 1px solid #2a2a2a;
  padding: 1.25rem 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: gap;
  font-size: 0.85rem;
}

.pay-icons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pay-icons span {
  background: #222;
  padding: 0.35rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #ddd;
}

/* Page hero */
.page-hero {
  background: linear-gradient(120deg, var(--black) 0%, #2a2a2a 100%);
  color: var(--white);
  padding: 3rem 0;
  text-align: center;
}

.page-hero h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.page-hero p {
  margin: 0;
  color: var(--gray-400);
  max-width: 640px;
  margin-inline: auto;
}

/* Content pages */
.content-prose {
  max-width: 820px;
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

.content-prose h2 {
  margin-top: 2rem;
  font-size: 1.35rem;
}

.content-prose h3 {
  margin-top: 1.5rem;
  font-size: 1.1rem;
}

.content-wide {
  max-width: var(--container);
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

/* Forms */
.form-card {
  max-width: 560px;
  margin: 0 auto;
  background: var(--white);
  padding: 2rem;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--gray-200);
  font: inherit;
  background: var(--off-white);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--black);
}

.form-group input.is-invalid,
.form-group textarea.is-invalid {
  border-color: var(--error);
}

.field-error {
  color: var(--error);
  font-size: 0.8rem;
  margin-top: 0.35rem;
  display: none;
}

.field-error.is-visible {
  display: block;
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.form-check input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  margin: 0.2rem 0 0;
  flex-shrink: 0;
  accent-color: var(--black);
  cursor: pointer;
}

.form-check label {
  font-size: 0.9rem;
  line-height: 1.5;
  cursor: pointer;
}

.form-success {
  display: none;
  background: #e8f5e9;
  border: 1px solid var(--success);
  color: var(--success);
  padding: 1.25rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.form-success.is-visible {
  display: block;
}

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.blog-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.blog-card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
}

.blog-card__body {
  padding: 1.25rem;
}

.blog-card__meta {
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-bottom: 0.5rem;
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-grid img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Shop toolbar */
.shop-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.shop-filters {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.shop-filters button {
  padding: 0.5rem 1rem;
  border: 1px solid var(--gray-200);
  background: var(--white);
  cursor: pointer;
  font: inherit;
}

.shop-filters button.is-active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

/* Cart drawer */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s;
}

.cart-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100vw);
  height: 100%;
  background: var(--white);
  z-index: 301;
  transform: translateX(100%);
  transition: transform 0.3s;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
}

.cart-drawer.is-open {
  transform: translateX(0);
}

.cart-drawer__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem;
  border-bottom: 1px solid var(--gray-200);
}

.cart-drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.cart-item {
  display: flex;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.cart-item img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: var(--gray-100);
}

.cart-item__info {
  flex: 1;
}

.cart-item__qty {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.cart-item__qty button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--gray-200);
  background: var(--white);
  cursor: pointer;
}

.cart-drawer__foot {
  padding: 1.25rem;
  border-top: 1px solid var(--gray-200);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.checkout-thanks {
  display: none;
  text-align: center;
  padding: 2rem 1rem;
}

.checkout-thanks.is-visible {
  display: block;
}

.checkout-thanks h3 {
  color: var(--success);
  margin-bottom: 0.5rem;
}

/* Breadcrumb */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--gray-600);
  padding: 1rem 0;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 1024px) {
  .product-grid,
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .testimonial-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .promo-grid {
    grid-template-columns: 1fr 1fr;
  }

  .promo-card--large {
    grid-column: span 2;
    grid-row: auto;
    min-height: 300px;
  }
}

@media (max-width: 768px) {
  .header-actions {
    right: 4vw;
  }

  .menu-toggle {
    display: block;
    margin-left: auto;
  }

  .main-nav__list {
    display: none;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }

  .main-nav__list.is-open {
    display: flex;
  }

  .main-nav__inner {
    display: flex;
    align-items: center;
  }

  .hero__grid,
  .split-banner,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .product-grid,
  .blog-grid,
  .testimonial-grid,
  .trust-row,
  .gallery-row {
    grid-template-columns: 1fr;
  }

  .gallery-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .promo-grid {
    grid-template-columns: 1fr;
  }

  .promo-card--large {
    grid-column: auto;
  }
}