/* Note to reader: I am aware that there are a lot of classes and id's where there could/should be general styling.
This is because I've had to fake it to make it.
 */

/* ==========================================================================
   General Styles
   ========================================================================== */

html {
  color: #222;
  font-size: 1em; /* Unit em is a deliberate choice on my part, not AI :) */
  line-height: 1.5;
  padding: 0;

}

head {
  background-color: white;

}

body {
  justify-content: center;
  font-family: Verdana, Geneva, sans-serif; /* General font for body */
  padding: 0;
  margin: 0;
}
main {
  margin-top: 200px;
  margin-left: 50px;
  margin-right: 50px;
  justify-content: center;
  padding: 0;
}


/* ==========================================================================
   Typography
   ========================================================================== */

h1 {
  font-size: 1.5em; /* Main title size */
  margin-bottom: 10px;
}

h2 {
  font-size: 1.2em; /* Subtitle size */
  margin: 0;
}

h3 {
  font-size: 0.8em; /* Header size */
  margin: 0;
}

p {
  font-family: "PT Serif", serif;
  font-size: 1em; /* Paragraph size */
  margin: 0;
}


/* ==========================================================================
   Header and Navigation
   ========================================================================== */
/*Header styling*/
.topmenu {
  display: flex;
  height: 100px;
  justify-content: space-between;
  overflow: hidden;
  position: fixed;
  gap: 10px;
  width: 97vw;
  align-items: center;
  top: 0;
  background-color: white;
  padding-bottom: 80px;
  margin-outside: 50px;
}

/* Style the links inside the navigation bar */
#myTopnav a {
  float: left ;
  color: #102d17;
  background-color: white;
  text-align: center;
  padding: 14px 16px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600; /* Not using "bold" is a deliberate choice on my part, not AI :) */
  font-family: Verdana, Geneva, sans-serif;

}

/* Change the color of links on hover */
#myTopnav a:hover {
  background-color: #9baa9f;
  color: #102d17;

}

/* Add a color to the active/current link */
#myTopnav a.active {
  background-color: #9baa9f;
  color: #102d17;
}

.logo {
  margin-left: 70px;
}
/*Hamburger menu for small screens*/
#myTopnav .icon {
  display: none;
  font-size: 24px;
  padding: 14px 16px;
  background: transparent;
  border: none;
  cursor: pointer;
}

/* ==========================================================================
   Search Container
   ========================================================================== */
.searchcontainer {
  display: flex;
  margin: 20px 20px 50px 70px;
  background-color: white;
  position: fixed;
  top: 100px; /* Space below the navigation bar */
  width: 60vw;
}

#searchbar {
  border-bottom-left-radius: 25px;
  border-top-left-radius: 25px;
  border: 1px solid #9baa9f; /* Border style */
  padding: 10px;
  flex: 1; /* Takes available space */
}

#btn {
  background-color: #9baa9f ;
  color: white;
  font-weight: 600;
  font-size: 0.8em;
  border: none;
  border-bottom-right-radius: 25px;
  border-top-right-radius: 25px;
  padding: 10px 20px; /* Button padding */
  gap: 30px;
}

#btn a:hover {
  background-color: #193520;
  color: white;

}
/* ==========================================================================
   Welcome div
   ========================================================================== */
.welcome {
  margin-left: 25px;
}

/* ==========================================================================
   Display products in cards
   ========================================================================== */
#product-container {
  width: 97vw;
  height: 100vh;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}
.product-card {
  display: flex;
  align-items: center;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
  width: 310px;
  max-width: 310px;
  max-height: 450px;
  background-color: white;
  padding: 10px;
  box-shadow: 2px 2px 6px #e0e2e1;
}
.product-card--img {
  max-width: 100%;
  max-height: 300px;
}
.product-card--title {
  font-size: 1.2em;
  font-weight: normal;
  line-height: 0.9em;
  align-self: flex-start ;
  font-variant-caps: all-small-caps ;
  padding-bottom: 10px;
}

.product-card--price {
  font-size: 1em;
  font-weight: bold;
  align-self: flex-end ;
  padding-right: 20px;
  padding-bottom: 10px;
}
/*button Lägg till i önskelista*/
.add-to-favorites {
  width: 100%;
  font-size: 1em;
  font-weight: bold;
  color: white;
  background-color: #af1c41;
  border: none;
  border-radius: 50px;
  padding: 10px;
  margin-bottom: 20px;
}
.favorites-list {
  display: flex;
  flex-direction: row;
  gap: 10px;
  flex-wrap: wrap;
  width: 90vw;
  margin-left: 50px;

}
  /*Dela lista*/
.share {
  display: flex;
  justify-content: space-between;
  width: 91%;
  margin-bottom: 5px;
  margin-left: 50px;

}

.share-btn-img {
  width: 30px;
  height: auto;
  padding: 5px 5px 0 10px;
}


.share-p {
    font-size: 0.6em;
    font-family: Verdana, Geneva, sans-serif;
    line-height: 0.4em;
}

/* ==========================================================================
   Display products in detail view
   ========================================================================== */
.product-card--detail {
  width: 80vw;
  max-width: 800px;
  max-height: 760px;
  margin: 30px auto;
  padding: 20px;
}
.product-card--detail img {
  max-width: 300px;
  max-height: 300px;
  display: block;
  margin-bottom: 16px;
}
.product-description {
  margin: 12px 0;
  line-height: 1.5;
}
.product-price {
  font-size: 1em;
  font-family: Verdana, Geneva, sans-serif;
  font-weight: bold;
  align-self: flex-end ;
  padding-right: 20px;
  padding-bottom: 10px;
}
/* ==========================================================================
   Filter products
   ========================================================================== */

.category-buttons {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  padding: 20px 20px 20px 20px;

}
.category-btn {
  padding: 12px 16px;
  border: 1px solid #ccc;
  background: white;
  cursor: pointer;
  border-radius: 4px;
  font-size: 0.9em;
  font-weight: 800;
  color: #102d17;
}
.category-btn.active {
  background: #102d17;
  color: #fff;
  border-color: #222;
}



/* ==========================================================================
   Media Queries
   ========================================================================== */

@media screen and (max-width: 800px) {
  #myTopnav a:not(.icon) {
    display: none; /* Hide links except "Home" */
  }
    #myTopnav .icon {
    display: inline-flex;
    align-items: center;
  }
  /* When nav has .responsive, show links vertically */
  #myTopnav.responsive {
    position: absolute;
    top: 60px;
    left: 0;
    background: white;
    width: 100%;
    flex-direction: column;
    padding: 8px 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    border-radius: 6px;
  }

  #myTopnav.responsive {
    position: relative;
    display: block;
    text-align: left;
    float: none;
  }

  #myTopnav.responsive a.icon {
    position: absolute;
    right: 0;
    top: 0;
    display: block;
  }

  #myTopnav.responsive a {
    float: none;
    display: block;
    text-align: left;
  }
}
