/* Shared storefront modals — index + product.html */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9000;
  justify-content: center;
  align-items: center;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}

.modal.open {
  display: flex !important;
}

.modal-content {
  background: linear-gradient(180deg, rgba(18, 27, 48, 0.98), rgba(11, 17, 32, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 25px;
  width: min(94vw, 500px);
  max-height: min(85vh, 720px);
  overflow-y: auto;
  position: relative;
  z-index: 1;
  color: #fff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

.modal-content h2,
.modal-content h3,
.modal-content label,
.modal-content p {
  color: #fff;
}

.modal-content input,
.modal-content textarea,
.modal-content select {
  width: 100%;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  box-sizing: border-box;
}

.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 28px;
  cursor: pointer;
  color: #9aa7bd;
  line-height: 1;
}

.cart-total {
  font-size: 18px;
  font-weight: 900;
  margin: 14px 0;
  color: #fff;
}

.btn-order {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff2f68, #c41e4a);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

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

.cart-item-info h4 {
  margin: 0 0 4px;
  font-size: 14px;
  color: #fff;
}

.cart-item-price {
  font-size: 12px;
  color: #94a3b8;
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cart-item-qty button {
  min-width: 36px;
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
}

body.modal-locked {
  overflow: hidden !important;
  touch-action: none;
}

body.storefront-modal-open .bottom-nav {
  z-index: 50;
}

@media (max-width: 768px) {
  .modal {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  }
}

.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 25px;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  z-index: 12000;
  display: none;
}

.notification.success {
  background: #00cc66;
  display: block;
}

.notification.error {
  background: #e94560;
  display: block;
}
