/* Modal Carrinho em tela cheia no mobile */
@media (max-width: 600px) {
  #cartModal .modal-dialog {
    max-width: 100vw;
    margin: 0;
    height: 100vh;
    display: flex;
    align-items: stretch;
  }

  #cartModal .modal-content {
    border-radius: 0;
    min-height: 100vh;
    height: 100vh;
    display: flex;
    flex-direction: column;
    box-shadow: none;
  }

  #cartModal .modal-header {
    border-bottom: none;
    padding-top: 1.2rem;
    padding-bottom: 0.7rem;
    padding-left: 1.2rem;
    padding-right: 1.2rem;
    justify-content: flex-start;
    align-items: center;
    background: #fff;
  }

  #cartModal .modal-title {
    flex: 1;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
    color: #333;
    letter-spacing: 0.01em;
  }

  #cartModal .btn-close {
    font-size: 14px;
    margin-left: 0.5rem;
    color: #6C2BD9;
    opacity: 1;
  }

  #cartModal .modal-body {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 1.2rem 0.5rem 1rem 0.5rem;
    background: #f6f6f6;
    position: relative;
    min-height: 300px;
    padding-bottom: 90px;
    /* espaço para o total e footer */
  }

  #cartModal .modal-footer {
    border-top: none;
    padding-bottom: 2rem;
    padding-top: 1rem;
    background: #fff;
  }

  #cartModal #cart-items {
    padding: 1rem .5rem 2rem;
  }

  #cartModal .to {
    border-top: .5px solid #ccc;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 70px;
    background: #fff;
    z-index: 10;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0.7rem 1.2rem 0.7rem 1.2rem;
    font-size: 1.1rem;
    gap: 0.7rem;
  }

  #cartModal .to span:first-child {
    flex: 1;
    text-align: left;
    color: #333;
    font-size: 1.1rem;
    font-weight: 500;
  }

  #cartModal .to span#cart-total {
    font-size: 1.35rem;
    color: var(--highlight-color-2);
    font-weight: 700;
    letter-spacing: 0.01em;
    text-align: right;
    margin-left: auto;
    display: block;
  }

  #cartModal .list-group-item {
    border: 1.5px solid #f1f1f1;
    border-radius: 16px;
    margin-bottom: 1rem;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.11);
    display: flex;
    align-items: stretch;
    padding: 0.7rem 0.7rem 0.7rem 0.7rem;
    gap: 0.7rem;
    min-height: 80px;
    position: relative;
    transition: box-shadow 0.2s;
  }

  #cartModal .list-group-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 12px;
    margin-right: 0.8rem;
    margin-top: 0.1rem;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.07);
    background: #f8f8f8;
    flex-shrink: 0;
    align-self: center;
    border: 1px solid #eee;
  }

  #cartModal .cart-item-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    justify-content: center;
    padding-left: 0.1rem;
  }

  #cartModal .cart-item-title {
    font-size: 1.04rem;
    font-weight: 700;
    margin-bottom: 0.1rem;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.01em;
    line-height: 1.2;
  }

  #cartModal .cart-item-category {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.2rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 1.1;
  }


  #cartModal .cart-item-qty button {
    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #f1f1f1;
    border: none;
    color: var(--highlight-color-2);
    font-weight: bold;
    border-radius: 10px;
  }

  .cart-item-qty button span {
    display: block;
  }

  #cartModal .cart-item-qty button:active {
    background: var(--highlight-color-2);
    color: #fff;
  }

  #cartModal .cart-item-remove {
    background: none;
    border: none;
    color: #c00;
  }

  #cartModal .cart-item-remove:hover {
    background: #ffeaea;
    color: #c00;
  }

  #cartModal #cart-empty {
    margin-top: 2rem;
    font-size: 1.1rem;
  }

  /* O total agora está fixo na parte inferior, estilizado acima */
  #cartModal .modal-footer {
    gap: 0.7rem;
    background: #fff;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    border-radius: 0;
    padding-bottom: 1.2rem;
    padding-top: 1rem;
    justify-content: space-between;
  }

  #cartModal .modal-footer .btn {
    min-width: 110px;
    font-size: 1rem;
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
  }

  #cartModal .modal-footer .btn-primary {
    background: var(--highlight-color-2);
    color: #fff;
    font-weight: 600;
    border: none;
  }

  #cartModal .modal-footer .btn-secondary {
    background: #888;
    color: #fff;
    border: none;
    font-weight: 500;
  }
}

/* Cor highlight 2 */
:root {
  --highlight2: #6C2BD9;
}

/* Botão hamburguer sem fundo */
#hamburgerBtn {
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  color: var(--highlight2) !important;
  padding: 0.25rem 0.5rem;
}

#hamburgerBtn:focus {
  outline: 2px solid var(--highlight2);
}

/* Linhas do menu lateral com highlight 2 */
#sideMenu ul li a {
  color: var(--highlight-color-2);
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

#sideMenu ul li a:hover,
#sideMenu ul li a:focus {
  background: var(--highlight-color-2);
  color: #fff;
}

/* Menu Hamburguer */
.side-menu {
  min-width: 220px;
  max-width: 90vw;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.08);
  overflow-y: auto;
}

#sideMenu span {
  display: flex;
  align-items: center;
  gap: 1px;
}

#sideMenu span .logo {
  text-decoration: none;
}

#sideMenu .logo img {
  width: 30px;
  height: 30px;
}

@media (min-width: 992px) {

  #hamburgerBtn,
  #sideMenu,
  #sideMenuOverlay {
    display: none !important;
  }
}

@media (max-width: 991.98px) {
  .action-wrapper #search-bar {
    max-width: 120px;
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #ffffff;
  --secondy-color: #121212;
  --highlight-color-1: #FFD600;
  --highlight-color-2: #6C2BD9;
  --sucess-color: #A8FF60;
  --danger-color: #FF4E4E;
  --neutral: #2C2C2C;
}

html,
body {
  height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;

  padding-top: 70px;
  background-color: var(--primary-color);
}

header {
  grid-area: Header;
  width: 100%;
  padding: 10px 20px;

  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: space-between;

  border-bottom: solid 1px #ccc;

  background: var(--primary-color);
  /* Adicione sombra para destacar o header fixo */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.logo img {
  width: 50px;
}

.action-wrapper {
  display: flex;
  gap: 10px;
}

#search-bar-button {
  border: none;
  background: none;
  color: var(--highlight-color-2);

  font-size: 24px;
}

#search-bar {
  display: none;
  width: 0px;
  opacity: 0;

  border: none;
  border-bottom: 1px solid var(--highlight-color-2);

  outline: none;

  transition: border 500ms ease-in-out;
}

#search-bar.extended {
  display: block;
  width: 300px;
  opacity: 1;
}

#search-bar.extended:focus {
  border-bottom: 2px solid var(--highlight-color-2);
}

@media screen and (width <=868px) {
  #search-bar.extended {
    width: 100px;
  }
}

header .btn {
  background-color: var(--highlight-color-2);
  color: var(--primary-color);

  display: flex;
  align-items: center;
  gap: 5px;
}

.cart:hover {
  background-color: var(--highlight-color-2);
  color: var(--primary-color);
  opacity: 0.8;
}


.cart-quantity {
  width: 20px;
  height: 20px;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  border-radius: 50%;

  font-size: 14px;
  font-weight: bold;

  color: var(--highlight-color-2);
  background-color: var(--primary-color);
}

.container {
  grid-area: Main;
  flex: 1 0 auto;
}

.categories {
  max-width: 1024px;
  margin: 20px auto;
  overflow-x: auto;
  display: flex;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: var(--highlight-color-2) #f1f1f1;
}

.categories .btn {
  display: flex;
  align-items: center;
  gap: 5px;

  color: var(--highlight-color-2);
  border-color: var(--highlight-color-2);

  border-radius: 15px;

  white-space: nowrap;
  flex-shrink: 0;
}

.categories .btn:hover {
  background-color: var(--highlight-color-2);
  color: var(--primary-color);
}

.categories::-webkit-scrollbar {
  height: 6px;
}

.categories::-webkit-scrollbar-thumb {
  background: var(--highlight-color-2);
  border-radius: 4px;
}

.categories::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.products {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 1024px;
  margin: 0 auto 50px;
}

#productsPagination {
  margin-bottom: 24px;
}

#productsPagination .btn {
  border-color: var(--highlight-color-2);
  color: var(--highlight-color-2);
}

#productsPagination .btn-primary {
  background-color: var(--highlight-color-2);
  color: var(--primary-color);
}

.btn:hover {
  background-color: var(--highlight-color-2);
  opacity: 0.8;
}

@media (min-width: 600px) {
  .products {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .products {
    grid-template-columns: repeat(3, 1fr);
  }
}

.item {
  background: var(--primary-color);
  border-radius: 15px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
  padding: 1.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: box-shadow 0.2s;
}

.item:hover {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.13);
}

.item img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: 8px;
  margin: 0 auto 1rem;
}

.item-info {
  margin-bottom: 1rem;
}

.item-info h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  color: var(--secondy-color);
}

.item-info .category {
  display: block;
  font-size: 0.95rem;
  color: var(--neutral);
  margin-bottom: 0.25rem;
}

.item-info .price {
  display: block;
  font-size: 20px;
  font-weight: bold;
  color: var(--secondy-color);
}

.item .btn {
  width: 100%;
  font-weight: 500;
  border-radius: 6px;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.btn-primary {
  background-color: var(--highlight-color-2);
  border: none;
}

.footer-social {
  grid-area: Footer;
  width: 100%;
  padding: 32px 0 12px 0;
  background: var(--neutral);
  color: var(--primary-color);
  text-align: center;
  position: relative;
  bottom: 0;
  left: 0;
  flex-shrink: 0;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.07);
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 8px;
}

.footer-logo-text {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.footer-logo {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.09);
}

.footer-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--highlight-color-2);
}

.footer-social-links {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-bottom: 2px;
}

.footer-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff1;
  color: var(--highlight-color-2);
  font-size: 1.5rem;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  text-decoration: none;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.07);
}

.footer-social-btn:hover,
.footer-social-btn:focus {
  background: var(--highlight-color-2);
  color: #fff;
  box-shadow: 0 2px 10px rgba(108, 43, 217, 0.13);
}

.footer-copyright {
  font-size: 14px;
  margin: 0;
  opacity: 0.95;
  margin-top: 6px;
  letter-spacing: 0.01em;
}

@media (max-width: 600px) {
  .footer-content {
    flex-direction: column;
    gap: 8px;
  }

  .footer-logo {
    width: 32px;
    height: 32px;
  }

  .footer-title {
    font-size: 1.05rem;
  }

  .footer-social-btn {
    width: 32px;
    height: 32px;
    font-size: 1.15rem;
  }
}

.how-it-works-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1050;
  background: #6C2BD9;
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.13);
  transition: width 0.2s, padding 0.2s, border-radius 0.2s, font-size 0.2s;
  cursor: pointer;
  outline: none;
  text-decoration: none;
}

.how-it-works-btn:active {
  background: #4b1a9a;
}

.how-it-works-btn[aria-expanded="true"] {
  background: #007bff;
}

@media (max-width: 600px) {
  .how-it-works-btn {
    right: 12px;
    bottom: 12px;
    padding: 12px 18px;
    font-size: 0.95rem;
  }
}

.item-animate-init {
  opacity: 0;
  transform: translateY(40px) scale(0.97);
  transition: opacity 0.6s cubic-bezier(.4, 0, .2, 1), transform 0.6s cubic-bezier(.4, 0, .2, 1);
}

.item-animate-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal-body .list-group-item img {
  width: 60px;
  height: 60px;
}

#cartModal .list-group-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 12px;
  margin-right: 0.8rem;
  margin-top: 0.1rem;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.07);
  background: #f8f8f8;
  flex-shrink: 0;
  align-self: center;
  border: 1px solid #eee;
}

#cartModal .cart-item-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  justify-content: center;
  padding-left: 0.1rem;
}

#cartModal .cart-item-title {
  font-size: 1.04rem;
  font-weight: 700;
  margin-bottom: 0.1rem;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.cart-item-category {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 0.2rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.cart-item-price {
  font-size: 1.09rem;
  font-weight: 700;
  color: var(--highlight-color-2);
  margin-bottom: 0.2rem;
  letter-spacing: 0.01em;
  line-height: 1.2;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-bottom: 0;
  margin-top: 0.2rem;
}

.cart-item-qty button {
  width: 30px;
  height: 30px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #f1f1f1;
  border: none;
  color: var(--highlight-color-2);
  font-weight: bold;
  border-radius: 10px;
}

.cart-item-qty button span {
  display: block;
}

.modal-body .cart-item-qty button:active {
  background: var(--highlight-color-2);
  color: #fff;
}

@media screen and (width > 600px) {
  .to {
    margin: 20px;
  }
}