:root {
  --pico-border-radius: 1.5rem;
}

ul li,
ol li {
  list-style: none;
}

/* these two sets of rules will ensure the footer rests at the bottom of the page */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main {
  flex: 1;
}

#main-header {
  background-color: var(--pico-card-background-color);
  box-shadow: 2px 2px 6px rgba(0, 0, 0, .3);
  z-index: 2;
}

#main-header > nav {
  max-width: 1800px; 
  margin: auto;
}

#main-header svg {
  /* display: inline-block; */
  width: 80%; /* or a percentage value */
  min-width: 8.5rem;
  max-width: 12rem;
  height: auto;
  /* max-width: 100%; */
  margin-left: 8px;
  margin-right: 8px;
}

/* nav styling */
#desktop-nav-element {
  display: none;
}

#mobile-nav-element {
  position: fixed;
  height: 120vh;
}

.hamburger-menu {
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}
#menu__toggle {
  opacity: 0;
}
#menu__toggle:checked ~ .menu__btn {
  position: fixed;
  right: var(--pico-spacing);
  /* top: calc(var(--pico-spacing) + (50% - 12px)); */
}
#menu__toggle:checked + .menu__btn > span {
  transform: rotate(45deg);
  width: 2.3rem;
  left: -0.25rem;
  top: 0.6875rem;
}
#menu__toggle:checked + .menu__btn > span::before {
  transform: rotate(0deg);
  width: 2.25rem;
  top: 0;
}
#menu__toggle:checked + .menu__btn > span::after {
  top: 0;
  transform: rotate(90deg);
  width: 2.25rem;
}
#menu__toggle:checked ~ .menu__box,
.slide-out-drawer-toggle:checked ~ .menu__box {
  right: 0 !important;
}
.menu__btn {
  position: absolute;
  right: var(--pico-spacing);
  width: 1.75rem;
  height: 1.5rem;
  cursor: pointer;
  z-index: 3;
}
.menu__btn > span,
.menu__btn > span::before,
.menu__btn > span::after {
  display: block;
  position: absolute;
  width: 100%;
  height: 0.1875rem;
  border-radius: 0.1875rem;
  /* background-color: #616161; */
  background-color: var(--pico-color);
  /* background-color: var(--pico-primary-background); */
  transition-duration: .25s;
}
.menu__btn > span::before {
  content: '';
  top: 1.25rem;
}
.menu__btn > span::after {
  content: '';
  top: 0.625rem;
}
.menu__box {
  display: block;
  position: fixed;
  top: 0;
  right: -110%;
  width: 300px;
  height: 100%;
  margin: 0;
  padding: 80px 0;
  list-style: none;
  background-color: var(--pico-card-background-color);
  box-shadow: 2px 2px 12px rgba(0, 0, 0, .7);
  transition-duration: .25s;
}
.menu__box li {
  display: block;
}
.menu__item {
  display: block;
  padding: 12px 35px;
  font-size: 20px;
  font-weight: 600;
  text-decoration: none;
  transition-duration: .25s;
  text-align: right;
  border-radius: 0;
}
.menu__item:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

@media (min-width: 37rem) {
  .hamburger-menu {
    display: none;
  }

  #desktop-nav-element {
    display: flex;
  }

  header {
    position: sticky;
    top: 0;
  }
}

.badge.filled {
  background-color: var(--pico-primary-background);
  border-radius: 40px;
  padding: 0.2rem 0.9rem 0.3rem 0.8rem;
  color: var(--pico-primary-inverse);
  font-weight: 600;
  margin-left: 0.3rem;
}

/*
#mobile-nav-btn {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 2.25rem;
  height: 2.25rem;
  background-color: transparent;
  border: none;
  padding: 0;
  margin-right: var(--space-05);
}

#mobile-nav-btn div {
  box-sizing: border-box;
  width: 100%;
  border: 0.16rem solid var(--pico-color);
  border-radius: var(--pico-border-radius);
}

#mobile-nav-btn:active div {
    /* TODO */
    /* border-color: var(--primary-color-300); 
} */

/* nav settings for desktop mode */
/* 
#desktop-nav-element {
  display: none;
}

@media (min-width: 44rem) {

  #desktop-nav-element {
    display: block;
  }

  #mobile-nav-btn {
    display: none;
  }

} */

main > section {
  margin: 2rem auto 2rem auto;
}


/* footer styling */
#page-footer {
  background-color: var(--pico-card-background-color);
}

#page-footer .container {
  display: grid;
}
#mob-footer {
  grid-template-columns: 1fr;
}
#desktop-footer {
  grid-template-columns: max-content max-content;
  justify-content: center;
  gap: 20%;
}

#page-footer #desktop-footer {
  display: none;
}
#page-footer #footer-logo {
  display: none;
}
#page-footer li {
  color: var(--pico-color);
  list-style: square
}
#page-footer .container nav {
  display: block;
}
#page-footer .container nav ul  {
  display: block;
  margin: 0;
}
#page-footer .container nav ul li {
  list-style: none;
  display: block;
  margin: 0;
  padding: 0;
}
#page-footer .container nav ul li a {
  text-decoration: underline;
}

@media (min-width: 33rem) {
  #page-footer #footer-logo {
    max-width: 8.5rem;
    display: block;
    margin-top: var(--pico-spacing);
  }
  #page-footer #desktop-footer {
    display: grid;
  }
  #page-footer #mob-footer {
    display: none;
  }
  #page-footer .container > div {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}


.promotion-banner {
  padding: calc(var(--pico-spacing) / 1.5 );
  width: 100%;
  background-color: var(--pico-primary-background); 
  text-align: center;
}


/* card styling */

.card {
  width: 100%;
  height: 100%;
  padding: var(--pico-spacing);
  box-shadow: 2px 4px var(--border-radius-small) var(--primary-contrast-color-400);
  overflow: hidden;
}

.card > div {
  display: grid;
  grid-template-columns: calc(40% - var(--pico-spacing) / 2) calc(60% - var(--pico-spacing) / 2);
  gap: var(--pico-spacing);
}


.card .img-div {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 0;
  margin-right: calc(var(--pico-spacing) / 8);
  border-radius: calc(var(--pico-border-radius) * 0.8);
  overflow: hidden;
  background-color: white;
}
.card .img-div > div {
  position: relative;
  width: 100%;
}
.card .img-div > div:before{
  content: "";
  display: block;
  padding-top: 100%;
  width: 10rem;
}
.card .img-div > div > div {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  /* padding: var(--pico-spacing); */
  margin: 0;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card img {
  object-fit: cover;
}

.card h3,
.card h4 {
  margin: 0;
  text-align: center;
  overflow-wrap: anywhere;
}

.card > div > div {
  padding: calc(var(--pico-spacing) * 0.75);
  margin: 0 auto 0 auto;
}

.product-card {
  /* these next few styles are to ensure that the container div is center vertically in the scenario that the card is resized(with js) in order to equal the same amount as the maximum height card. */
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.product-card > button {
  display: none;
}

/* for the product card items */
.product-card * {
  text-decoration: none;
}

.product-card > div > .img-div {
  align-self: center;
}

.product-card > div {
  height: 100%;
}

.product-card > div > div {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.product-card .title-price-div {
  padding: calc(var(--pico-spacing) / 2) 0;
}

.product-card > div > div > .price-details-div {
  margin-top: calc(var(--pico-spacing) / 2);
  text-align: center;
}

.product-card > div > div > .price-details-div > span {
  display: block;
}

.product-card button {
  margin-top: calc(var(--pico-spacing) / 2);
}

.price {
  font-weight: 700;
}

/* .product-card mobile styles */
@media (max-width: 25rem) {
  .product-card > div > div {
    min-height: 8rem;
    padding: var(--pico-spacing) calc(var(--pico-spacing) * 0.3);
  }

  .product-card > div > div > div > button {
    display: none;
  }

  .product-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* align-items: center; */
  }

  .product-card > button {
    display: inline-block;
    width: 100%;
    /* width: fit-content; */
    margin: var(--pico-spacing) auto 0 auto;
  }
}


.alert {
  --pico-color: var(--pico-primary-inverse);
  --pico-box-shadow: var(--pico-button-box-shadow, 0, 0, 0, rgba(0, 0, 0, 0));
  text-align: center;
  font-size: 1rem;
  font-weight: var(--pico-font-weight);
  /* color: var(--pico-color); */
  box-shadow: var(--pico-box-shadow);
  border-radius: var(--pico-border-radius);
  /* border-radius: 8px; */
  padding: calc(var(--pico-spacing) / 2) var(--pico-spacing) calc(var(--pico-spacing) / 2) var(--pico-spacing);
}

.alert.success {
  color: #e8f5e9;
  background-color: #339036;
  border-color: #4caf50;
}
.alert.fail {
  color: #fdecea;
  background-color: #f44336;
  border-color: #f44336;
}

div.notifications {
  position: fixed;
  left: 0;
  bottom: 10vh;
  width: 100%;
  z-index: 5;
}

div.notifications .notif {
  margin: auto;
  margin-top: calc(var(--pico-spacing) / 2);
  width: fit-content;
  opacity: 0;
}

div.notifications .notif.show {
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

div.notifications .notif.fade-out {
  opacity: 0;
  transition: opacity 1.5s ease;
}