/* DzungTran — Modern electronics storefront (clean blue layout) */
:root {
  --primary: #00aeef;
  --primary-dark: #0090c8;
  --primary-soft: #e8f7fd;
  --text: #1e2530;
  --muted: #6b7280;
  --bg: #ffffff;
  --surface: #f6f8fa;
  --surface-2: #eef2f6;
  --border: #e5e9ef;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 8px 30px rgba(30, 37, 48, 0.08);
  --shadow-sm: 0 4px 14px rgba(30, 37, 48, 0.06);
  --font: "DM Sans", system-ui, sans-serif;
  --cat-blue: #d9f0fc;
  --cat-yellow: #fff4d6;
  --cat-pink: #ffe8f0;
  --cat-orange: #ffe9da;
  --promo-red: #fdebec;
  --promo-gray: #f0f2f5;
  --promo-tan: #fff1e3;
  --max: 1240px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--primary);
}

.container {
  width: min(var(--max), 92vw);
  margin: 0 auto;
}

/* Top bar */
.top-bar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
}

.top-bar .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.top-social {
  display: flex;
  gap: 0.5rem;
}

.top-social a {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.top-social a:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.top-meta {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.top-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.currency-pill {
  padding: 0.2rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 700;
  color: var(--text);
  background: var(--bg);
}

/* Header */
.site-header {
  background: var(--bg);
  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-shell,
.header-inner {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr);
  align-items: center;
  gap: 1rem;
  min-height: 76px;
}

.logo-link img {
  height: 40px;
  width: auto;
}

.nav-wrap {
  justify-self: center;
}

.nav-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-main a {
  color: var(--text);
  position: relative;
  padding: 0.25rem 0;
}

.nav-main a.active {
  color: var(--primary);
}

.nav-item-badge {
  position: relative;
}

.nav-item-badge .pill-new {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  font-weight: 800;
  background: var(--primary);
  color: #fff;
  padding: 2px 6px;
  border-radius: 999px;
  white-space: nowrap;
}

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--text);
  position: relative;
  transition: background 0.2s;
}

.icon-btn:hover {
  background: var(--surface);
  color: var(--primary);
}

.icon-btn svg {
  width: 21px;
  height: 21px;
}

.cart-count {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.menu-toggle {
  display: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1.6rem;
  border: none;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 174, 239, 0.35);
}

.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
  transform: translateY(-1px);
}

.btn-outline {
  background: #fff;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-sm {
  padding: 0.55rem 1.15rem;
  font-size: 0.85rem;
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
  padding: 0;
  box-shadow: none;
}

.btn-ghost:hover {
  text-decoration: underline;
}

.btn-add {
  width: 100%;
  margin-top: 0.75rem;
  border-radius: 12px;
  padding: 0.65rem;
  font-size: 0.85rem;
  box-shadow: none;
}

/* Hero */
.hero-modern {
  background: linear-gradient(135deg, #e8f7fd 0%, #ffffff 55%, #f6fbff 100%);
  padding: clamp(2rem, 6vw, 4rem) 0;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.hero-kicker {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
}

.hero-inner h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.12;
  font-weight: 800;
}

.hero-inner p {
  color: var(--muted);
  margin: 0 0 1.5rem;
  max-width: 38ch;
}

.hero-media {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-media img {
  max-height: 380px;
  object-fit: contain;
  filter: drop-shadow(0 20px 40px rgba(0, 174, 239, 0.15));
}

/* Categories */
.section {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
}

.section-title-center {
  text-align: center;
  margin: 0 0 2rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.cat-card {
  border-radius: var(--radius-lg);
  padding: 1.75rem 1rem 1.25rem;
  text-align: center;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
}

.cat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.cat-card.blue { background: var(--cat-blue); }
.cat-card.yellow { background: var(--cat-yellow); }
.cat-card.pink { background: var(--cat-pink); }
.cat-card.orange { background: var(--cat-orange); }

.cat-card img {
  max-height: 110px;
  object-fit: contain;
}

.cat-card span {
  font-weight: 700;
  font-size: 0.95rem;
}

/* Products */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.35rem;
}

.product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
}

.product-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.pill-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: var(--primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  text-transform: uppercase;
}

.card-wish {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  font-size: 1rem;
  display: grid;
  place-items: center;
}

.card-wish.is-on {
  color: #e74c3c;
  border-color: #ffc9c4;
  background: #fff5f4;
}

.card-thumb {
  display: grid;
  place-items: center;
  padding: 1rem 0.5rem;
  min-height: 160px;
}

.card-thumb img {
  max-height: 130px;
  object-fit: contain;
}

.card-body h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
}

.card-meta {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
}

.price {
  color: var(--primary);
  font-weight: 800;
  font-size: 1.05rem;
}

.was {
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: line-through;
}

.rating {
  margin: 0.35rem 0;
}

.star {
  color: #d1d5db;
  font-size: 0.8rem;
}

.star.on {
  color: #fbbf24;
}

.swatches {
  display: flex;
  gap: 0.35rem;
}

.swatches span {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.section-cta {
  text-align: center;
  margin-top: 2rem;
}

/* Promo row */
.promo-row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.promo-box {
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  min-height: 160px;
  box-shadow: var(--shadow-sm);
}

.promo-box.red { background: var(--promo-red); }
.promo-box.gray { background: var(--promo-gray); }
.promo-box.tan { background: var(--promo-tan); }

.promo-box h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.promo-box p {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.promo-box img {
  width: 100px;
  height: 100px;
  object-fit: contain;
}

/* Feature split */
.feature-split {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2rem;
  align-items: center;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.feature-split h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.feature-split p {
  color: var(--muted);
  margin: 0 0 1.25rem;
}

.feature-split img {
  border-radius: var(--radius);
  width: 100%;
  max-height: 340px;
  object-fit: cover;
}

/* Video banner */
.media-banner {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.media-banner img {
  width: 100%;
  height: min(420px, 55vw);
  object-fit: cover;
}

.play-fab {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(30, 37, 48, 0.15);
  border: none;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.play-fab span {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  font-size: 1.25rem;
  color: var(--primary);
}

.brands-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem 3rem;
  padding: 2rem 0;
  color: #b0b8c4;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Testimonial */
.quote-box {
  background: var(--surface-2);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.quote-icon {
  font-size: 2.5rem;
  color: var(--primary);
  line-height: 1;
}

.quote-box p {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 1rem 0;
}

.quote-author {
  font-weight: 800;
  color: var(--text);
}

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.blog-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.blog-card img {
  height: 200px;
  width: 100%;
  object-fit: cover;
}

.blog-card .content {
  padding: 1.15rem;
}

.blog-date {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.blog-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

/* Trust bar */
.trust-bar {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: #fff;
  padding: 1.5rem 0;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}

.trust-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
}

/* Footer */
.site-footer {
  background: var(--surface);
  padding-top: 3rem;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2rem;
  padding-bottom: 2rem;
}

.footer-brand p {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0.75rem 0 1rem;
}

.footer-social {
  display: flex;
  gap: 0.5rem;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 800;
}

.footer-col h4 {
  margin: 0 0 1rem;
  font-size: 1rem;
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.45rem;
}

.footer-links a {
  color: var(--muted);
  font-weight: 500;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-newsletter input {
  width: 100%;
  margin-bottom: 0.65rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  font: inherit;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-legal a {
  color: var(--muted);
}

/* Page interior */
.page-hero {
  padding: 2.5rem 0 1.5rem;
  background: var(--primary-soft);
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.breadcrumb {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.content-panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.prose p,
.prose li {
  color: var(--muted);
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--surface);
  border-radius: var(--radius);
}

.shop-toolbar input,
.shop-toolbar select {
  padding: 0.65rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  font: inherit;
  flex: 1;
  min-width: 160px;
}

/* Forms */
.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  font: inherit;
}

.form-error {
  color: #e11d48;
  font-size: 0.8rem;
  margin-top: 0.35rem;
  display: block;
  min-height: 1em;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  margin-top: 0.2rem;
  accent-color: var(--primary);
  flex-shrink: 0;
}

.form-success {
  display: none;
  padding: 1rem;
  background: #ecfdf5;
  border-radius: 12px;
  font-weight: 600;
}

.form-success.is-visible {
  display: block;
}

/* Cart & modals */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
}

.cart-overlay.open {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(420px, 100vw);
  height: 100%;
  background: #fff;
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.1);
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.25s;
  display: flex;
  flex-direction: column;
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.cart-item {
  display: flex;
  gap: 0.75rem;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.cart-footer {
  padding: 1.25rem;
  border-top: 1px solid var(--border);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  margin-bottom: 1rem;
}

.checkout-modal,
.order-thanks-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
}

.checkout-modal.open,
.order-thanks-overlay.open {
  opacity: 1;
  visibility: visible;
}

.order-thanks-overlay {
  z-index: 400;
}

.checkout-panel,
.order-thanks {
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  width: min(480px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
}

.order-thanks {
  text-align: center;
}

.order-thanks h2 {
  color: var(--primary);
  margin-top: 0;
}

.empty-cart {
  text-align: center;
  color: var(--muted);
  padding: 2rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .product-grid,
  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .promo-row-3,
  .blog-grid,
  .trust-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-main {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .header-shell,
  .header-inner {
    grid-template-columns: 1fr auto;
  }
  .menu-toggle {
    display: grid;
  }
  .nav-wrap {
    display: none;
    grid-column: 1 / -1;
    padding: 0.75rem 0 1rem;
    border-top: 1px solid var(--border);
  }
  .nav-wrap.open {
    display: block;
  }
  .nav-main {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-inner,
  .feature-split,
  .two-col {
    grid-template-columns: 1fr;
  }
  .product-grid,
  .cat-grid,
  .promo-row-3,
  .blog-grid,
  .trust-grid {
    grid-template-columns: 1fr;
  }
  .footer-main {
    grid-template-columns: 1fr;
  }
}