:root {
  --yellow: #ffcc03;
  --red: #cc1517;
  --white: #ffffff;
  --dark: #242424;
  --gray: #777777;
  ----background: #ffffff;
  --border: #eeeeee;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: "Inter", sans-serif;
  background: var(--background);
  color: var(--dark);
}

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

html,
body {
  margin: 0;
  padding: 0;
}

/* HEADER */

/* CABEÇALHO DA LOJA */

.header {
  background: var(--white);
  padding: 0 0 18px;
  padding: 0;
  margin: 0;
}

.header > .hero-banner {
  height: 175px;
  background-image: url("../assets/images/banner-doratto.jpeg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  padding-top: 25px;
  margin: 0;
}

.header > .container {
  display: block;
  position: relative;
}

.hero-top {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-slogan {
  font-size: 21px;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.hero-slogan span {
  color: var(--yellow);
}

/* CARTÃO DA LOJA */

.store-card {
  display: flex;
  align-items: center;
  gap: 13px;
  position: relative;
  margin-top: -42px;
  padding: 18px 14px;
  background: var(--white);
  border-radius: 18px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.07);
}

.store-logo {
  width: 54px;
  height: 54px;
  min-width: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 13px;
  background: #ffffff;
}

.store-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.store-info {
  flex: 1;
  min-width: 0;
}

.store-info .store-status {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  font-size: 11px;
  font-weight: 700;
}

.store-info h1 {
  margin: 0 0 4px;
  color: var(--dark);
  font-size: 15px;
  font-weight: 700;
}

.store-info p {
  margin: 0;
  color: var(--gray);
  font-size: 12px;
}

.store-arrow {
  color: #999;
  font-size: 25px;
}

/* INFORMAÇÕES DE ENTREGA */

.store-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 10px;
  padding: 12px 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.store-detail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
}

.store-detail + .store-detail {
  border-left: 1px solid var(--border);
}

.store-detail span {
  color: var(--gray);
  font-size: 12px;
}

.store-detail strong {
  color: var(--dark);
  font-size: 12px;
  font-weight: 600;
}

.logo {
  color: var(--red);
  font-size: 25px;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -1px;
}

.logo span {
  display: block;
  font-size: 10px;
  letter-spacing: 3px;
}

.store-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
}

.status-indicator {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #777;
}

/* HERO */

.hero {
  background: var(--yellow);
  padding: 55px 0 65px;
}

.hero-label {
  color: var(--red);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(34px, 6vw, 52px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -2px;
  margin-bottom: 15px;
}

.hero p:last-child {
  color: #594900;
  font-size: 15px;
}

/* CARDÁPIO */

.menu-section {
  padding-top: 45px;
  padding-bottom: 110px;
}

.section-heading {
  margin-bottom: 15px;
}

.eyebrow {
  color: var(--red);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
}

.section-heading h2 {
  font-size: 25px;
}

/* CATEGORIAS */

.categories {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding: 12px 0 16px;
  white-space: nowrap;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.categories::-webkit-scrollbar {
  display: none;
}

.category-button {
  flex-shrink: 0;
  border: 1px solid #eaeaea;
  background: var(--white);
  color: #555;
  padding: 10px 18px;
  border-radius: 10px;
  white-space: nowrap;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-button.active {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}

/* PRODUTOS */

.products-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.loading-message {
  color: var(--gray);
  padding: 25px 0;
  grid-column: 1 / -1;
}

.product-card {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  min-height: 130px;
  cursor: pointer;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;

  animation: productFadeIn 0.35s ease both;
}

.product-card:hover {
  transform: translateY(-2px);
}

.product-card:active {
  transform: scale(0.985);
}

.product-card img {
  width: 125px;
  min-width: 125px;
  height: 130px;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.product-card:hover img {
  transform: scale(1.01);
}

@keyframes productFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-card,
  .product-card img {
    animation: none;
    transition: none;
  }
}

.product-info {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-info h3 {
  font-size: 15px;
  margin-bottom: 7px;
}

.product-info p {
  color: var(--gray);
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 12px;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.product-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--red);
}

.add-product {
  border: none;
  background: var(--yellow);
  color: var(--dark);
  font-weight: 800;
  border-radius: 8px;
  padding: 10px 13px;
  cursor: pointer;
}

/* CARRINHO */

.cart-floating-button {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: min(450px, 90%);
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: 17px 20px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 5px 20px #0002;
}

.cart-count {
  background: var(--yellow);
  color: var(--dark);
  border-radius: 20px;
  padding: 5px 10px;
}

/* PAINEL DO CARRINHO */

.cart-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 420px;
  height: 100vh;
  height: 100dvh;
  background: var(--white);
  z-index: 9999;
  box-shadow: -5px 0 25px #0002;
  display: flex;
  flex-direction: column;
  transform: translateX(105%);
  transition: transform 0.3s ease;
}

.cart-panel.open {
  transform: translateX(0);
}

.cart-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px;
  border-bottom: 1px solid var(--border);
}

.cart-panel-header h2 {
  font-size: 21px;
}

.cart-panel-header button {
  background: #eeeeee;
  color: var(--dark);
  border: none;
  padding: 9px 14px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 600;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.cart-empty {
  text-align: center;
  padding: 50px 10px;
  color: var(--gray);
}

.cart-empty span {
  display: block;
  font-size: 13px;
  margin-top: 8px;
}

.cart-item {
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item-info h4 {
  font-size: 16px;
  margin-bottom: 5px;
}

.cart-item-info span {
  color: var(--red);
  font-weight: 700;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.cart-item-controls button {
  padding: 7px 12px;
  border: none;
  border-radius: 5px;
  background: #eeeeee;
  color: var(--dark);
  cursor: pointer;
}

.cart-item-controls .remove-cart-item {
  background: transparent;
  color: var(--red);
  padding: 5px;
}

.cart-panel-footer {
  padding: 22px;
  border-top: 1px solid var(--border);
}

.cart-panel-footer div {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-panel-footer strong {
  color: var(--red);
  font-size: 22px;
}

@media (max-width: 450px) {
  .cart-panel {
    max-width: 100%;
  }
}

/* CHECKOUT */

.checkout-panel {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--white);
  overflow-y: auto;
  padding: 25px 20px 40px;
  display: none;
}

.checkout-panel.open {
  display: block;
}

.checkout-header {
  width: min(600px, 100%);
  margin: 0 auto 25px;
}

.checkout-header > button {
  background: transparent;
  border: none;
  color: var(--red);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  margin-bottom: 20px;
}

.checkout-header h2 {
  font-size: 25px;
  margin-bottom: 8px;
}

.checkout-header p {
  color: var(--gray);
  font-size: 13px;
}

#checkoutForm {
  width: min(600px, 100%);
  margin: 0 auto;
}

.checkout-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 15px;
}

.checkout-section h3 {
  font-size: 16px;
  margin-bottom: 18px;
}

.checkout-section > label:not(.checkout-option) {
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 7px;
}

.checkout-section input:not([type="radio"]),
.checkout-section textarea {
  width: 100%;
  border: 1px solid #dddddd;
  border-radius: 7px;
  padding: 13px;
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 15px;
  outline: none;
}

.checkout-section input:focus,
.checkout-section textarea:focus {
  border-color: var(--yellow);
}

.checkout-section textarea {
  resize: vertical;
  margin-bottom: 0;
}

.checkout-option {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  margin-bottom: 15px;
  cursor: pointer;
}

.checkout-option:last-child {
  margin-bottom: 0;
}

.checkout-option input {
  accent-color: var(--red);
  width: 17px;
  height: 17px;
}

.checkout-summary {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 15px;
}

.checkout-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 14px;
  font-size: 14px;
}

.checkout-summary .checkout-total {
  border-top: 1px solid var(--border);
  padding-top: 15px;
  margin-bottom: 0;
  font-size: 17px;
  font-weight: 800;
}

.checkout-total strong {
  color: var(--red);
  font-size: 22px;
}

#confirmOrderButton {
  width: min(600px, 100%);
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 9px;
  padding: 17px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

#confirmOrderButton:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .checkout-panel {
    padding: 20px 15px 35px;
  }

  .checkout-section {
    padding: 17px;
  }
}

.checkout-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.checkout-item div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.checkout-item span {
  color: var(--gray);
  font-size: 12px;
}

.checkout-item > strong {
  color: var(--red);
  white-space: nowrap;
}

/* RESPONSIVIDADE */

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

@media (max-width: 480px) {
  .logo {
    font-size: 21px;
  }

  .store-status {
    font-size: 10px;
  }

  .hero {
    padding: 40px 0 50px;
  }

  .section-heading h2 {
    font-size: 21px;
  }
}
/* MODAL DE DETALHES DO PRODUTO */

.product-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
}

.product-modal.open {
  display: flex;
  animation: modalOverlayIn 0.25s ease forwards;
}

.product-modal-content {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--white);
  border-radius: 18px;
}

.close-product-modal {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: var(--white);
  color: var(--dark);
  font-size: 26px;
  cursor: pointer;
}

/* ANIMAÇÃO DE FECHAMENTO DO MODAL */
.product-modal.closing {
  animation: modalOverlayOut 0.2s ease forwards;
}

.product-modal.closing .product-modal-content {
  animation: modalContentOut 0.2s ease forwards;
}

@keyframes modalOverlayOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes modalContentOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
}

@keyframes modalOverlayIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalContentIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.product-modal.open .product-modal-content {
  animation: modalContentIn 0.3s ease forwards;
}

#detailProductImage {
  display: block;
  width: 100%;
  height: 260px;
  object-fit: cover;
  background: #f3f3f3;
}

.product-modal-info {
  padding: 24px;
}

.product-modal-info h2 {
  margin: 0 0 10px;
  color: var(--dark);
  font-size: 24px;
}

.product-modal-info p {
  margin: 0 0 18px;
  color: var(--gray);
  line-height: 1.5;
}

#detailProductPrice {
  display: block;
  color: var(--red);
  font-size: 25px;
}

.product-quantity {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 24px;
}

.product-quantity button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--dark);
  font-size: 22px;
  cursor: pointer;
}

.product-quantity span {
  min-width: 20px;
  text-align: center;
  font-size: 18px;
  font-weight: 700;
}

.product-modal-footer {
  position: sticky;
  bottom: 0;
  padding: 16px 24px;
  background: var(--white);
  border-top: 1px solid var(--border);
}

#addDetailProduct {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 10px;
  background: var(--red);
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

#addDetailProduct:hover {
  background: #a91012;
}

@media (max-width: 480px) {
  .product-modal {
    padding: 12px;
  }

  .product-modal-content {
    max-height: 94vh;
  }

  #detailProductImage {
    height: 220px;
  }
}

/* MODAL PIX */
.pix-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.65);
}

.pix-modal.active {
  display: flex;
}

.pix-modal-content {
  width: 100%;
  max-width: 420px;
  padding: 28px 24px;
  background: #fff;
  border-radius: 16px;
  text-align: center;
}

.pix-modal-content h2 {
  margin-bottom: 12px;
  color: #cc1517;
}

.pix-modal-content p {
  margin-bottom: 20px;
  color: #555;
  line-height: 1.5;
}

.pix-key-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  margin-bottom: 20px;
  background: #fff9df;
  border: 1px solid #ffcc03;
  border-radius: 12px;
}

.pix-key-box span {
  font-size: 13px;
  color: #666;
}

.pix-key-box strong {
  font-size: 19px;
  color: #222;
  letter-spacing: 0.5px;
}

.pix-modal-content button,
.pix-modal-content a {
  display: block;
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}

#copyPixButton {
  background: #ffcc03;
  color: #222;
}

#sendPixProofButton {
  margin-bottom: 10px;
  background: #cc1517;
  color: #fff;
}

#closePixModal {
  background: #eee;
  color: #333;
}

/* MODAL DE MENSAGENS */
.message-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.65);
}

.message-modal.active {
  display: flex;
}

.message-modal-content {
  width: 100%;
  max-width: 380px;
  padding: 26px 22px;
  background: #fff;
  border-radius: 16px;
  text-align: center;
}

.message-modal-content h2 {
  margin-bottom: 12px;
  color: #cc1517;
}

.message-modal-content p {
  margin-bottom: 24px;
  color: #555;
  line-height: 1.5;
}

.message-modal-actions {
  display: flex;
  gap: 10px;
}

.message-modal-actions button {
  flex: 1;
  padding: 13px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

#messageModalConfirm {
  background: #ffcc03;
  color: #222;
}

#messageModalCancel {
  background: #eee;
  color: #333;
}

/* BOTÃO FINALIZAR PEDIDO */
#checkoutButton {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 13px 18px;
  margin-top: 25px;
  border: none;
  border-radius: 8px;
  background: #cc1517;
  color: #ffffff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

#checkoutButton:hover {
  background: #a91012;
  box-shadow: 0 4px 12px rgba(204, 21, 23, 0.2);
}

#checkoutButton:active {
  transform: scale(0.98);
}

#checkoutButton:focus-visible {
  outline: 3px solid #ffcc03;
  outline-offset: 3px;
}

#checkoutButton:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* ========================================
   ACOMPANHAMENTO DO PEDIDO
======================================== */

.order-tracking-page {
  min-height: 100vh;
  padding: 40px 20px;
  background: #f7f7f7;
}

.order-tracking-container {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}

.tracking-header {
  text-align: center;
  margin-bottom: 30px;
}

.tracking-header h1 {
  color: #cc1517;
  font-size: 28px;
  margin-bottom: 8px;
}

.tracking-header p {
  color: #666;
  font-size: 14px;
}

.tracking-order,
.tracking-message {
  padding: 28px 24px;
  background: #ffffff;
  border: 1px solid #e9e9e9;
  border-radius: 14px;
}

.tracking-order h2,
.tracking-message h2 {
  margin: 0 0 12px;
  color: #222;
  font-size: 21px;
}

.tracking-current-status {
  display: inline-block;
  padding: 8px 13px;
  margin: 0 0 28px;
  border-radius: 20px;
  background: #fff4c2;
  color: #8a6500;
  font-size: 13px;
  font-weight: 700;
}

.tracking-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.tracking-step {
  position: relative;
  display: flex;
  gap: 15px;
  min-height: 88px;
}

.tracking-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 34px;
  left: 14px;
  width: 2px;
  height: calc(100% - 12px);
  background: #e5e5e5;
}

.tracking-step.completed:not(:last-child)::after {
  background: #cc1517;
}

.tracking-step-indicator {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  min-width: 30px;
  border: 2px solid #dedede;
  border-radius: 50%;
  background: #ffffff;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.tracking-step.completed .tracking-step-indicator {
  border-color: #cc1517;
  background: #cc1517;
}

.tracking-step.current .tracking-step-indicator {
  box-shadow: 0 0 0 5px rgba(204, 21, 23, 0.12);
}

.tracking-step-content {
  padding-bottom: 22px;
}

.tracking-step-content h3 {
  margin: 3px 0 5px;
  color: #999;
  font-size: 15px;
}

.tracking-step-content p {
  margin: 0;
  color: #999;
  font-size: 13px;
  line-height: 1.5;
}

.tracking-step.completed .tracking-step-content h3 {
  color: #333;
}

.tracking-step.current .tracking-step-content h3 {
  color: #cc1517;
  font-weight: 700;
}

.tracking-step.current .tracking-step-content p {
  color: #555;
}

.tracking-delivery-type {
  padding-top: 18px;
  margin: 8px 0 0;
  border-top: 1px solid #eee;
  color: #666;
  font-size: 13px;
}

.tracking-pending {
  border-top: 4px solid #ffcc03;
}

.tracking-pending p {
  color: #666;
  line-height: 1.6;
}

.tracking-cancelled {
  border-top: 4px solid #cc1517;
}

.tracking-cancelled p {
  color: #666;
  line-height: 1.6;
}

@media (max-width: 480px) {
  .order-tracking-page {
    padding: 28px 15px;
  }

  .tracking-order,
  .tracking-message {
    padding: 23px 18px;
  }

  .tracking-header h1 {
    font-size: 25px;
  }
}

.tracking-order-number {
  display: inline-block;
  margin: 0 0 18px;
  padding: 7px 12px;
  border-radius: 7px;
  background: #fff4c2;
  color: #8a6500;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
