/* ===== Shopify Dawn–inspired theme for Motanova ===== */
:root {
  --font-body: 'Assistant', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --color-foreground: 18, 18, 18;
  --color-background: 255, 255, 255;
  --color-background-secondary: 245, 245, 245;
  --color-border: 230, 230, 230;
  --color-button: 18, 18, 18;
  --color-button-text: 255, 255, 255;
  --page-width: 120rem;
  --page-padding: 1.5rem;
  --header-height: 6rem;
  --announcement-height: 3.6rem;
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--announcement-height));
  font-size: 62.5%;
}

body.shopify-store {
  font-family: var(--font-body);
  font-size: 1.6rem;
  line-height: 1.5;
  color: rgb(var(--color-foreground));
  background: rgb(var(--color-background));
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

.page-width {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 var(--page-padding);
}

.page-width--narrow { max-width: 72rem; }

.center { text-align: center; }
.caption { font-size: 1.3rem; color: rgba(var(--color-foreground), 0.65); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

.h1 { font-size: clamp(2.8rem, 4vw, 4rem); font-weight: 400; letter-spacing: -0.02em; line-height: 1.1; }
.h2 { font-size: 2.4rem; font-weight: 400; letter-spacing: -0.01em; }
.h3 { font-size: 2rem; font-weight: 500; }
.h4 { font-size: 1.6rem; font-weight: 600; }

.link-underline {
  font-size: 1.4rem;
  text-underline-offset: 0.3rem;
  text-decoration: underline;
  text-decoration-thickness: 0.1rem;
}

/* ===== Buttons (Shopify button component) ===== */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 4.5rem;
  min-width: 12rem;
  padding: 0 3rem;
  font-family: inherit;
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 0.1rem solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}

.button--primary {
  background: rgb(var(--color-button));
  color: rgb(var(--color-button-text));
}
.button--primary:hover { opacity: 0.85; }

.button--secondary {
  background: transparent;
  color: rgb(var(--color-button-text));
  border-color: rgb(var(--color-button-text));
}
.hero-banner .button--secondary {
  color: #fff;
  border-color: rgba(255,255,255,0.8);
}
.hero-banner .button--secondary:hover { background: rgba(255,255,255,0.1); }

.button--full { width: 100%; }

/* ===== Announcement bar ===== */
.announcement-bar {
  background: rgb(var(--color-foreground));
  color: rgb(var(--color-background));
  text-align: center;
  padding: 1rem var(--page-padding);
  font-size: 1.3rem;
  letter-spacing: 0.02em;
}
.announcement-bar a { text-decoration: underline; text-underline-offset: 0.2rem; }
.announcement-bar a:hover { opacity: 0.8; }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgb(var(--color-background));
  border-bottom: 0.1rem solid rgb(var(--color-border));
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: var(--header-height);
  gap: 1rem;
}

.header-logo {
  grid-column: 2;
  justify-self: center;
  display: flex;
  align-items: center;
}

.header-logo-img {
  height: 4.4rem;
  width: auto;
  max-width: 22rem;
  object-fit: contain;
}

.footer-logo {
  height: 3rem;
  width: auto;
  object-fit: contain;
  margin-bottom: 1rem;
}

.header-nav--desktop {
  display: flex;
  gap: 2.4rem;
}
.header-nav--desktop:first-of-type { justify-self: start; }
.header-nav--right { justify-self: end; grid-column: 3; }

.header-link {
  font-size: 1.4rem;
  letter-spacing: 0.04em;
  position: relative;
}
.header-link:hover { opacity: 0.7; }

.header-icons {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  justify-self: end;
  grid-column: 3;
}

.header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.4rem;
  height: 4.4rem;
  background: none;
  border: none;
  cursor: pointer;
  color: rgb(var(--color-foreground));
  position: relative;
}
.header-icon:hover { opacity: 0.7; }

.header-menu { display: none; justify-self: start; grid-column: 1; }

.header-cart .cart-count {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  min-width: 1.8rem;
  height: 1.8rem;
  background: rgb(var(--color-foreground));
  color: rgb(var(--color-background));
  font-size: 1rem;
  font-weight: 600;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
}

.menu-drawer {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: rgb(var(--color-background));
  border-bottom: 0.1rem solid rgb(var(--color-border));
  padding: 1.6rem var(--page-padding) 2.4rem;
  box-shadow: 0 1rem 2rem rgba(0,0,0,0.06);
}
.menu-drawer.open { display: block; }

.menu-drawer-link {
  display: block;
  padding: 1.2rem 0;
  font-size: 1.6rem;
  border-bottom: 0.1rem solid rgb(var(--color-border));
}

/* ===== Hero banner ===== */
.hero-banner {
  position: relative;
  min-height: 55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-banner-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(18,18,18,0.75) 0%, rgba(18,18,18,0.35) 60%, rgba(18,18,18,0.5) 100%),
    linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 40%, #3d3d3d 100%);
}
.hero-banner-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 80px,
    rgba(255,255,255,0.02) 80px,
    rgba(255,255,255,0.02) 81px
  );
}

.hero-banner-content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: #fff;
  padding: 6rem var(--page-padding);
  max-width: 80rem;
}

.hero-eyebrow {
  font-size: 1.3rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.6rem;
  opacity: 0.85;
}

.hero-heading {
  font-size: clamp(3.2rem, 6vw, 5.6rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 2.4rem;
}

.hero-subtext {
  font-size: 1.6rem;
  color: rgba(255,255,255,0.82);
  line-height: 1.7;
  margin-bottom: 2.4rem;
  max-width: 52rem;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 1.2rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Sections ===== */
.shopify-section { padding: 5rem 0; }
.featured-collection--alt { background: rgb(var(--color-background-secondary)); }

.section-heading { margin-bottom: 2.4rem; }
.section-heading--row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.6rem;
}

.section-subtext {
  font-size: 1.4rem;
  color: rgba(var(--color-foreground), 0.65);
  margin: -1.2rem 0 2.4rem;
}

/* ===== Collection list ===== */
.collection-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
}

.collection-card { display: block; }

.collection-card-media {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 0;
  overflow: hidden;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: flex-end;
  padding: 1.6rem;
}

.collection-card-media--wire {
  background: linear-gradient(160deg, #3a3a3a 0%, #1a1a1a 100%);
}
.collection-card-media--terminals {
  background: linear-gradient(160deg, #4a4a4a 0%, #2a2a2a 100%);
}
.collection-card-media--custom {
  background: linear-gradient(160deg, #2d2d2d 0%, #0f0f0f 100%);
}

.collection-card-label {
  color: #fff;
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.9;
}

.collection-card-title {
  font-size: 1.8rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.collection-card:hover .collection-card-media { opacity: 0.92; }

/* ===== Product grid (Shopify card-product) ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem 1.6rem;
}

.product-grid--custom { margin-top: 4rem; grid-template-columns: repeat(3, 1fr); }

.product-card {
  position: relative;
}

.product-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: rgb(var(--color-background-secondary));
  overflow: hidden;
  margin-bottom: 1.2rem;
}

.product-card__media-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: rgba(var(--color-foreground), 0.35);
  transition: transform 0.4s ease;
}

.product-card:hover .product-card__media-inner { transform: scale(1.03); }

.product-card__badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.4rem 0.8rem;
  background: rgb(var(--color-background));
  border: 0.1rem solid rgb(var(--color-border));
}

.product-card__quick-add {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  opacity: 0;
  transform: translateY(0.5rem);
  transition: all var(--transition);
}

.product-card:hover .product-card__quick-add { opacity: 1; transform: translateY(0); }

.product-card__quick-add .button {
  width: 100%;
  min-height: 4rem;
  font-size: 1.2rem;
  background: rgb(var(--color-background));
  color: rgb(var(--color-foreground));
  border: 0.1rem solid rgb(var(--color-border));
}
.product-card__quick-add .button:hover { background: rgb(var(--color-foreground)); color: rgb(var(--color-background)); }

.product-card__vendor {
  font-size: 1.2rem;
  color: rgba(var(--color-foreground), 0.55);
  margin-bottom: 0.2rem;
}

.product-card__title {
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.3;
  margin-bottom: 0.4rem;
}

.product-card__title a:hover { text-decoration: underline; }

.product-card__price {
  font-size: 1.5rem;
  font-weight: 500;
}
.product-card__price--quote {
  font-size: 1.3rem;
  color: rgba(var(--color-foreground), 0.7);
  font-style: italic;
}

.product-card__min {
  font-size: 1.2rem;
  color: rgba(var(--color-foreground), 0.55);
  margin-top: 0.4rem;
}

.product-card__actions {
  margin-top: 1rem;
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.qty-input {
  width: 5.6rem;
  height: 4rem;
  text-align: center;
  border: 0.1rem solid rgb(var(--color-border));
  font-family: inherit;
  font-size: 1.4rem;
}

.qty-input:focus { outline: none; border-color: rgb(var(--color-foreground)); }

.product-card__actions .button--primary {
  flex: 1;
  min-height: 4rem;
  font-size: 1.2rem;
}

/* Filter pills */
.filter-group { display: flex; gap: 0.6rem; flex-wrap: wrap; }

.filter-pill {
  padding: 0.6rem 1.4rem;
  font-family: inherit;
  font-size: 1.3rem;
  background: transparent;
  border: 0.1rem solid rgb(var(--color-border));
  cursor: pointer;
  transition: all var(--transition);
}
.filter-pill:hover { border-color: rgb(var(--color-foreground)); }
.filter-pill.active {
  background: rgb(var(--color-foreground));
  color: rgb(var(--color-background));
  border-color: rgb(var(--color-foreground));
}

/* ===== Image with text ===== */
.image-with-text-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 2rem;
}

.image-with-text-media {
  aspect-ratio: 1 / 1;
  background: rgb(var(--color-background-secondary));
}
.image-with-text-media--custom {
  background: linear-gradient(145deg, #333 0%, #111 100%);
}

.image-with-text-content .h1 { margin-bottom: 1.6rem; }
.image-with-text-content p { margin-bottom: 2rem; color: rgba(var(--color-foreground), 0.75); line-height: 1.7; }

/* ===== Multicolumn ===== */
.multicolumn-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  text-align: center;
}

.multicolumn-item .h4 { margin-bottom: 0.8rem; }
.multicolumn-item p { font-size: 1.4rem; color: rgba(var(--color-foreground), 0.7); line-height: 1.6; }

/* ===== Quote section ===== */
.quote-section { background: rgb(var(--color-background-secondary)); }

.quote-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: start;
}

.quote-copy .h1 { margin-bottom: 1.2rem; }
.quote-copy p { color: rgba(var(--color-foreground), 0.75); margin-bottom: 1rem; line-height: 1.7; }
.quote-email-line a { text-decoration: underline; }

/* ===== Forms ===== */
.shopify-form { display: flex; flex-direction: column; gap: 1.2rem; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }

.field label {
  display: block;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 1.2rem 1.4rem;
  font-family: inherit;
  font-size: 1.4rem;
  border: 0.1rem solid rgb(var(--color-border));
  background: rgb(var(--color-background));
  color: rgb(var(--color-foreground));
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: rgb(var(--color-foreground));
}

.shopify-form--inline {
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 1rem;
  margin-top: 2rem;
}
.field--grow { flex: 1; min-width: 16rem; }
.field--full { width: 100%; }

.newsletter-email { font-size: 1.8rem; margin: 1rem 0; }
.newsletter-email a { text-decoration: underline; }

.rte p { font-size: 1.6rem; color: rgba(var(--color-foreground), 0.75); line-height: 1.8; margin-top: 1.2rem; }

/* ===== Footer ===== */
.site-footer {
  background: rgb(var(--color-background-secondary));
  border-top: 0.1rem solid rgb(var(--color-border));
  padding: 5rem 0 2.4rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-heading {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.2rem;
}

.footer-text { font-size: 1.4rem; color: rgba(var(--color-foreground), 0.7); }

.footer-links li {
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  color: rgba(var(--color-foreground), 0.7);
}
.footer-links a:hover { text-decoration: underline; }

.footer-bottom {
  padding-top: 2rem;
  border-top: 0.1rem solid rgb(var(--color-border));
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 1.3rem;
  color: rgba(var(--color-foreground), 0.55);
}

/* ===== Cart drawer (Shopify cart-drawer) ===== */
.cart-overlay, .modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(18,18,18,0.5);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}
.cart-overlay.open, .modal-overlay.open { opacity: 1; visibility: visible; }

.cart-drawer, .modal-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(42rem, 100vw);
  background: rgb(var(--color-background));
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -0.4rem 0 2rem rgba(0,0,0,0.08);
}
.cart-drawer.open, .modal-drawer.open { transform: translateX(0); }

.modal-drawer { padding: 0 2.4rem 2.4rem; overflow-y: auto; }

.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2rem 2.4rem;
  border-bottom: 0.1rem solid rgb(var(--color-border));
}

.cart-close, .modal-close {
  background: none;
  border: none;
  font-size: 2.8rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
}
.cart-close:hover, .modal-close:hover { opacity: 1; }

.cart-drawer-items {
  flex: 1;
  overflow-y: auto;
  padding: 1.6rem 2.4rem;
}

.cart-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: rgba(var(--color-foreground), 0.6);
  font-size: 1.5rem;
}
.cart-empty a { text-decoration: underline; }

.cart-line {
  display: grid;
  grid-template-columns: 7rem 1fr auto;
  gap: 1.2rem;
  padding: 1.6rem 0;
  border-bottom: 0.1rem solid rgb(var(--color-border));
}

.cart-line-thumb {
  aspect-ratio: 1;
  background: rgb(var(--color-background-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 600;
  color: rgba(var(--color-foreground), 0.4);
}

.cart-line-info h4 { font-size: 1.4rem; font-weight: 500; margin-bottom: 0.2rem; }
.cart-line-info p { font-size: 1.2rem; color: rgba(var(--color-foreground), 0.6); }

.cart-line-qty {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 0.8rem;
}
.cart-line-qty button {
  width: 2.8rem;
  height: 2.8rem;
  border: 0.1rem solid rgb(var(--color-border));
  background: none;
  cursor: pointer;
  font-size: 1.6rem;
}
.cart-line-qty span { font-size: 1.4rem; min-width: 2rem; text-align: center; }

.cart-remove {
  background: none;
  border: none;
  font-size: 1.2rem;
  text-decoration: underline;
  cursor: pointer;
  margin-top: 0.4rem;
  color: rgba(var(--color-foreground), 0.6);
}

.cart-line-price { font-size: 1.4rem; font-weight: 500; align-self: start; padding-top: 0.2rem; }

.cart-drawer-footer {
  padding: 2rem 2.4rem;
  border-top: 0.1rem solid rgb(var(--color-border));
}

.cart-subtotal-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.6rem;
  font-weight: 500;
  margin-bottom: 0.8rem;
}

.cart-note { margin-bottom: 1.6rem; line-height: 1.5; }

.cart-continue {
  display: block;
  text-align: center;
  margin-top: 1.2rem;
}

.checkout-summary {
  background: rgb(var(--color-background-secondary));
  padding: 1.2rem;
  font-size: 1.3rem;
  line-height: 1.6;
  margin-bottom: 1.2rem;
}

.quote-modal-product { padding: 0 0 1.2rem; }

/* ===== Responsive ===== */
@media (max-width: 990px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .collection-list { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .quote-grid, .image-with-text-grid { grid-template-columns: 1fr; }
}

@media (max-width: 749px) {
  :root { --header-height: 5.6rem; }

  .header-inner {
    grid-template-columns: auto 1fr auto;
  }

  .header-nav--desktop { display: none; }
  .header-menu { display: flex; }
  .header-logo { grid-column: 2; font-size: 1.6rem; }
  .header-icons { grid-column: 3; }

  .product-grid,
  .product-grid--custom,
  .collection-list,
  .multicolumn-list { grid-template-columns: repeat(2, 1fr); }

  .product-card__quick-add { opacity: 1; transform: none; position: static; margin-top: 1rem; }

  .hero-banner { min-height: 45rem; }

  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .shopify-form--inline { flex-direction: column; }
}

@media (max-width: 480px) {
  .product-grid,
  .product-grid--custom,
  .collection-list { grid-template-columns: 1fr; }
}
