:root{
  --accent:#2fa3f7;
  --muted:#6b7280;
  --light:#f8fafc;
  --dark:#0f172a;
}

* {box-sizing:border-box}

body {
  font-family: Verdana, Arial, system-ui, sans-serif;
  line-height:1.5; margin:0;

  header, section, footer { 
    max-width: 1200px; 
    margin-inline: auto;
    padding-inline: 1rem;
  }

  section.hero { max-width: none; padding-inline: 0; }
}

section {
  h2 {text-align: center;}
  margin-bottom: 1em;
}

footer{
  padding:0.5rem 0;
  color:var(--muted);text-align:center;
  a {color:var(--muted); text-decoration: none;}
}

.dark{background:var(--dark); color:var(--light);}

.card{
  border-radius:5px; padding: 0px 1rem;
  box-shadow: 0 6px 18px black;

  .dark & {
    box-shadow:0 6px 18px whitesmoke; 
  }
}

#products h3 {text-align: center;}

.three-col-grid{ 
  display:grid; 
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
  gap:30px; 
}

.two-col-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;

  /* Responsive adjustment to one column on smaller screens */
  @media (max-width: 640px) {
    grid-template-columns: 1fr;
  }
}

.product-description {
  display: grid;
  grid-template-columns: auto 1fr;
  padding: 0 1rem;

  img {
    width: 150px;
    margin: 2rem 1rem 1rem 1rem;
  }
  @media (max-width: 700px){
    grid-template-columns: 1fr;
    img {display: block; width: 100px; margin: 1rem auto 0rem auto;}
  }
  /* h3 {text-align: center;} */
}

.submenu {
  display:flex; 
  gap:2em; 
  align-items: center;  /* stop vertical stretch */
    @media (width < 600px) {
    flex-direction: column;
    gap: 1em;
  }
}


.btn {
  background:var(--accent);
  color:white;
  padding: 0.25em 1em;
  border-radius:5px;
  text-decoration:none;
  display: inline-flex;
  justify-content: center;

  font: inherit;
  border: 0;
  line-height: 1.2;
  margin: 0.5rem auto; /* center it */

  /* this may be used in a flex row or column */
  /* this code will make it grow horizontally only (unlike flex) */
  margin: 0.5rem auto;      /* center horizontally */
  max-inline-size: 50%;     /* logical horizontal max */
  inline-size: 100%;       /* stretch horizontally */
}

a { color: white;}

.flex-col {
  display: flex;
  flex-direction: column;
  padding: 1rem;

  img {
    display: block;
    margin-inline: auto;
  }

  form, .flex-footer {
    /* Pushes the footer to the bottom of the flex container */
    margin-top: auto;
  }



  /* hover/focus effect */
  &.card:hover {
    box-shadow:0 6px 18px cyan;
    transform: translateY(-1px);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
  } 
}

.center-this {
    text-align: center;
}
