/* ================================
   Machine Art Motors – Complete Styles
   Palette A: Bright Performance Orange (Medium Grey + Shop Cards)
   ================================ */

:root {
  /* Brand colors */
  --brand-orange: #FF6F20;
  --bg-dark: #484E56;
  --bg-darker: #3A4149;
  --grey-mid: #8C8F93;
  --grey-light: #D1D5D9;
  --text-light: #F5F5F5;
  --text-body: #B3B3B3;
  --black-accent: #111111;
  
  /* Layout */
  --container-width: 1200px;
  --border-radius: 6px;
  --transition: 0.2s ease;
}

/* ================================
   Reset & Base
   ================================ */

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

html, body {
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-body);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4, h5, h6 {
  color: var(--text-light);
  margin-top: 0;
  letter-spacing: 0.04em;
  font-weight: 700;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
}

a {
  color: var(--brand-orange);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover, a:focus {
  color: var(--text-light);
}

strong {
  color: var(--text-light);
  font-weight: 600;
}

/* ================================
   Layout Containers
   ================================ */

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 3.5rem 0;
}

/* ================================
   Header & Navigation Bar
   ================================ */

.bar {
  background-color: var(--bg-darker);
  border-bottom: 1px solid rgba(0, 0, 0, 0.7);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.bar .inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand {
  margin-right: auto;
  display: flex;
  align-items: center;
}

.logo {
  height: 42px;
  width: auto;
}

.logo--xl {
  height: 48px;
}

.logo--footer {
  height: 38px;
}

/* Navigation */
.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav a {
  font-size: 0.88rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-body);
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}

.nav a:hover,
.nav a:focus {
  color: var(--text-light);
  border-bottom-color: var(--brand-orange);
}

/* Cart link */
.cart-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--brand-orange);
}

.icon-cart {
  width: 18px;
  height: 18px;
  vertical-align: -2px;
}

#cart-count {
  background-color: var(--brand-orange);
  color: #fff;
  border-radius: 10px;
  padding: 0.1rem 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
}

/* Hamburger (mobile) */
.hamburger {
  display: none;
  margin-left: auto;
  cursor: pointer;
  background: var(--bg-darker);
  border: 1px solid var(--grey-mid);
  border-radius: 6px;
  color: var(--text-light);
  padding: 8px 14px;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--transition);
}

.hamburger:hover {
  background: var(--brand-orange);
  border-color: var(--brand-orange);
}

/* ================================
   Hero Section
   ================================ */

.hero {
  padding: 3rem 0 2.5rem;
  background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.logo-hero {
  max-width: 280px;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero-title .accent {
  display: block;
  color: var(--brand-orange);
  font-size: 0.75em;
  margin-top: 0.5rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.hero-sub {
  font-size: 1.05rem;
  line-height: 1.65;
  margin-bottom: 1.75rem;
  max-width: 38rem;
}

/* ================================
   Buttons
   ================================ */

.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  border-radius: var(--border-radius);
  font-size: 0.88rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  background-color: var(--brand-orange);
  color: #fff;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  margin-right: 0.75rem;
  margin-bottom: 0.75rem;
}

.btn:hover,
.btn:focus {
  background-color: #e2601b;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  color: #fff;
}

.btn.secondary {
  background-color: transparent;
  color: var(--text-light);
  border: 1px solid var(--grey-mid);
  box-shadow: none;
}

.btn.secondary:hover,
.btn.secondary:focus {
  border-color: var(--brand-orange);
  color: var(--brand-orange);
  background-color: rgba(255, 111, 32, 0.08);
  transform: translateY(-1px);
}

button {
  font-family: inherit;
}

/* Mini link button */
.mini {
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.35rem 0.75rem;
  border-radius: 4px;
  background: rgba(255, 111, 32, 0.12);
  color: var(--brand-orange);
  transition: all var(--transition);
}

.mini:hover {
  background: var(--brand-orange);
  color: #fff;
}

/* ================================
   Cards (General + Product Cards)
   ================================ */

.card {
  background-color: var(--bg-darker);
  border-radius: var(--border-radius);
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: all var(--transition);
}

.card.hover {
  cursor: pointer;
}

.card.hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.6);
  border-color: rgba(255, 111, 32, 0.4);
}

.card img {
  border-radius: var(--border-radius);
  margin-bottom: 0.75rem;
  width: 100%;
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.title-row strong {
  flex: 1;
  font-size: 0.95rem;
}

/* ================================
   Shop Product Cards (Enhanced)
   ================================ */

.product-card,
.shop-item,
article.card {
  background: linear-gradient(145deg, #3d444c 0%, #3A4149 100%);
  border: 1px solid rgba(255, 111, 32, 0.15);
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.product-card::before,
.shop-item::before,
article.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--brand-orange), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card:hover,
.shop-item:hover,
article.card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 111, 32, 0.5);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7),
              0 0 0 1px rgba(255, 111, 32, 0.3);
}

.product-card:hover::before,
.shop-item:hover::before,
article.card:hover::before {
  opacity: 1;
}

.product-card img,
.shop-item img {
  border-radius: 6px;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Product title and meta */
.product-title,
.shop-item h3 {
  color: var(--text-light);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  letter-spacing: 0.02em;
}

.product-meta,
.shop-item .meta {
  color: var(--grey-mid);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

/* Quantity controls */
.quantity-controls,
.qty-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.quantity-controls button,
.qty-controls button {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  border: 1px solid var(--grey-mid);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-light);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-controls button:hover,
.qty-controls button:hover {
  background: var(--brand-orange);
  border-color: var(--brand-orange);
  color: #fff;
}

.quantity-controls input,
.qty-controls input {
  width: 50px;
  height: 32px;
  text-align: center;
  border: 1px solid var(--grey-mid);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-light);
  font-weight: 600;
}

/* Add to cart button */
.add-to-cart,
.btn-add-cart,
button[class*="add"] {
  width: 100%;
  padding: 0.85rem 1.25rem;
  background-color: var(--brand-orange);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 111, 32, 0.3);
}

.add-to-cart:hover,
.btn-add-cart:hover,
button[class*="add"]:hover {
  background-color: #e2601b;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 111, 32, 0.5);
}

/* ================================
   Before/After Slider (ba2)
   ================================ */

.ba2 {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--border-radius);
  --split: 50%;
}

.ba2-after,
.ba2-before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  pointer-events: none;
}

.ba2-before {
  clip-path: inset(0 calc(100% - var(--split)) 0 0);
}

/* Divider line */
.ba2::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--split);
  width: 2px;
  background-color: var(--brand-orange);
  z-index: 2;
  pointer-events: none;
  box-shadow: 0 0 8px rgba(255, 111, 32, 0.6);
}

/* Handle knob */
.ba2::after {
  content: "⇄";
  position: absolute;
  top: 50%;
  left: var(--split);
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--brand-orange);
  border: 2px solid var(--black-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  z-index: 3;
  pointer-events: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7);
  font-weight: 700;
}

.ba2-range {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  z-index: 4;
}

/* ================================
   Grid (Gallery / Shop)
   ================================ */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.75rem;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
}

.section-head h2 {
  margin: 0;
  font-size: 1.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ================================
   Footer
   ================================ */

.site-footer {
  background-color: #3A4149;
  border-top: 1px solid rgba(0, 0, 0, 0.8);
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
  margin-bottom: 2rem;
}

.footer-col {
  display: flex;
  flex-direction: column;
}

.footer-brand .brand {
  margin-bottom: 1rem;
}

.footer-blurb {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--grey-mid);
}

.footer-title {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  color: var(--text-light);
}

.footer-links ul,
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links li,
.contact-list li {
  margin-bottom: 0.6rem;
}

.footer-links a,
.contact-list a {
  color: var(--grey-mid);
  font-size: 0.88rem;
}

.footer-links a:hover,
.contact-list a:hover {
  color: var(--brand-orange);
}

/* Social icons */
.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--grey-mid);
  transition: all var(--transition);
}

.social:hover {
  background: var(--brand-orange);
  color: #fff;
}

/* Newsletter */
.footer-news .muted {
  font-size: 0.85rem;
  color: var(--grey-mid);
  margin-bottom: 0.75rem;
}

.newsletter-wrap {
  display: flex;
  gap: 0.5rem;
}

.newsletter-wrap input {
  flex: 1;
  padding: 0.65rem 0.85rem;
  border-radius: 4px;
  border: 1px solid var(--grey-mid);
  background: var(--bg-darker);
  color: var(--text-light);
  font-size: 0.88rem;
}

.newsletter-wrap input:focus {
  outline: none;
  border-color: var(--brand-orange);
}

.newsletter-wrap button {
  padding: 0.65rem 1.25rem;
  border-radius: 4px;
  border: none;
  background: var(--brand-orange);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background var(--transition);
}

.newsletter-wrap button:hover {
  background: #e2601b;
}

/* Footer legal */
.footer-legal {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 1.5rem;
}

.legal-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--grey-mid);
}

/* ================================
   Responsive
   ================================ */

@media (max-width: 900px) {
  .hamburger {
    display: inline-flex;
  }

  #mam-mainnav {
    position: fixed;
    left: 0;
    right: 0;
    top: 64px;
    bottom: auto;
    background: rgba(58, 65, 73, 0.98);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 1.5rem;
    transform: translateY(-120%);
    transition: transform 0.25s ease;
    z-index: 1000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  }

  #mam-mainnav.open {
    transform: none;
  }

  body.menu-open {
    overflow: hidden;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 2.5rem 0;
  }

  .hero {
    padding: 2rem 0 1.5rem;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .legal-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
