/*
Theme Name: DMCTN Điện Máy Cũ 2025
Theme URI: https://dienmaycutayninh.com
Author: BÙI VĂN TĨNH
Author URI: https://dienmaycutayninh.com
Description: Theme WooCommerce bán điện máy hiện đại, song ngữ giao diện sáng tối, tối ưu chuyển đổi, SEO, tốc độ và mobile-first.
Version: 3.0.0
Text Domain: dmctn
Requires at least: 6.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Tags: e-commerce, woocommerce, responsive
*/

:root {
  --dmctn-container: 1280px;
  --dmctn-container-wide: 1440px;
  --dmctn-radius-sm: 10px;
  --dmctn-radius-md: 16px;
  --dmctn-radius-lg: 24px;
  --dmctn-shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
  --dmctn-shadow-md: 0 18px 44px rgba(15, 23, 42, 0.12);
  --dmctn-shadow-lg: 0 28px 70px rgba(15, 23, 42, 0.18);
  --dmctn-space-1: 4px;
  --dmctn-space-2: 8px;
  --dmctn-space-3: 12px;
  --dmctn-space-4: 16px;
  --dmctn-space-5: 20px;
  --dmctn-space-6: 24px;
  --dmctn-space-8: 32px;
  --dmctn-space-10: 40px;
  --dmctn-space-12: 48px;
  --dmctn-space-16: 64px;
  --dmctn-font-body: "Be Vietnam Pro", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --dmctn-font-heading: "Be Vietnam Pro", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --dmctn-bg: #f4f7fb;
  --dmctn-surface: #ffffff;
  --dmctn-surface-alt: #eef4ff;
  --dmctn-card: #ffffff;
  --dmctn-border: #d9e2ef;
  --dmctn-text: #0f172a;
  --dmctn-text-soft: #475569;
  --dmctn-text-muted: #64748b;
  --dmctn-primary: #0b57d0;
  --dmctn-primary-strong: #083ea0;
  --dmctn-secondary: #f59e0b;
  --dmctn-accent: #fb923c;
  --dmctn-danger: #ef4444;
  --dmctn-success: #16a34a;
  --dmctn-header-bg: linear-gradient(135deg, #0b57d0 0%, #155dfc 46%, #0ea5e9 100%);
  --dmctn-header-text: #ffffff;
  --dmctn-topbar-bg: #0f172a;
  --dmctn-topbar-text: #dbeafe;
  --dmctn-badge-hot: #ef4444;
  --dmctn-badge-sale: #f97316;
  --dmctn-badge-new: #16a34a;
  --dmctn-text-xs: 0.75rem;
  --dmctn-text-sm: 0.875rem;
  --dmctn-text-base: 1rem;
  --dmctn-text-lg: 1.125rem;
  --dmctn-text-xl: 1.25rem;
  --dmctn-text-2xl: 1.5rem;
  --dmctn-text-3xl: 1.875rem;
  --dmctn-text-4xl: 2.25rem;
}

html[data-theme='dark'] {
  --dmctn-bg: #09111f;
  --dmctn-surface: #0f172a;
  --dmctn-surface-alt: #132238;
  --dmctn-card: #111c30;
  --dmctn-border: #22314b;
  --dmctn-text: #e5eefc;
  --dmctn-text-soft: #c6d5ea;
  --dmctn-text-muted: #8fa3c0;
  --dmctn-primary: #60a5fa;
  --dmctn-primary-strong: #3b82f6;
  --dmctn-secondary: #fbbf24;
  --dmctn-accent: #fb923c;
  --dmctn-danger: #f87171;
  --dmctn-success: #4ade80;
  --dmctn-header-bg: linear-gradient(135deg, #081121 0%, #0f2958 52%, #0b57d0 100%);
  --dmctn-header-text: #f8fbff;
  --dmctn-topbar-bg: #020617;
  --dmctn-topbar-text: #bfdbfe;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
body {
  margin: 0;
  font-family: var(--dmctn-font-body);
  font-size: var(--dmctn-text-base);
  color: var(--dmctn-text);
  background: var(--dmctn-bg);
  line-height: 1.6;
}
body.admin-bar .dmctn-header-sticky { top: 32px; }
a { color: inherit; text-decoration: none; transition: color .2s ease; }
a:hover { text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--dmctn-primary);
  outline-offset: 2px;
}
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; }
input, select, textarea {
  border: 1px solid var(--dmctn-border);
  background: var(--dmctn-surface);
  color: var(--dmctn-text);
}
.container {
  width: min(100% - 32px, var(--dmctn-container));
  margin: 0 auto;
}
.container-wide {
  width: min(100% - 32px, var(--dmctn-container-wide));
  margin: 0 auto;
}
.site-main {
  min-height: 60vh;
  padding: var(--dmctn-space-8) 0 var(--dmctn-space-12);
}
.dmctn-section {
  margin-bottom: var(--dmctn-space-12);
}
.dmctn-surface,
.dmctn-card-shell {
  background: var(--dmctn-surface);
  border: 1px solid var(--dmctn-border);
  border-radius: var(--dmctn-radius-lg);
  box-shadow: var(--dmctn-shadow-sm);
}
.dmctn-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--dmctn-space-4);
  margin-bottom: var(--dmctn-space-6);
}
.dmctn-section-title {
  margin: 0;
  font: 800 var(--dmctn-text-2xl) / 1.15 var(--dmctn-font-heading);
  letter-spacing: -0.02em;
}
@media (min-width: 768px) {
  .dmctn-section-title { font-size: var(--dmctn-text-3xl); }
}
.dmctn-section-subtitle {
  margin: 8px 0 0;
  font-size: var(--dmctn-text-sm);
  color: var(--dmctn-text-soft);
  max-width: 70ch;
}
.dmctn-grid {
  display: grid;
  gap: var(--dmctn-space-6);
}
.dmctn-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dmctn-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dmctn-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dmctn-chip,
.dmctn-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.dmctn-badge { color: #fff; background: var(--dmctn-primary); }
.dmctn-badge-sale { background: var(--dmctn-badge-sale); }
.dmctn-badge-hot { background: var(--dmctn-badge-hot); }
.dmctn-badge-new { background: var(--dmctn-badge-new); }
.dmctn-btn,
button.button,
a.button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--dmctn-secondary), var(--dmctn-accent));
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.25);
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}
.dmctn-btn:hover,
button.button:hover,
a.button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover {
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.03);
  box-shadow: 0 18px 34px rgba(245, 158, 11, 0.32);
}
.dmctn-btn-secondary {
  background: transparent;
  color: var(--dmctn-primary);
  border: 1px solid color-mix(in srgb, var(--dmctn-primary) 30%, var(--dmctn-border));
  box-shadow: none;
  transition: color .2s ease, background .2s ease, transform .15s ease;
}
.dmctn-btn-secondary:hover { background: color-mix(in srgb, var(--dmctn-primary) 8%, transparent); }
.dmctn-link-more {
  font-weight: 700;
  color: var(--dmctn-primary);
}
.dmctn-link-more:hover { color: var(--dmctn-primary-strong); }
.woocommerce-breadcrumb,
.dmctn-breadcrumbs {
  color: var(--dmctn-text-muted);
  font-size: 14px;
  margin-bottom: var(--dmctn-space-4);
}
.woocommerce-breadcrumb a,
.dmctn-breadcrumbs a {
  color: var(--dmctn-text-soft);
}
.widget,
.footer-widget,
.footer-social-widget {
  background: transparent;
  margin: 0;
}
.widget-title,
.footer-widget-title,
.footer-social-title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 800;
}
.site-footer {
  background: color-mix(in srgb, var(--dmctn-topbar-bg) 92%, var(--dmctn-surface));
  color: #e2e8f0;
  padding-top: var(--dmctn-space-10);
}
.site-footer a { color: #dbeafe; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  color: #cbd5e1;
  font-size: 14px;
}
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  width: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 100000;
  padding: 12px 16px;
  background: var(--dmctn-primary);
  color: #fff;
  border-radius: 12px;
}
.skip-link:focus { top: 16px; }
.dmctn-empty-state {
  padding: var(--dmctn-space-10);
  text-align: center;
  color: var(--dmctn-text-soft);
  background: var(--dmctn-surface);
  border: 1px dashed var(--dmctn-border);
  border-radius: var(--dmctn-radius-lg);
}
@media (max-width: 1024px) {
  .dmctn-grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dmctn-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
  .container,
  .container-wide { width: min(100% - 20px, var(--dmctn-container)); }
  .site-main { padding-top: var(--dmctn-space-6); }
  .dmctn-grid.cols-2,
  .dmctn-grid.cols-3,
  .dmctn-grid.cols-4 { grid-template-columns: 1fr; }
  .dmctn-section { margin-bottom: var(--dmctn-space-10); }
}
