body{
font-family:Poppins, sans-serif;
margin:0;
background:#fff;
color:#222;
}

header{
display:flex;
justify-content:space-between;
padding:15px 20px;
background:#fff;
box-shadow:0 2px 5px rgba(0,0,0,0.05);
position:sticky;
top:0;
z-index: 1000;
}

.logo{
font-weight:600;
color:#e8a6b8;
}

.categories{
display:flex;
gap:10px;
padding:10px;
overflow:auto;
position:sticky;
top:calc(15px + 40px); /* ajusta conforme altura do header */
margin-top: -4px;
background:#fff;
z-index: 999;
box-shadow:0 2px 5px rgba(0,0,0,0.05);
}

.categories button{
border:none;
padding:8px 14px;
border-radius:20px;
background:#f8d7e0;
cursor:pointer;
}

.categories button{
border:none;
padding:8px 14px;
border-radius:20px;
background:#f8d7e0;
cursor:pointer;
}

.products-section{
  padding: 20px;
}

.products-section h2{
  text-align: left;
  margin-bottom: 20px;
  color: black;
}

.products{
display:grid;
grid-template-columns: repeat(2, 1fr);
gap:15px;
padding:20px;
}

.card{
display:flex;
align-items:flex-start;
gap:12px;
padding:10px;
box-shadow:0 0 10px rgba(0,0,0,0.05);
background: white;
border: 1px solid #ddd;
border-radius:12px;
}

.card img{
width: 120px;
height: 120px;
object-fit: cover;
border-radius:10px;
flex-shrink:0;
}

.card-content{
flex:1;
display:flex;
flex-direction:column;
justify-content:space-between;
}

.card h3{
font-weight: bold;
margin:0;
}

.card p{
color: green;
}

.item-desc{
font-size: 13px;
color: #888;
margin-top: 4px;
display: block;
}

.card button{
width:100%;
margin-top:8px;
background:#e8a6b8;
border:none;
padding:8px;
color:white;
border-radius:8px;
cursor:pointer;
transition: all 0.3s ease;
}

.card button:hover{
background: #d68899;
transform: scale(1.05);
box-shadow: 0 4px 12px rgba(232, 166, 184, 0.4);
}

.card button:active{
transform: scale(0.98);
background: #d68899;
}

.cart{
position:fixed;
right:-350px;
top:0;
width:320px;
height:100%;
background:white;
box-shadow:-5px 0 20px rgba(0,0,0,0.1);
padding:20px;
transition:0.3s;
overflow:auto;
z-index:1102;
padding-top:70px;
}

.cart h2 {
  margin: 0;
}

#cart-items {
  margin-bottom: 20px;
}

#cart-items p {
  background: #f5f5f5;
  padding: 12px;
  margin: 8px 0;
  border-left: 4px solid #e8a6b8;
  border-radius: 4px;
  font-size: 14px;
}

.cart.open{
right:0;
}

.finish{
width:100%;
padding:12px;
background:#e8a6b8;
border:none;
color:white;
margin-top:15px;
border-radius:10px;
cursor:pointer;
font-size:16px;
font-weight:bold;
position:relative;
z-index:10;
}

button {
  touch-action: manipulation;
}
    height: auto;
    max-height: 240px;
  }

  .card-content {
    width: 100%;
  }
}

.whatsapp{
position:fixed;
bottom:20px;
right:20px;
background:#25D366;
padding:8px;
border-radius:50%;
text-decoration:none;
box-shadow:0 3px 10px rgba(0,0,0,0.2);
width:44px;
height:44px;
display:flex;
align-items:center;
justify-content:center;
z-index:1101;
}

.whatsapp-icon{
width:32px;
height:32px;
}

.site-footer{
background:#f8f4f1;
padding:18px 20px;
text-align:left;
color:#333;
font-size:14px;
line-height:1.5;
border-top:1px solid #ddd;
}

.site-footer p{
margin:5px 0;
}

.site-footer strong{
font-size:16px;
}

@media (max-width: 768px) {
  .site-footer{
    padding:16px;
    font-size:13px;
  }
}

.modal {
  display: none;
  position: fixed;
  z-index: 1200;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 500px;
  border-radius: 10px;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: black;
}

#customization-form {
  margin: 20px 0;
}

#customization-form label {
  display: block;
  margin: 10px 0 5px;
}

#customization-form select, #customization-form input[type="radio"] {
  margin-right: 10px;
}

#price-summary {
  font-weight: bold;
  margin: 20px 0;
}

#confirm-customization {
  background: #e8a6b8;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
}

.cart-page {
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
}

.back-btn {
  text-decoration: none;
  color: #e8a6b8;
  font-weight: bold;
  font-size: 16px;
}

.back-btn:hover {
  color: #d48a9e;
}

/* ===== MEDIA QUERIES PARA RESPONSIVIDADE ===== */

/* Tablets e dispositivos móveis grandes */
@media (max-width: 768px) {
  .products {
    grid-template-columns: 1fr;
    padding: 10px;
  }

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

  .card img {
    width: 100%;
    height: auto;
    max-height: 240px;
  }

  .card-content {
    width: 100%;
  }

  .modal-content {
    width: 90%;
    margin: 10% auto;
    padding: 15px;
  }

  .site-footer{
    padding:16px;
    font-size:13px;
  }
}

/* iPhones e dispositivos móveis pequenos */
@media (max-width: 480px) {
  body {
    font-size: 14px;
    line-height: 1.4;
  }

  header {
    padding: 12px 15px;
  }

  .logo {
    font-size: 18px;
  }

  .cart-btn {
    font-size: 16px;
    padding: 8px 12px;
  }

  .categories {
    padding: 8px;
    gap: 8px;
    top: calc(12px + 35px);
  }

  .categories button {
    padding: 6px 12px;
    font-size: 13px;
    white-space: nowrap;
  }

  .products-section {
    padding: 15px 10px;
  }

  .products-section h2 {
    font-size: 18px;
    margin-bottom: 15px;
  }

  .products {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 10px 5px;
  }

  .card {
    padding: 12px;
    gap: 10px;
  }

  .card img {
    width: 100%;
    height: 180px;
    border-radius: 8px;
  }

  .card h3 {
    font-size: 16px;
  }

  .card p {
    font-size: 15px;
  }

  .item-desc {
    font-size: 12px;
  }

  .card button {
    padding: 10px;
    font-size: 14px;
    margin-top: 10px;
  }

  /* Modal específico para iPhones */
  .modal-content {
    width: 95%;
    margin: 5% auto;
    padding: 20px 15px;
    max-height: 90vh;
    overflow-y: auto;
  }

  .modal-content h2 {
    font-size: 18px;
    margin-bottom: 15px;
  }

  .close {
    font-size: 24px;
    padding: 5px;
  }

  /* Formulários otimizados para toque */
  input[type="text"],
  input[type="tel"],
  input[type="date"],
  input[type="time"],
  select,
  textarea {
    font-size: 16px; /* Previne zoom no iOS */
    padding: 12px 10px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    width: 100%;
    box-sizing: border-box;
  }

  textarea {
    height: 80px;
    resize: vertical;
  }

  /* Botões maiores para toque */
  button {
    min-height: 44px; /* Tamanho mínimo recomendado para toque */
    font-size: 16px;
    padding: 12px 16px;
  }

  .finish {
    font-size: 16px;
    padding: 15px;
    margin: 20px 0;
  }

  /* Labels e espaçamento */
  label {
    font-size: 14px;
    margin-bottom: 6px;
    display: block;
  }

  /* Radio buttons mais fáceis de tocar */
  input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
  }

  /* Cupom section */
  .cart-page > div:first-of-type {
    padding: 12px;
    margin: 15px 0;
  }

  /* Total do pedido */
  #order-total {
    font-size: 20px;
  }
}

/* iPhones específicos (375px - 430px) */
@media (max-width: 430px) {
  .modal-content {
    width: 98%;
    margin: 2% auto;
    padding: 15px 12px;
  }

  .products-section {
    padding: 10px 5px;
  }

  .card {
    padding: 10px;
  }

  .card img {
    height: 160px;
  }

  /* Ajustes específicos para modal de pedido */
  #order-modal .modal-content {
    width: 95%;
    max-width: 400px;
    height: auto;
    max-height: 85vh;
    margin: 10% auto;
    border-radius: 10px;
    overflow-y: auto;
    position: relative;
  }

  #order-modal .close {
    position: absolute;
    top: 10px;
    right: 15px;
    z-index: 1001;
  }

  #order-modal h2 {
    margin-top: 40px;
    text-align: center;
  }
}

/* Previne zoom no iOS para inputs */
@media screen and (max-width: 767px) {
  input[type="text"],
  input[type="tel"],
  input[type="email"],
  input[type="password"],
  input[type="date"],
  input[type="time"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* Estilos específicos para dispositivos móveis detectados via JS */
.mobile-device .modal-content {
  -webkit-overflow-scrolling: touch;
  overflow-scrolling: touch;
}

.mobile-device button {
  -webkit-tap-highlight-color: rgba(232, 166, 184, 0.3);
  tap-highlight-color: rgba(232, 166, 184, 0.3);
}

.mobile-device input[type="radio"],
.mobile-device input[type="checkbox"] {
  transform: scale(1.2);
  margin-right: 10px;
}

/* Melhora experiência de toque */
@media (hover: none) and (pointer: coarse) {
  .card button:hover {
    transform: none;
    background: #e8a6b8;
  }

  .card button:active {
    background: #d68899;
    transform: scale(0.98);
  }
}
