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

html, body {
  height: 100%;
}

body {
  font-family: 'Signika', sans-serif;
  background: #F8F9F9;
  color: #363C3F;
  -webkit-text-size-adjust: 100%;
}

/* Header */
.store-header {
  background: #3B8D9A;
  color: #fff;
  text-align: center;
  padding: 28px 20px 22px;
}

.store-header h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.tagline {
  font-size: 15px;
  font-weight: 400;
  opacity: 0.85;
  margin-top: 4px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 28px 24px;
  max-width: 1024px;
  margin: 0 auto;
}

/* Product Tile */
.product-tile {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.product-tile:active {
  transform: scale(0.97);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.product-image {
  background: linear-gradient(135deg, #FFBC8D 0%, #3B8D9A 100%);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  padding: 14px 16px 16px;
  text-align: center;
}

.product-info h2 {
  font-size: 16px;
  font-weight: 600;
  color: #363C3F;
  margin-bottom: 6px;
}

.price {
  font-size: 18px;
  font-weight: 700;
  color: #3B8D9A;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 100;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Modal */
.modal {
  background: #fff;
  border-radius: 20px;
  padding: 36px 40px;
  text-align: center;
  position: relative;
  width: 340px;
  max-width: 90vw;
  transform: scale(0.9);
  transition: transform 0.2s ease;
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.08);
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  line-height: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-title {
  font-size: 22px;
  font-weight: 700;
  color: #363C3F;
  margin-bottom: 20px;
}

.modal-qr {
  width: 200px;
  height: 200px;
  margin: 0 auto 12px;
  border-radius: 12px;
  display: block;
  background: #F0F0F0;
}

.qr-hint {
  font-size: 13px;
  color: #999;
  margin-bottom: 16px;
}

.modal-price {
  font-size: 24px;
  font-weight: 700;
  color: #3B8D9A;
}

/* iPad portrait / small tablet: 2 columns */
@media (max-width: 700px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 20px 16px;
  }

  .store-header {
    padding: 22px 16px 18px;
  }

  .store-header h1 {
    font-size: 24px;
  }

  .product-info h2 {
    font-size: 14px;
  }

  .price {
    font-size: 16px;
  }
}

/* Phone: 1 column */
@media (max-width: 600px) {
  .product-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
  }

  .product-tile {
    display: grid;
    grid-template-columns: 120px 1fr;
    border-radius: 12px;
  }

  .product-image {
    aspect-ratio: 1;
    border-radius: 12px 0 0 12px;
  }

  .product-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    padding: 12px 16px;
  }

  .store-header h1 {
    font-size: 22px;
  }

  .tagline {
    font-size: 13px;
  }

  .modal {
    padding: 28px 24px;
    border-radius: 16px;
  }

  .modal-qr {
    width: 180px;
    height: 180px;
  }
}
