body { font-family: -apple-system, "Malgun Gothic", sans-serif; background: #f7f7f8; margin: 0; color: #1f2937; }

.topbar { background: #fff; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between;
          box-shadow: 0 1px 4px rgba(0,0,0,.06); position: sticky; top: 0; z-index: 10; }
.brand { font-size: 17px; font-weight: 800; color: #111827; text-decoration: none; }
.lookupLink { font-size: 14px; color: #6b7280; text-decoration: none; font-weight: 600; }

.page { max-width: 480px; margin: 0 auto; padding: 20px 16px 60px; box-sizing: border-box; }

/* 상품 목록 */
.productGrid { display: grid; gap: 14px; }
.productCard { background: #fff; border-radius: 14px; padding: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.06);
               text-decoration: none; color: inherit; display: block; }
.productCard .thumb { width: 100%; aspect-ratio: 1; border-radius: 10px; background: linear-gradient(135deg,#e0e7ff,#fce7f3);
                       display: flex; align-items: center; justify-content: center; font-size: 40px; margin-bottom: 10px; }
.productCard .name { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.productCard .price { font-size: 18px; font-weight: 800; color: #16a34a; }
.productCard .soldout { color: #dc2626; font-weight: 700; font-size: 13px; }

/* 상품 상세 */
.detailThumb { width: 100%; aspect-ratio: 1; border-radius: 14px; background: linear-gradient(135deg,#e0e7ff,#fce7f3);
               display: flex; align-items: center; justify-content: center; font-size: 64px; margin-bottom: 16px; }
h1.pName { font-size: 20px; margin: 0 0 8px; }
.pPrice { font-size: 24px; font-weight: 800; color: #16a34a; margin-bottom: 12px; }
.pDesc { font-size: 14px; color: #4b5563; line-height: 1.6; margin-bottom: 20px; white-space: pre-wrap; }
.stockBadge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; margin-bottom: 16px; }
.stockBadge.ok { background: #dcfce7; color: #166534; }
.stockBadge.out { background: #fee2e2; color: #991b1b; }

.qtyRow { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.qtyRow button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid #d1d5db; background: #fff;
                  font-size: 18px; cursor: pointer; }
.qtyRow input { width: 60px; text-align: center; font-size: 16px; padding: 8px; border: 1px solid #d1d5db; border-radius: 10px; }

.bigBtn { display: block; width: 100%; padding: 16px; font-size: 17px; font-weight: 700; color: #fff;
          background: #16a34a; border: none; border-radius: 14px; cursor: pointer; box-sizing: border-box;
          text-align: center; text-decoration: none; }
.bigBtn:disabled { background: #9ca3af; cursor: default; }
.bigBtn.secondary { background: #6b7280; }

label { display: block; font-size: 13px; color: #555; margin: 14px 0 4px; font-weight: 600; }
input { width: 100%; box-sizing: border-box; padding: 12px 14px; font-size: 15px;
        border: 1px solid #ccc; border-radius: 10px; font-family: inherit; }

.summaryCard { background: #fff; border-radius: 14px; padding: 16px; margin: 16px 0; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.summaryRow { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.summaryRow.total { font-size: 17px; font-weight: 800; border-top: 1px solid #eee; padding-top: 10px; margin-top: 10px; }

.errorMsg { color: #dc2626; font-size: 14px; margin: 10px 0; white-space: pre-wrap; }
.okMsg { color: #16a34a; font-size: 14px; margin: 10px 0; }
.empty { color: #999; text-align: center; padding: 40px 0; }

/* 결제대기 */
.payStatus { text-align: center; padding: 30px 0; }
.payStatus .spinner { font-size: 40px; margin-bottom: 16px; }
.payStatus h2 { margin: 0 0 8px; }
.payStatus p { color: #666; font-size: 14px; }

/* 주문상태 진행바 */
.trackBar { display: flex; justify-content: space-between; margin: 20px 0; }
.trackStep { flex: 1; text-align: center; font-size: 12px; color: #9ca3af; position: relative; }
.trackStep.done { color: #16a34a; font-weight: 700; }
.trackStep .dot { width: 12px; height: 12px; border-radius: 50%; background: #e5e7eb; margin: 0 auto 6px; }
.trackStep.done .dot { background: #16a34a; }
