:root {
  /* Patagonia Earth Tones & Neutrals */
  --color-forrest-green: #2B4522;
  --color-ochre: #D99520;
  --color-navy: #1B2945;
  --color-stone: #EFEFEF;
  --color-black: #111111;
  --color-white: #FFFFFF;
  --color-grey-light: #F7F7F7;
  --color-grey-dark: #666666;

  /* Card specific colors (from exact mockups) */
  --color-cta-blue: #1A5BFF;
  --color-cta-hover: #0044E2;
  --color-disabled: #A1A5AE;
  --color-badge-new: #00A34F;
  --color-badge-waterproof: #1A5BFF;
  --color-badge-limited: #8F00FF;

  /* Typography */
  --font-family: 'Inter', 'Roboto', sans-serif;
  
  /* Layout constraints */
  --max-width: 1440px;
}

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

body {
  font-family: var(--font-family);
  color: var(--color-black);
  background-color: var(--color-white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Typography styles */
h1, h2, h3, h4 {
  font-family: var(--font-family);
  font-weight: 700;
  line-height: 1.2;
}

h1 {
  font-size: 3rem;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

/* Nav */
.nav__main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--color-stone);
}

.nav__logo h2 {
  margin: 0;
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.nav__links a {
  margin-left: 2rem;
  text-decoration: none;
  color: var(--color-black);
  font-weight: 600;
  font-size: 0.875rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border-radius: 4px;
  border: none;
  transition: all 0.2s ease;
}

.btn--primary {
  background-color: var(--color-cta-blue);
  color: var(--color-white);
}

.btn--primary:hover {
  background-color: var(--color-cta-hover);
}

.btn--primary:disabled,
.btn--disabled {
  background-color: var(--color-disabled);
  color: var(--color-white);
  cursor: not-allowed;
}

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

/* Hero Section */
.section__hero {
  position: relative;
  height: 70vh;
  min-height: 500px;
  background-color: var(--color-grey-dark);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  overflow: hidden;
}

.section__hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0) 100%);
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  color: var(--color-white);
  max-width: 600px;
}

.hero__content h1 {
  margin-bottom: 1rem;
}

.hero__content p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

/* Category grid section */
.section__categories {
  padding: 4rem 2rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.category-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--color-black);
}

.category-card__img {
  width: 100%;
  aspect-ratio: 1/1;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.category-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

/* Worn Wear / Sustainability section */
.section__mission {
  background-color: var(--color-forrest-green);
  color: var(--color-white);
  padding: 4rem 2rem;
  text-align: center;
}

/* Specific to Homepage Split Guarantee layout */
.section__mission-split {
  flex: 1;
  display: flex;
  padding: 0;
  text-align: left;
}

.mission__text {
  flex: 1;
  padding: 2rem 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mission__text h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.mission__text p {
  font-size: 1rem;
  max-width: 600px;
  color: #D3E0CE;
}

.mission__image {
  flex: 1;
  background-size: cover;
  background-position: center;
  min-height: 400px; /* Adjust for scrolling layout */
}


/* Product Listing Grid */
.section__plp {
  padding: 4rem 0;
}

.grid__product-list {
  display: grid;
  gap: 2rem;
  /* Auto layout Wrap: 1440px -> 4 cols, 768px -> 2 cols, 375px -> 1 col */
  grid-template-columns: repeat(4, 1fr);
  align-items: stretch; /* equal height */
}

@media (max-width: 1024px) {
  .grid__product-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .grid__product-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .grid__product-list {
    grid-template-columns: 1fr;
  }
}

/* Product Card - Flexbox anatomy for Equal Height */
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--color-white);
  border: 1px solid var(--color-stone);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.2s ease;
  height: 100%; /* Ensures it fills cell */
}

.product-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.product-card__image-container {
  background-color: var(--color-grey-light);
  padding-top: 100%; /* 1:1 aspect ratio */
  position: relative;
  overflow: hidden;
}

.product-card__image-container img {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  object-fit: cover;
}

.product-card__badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-white);
  text-transform: capitalize;
  z-index: 2;
}

.badge--new { background-color: var(--color-badge-new); }
.badge--waterproof { background-color: var(--color-badge-waterproof); }
.badge--limited_edition { background-color: var(--color-badge-limited); }

.product-card__content {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  flex-grow: 1; /* Pushes CTA to the bottom */
}

.product-card__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--color-black);
}

.product-card__description {
  font-size: 0.875rem;
  color: var(--color-grey-dark);
  margin-bottom: 1rem;
  /* Allows description to stretch so that price and CTA are bottom-aligned */
  flex-grow: 1; 
}

.product-card__price {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.product-card__cta {
  width: 100%;
}

/* Product Detail Page (PDP) */
.section__pdp {
  display: flex;
  padding: 4rem 2rem;
  gap: 4rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.pdp__gallery {
  flex: 1;
  background-color: var(--color-grey-light);
  border-radius: 8px;
  overflow: hidden;
}

.pdp__gallery img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
}

.pdp__info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.pdp__title {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.pdp__price {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.pdp__description {
  font-size: 1.125rem;
  color: var(--color-grey-dark);
  margin-bottom: 2rem;
}

.pdp__specs {
  border-top: 1px solid var(--color-stone);
  padding-top: 2rem;
  margin-bottom: 2rem;
}

.pdp__specs-list {
  list-style: none;
}

.pdp__specs-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-stone);
}

.pdp__specs-list .spec-label {
  font-weight: 600;
}

/* Sticky Mobile CTA for PDP */
@media (max-width: 768px) {
  .section__pdp {
    flex-direction: column;
    padding: 2rem 1rem;
    gap: 2rem;
  }
  
  .pdp__cta-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1rem;
    background: var(--color-white);
    border-top: 1px solid var(--color-stone);
    z-index: 10;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.05);
  }
  
  .pdp__cta-container .btn {
    width: 100%;
  }
  
  /* Add padding to body so sticky CTA doesn't cover content */
  body.is-pdp {
    padding-bottom: 80px;
  }
}
