* {
  font-family: "Varela Round", sans-serif;
  font-display: swap;
}
html {min-height: 100%}
body {
  min-height: 100%;
  background-image: url(output.avif);
  background-attachment: fixed;
  background-repeat: repeat;
  background-size: 100% auto;
  margin: 0;
  padding: 1rem;
}

/* === Typography === */
a {
  color: #000;
  text-decoration: none;
}
a[href="../signup/"],
.popup-content > a[href="../login/"] {
  text-decoration: underline
}
span:has(a[href="../signup/"]) {
  display: inline
}
h2 img {height: 1.5rem}
span h2 {margin-top: 0}
strong span:not(#cart-total) {
  font-weight: 1;
  color: #BBB;
}

/* === Layout Containers === */
header {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  font-size: 2rem;
  position: sticky;
  top: 0;
  background-color: #fff;
  border-radius: 1rem;
  padding: 0.25rem 1rem;
  z-index: 2;
}
nav {
  background-color: #fff;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
footer {
  background-color: #fff;
  border-radius: 1rem;
  width: 100%;
  padding: 1rem;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
}

/* === Main Sections === */
#shop {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(10.75rem, 1fr));
}
#cart {
  margin-top: 1rem;
  padding: 1rem;
  background-color: #fff;
  border-radius: 1rem;
  z-index: 2;
  position: relative;
}
#cart h2 {margin-top: 0}
#cart-items {
  margin-bottom: 0.5rem;
  width: 100%;
  display: none;
}

#freegift,
#checkoutdiv,
.product,
form,
.content > div > span,
.popup-content {
  text-align: center;
}

/* freegifts */
#freegift, #checkoutdiv {
  display: none;
}
#freegift #shop .product img, .popup-trigger img {
  height: 9rem;
  border-radius: 0.25rem;
}
#freegift #shop .product span {font-size: 1.25rem}
#freegift #shop .product span s {
  font-weight:1;
  color:#BBBBBB;
}
#freegift #shop .product button img {
  height: 1rem;
  border-radius: 0;
}

/* === Components === */
button {
  background-color: #0c6441;
  color: #fff;
  border-radius: 1.25rem;
  border: none;
  transition: all 0.2s ease;
  font-size: 1rem;
  padding: 0.5rem 1rem;
}
.product {
  transition: all 0.2s ease;
  border-radius: 1.25rem;
  padding: 1rem;
  background-color: #fff;
  box-sizing: border-box;
}
.product:hover {
  transform: scale(1.01);
  box-shadow: 0 0 0.5rem;
}
.popup-content > button > img[src="bolt.svg"],
.product button img,
img[src="confirm.svg"],
img[src="wshop.svg"],
.remove-button img,
a img,
.hover img[src="shop.svg"] {
  height: 1rem
}
.product button {
  background-color: #000;
  color: #fff;
  border-radius: 1.25rem;
  font-size: 1rem;
  font-family: "Varela Round", sans-serif;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border: none;
  transition: all 0.2s ease;
}
.product button:active {scale: 0.9}
#backsho,#signOut {
  background-color: rgba(255,255,255,0.5);
  border: 0.125rem solid;
  color: #000;
}

/* === Popup === */
.popup-trigger span {font-size: 1.25rem}
.popup-trigger span span {
  font-weight: 1;
  color: #BBB;
}
.popupimage {
  max-width: 17rem;
  width: 80vw;
  border-radius: 0.25rem;
  background-color: #fff;
}
.popup-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  padding: 2rem;
  border-radius: 1.25rem;
  box-shadow: 0 0 5rem;
  z-index: 3;
  height: 80%;
  width: minmax(90%, 23rem);
}
.popup-content > input {
  width: 3rem;
  font-size: 1.25rem;
}
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  backdrop-filter: blur(0.25rem);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.close {
  float: right;
  border-radius: 9e9rem;
  transition: all 0.2s ease;
  font-size: 1.25rem;
}
.close img {height: 1.5rem}
.close:hover {transform: scale(1.1)}
dialog {
  border: none;
  border-radius: 9e9rem;
}
dialog a button {
  font-size: 2rem;
  margin: 0.5rem;
  border-radius: 9e9rem;
}
dialog a {
  display: flex;
  justify-content: center;
  flex-direction: column;
}
dialog::backdrop {backdrop-filter: blur(0.25rem)}

/* === Cart Buttons === */
.quantity-input {
  width: 3rem;
  margin: 0 0.5rem;
}
.remove-button {
  margin: 0.25rem;
  background-color: red;
  color: #fff;
  border: none;
  border-radius: 99rem;
  padding: 0.25rem 0.5rem;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
}
.remove-button:hover {scale: 1.05}

/* === Inputs & Selects === */
input {
  font-family: "Varela Round", sans-serif;
  border-radius: 9e9rem;
}
form {
  position: absolute;
  top:50%;
  left:50%;
  transform: translate(-50%, -50%);
  font-size: 1.75rem;
}
form > span {
  background-color: #51af58;
  padding: 0 0.25rem;
  border-radius: 1rem;
}
form > input {
  font-size: 2.5rem;
  max-width: 97vw;
}
form > input[placeholder="Street Address 地址"]{
  font-family: monospace;
}
form > button {
  font-size: 2.5rem;
  border-radius: 2.5rem;
  margin-top: 1rem;
}
#search {
  width: 100%;
  border-radius: 2rem;
  padding-left: 0.75rem;
  font-size: 1rem;
}
#category-filter {
  float: left;
  background-color: #fff;
  border-radius: 1rem;
  padding: 0.25rem;
  margin-top: 1rem;
  position: sticky;
  top: 5rem;
  padding: 1rem 0;
  z-index: 0;
}
@media screen and (max-width: 375px) {
  #category-filter {display: none}
}
.Pork, label[for="pork"] {background-color: #ffe0e0}
.Chicken, label[for="chicken"] {background-color: yellow}
.Vegetable, label[for="vegetable"] {background-color: #51af58}
.Beef, label[for="beef"] {background-color: #a64000;}
.Mutton, label[for="mutton"] {background-color: #8b5e3c;}
.Duck, label[for="duck"] {background-color: #db5a0e;}

.Beef, label[for="beef"],
.Mutton, label[for="mutton"],
.Duck, label[for="duck"] {color: white}

label {border-radius: 0.25rem}

/* === Table === */
tbody {font-weight: bolder}
thead {color: #BBB}
#checkout-table tfoot tr {background-color: #fff}
#checkout-table tfoot tr td[colspan="3"] {text-align: right}
button:disabled {background-color: grey}
button:disabled:hover {transform: scale(1)}
td:has(strong) {text-align: right}

/* === Utility Classes === */
.blur-bg > *:not(#langchoose) {filter: blur(0.5rem)}
#langchoose {
  position: fixed;
  bottom: 50%;
  right: 50%;
  background-color: #fff;
  padding: 1rem;
  font-size: 2rem;
  transform: translate(50%, 50%);
  z-index: 4;
  border-radius: 1.25rem;
  box-shadow: 0 0 0.5rem;
  text-align: right;
}
.smolimage:hover {
  border: 0.2rem solid;
  box-sizing: border-box;
  transition: all 0.2s ease;
}
.content {background-size: cover}
.content div {
  display: flex;
  align-items: center;
  justify-content: center;
}
.content div h1 span:not(#green) {
  font-weight: normal;
  font-size: 2rem;
  font-family: "Caveat", cursive;
  font-optical-sizing: auto;
  font-style: normal;
  line-height: 1;
}
.content > div > span {
  font-family: "Inter Tight", sans-serif;
  font-weight: 900;
  font-size: clamp(2.5rem,8vw,8vw);
}
#green {
  color: hsl(125, 35%, 45%);
  font-family: "Inter Tight", sans-serif;
  font-weight: 900;
}

/* images */
img[src="gift.svg"],
img[src="../c.svg"]:not(#icon),
#backsho img, 
img[src='duplicate.svg'],
img[src='../login/duplicate.svg'], 
img[src="list.svg"], 
img[src="delivery.svg"] {
  height: 2rem;
  width: 2rem
}
a[href="../"] > img[src="dff.avif"],img[src="../login/dff.avif"] {
  height: 11rem;
  margin-top: 0.25rem;
}

/* === Hover/Scale Effects === */
.hover:hover {
  color: #199EE1;
  transition: all 0.5s ease;
}
.scaleonhover:hover {
  transform: scale(1.05);
  transition: all 0.5s ease;
}

/* === Logo/Icon/CartNum === */
#logo {
  background-color: #fff;
  padding: 1rem;
  border-radius: 1rem;
  height: 3rem;
}
#logoth,
#icon {
  height: 3rem
}
@media screen and (max-width: 378px) {
  #icon {display: none}
}
@media screen and (max-width: 312px) {
  #logoth {display: none}
}
#cartnum {
  position: absolute;
  top: 0.2rem;
  right: 1.2rem;
  color: #fff;
  font-size: 1rem;
}
img[src="qrcode.jpeg"] {
  width: 30vw
}
#user-status {
  background-color: white;
  width: fit-content;
  margin: auto;
  border-radius: 2rem;
  padding: 0.5rem;
}