:root {
  font-size: 16px;
}

/* Garantir que elementos strong sempre apareçam em negrito */
strong {
  font-weight: bold !important;
}

body {
  font-family: "Quicksand", sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  background-color: #ffffff;
  padding: 1rem 0;
  text-align: center;
}

nav {
  border-radius: 0.75rem;
  max-width: 56.25rem;
  margin: 0 auto;
  background-color: #e0e0e0;
  color: #272727;
}

.nav-ul li {
  cursor: pointer;
  padding: 0.5rem 0.9375rem;
  transition: background-color 0.3s ease;
  border-radius: 0.3125rem;
}

.nav-ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
  font-weight: bold;
  color: #333;
}

.nav-ul li[data-category="Todos"].active u {
  text-decoration: none;
}
.nav-ul li.active {
  text-decoration: underline;
  font-weight: bold;
}

main {
  flex-grow: 1;
}

main h2,
main h3 {
  text-align: center;
  color: #444444;
  margin-bottom: 1.25rem;
  font-size: 2em;
}

.error-message {
  color: #f00;
  font-size: 0.85em;
  margin-top: 0.3125rem;
}

input:invalid:not(:placeholder-shown) {
  border-color: #f00;
}

input.invalid {
  border-color: #f00 !important;
}

.product-grid {
  display: grid;
  width: 90%;
  justify-content: center;
  grid-template-columns: repeat(auto-fit, minmax(15.625rem, 1fr));
  gap: 1.875rem;
  padding: 0 1.25rem;
  justify-items: center;
  margin-bottom: 3.125rem;
  max-width: 56.25rem;
  margin-left: auto;
  margin-right: auto;
}
.product-card {
  background-color: #fff;
  width: 17.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
  transition: transform 0.2s ease-in-out;
}

.product-card:hover {
  transform: translateY(-0.3125rem);
}

.product-card img {
  width: 17.5rem;
  height: 17.5rem;
  object-fit: cover;
  border-bottom: 0.0625rem solid #eee;
}

.product-info {
  padding: 0.125rem;
  margin-top: 0;
  margin-bottom: 1.2rem;
}

.product-info h3 {
  font-size: 1.4rem;
  padding: 0.2rem;
  margin: 0;
}
.product-info p {
  padding: 0.1rem;
  margin: 0;
}

.product-info .price {
  font-weight: bold;
  font-size: 1.2rem;
  color: #333;
}

.product-info .price strong {
  font-weight: bold !important;
}

.product-price {
  font-weight: bold;
  font-size: 1.2rem;
  color: #333;
}

.product-price strong {
  font-weight: bold !important;
}
.button {
  background-color: #323232;
  color: white;
  padding: 0.625rem 0.9375rem;
  border: none;
  border-radius: 0.3125rem;
  font-size: 1em;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.button:hover {
  background-color: #6e6d6d;
}

.button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

.product-card .add-to-cart-btn {
  width: 100%;
  margin-top: 0.5rem;
}

#proceed-to-checkout-btn {
  width: 100%;
}

#confirm-purchase-btn {
  background-color: #666666;
  padding: 0.9375rem 1.875rem;
  font-size: 1.2em;
  width: 100%;
}

#confirm-purchase-btn:hover {
  background-color: #272727;
}

.cart-message {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  background-color: #e0e0e0;
  padding: 0.5rem 0.9375rem;
  border-radius: 0 0 0.5rem 0.5rem;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
  font-weight: bold;
  font-size: 0.9em;
  text-align: center;
  width: auto;
  max-width: 90%;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-message.show {
  opacity: 1;
  visibility: visible;
}

.cart-message.success {
  background-color: #f8f9fa;
  color: #495057;
  border: 1px solid #dee2e6;
}

.cart-message.warning {
  background-color: #f8f9fa;
  color: #495057;
  border: 1px solid #dee2e6;
}

.cart-message.info {
  background-color: #f8f9fa;
  color: #495057;
  border: 1px solid #dee2e6;
}

.cart-animation-icon {
  width: 1.875rem;
  height: 1.875rem;
}

.cart-item-details {
  display: flex;
}

.cart-item-thumbnail {
  width: 5rem;
  height: 5rem;
  margin-right: 0.9375rem;
  object-fit: cover;
  border-radius: 0.3125rem;
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-0.625rem);
  }
  60% {
    transform: translateY(-0.3125rem);
  }
}

.cart-animation-icon.animate {
  animation: bounce 0.8s ease-in-out;
}

.cart-section {
  padding: 1.25rem;
  margin-top: 2.5rem;
  border-top: 0.0625rem solid #eee;
}

.cart-section h2 {
  font-size: 2em;
  margin-bottom: 1.25rem;
  color: #333;
}

.cart-items {
  border: 0.0625rem solid #ddd;
  border-radius: 0.3125rem;
  padding: 0.9375rem;
  min-height: 5rem;
  margin-bottom: 1.25rem;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.625rem 0;
  border-bottom: 0.0625rem dashed #eee;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-info {
  flex-grow: 1;
}

.cart-item-info h4 {
  margin: 0;
  font-size: 1.1em;
  color: #555;
}

.cart-item-info p {
  margin: 0.3125rem 0 0;
  font-size: 0.9em;
  color: #888;
}

.cart-item-price {
  font-weight: bold;
  color: #666666;
  white-space: nowrap;
}

.empty-cart-message {
  text-align: center;
  color: #888;
  font-style: italic;
  padding: 1.25rem 0;
}

.cart-summary {
  text-align: right;
  margin-top: 1.25rem;
}

.cart-summary p {
  font-size: 1.5em;
  font-weight: bold;
  margin-bottom: 0.9375rem;
}

.total-price {
  color: #484848;
}

.checkout-section {
  padding: 1.25rem;
  margin-top: 2.5rem;
  border-top: 0.0625rem solid #eee;
}

.checkout-section h2 {
  font-size: 2em;
  margin-bottom: 1.25rem;
  color: #333;
}

.checkout-form .form-group {
  margin-bottom: 0.9375rem;
}

.checkout-form label {
  display: block;
  margin-bottom: 0.3125rem;
  font-weight: bold;
  color: #555;
}

.checkout-form input[type="text"],
.checkout-form input[type="email"] {
  width: 100%;
  padding: 0.625rem;
  border: 0.0625rem solid #ddd;
  border-radius: 0.25rem;
  box-sizing: border-box;
  font-size: 1em;
}

.order-summary {
  background-color: #f8f8f8;
  border: 0.0625rem solid #eee;
  border-radius: 0.3125rem;
  padding: 0.9375rem;
  margin-top: 1.5625rem;
  margin-bottom: 1.5625rem;
}

.order-summary h3 {
  margin-top: 0;
  color: #666666;
  font-size: 0.7em;
  border-bottom: 0.0625rem solid #eee;
  padding-bottom: 0.625rem;
  margin-bottom: 0.9375rem;
}

.order-summary ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: block;
}

.order-summary ul li {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 1em;
}

.order-summary ul li span.item-name {
  color: #555;
}

.order-summary ul li span.item-price {
  font-weight: bold;
  color: #666666;
}

.order-total {
  font-size: 1.6em;
  font-weight: bold;
  text-align: right;
  margin-top: 1.25rem;
  padding-top: 0.625rem;
  border-top: 0.0625rem dashed #ddd;
}

.purchase-confirmation-message {
  margin-top: 1.25rem;
  padding: 0.9375rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: bold;
  font-size: 1.1em;
  text-align: center;
  background-color: #d4edda;
  color: #153557;
  border: 0.0625rem solid #c3e6cb;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.purchase-confirmation-message.show {
  opacity: 1;
  visibility: visible;
}

.confirmation h3 {
  color: #464647;
  margin-bottom: 0.9375rem;
  font-size: 1em;
  border-bottom: 0.0625rem solid #ddd;
  padding-bottom: 0.625rem;
  margin-top: 0;
}

.confirmation ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: block;
}

.confirmation ul li {
  margin-bottom: 0.5rem;
  font-size: 1.1em;
  color: #666;
}

.confirmation .total-price {
  font-weight: bold;
  color: #4c4c4c;
  font-size: 1.3em;
  margin-top: 0.9375rem;
  padding-top: 0.625rem;
  border-top: 0.0625rem dashed #eee;
}

/* Ícone de carrinho flutuante */
.floating-cart {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  background-color: #e0e0e0;
  border-radius: 20%;
  width: 3.75rem;
  height: 3.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.3);
  cursor: pointer;
  z-index: 1000;
  transition: transform 0.2s ease, background-color 0.3s ease;
}

.floating-cart:hover {
  transform: scale(1.1);
  background-color: #8d978f;
}

.floating-cart .cart-icon {
  width: 1.5rem;
  height: 1.5rem;
}

.floating-cart .cart-count {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  background-color: #e74c3c;
  color: white;
  border-radius: 50%;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: bold;
  border: 0.125rem solid white;
  min-width: 1.25rem;
}

.floating-cart .cart-count.hidden {
  display: none;
}

/* Animação quando itens são adicionados */
.floating-cart.pulse {
  animation: pulse 0.6s ease;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

footer {
  background-color: #4c4c4c;
  color: #fff;
  margin-top: auto;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.img-footer {
  margin-left: 2rem;
  width: 10%;
}

hr {
  color: #fff;
  width: 90%;
}

.container-footer {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  max-width: 75rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.footer-div h3 {
  margin-top: 0;
  margin-bottom: 0.3rem;
  font-size: 1.1em;
  color: #fff;
}

.ul-footer {
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  justify-content: flex-start;
}

#li1 {
  font-size: small;
}
.li-footer {
  font-size: small;
  color: #fff;
  margin-left: 0.1rem;
  margin-right: 0.1rem;
  white-space: nowrap;
}

.ul-footer li:not(:last-child)::after {
  content: "• ";
  color: #fff;
  margin-left: 0.2rem;
}

/* Responsividade para o carrinho flutuante */
@media (max-width: 48rem) {
  .floating-cart {
    width: 3.125rem;
    height: 3.125rem;
    top: 0.9375rem;
    right: 0.9375rem;
  }

  .floating-cart .cart-icon {
    width: 1.25rem;
    height: 1.25rem;
  }

  .floating-cart .cart-count {
    width: 1.25rem;
    height: 1.25rem;
    font-size: 0.625rem;
    top: -0.375rem;
    right: -0.375rem;
  }
}

/* Estilos específicos para a página do carrinho */
.cart-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.button.secondary {
  background-color: #6e6d6d;
  color: white;
}

.button.secondary:hover {
  background-color: #323232;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.quantity-btn {
  background-color: #6e6d6d;
  border: none;
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  color: white;
}

.quantity-btn:hover {
  background-color: #323232;
  color: white;
  transform: scale(1.1);
}

.quantity-btn:active {
  transform: scale(0.95);
}

.quantity-btn.increase-btn {
  background-color: #6e6d6d;
  color: white;
}

.quantity-btn.increase-btn:hover {
  background-color: #323232;
}

.quantity-btn.decrease-btn {
  background-color: #6e6d6d;
  color: white;
}

.quantity-btn.decrease-btn:hover {
  background-color: #323232;
}

.quantity-display {
  font-weight: bold;
  min-width: 2rem;
  text-align: center;
  padding: 0.5rem;
  background-color: #f8f9fa;
  border-radius: 0.25rem;
  border: 1px solid #dee2e6;
  transition: all 0.3s ease;
}

.quantity-display.updated {
  background-color: #fff3cd;
  border-color: #ffeaa7;
  transform: scale(1.1);
}

.quantity-display.quantity-warning {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
  animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
  100% {
    opacity: 1;
  }
}

/* Estilo para botão de remover item */
.remove-item-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: background-color 0.3s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.remove-item-btn:hover {
  background-color: #ffebee;
  transform: scale(1.1);
}

.remove-item-btn img {
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.remove-item-btn:hover img {
  filter: grayscale(0%) sepia(100%) saturate(200%) hue-rotate(0deg)
    brightness(1.2);
}

/* Estilos específicos para a página de checkout */
.checkout-container {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.checkout-form-section {
  background-color: #f9f9f9;
  padding: 1.5rem;
  border-radius: 0.5rem;
}

.order-summary-section {
  background-color: #fff;
  padding: 1.5rem;
  border: 1px solid #e0e0e0;
  border-radius: 0.5rem;
  height: fit-content;
}

.order-summary-details {
  background-color: #f8f8f8;
  border: 1px solid #eee;
  border-radius: 0.5rem;
  padding: 1rem;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  padding: 0.25rem 0;
}

.summary-line.total-final {
  border-top: 2px solid #333;
  margin-top: 1rem;
  padding-top: 0.5rem;
  font-size: 1.2em;
}

/* Responsividade para checkout */
@media (max-width: 768px) {
  .checkout-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .order-summary-section {
    order: -1;
  }
}

/* Estilos para navegação nas páginas internas */
.nav-button {
  background: none !important;
  border: none !important;
  color: #444 !important;
  font-weight: bold !important;
  cursor: pointer !important;
  text-decoration: underline !important;
  font-size: 1rem;
  padding: 0;
  font-family: inherit;
}

.nav-button:hover {
  color: #666 !important;
  text-decoration: none !important;
}

header nav {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

header nav a,
header nav button {
  transition: color 0.3s ease;
}

header nav a:hover,
header nav button:hover {
  color: #666 !important;
}

/* Responsividade para navegação */
@media (max-width: 48rem) {
  header nav {
    flex-direction: column;
    gap: 0.5rem;
  }

  header nav a,
  header nav button {
    font-size: 0.9rem;
  }
}

/* Estilos para página de detalhes do produto */
.product-detail-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.product-detail-loading,
.product-not-found {
  text-align: center;
  padding: 3rem 1rem;
}

.product-detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.product-detail-image {
  text-align: center;
}

.detail-image {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 1rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.product-detail-info {
  padding: 1rem;
}

.product-detail-title {
  font-size: 2.5rem;
  color: #333;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.product-detail-category {
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  font-weight: 500;
}

.product-detail-description {
  font-size: 1.1rem;
  line-height: 1.8;
  color: #555;
  margin-bottom: 2rem;
  text-align: justify;
  padding: 1rem;
  background-color: #f9f9f9;
  border-left: 4px solid #333;
  border-radius: 0 0.5rem 0.5rem 0;
}

.detail-price {
  font-size: 2rem;
  color: #333;
  font-weight: bold;
  margin-bottom: 2rem;
  display: block;
}

.product-detail-actions {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.quantity-selector {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quantity-selector label {
  font-weight: bold;
  color: #555;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quantity-input {
  width: 80px;
  padding: 0.5rem;
  text-align: center;
  border: 2px solid #ddd;
  border-radius: 0.25rem;
  font-size: 1.1rem;
  font-weight: bold;
}

.quantity-input:focus {
  outline: none;
  border-color: #333;
}

/* Remove as setas do input number (spinner) */
.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
.quantity-input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.add-to-cart-detail {
  padding: 1rem 2rem;
  font-size: 1.2rem;
  font-weight: bold;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #333;
  color: white;
  width: 100%;
}

.add-to-cart-detail:hover {
  background-color: #555;
  transform: translateY(-2px);
}

.view-details-btn {
  background-color: #f8f9fa;
  color: #333;
  border: 2px solid #333;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  cursor: pointer;
  font-weight: bold;
  margin-bottom: 0.5rem;
  width: 100%;
  transition: all 0.3s ease;
}

.view-details-btn:hover {
  background-color: #333;
  color: white;
}

/* Responsividade para detalhes do produto */
@media (max-width: 768px) {
  .product-detail-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .product-detail-title {
    font-size: 2rem;
  }

  .detail-price {
    font-size: 1.5rem;
    color: #333;
  }

  .product-detail-actions {
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .product-detail-container {
    margin: 1rem auto;
    padding: 0 0.5rem;
  }

  .product-detail-title {
    font-size: 1.5rem;
  }

  .product-detail-description {
    font-size: 1rem;
  }

  .add-to-cart-detail {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }
}

@media (max-width: 30rem) {
  .floating-cart {
    width: 2.8125rem;
    height: 2.8125rem;
    top: 0.625rem;
    right: 0.625rem;
  }

  .floating-cart .cart-icon {
    width: 1.125rem;
    height: 1.125rem;
  }

  .floating-cart .cart-count {
    width: 1.125rem;
    height: 1.125rem;
    font-size: 0.5625rem;
    top: -0.3125rem;
    right: -0.3125rem;
  }
}

@media (max-width: 48rem) {
  main {
    padding: 0.625rem;
    max-width: 100%;
    margin: 1rem auto;
  }

  main h2 {
    font-size: 1.6em;
  }

  .product-grid {
    grid-template-columns: 1fr;
    padding: 0;
  }

  .product-card {
    margin: 0 auto;
    max-width: 20rem;
  }

  .product-card img {
    height: 8rem;
  }

  .checkout-form input {
    font-size: 0.9em;
  }

  #proceed-to-checkout-btn,
  #confirm-purchase-btn {
    padding: 0.75rem 1.25rem;
    font-size: 1em;
  }

  footer {
    padding: 1rem 0;
  }

  .img-footer {
    align-items: center;
    width: 30%;
  }

  .container-footer {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 1rem;
    max-width: 100%;
  }

  .footer-div {
    width: 90%;
    max-width: 25rem;
    margin: 0 auto;
    text-align: justify;
  }

  .ul-footer {
    justify-content: center;
  }

  .li-footer {
    margin: 0 0.125rem;
    font-size: 0.9em;
  }

  .ul-footer li:not(:last-child)::after {
    margin-left: 0.0625rem;
  }

  nav {
    border-radius: 0.75rem;
    max-width: 56.25rem;
    margin: 0 auto;
    padding: 0.95rem;
    color: #272727;
  }

  .nav-ul {
    flex-direction: column;
    align-items: center;
    gap: 0.625rem;
    .nav-ul li:hover {
      background-color: #f0f0f0;
    }

    .nav-ul li.active {
      background-color: #e0e0e0;
      font-weight: bold;
      text-decoration: underline;
      color: #333;
    }
  }
}
