/* ==========================================================================
   MITSUBISHI ĐỒNG NAI — Base Styles
   Phụ thuộc: variables.css, reset.css
   ========================================================================== */

/* ===== GLOBAL ANIMATIONS & PROPERTIES ===== */
@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

@keyframes rotate-border {
  from { --angle: 0deg; }
  to { --angle: 360deg; }
}

/* ===== CUSTOM SCROLLBARS (PREMIUM) ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--color-dark-1); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; border: 2px solid var(--color-dark-1); }
::-webkit-scrollbar-thumb:hover { background: var(--color-primary); }
html {
  scrollbar-width: thin;
  scrollbar-color: #333 var(--color-dark-1);
}

/* ===== CONTAINER ===== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

@media (min-width: 1024px) {
  .container {
    padding-inline: var(--container-padding-lg);
  }
}

.section {
  padding-block: 5rem;
  margin: 0;
}

/* Triệt tiêu cộng dồn padding giữa 2 section liên tiếp */
.section + .section {
  padding-top: 0;
  margin-top: 0;
}

.section--dark {
  background-color: var(--color-dark-1);
  color: var(--color-text-primary);
}

.section--light {
  background-color: var(--color-light-1);
  color: var(--color-text-dark);
}

.section__title {
  font-size: var(--text-3xl);
  font-family: var(--font-heading);
  font-weight: var(--font-extrabold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-4);
}

.section__subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  margin-bottom: var(--space-12);
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-12);
}

/* ===== CYBER LUXURY LASER SCANLINE ===== */
.section__header--scanline {
  position: relative;
  padding-bottom: var(--space-4); /* Thu hẹp khoảng cách phía trên vạch */
  margin-bottom: var(--space-8);  /* Thu hẹp khoảng cách phía dưới vạch */
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.section__header--scanline::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 150px;
  height: 2px;
  background: linear-gradient(to right, transparent, var(--color-primary), #ffc107, var(--color-primary), transparent);
  animation: cyberScanLine 4s linear infinite;
}

@keyframes cyberScanLine {
  0% { left: -150px; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

/* Đường gạch dưới tiêu đề — màu đỏ Mitsubishi */
.section__title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background-color: var(--color-primary);
  margin-top: var(--space-3);
}

.section__header .section__title::after {
  margin-inline: auto;
}

/* ===== GRID ===== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-6); }

@media (max-width: 1023px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .section { padding-block: 2.5rem; }
}

/* ===== TYPOGRAPHY UTILITIES ===== */
.text-primary   { color: var(--color-primary); }
.text-gold      { color: var(--color-gold); }
.text-muted     { color: var(--color-text-muted); }
.text-center    { text-align: center; }
.text-upper     { text-transform: uppercase; letter-spacing: 0.05em; }
.font-heading   { font-family: var(--font-heading); }

/* ===== BADGE ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge--primary  { background: var(--color-primary); color: #fff; }
.badge--gold     { background: var(--color-gold); color: #fff; }
.badge--dark     { background: var(--color-dark-3); color: var(--color-text-primary); }
.badge--official { background: var(--color-primary); color: #fff; } /* Chính hãng */

/* ===== DIVIDER ===== */
.divider {
  border: none;
  border-top: 1px solid var(--color-dark-3);
  margin-block: var(--space-8);
}

/* ===== MODAL BODY LOCK ===== */
body.body--modal-open {
  overflow: hidden;
}

/* ===== UTILITY ===== */
.text-primary { color: var(--color-primary); }
.text-gold    { color: var(--color-gold); }
.text-muted   { color: var(--color-text-muted); }

/* ===== ACCESSIBILITY ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* ===== LAZY LOAD PLACEHOLDER ===== */
img[loading="lazy"] {
  background-color: var(--color-dark-2);
}

/* ===== MITSUBISHI GLOW EFFECT (Premium Showroom Style) ===== */
.text-mitsubishi-glow {
    font-weight: 950;
    color: transparent;
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.45); 
    text-transform: uppercase;
    background: linear-gradient(135deg, transparent 30%, var(--color-primary) 50%, transparent 70%);
    -webkit-background-clip: text;
    background-clip: text;
    background-size: 400% 400%;
    animation: brandShineHyper 10s ease-in-out infinite;
    display: inline-block;
    user-select: none;
    letter-spacing: 10px; /* Enhanced Showcase Spacing */
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.3));
}

@keyframes brandShineHyper {
    0%   { background-position: 0% 50%; }
    10%  { background-position: 100% 50%; }
    11%  { background-position: 50% 0%; }
    20%  { background-position: 50% 100%; }
    21%  { background-position: 100% 50%; }
    30%  { background-position: 0% 50%; }
    31%  { background-position: 50% 100%; }
    40%  { background-position: 50% 0%; }
    41%  { background-position: 100% 100%; }
    50%  { background-position: 0% 0%; }
    51%  { background-position: 0% 0%; }
    60%  { background-position: 100% 100%; }
    61%  { background-position: 100% 0%; }
    70%  { background-position: 0% 100%; }
    71%  { background-position: 0% 100%; }
    80%  { background-position: 100% 0%; }
    81%  { background-position: 150% 50%; }
    90%  { background-position: 50% 50%; }
    100% { background-position: 10% 10%; }
}
