/* ==========================================================================
   Slug Bicycles — demo theme CSS
   Tokens and component styling extracted from the live slugbicycles.com theme
   (Shopify "Impulse"-style layout with GemPages sections). Values below were
   read out of the live site's computed CSS custom properties, not guessed.
   ========================================================================== */

:root {
  /* --- Typography (live theme: every family is Space Mono) --- */
  --font-body: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-heading: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --base-text-size: 16px;
  --base-line-height: 1.6;
  --nav-text-size: 16px;
  --logo-text-size: 24px;
  --larger-text-size: 30px;
  --super-large-text-size: 53px;
  --super-large-mobile-text-size: 24px;
  --larger-mobile-text-size: 24px;
  --smaller-text-size-1: 13px;
  --smaller-text-size-2: 14px;
  --smaller-text-size-3: 13px;
  --smaller-text-size-4: 12px;
  --heading-text-transform: uppercase;
  --btn-text-transform: uppercase;

  /* --- Colour (live theme values) --- */
  --page-container-width: 1600px;
  --reading-container-width: 720px;

  --body-bg-color: #ffffff;
  --bg-color: #f9ffed; /* live --header-bg-col / btn-alt-bg */
  --accent: #c9fd5a; /* live --bg-color, the signature lime */
  --body-text-color: #6d7175;
  --text-color: #011200;
  --heading-color: #202223;
  --body-heading-color: #202223;
  --main-nav-bg: #ffffff;
  --main-nav-link-col: #6d7175;
  --main-nav-link-hover-col: #202223;
  --main-nav-link-featured-col: #c4293d;
  --header-text-col: #202223;
  --header-bg-col: #f9ffed;
  --logo-col: #202223;
  --heading-divider-col: #e2e2e2;
  --divider-opacity: 0.14;
  --input-border-color: rgb(219, 220, 221);
  --input-border-color-hover: rgb(175, 177, 179);
  --product-label-sale-text: #c4293d;

  /* Buttons (live --btn-* tokens) */
  --btn-bg-color: #000000;
  --btn-bg-hover-color: #202223;
  --btn-border-color: #000000;
  --btn-border-hover-color: #202223;
  --btn-text-color: #ffffff;
  --btn-text-hover-color: #ffffff;
  --btn-alt-bg-color: #f9ffed;
  --btn-alt-text-color: #000000;
  --btn-alt-border-color: #000000;
  --btn-alt-border-hover-color: #000000;
  --btn-ter-bg-color: #ebebeb;
  --btn-ter-text-color: #3c3e40;
  --btn-ter-bg-hover-color: #000000;
  --btn-ter-text-hover-color: #ffffff;
  --btn-border-radius: 3px;
  --btn-letter-spacing: normal;

  /* --- Spacing (live theme scale) --- */
  --gutter-large: 30px;
  --gutter-desktop: 20px;
  --gutter-mobile: 16px;
  --section-padding: 50px;
  --larger-section-padding: 80px;
  --larger-section-padding-mobile: 60px;
  --largest-section-padding: 110px;
}

/* ==========================================================================
   Fonts — the live site self-hosts Space Mono. Loaded from the same CDN.
   ========================================================================== */
@font-face {
  font-family: "Space Mono";
  font-style: normal;
  font-weight: 400;
  font-display: fallback;
  src: url("https://slugbicycles.com/cdn/fonts/space_mono/spacemono_n4.9ee60bbbb57a3b43dbcb22a7f53e18140cb3b40f.woff2")
    format("woff2");
}
@font-face {
  font-family: "Space Mono";
  font-style: normal;
  font-weight: 700;
  font-display: fallback;
  src: url("https://slugbicycles.com/cdn/fonts/space_mono/spacemono_n7.508dbd51f810465f80674aa16b57dbed9d939476.woff2")
    format("woff2");
}
@font-face {
  font-family: "Space Mono";
  font-style: italic;
  font-weight: 400;
  font-display: fallback;
  src: url("https://slugbicycles.com/cdn/fonts/space_mono/spacemono_i4.41a13016ec5fad206f1052669f6b02ff17f81782.woff2")
    format("woff2");
}
@font-face {
  font-family: "Space Mono";
  font-style: italic;
  font-weight: 700;
  font-display: fallback;
  src: url("https://slugbicycles.com/cdn/fonts/space_mono/spacemono_i7.e0b573be54b92cac9cb97a04f7ebcc9a4dbf3ef1.woff2")
    format("woff2");
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: var(--base-text-size);
  line-height: var(--base-line-height);
  color: var(--body-text-color);
  background: var(--body-bg-color);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-heading);
  font-weight: 400;
  color: var(--heading-color);
  text-transform: var(--heading-text-transform);
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
ul {
  list-style: none;
}

.container {
  max-width: var(--page-container-width);
  margin: 0 auto;
  padding-left: var(--gutter-desktop);
  padding-right: var(--gutter-desktop);
}
.reading-width {
  max-width: var(--reading-container-width);
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--accent);
  color: var(--text-color);
  padding: 8px 16px;
  font-size: var(--smaller-text-size-1);
  z-index: 1000;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 6px;
}

/* ==========================================================================
   Buttons — mirrors the live theme's gp-button-base
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  text-transform: var(--btn-text-transform);
  letter-spacing: var(--btn-letter-spacing);
  border: 1px solid var(--btn-border-color);
  border-radius: var(--btn-border-radius);
  background: var(--btn-alt-bg-color);
  color: var(--btn-alt-text-color);
  cursor: pointer;
  transition:
    background-color 0.2s ease-in-out,
    color 0.2s ease-in-out,
    border-color 0.2s ease-in-out;
}
.btn:hover {
  background: var(--accent);
  border-color: var(--text-color);
  color: var(--text-color);
}

.btn-solid {
  background: var(--btn-bg-color);
  color: var(--btn-text-color);
  border-color: var(--btn-border-color);
}
.btn-solid:hover {
  background: var(--btn-bg-hover-color);
  border-color: var(--btn-border-hover-color);
  color: var(--btn-text-hover-color);
}

.btn-quiet {
  background: transparent;
  color: #f9ffed;
  border-color: rgba(249, 255, 237, 0.4);
}
.btn-quiet:hover {
  background: var(--accent);
  color: var(--text-color);
  border-color: var(--text-color);
}

/* ==========================================================================
   Header — announcement bar + logo/nav/cart, as on the live site
   ========================================================================== */
.announcement-bar {
  background: var(--accent);
  color: var(--text-color);
  text-align: center;
  font-size: var(--smaller-text-size-3);
  padding: 8px var(--gutter-desktop);
}
.announcement-bar a {
  border-bottom: 1px solid currentColor;
}

.site-header {
  background: var(--main-nav-bg);
  border-bottom: 1px solid
    rgba(
      var(--divider-opacity) * 255,
      var(--divider-opacity) * 255,
      var(--divider-opacity) * 255
    );
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gutter-large);
  padding: 18px 0;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}
.header-center {
  flex: 0 1 auto;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
  justify-content: flex-end;
}

.logo-link img {
  height: 26px;
  width: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.main-nav a {
  font-size: var(--nav-text-size);
  font-weight: 400;
  color: var(--main-nav-link-col);
  transition: color 0.2s ease-in-out;
}
.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--main-nav-link-hover-col);
}
.main-nav a.featured {
  color: var(--main-nav-link-featured-col);
}

.cart-link {
  font-size: var(--nav-text-size);
  color: var(--header-text-col);
}
.cart-count {
  color: var(--body-text-color);
}

.country-select {
  font-size: var(--smaller-text-size-3);
  color: var(--body-text-color);
  background: none;
  border: none;
  font-family: var(--font-body);
  cursor: pointer;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 4px;
}
.mobile-menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--header-text-col);
}

/* ==========================================================================
   Hero — full-bleed image with an overlaid card, matching the live layout
   ========================================================================== */
.hero {
  position: relative;
  width: 100%;
  background: var(--bg-color);
}
.hero-media {
  position: relative;
  width: 100%;
  overflow: hidden;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0 var(--gutter-large);
}
.hero-copy {
  background: var(--bg-color);
  color: var(--text-color);
  padding: 40px 44px;
  max-width: 520px;
}
.hero-copy h1 {
  font-size: clamp(24px, 4vw, var(--super-large-text-size));
  text-transform: uppercase;
  line-height: 1.05;
  margin-bottom: 16px;
  color: var(--heading-color);
}
.hero-copy p {
  color: var(--body-text-color);
  margin-bottom: 28px;
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section {
  padding: var(--larger-section-padding) 0;
}
.section-heading {
  text-align: center;
  margin-bottom: 48px;
}
.section-heading h2 {
  font-size: var(--larger-text-size);
  margin-bottom: 8px;
}
.section-heading p {
  color: var(--body-text-color);
}
.section-flush {
  padding: var(--section-padding) 0;
}

/* ==========================================================================
   Product grid / cards — 4-up on desktop, as in the live collection grid
   ========================================================================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gutter-large);
}
.product-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.product-card {
  display: flex;
  flex-direction: column;
}
.product-card-media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #f4f4f4;
  margin-bottom: 16px;
}
.product-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.product-card:hover .product-card-media img {
  transform: scale(1.03);
}

.product-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent);
  color: var(--text-color);
  font-size: var(--smaller-text-size-4);
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--btn-border-radius);
}
.product-card-badge.sale {
  background: var(--product-label-sale-text);
  color: #fff;
}

.product-card-title {
  font-size: 16px;
  text-transform: uppercase;
  margin-bottom: 4px;
  color: var(--heading-color);
}
.product-card-vendor {
  font-size: var(--smaller-text-size-4);
  color: var(--body-text-color);
  margin-bottom: 8px;
}
.product-card-price {
  font-size: 16px;
  color: var(--text-color);
  margin-bottom: 12px;
}
.product-card-price .compare {
  color: var(--body-text-color);
  text-decoration: line-through;
  margin-right: 8px;
}

/* ==========================================================================
   Product detail
   ========================================================================== */
.product-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--largest-section-padding);
  padding: var(--section-padding) 0;
}
.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.product-gallery img {
  width: 100%;
  background: #f4f4f4;
}

.product-info h1 {
  font-size: 28px;
  margin-bottom: 8px;
}
.product-info .vendor {
  font-size: var(--smaller-text-size-3);
  color: var(--body-text-color);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.product-info .price {
  font-size: 24px;
  color: var(--text-color);
  margin-bottom: 20px;
}
.product-info .price .compare {
  color: var(--body-text-color);
  text-decoration: line-through;
  margin-right: 10px;
  font-size: 18px;
}
.product-info .desc {
  color: var(--body-text-color);
  margin-bottom: 28px;
}

.variant-select {
  margin-bottom: 16px;
}
.variant-select label {
  display: block;
  font-size: var(--smaller-text-size-3);
  text-transform: uppercase;
  margin-bottom: 6px;
  color: var(--body-text-color);
}
.variant-select select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--input-border-color);
  border-radius: var(--btn-border-radius);
  font-family: var(--font-body);
  font-size: 14px;
  background: #fff;
  color: var(--heading-color);
}
.variant-select select:hover {
  border-color: var(--input-border-color-hover);
}

.btn-add-to-cart {
  width: 100%;
  padding: 16px;
  background: var(--btn-bg-color);
  color: var(--btn-text-color);
  border: 1px solid var(--btn-border-color);
  border-radius: var(--btn-border-radius);
  font-family: var(--font-body);
  font-size: 14px;
  text-transform: uppercase;
  cursor: pointer;
}
.btn-add-to-cart:hover {
  background: var(--btn-bg-hover-color);
  border-color: var(--btn-border-hover-color);
}

/* ==========================================================================
   Specs / accordion
   ========================================================================== */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  font-size: var(--smaller-text-size-2);
}
.specs-table th,
.specs-table td {
  border-bottom: 1px solid var(--heading-divider-col);
  padding: 12px 8px;
  text-align: left;
}
.specs-table th {
  color: var(--heading-color);
  font-weight: 400;
  text-transform: uppercase;
  font-size: var(--smaller-text-size-4);
}
.specs-table td {
  color: var(--body-text-color);
}

.accordion {
  border-top: 1px solid var(--heading-divider-col);
}
.accordion summary {
  padding: 18px 0;
  cursor: pointer;
  list-style: none;
  font-size: 15px;
  text-transform: uppercase;
  color: var(--heading-color);
  position: relative;
  user-select: none;
}
.accordion summary::-webkit-details-marker {
  display: none;
}
.accordion summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  color: var(--body-text-color);
}
.accordion[open] summary::after {
  content: "−";
}
.accordion-content {
  padding: 0 0 18px;
  border-bottom: 1px solid var(--heading-divider-col);
  color: var(--body-text-color);
}

/* ==========================================================================
   Editorial / story block
   ========================================================================== */
.story-section {
  background: var(--text-color);
  color: var(--bg-color);
  padding: var(--largest-section-padding) 0;
  text-align: center;
}
.story-section h2 {
  color: var(--bg-color);
  font-size: clamp(20px, 3.4vw, var(--larger-text-size));
  margin-bottom: 16px;
}
.story-section p {
  max-width: var(--reading-container-width);
  margin: 0 auto 32px;
  color: rgba(249, 255, 237, 0.8);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--text-color);
  color: var(--bg-color);
  padding: var(--larger-section-padding) 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gutter-large);
  margin-bottom: 48px;
}
.footer-col h4 {
  font-size: var(--smaller-text-size-3);
  color: var(--bg-color);
  margin-bottom: 16px;
}
.footer-col a,
.footer-col p {
  display: block;
  margin-bottom: 8px;
  font-size: var(--smaller-text-size-2);
  color: rgba(249, 255, 237, 0.75);
}
.footer-col a:hover {
  color: var(--accent);
}
.footer-bottom {
  border-top: 1px solid rgba(249, 255, 237, 0.15);
  padding-top: 24px;
  text-align: center;
  font-size: var(--smaller-text-size-3);
  color: rgba(249, 255, 237, 0.6);
}

/* ==========================================================================
   Utility
   ========================================================================== */
.text-center {
  text-align: center;
}
.mt-0 {
  margin-top: 0;
}
.mb-32 {
  margin-bottom: 32px;
}
.prose p {
  margin-bottom: 16px;
}
.prose h2 {
  margin: 40px 0 12px;
  font-size: 22px;
}
.prose h3 {
  margin: 28px 0 10px;
  font-size: 17px;
}

/* ==========================================================================
   Responsive — breakpoints mirror the live theme (tablet / mobile)
   ========================================================================== */
@media (max-width: 990px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .product-layout {
    gap: var(--larger-section-padding);
  }
}

@media (max-width: 749px) {
  .main-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: flex;
  }
  .product-grid,
  .product-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .product-layout {
    grid-template-columns: 1fr;
  }
  .hero-copy {
    padding: 28px 24px;
    max-width: 100%;
  }
  .hero-copy h1 {
    font-size: var(--super-large-mobile-text-size);
  }
  .section {
    padding: var(--larger-section-padding-mobile) 0;
  }
  .container {
    padding-left: var(--gutter-mobile);
    padding-right: var(--gutter-mobile);
  }
}

@media (max-width: 480px) {
  .product-grid,
  .product-grid.cols-2 {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
