/* ===============================
   GLOBAL RESET & VARIABLES
   =============================== */
*,
*:after,
*:before {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --red: hsl(14, 86%, 42%);
  --green: hsl(159, 69%, 38%);

  --Rose-50: hsl(20, 50%, 98%);
  --Rose-100: hsl(13, 31%, 94%);
  --Rose-300: hsl(14, 25%, 72%);
  --Rose-400: hsl(7, 20%, 60%);
  --Rose-500: hsl(12, 20%, 44%);
  --Rose-900: hsl(14, 65%, 9%);

  --orange: hsl(17, 71%, 57%);
  --orange-dark: hsl(15, 87%, 42%);
}

/* ===============================
   BASE STYLES
   =============================== */
body {
  font-family: "Red Hat Text", sans-serif;
  background-color: var(--Rose-100);
}

body.no-scroll {
  overflow: hidden;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
}

.hidden {
  display: none;
}

.main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
}

.section_title {
  color: var(--Rose-900);
  font-size: 1.8rem;
}

/* ===============================
   MENU SECTION
   =============================== */
.menu_grid {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2rem;
  justify-items: stretch;
  align-items: stretch;
}

.menu_item {
  grid-column: span 12;
  border-radius: 25px;
}

.menu_item-image-wrapper {
  position: relative;
}

.menu_item-img {
  max-width: 100%;
  border-radius: 10px;
}

.btn_item-position {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translate(-50%, -50%);
  cursor: pointer;
  white-space: nowrap;
}

.btn_add-cart {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  border: 1px solid var(--Rose-500);
  transition: 0.3s ease-in-out;
  width: 60%;
  max-width: 13rem;
}

.btn_add-cart:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.quantity-selector {
  opacity: 0;
  display: flex;
  justify-content: space-around;
  background-color: var(--orange);
  border-radius: 50px;
  padding: 0.5rem;
  color: white;
  width: 60%;
  max-width: 13rem;
  pointer-events: none;
}

.quantity-selector button {
  background-color: transparent;
  border: 1px solid var(--Rose-50);
  border-radius: 50px;
  font-size: 1.2rem;
  padding: 0 0.4rem;
  color: white;
}

.menu_item-info {
  margin-top: 1.2rem;
}

.menu_item-info li {
  margin-top: 0.2rem;
}

.menu-item-type {
  color: var(--Rose-400);
  font-size: 0.9rem;
}

.menu-item-name {
  color: var(--Rose-900);
}

.menu-item-price {
  color: var(--orange);
  font-weight: 600;
}

/* ===============================
   CART SECTION
   =============================== */
.section_cart {
  background-color: white;
  padding: 1rem;
}

.section_subtitle {
  color: var(--orange);
  font-weight: 700;
}

.cart_empty {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cart_empty-img {
  width: 40%;
  max-width: 12rem;
}

.cart_empty-message {
  color: var(--Rose-400);
  margin-bottom: 1rem;
}

.cart_item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--Rose-100);
  padding: 1rem 0;
}

.cart_item-info {
  margin-top: 0.3rem;
  display: flex;
  gap: 0.7rem;
}

.cart_item-name {
  color: var(--Rose-900);
  font-weight: 550;
}

.cart_item-quantity,
.order_item-quantity {
  color: var(--orange);
  font-weight: 600;
}

.cart_item-price,
.order_item-price {
  color: var(--Rose-400);
}

.cart_item-total {
  color: var(--Rose-500);
  font-weight: 600;
}

.btn_removeItem {
  background-color: transparent;
  border: none;
  width: 1.3rem;
  cursor: pointer;
}

.icon_removeItem {
  width: 100%;
  border: 1px solid var(--Rose-500);
  border-radius: 50px;
  padding: 2px;
}

.cart_total-container {
  margin-top: 1.3rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.cart_total-label,
.order_total-label {
  color: var(--Rose-900);
}

.total,
.order_total {
  color: var(--Rose-900);
  font-weight: 800;
  font-size: 1.4rem;
}

.eco_message-container {
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--Rose-100);
  border-radius: 10px;
}

.btn_confirmOrder,
.btn_startNewOrder {
  display: block;
  margin: 1.4rem auto;
  width: 80%;
  max-width: 19.5rem;
  padding: 0.8rem 0;
  border-radius: 20px;
  border: none;
  background-color: var(--orange-dark);
  color: white;
  transition: 0.3s ease-in-out;
  cursor: pointer;
}

.btn_confirmOrder:hover {
  background-color: var(--orange);
}

.cart_list,
.cart_total-container,
.eco_message-container,
.btn_confirmOrder {
  display: none;
}

/* ===============================
CONFIRMATION MODAL
   =============================== */
.confirm_order-background {
  width: 100%;
  height: 100vh;
  position: fixed;
  background-color: rgba(0, 0, 0, 0.6);
  top: 0;
  left: 0;
  padding: 4rem 0;
  overflow-y: auto;
  z-index: 999;
}

.confirm_order {
  margin: 0 auto;
  background-color: var(--Rose-50);
  border-radius: 10px;
  padding: 2rem 1.5rem 0.1px;
}

.confirm_order-message {
  color: var(--Rose-400);
  margin-bottom: 1.2rem;
}

.confirm_order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.icon_confirm_order {
  width: clamp(2rem, 9vw, 3rem);
}

.icon_close-modal {
  width: clamp(1rem, 7vw, 2rem);
  cursor: pointer;
}

/* ===============================
   ORDER SUMMARY
   =============================== */
.order_list {
  background-color: var(--Rose-100);
  border-radius: 10px 10px 0 0;
}

.order_item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1rem;
  position: relative;
}

.order_item::after {
  content: "";
  display: block;
  width: 90%;
  margin: 0 auto;
  border-bottom: 1px solid var(--Rose-300);
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  bottom: 0;
}

.order_item-left {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
}

.order_item-image {
  width: 35%;
  border-radius: 6px;
}

.order_content-center {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-left: 1rem;
}

.order_item-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: clamp(6rem, 40vw, 20rem);
  font-size: 0.9rem;
  color: var(--Rose-900);
  font-weight: 600;
}

.order_item-info {
  display: flex;
  gap: 0.8rem;
}

.order_item-individual-price {
  color: var(--Rose-300);
}

.order_item-total {
  color: var(--Rose-900);
  font-weight: 590;
}

.order_total-container {
  background-color: var(--Rose-100);
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 6rem;
  margin-bottom: 1rem;
  padding: 2rem 1.5rem;
  border-radius: 0 0 10px 10px;
}

/* ===============================
   FOOTER ATTRIBUTION
   =============================== */
.attribution {
  font-size: 11px;
  text-align: center;
}
.attribution a {
  color: hsl(228, 45%, 44%);
}

/* ===============================
   MEDIA QUERIES TABLET
   =============================== */
@media screen and (min-width: 47rem) {
  .menu_item {
    grid-column: span 6;
  }
  .btn_add-cart,
  .quantity-selector {
    max-width: none;
  }
  .cart_empty-img {
    max-width: 16rem;
  }

  .confirm_order-background {
    padding: 0 4rem;
  }
}

/* ===============================
   MEDIA QUERIES DESKTOP
   =============================== */
@media screen and (min-width: 65rem) {
  .main {
    gap: 2rem;
    align-items: flex-start;
    flex-direction: row;
    padding: 0 6rem;
    margin-top: 4rem;
  }

  .menu_item {
    grid-column: span 4;
    min-width: 150px;
  }

  .section_menu {
    width: 70%;
  }

  .section_cart {
    width: 30%;
  }

  .confirm_order {
    width: 40%;
    margin: 0 auto;
  }

  .order_list {
    overflow-y: auto;
  }

  .cart_empty-img {
    width: 60%;
    max-width: 18rem;
  }

  .order_item-image {
    width: 17%;
  }

  .confirm_order-background {
    padding: 2rem 0 0 0;
  }
}
