/* ========================================
   M2 Metal Treatment – Core Styles
   Clean, modern, mobile-first
   ======================================== */

:root {
  --bg: #0f1115;
  --bg-elevated: #171a21;
  --bg-card: #1c2029;
  --text: #e8eaed;
  --text-muted: #9aa0a6;
  --accent: #c9a227;          /* metallic gold */
  --accent-hover: #e0b83a;
  --border: #2a2f3a;
  --success: #3dd68c;
  --danger: #f07178;
  --radius: 10px;
  --shadow: 0 8px 24px rgba(0,0,0,0.35);
  --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --max: 1140px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }

ul { list-style: none; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section { padding: 4rem 0; }
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}
.section-sub {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 36rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 17, 21, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 88px;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
  min-width: 0;
}
.logo img {
  height: 68px;
  width: auto;
  display: block;
  flex-shrink: 0;
}
.logo-text {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  max-width: 11rem;
}
@media (max-width: 720px) {
  .logo-text { display: none; }
  .header-inner { height: 76px; }
  .logo img { height: 56px; }
}
@media (max-width: 480px) {
  .header-inner { height: 68px; }
  .logo img { height: 48px; }
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav a {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav a:hover,
.nav a.active { color: var(--text); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.phone {
  color: var(--text-muted);
  font-size: 0.9rem;
  display: none;
}
@media (min-width: 900px) { .phone { display: block; } }

.cart-btn {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.cart-btn:hover { border-color: var(--accent); }
.cart-count {
  background: var(--accent);
  color: #111;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    flex-direction: column;
    padding: 1.25rem;
    border-bottom: 1px solid var(--border);
    gap: 1rem;
  }
  .nav.open { display: flex; }
  .menu-toggle { display: block; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.35rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--accent);
  color: #111;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.85rem; }

/* ---------- Hero ---------- */
.hero {
  padding: 5rem 0 4rem;
  background: linear-gradient(180deg, #151820 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; }
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.1rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}
.hero h1 span { color: var(--accent); }

.hero p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 32rem;
  margin-bottom: 1.75rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

.hero-visual {
  background: transparent;
  border: none;
  border-radius: var(--radius);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-visual img,
.hero-logo {
  width: 85%;
  max-width: 420px;
  height: auto;
  object-fit: contain;
  display: block;
}

/* ---------- Feature cards ---------- */
.features {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--accent);
}
.feature-card p { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.display-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 768px) {
  .display-grid {
    grid-template-columns: 1fr;
  }
}
.display-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1;
  transition: border-color 0.2s, transform 0.2s;
}
.display-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.display-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.product-img {
  aspect-ratio: 1;
  background: #12151c;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  position: relative;
}
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 1rem;
}

.product-body {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.5rem;
}

.product-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  font-weight: 600;
}

.product-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  flex: 1;
}

.product-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text);
}

.product-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* ---------- About content ---------- */
.prose {
  max-width: 42rem;
  color: var(--text-muted);
}
.prose h2 {
  color: var(--text);
  font-size: 1.4rem;
  margin: 2rem 0 0.75rem;
}
.prose p { margin-bottom: 1rem; }
.prose ul {
  margin: 1rem 0 1.5rem 1.25rem;
  list-style: disc;
}
.prose li { margin-bottom: 0.35rem; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 700px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.contact-card h3 { margin-bottom: 0.75rem; }
.contact-card p { color: var(--text-muted); margin-bottom: 0.5rem; }

/* ---------- Cart drawer ---------- */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}
.cart-overlay.open { opacity: 1; visibility: visible; }

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(400px, 100%);
  height: 100%;
  background: var(--bg-elevated);
  border-left: 1px solid var(--border);
  z-index: 210;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.cart-overlay.open .cart-drawer { transform: translateX(0); }

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.cart-header h2 { font-size: 1.15rem; }

.cart-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}
.cart-close:hover { color: var(--text); }

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.cart-item {
  display: flex;
  gap: 0.85rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}
.cart-item-info { flex: 1; }
.cart-item-title { font-size: 0.9rem; font-weight: 500; }
.cart-item-price { color: var(--text-muted); font-size: 0.85rem; margin-top: 0.2rem; }

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.4rem;
}
.cart-item-qty button {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}
.cart-item-qty button:hover { border-color: var(--accent); }

.cart-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem 1rem;
}

.cart-footer {
  padding: 1.25rem;
  border-top: 1px solid var(--border);
}
.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.cart-footer .btn { width: 100%; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: auto;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  padding: 2.5rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 2rem;
}
.footer-col h4 {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.85rem;
}
.footer-col a, .footer-col p {
  color: var(--text-muted);
  font-size: 0.9rem;
  display: block;
  margin-bottom: 0.4rem;
}
.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }

/* Placeholder for missing images */
.placeholder {
  background: repeating-linear-gradient(
    45deg,
    #1a1e27,
    #1a1e27 8px,
    #151820 8px,
    #151820 16px
  );
  color: var(--text-muted);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1rem;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.88);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
  padding: 1.5rem;
  cursor: zoom-out;
}
.lightbox.open {
  opacity: 1;
  visibility: visible;
}
.lightbox img {
  max-width: min(90vw, 900px);
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  background: #111;
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
}
.lightbox-close:hover { opacity: 1; }

/* Active filter button */
.btn-outline.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(201, 162, 39, 0.1);
}